/* beer-lab.org home (ES + EN). Layout after busara.global, Tec colours. Bump ?v= in both pages when this changes (Cloudflare caches 4 h). */
:root {
  --blue: #0039a6; --blue-dark: #002d82; --blue-mid: #3d6fd6; --blue-pale: #dbe6fb;
  --navy: #0b1f4d; --night: #07142f; --ink: #1d2330; --muted: #5b6475; --soft: #f3f6fb; --line: #e3e7ef;
  color-scheme: only light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 116px; }
body { margin: 0; font-family: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: #fff; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--blue); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; margin: 0; }

/* header */
.site { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); }
.site .wrap { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; column-gap: 24px; padding-top: 8px; }
.logos { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 16px; text-decoration: none; }
.logos > * { flex: none; }
.logos .tec { height: 38px; }
.logos .bar { width: 1px; height: 40px; background: var(--line); }
.logos .beer { height: 52px; }
.menu { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 18px; justify-content: space-between; min-width: 0; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.menu::-webkit-scrollbar { display: none; }
.menu a { flex: none; white-space: nowrap; color: var(--ink); text-decoration: none; font-size: .75rem; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; padding: 8px 0; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.lang { grid-column: 2; grid-row: 1; justify-self: end; font-size: .75rem; font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
.lang a, .lang span { padding: 5px 8px; border-radius: 4px; text-decoration: none; }
.lang a { color: var(--blue); }
.lang a:hover { background: var(--soft); }
.lang span { background: var(--blue); color: #fff; }
@media (max-width: 1100px) {
  /* Keep both header rows; compact links and allow horizontal scrolling. */
  .menu { margin: 0 -16px; padding: 0 12px; gap: 10px; }
  .menu a { white-space: nowrap; font-size: .68rem; letter-spacing: .04em; padding: 11px 0 9px; }
}
@media (max-width: 385px) {
  /* narrowest phones: the row scrolls; fade the right edge so it reads as "more" */
  .menu { justify-content: flex-start; -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
}
@media (max-width: 480px) {
  .site .wrap { column-gap: 12px; }
  .logos { gap: 10px; }
  .logos .tec { height: 26px; }
  .logos .bar { height: 30px; }
  .logos .beer { height: 36px; }
}

/* hero */
.hero { position: relative; color: #fff; background: var(--navy) url("/img/laboratorio-aula.jpg") center 60% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,20,47,.94) 0%, rgba(0,45,130,.82) 45%, rgba(0,57,166,.35) 100%); }
.hero .wrap { position: relative; padding-top: clamp(64px, 11vw, 140px); padding-bottom: clamp(64px, 11vw, 140px); }
.hero .labname { display: flex; align-items: center; gap: 26px; margin: 0 0 30px; font-weight: 400; line-height: 1.3; }
.labname .beerlogo { display: block; height: clamp(76px, 10vw, 120px); width: auto; flex: none; }
.labname .short { font-size: clamp(2rem, 4.2vw, 2.8rem); font-weight: 800; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.labname .full { border-left: 2px solid rgba(255,255,255,.55); padding-left: 24px; font-size: clamp(1rem, 1.7vw, 1.2rem); max-width: 30ch; }
.labname .name { display: block; font-weight: 700; }
.labname .inst { display: block; font-weight: 300; color: #cfe0ff; }
@media (max-width: 560px) { .hero .labname { flex-direction: column; align-items: flex-start; gap: 12px; } }
.hero .headline { font-weight: 200; font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.08; margin: 0 0 22px; max-width: 14ch; letter-spacing: -.01em; }
.hero .headline strong { font-weight: 800; }
.hero .lead { font-weight: 300; font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 560px; margin: 0 0 34px; color: #e6edfb; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: .95rem; padding: 13px 24px; border-radius: 4px; margin: 0 10px 10px 0; transition: background .15s, color .15s; }
.btn.solid { background: #fff; color: var(--blue); }
.btn.solid:hover { background: var(--blue-pale); }
.btn.ghost { color: #fff; border: 1px solid rgba(255,255,255,.7); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }

/* section heads */
.block { padding: 72px 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.head .eyebrow { color: var(--ink); }
.head h2 { font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 8px 0 0; color: var(--blue); line-height: 1.2; }
.more { font-size: .8rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(11,31,77,.12); }
.card .pic { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; background: var(--soft); }
.card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card .who { color: var(--blue); font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 8px; flex: 0 0 auto; }
.card h3 { margin: 0 0 10px; font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.card p { margin: 0 0 20px; flex: 1; color: var(--muted); font-size: .95rem; }
.card .links a { display: inline-block; font-weight: 700; font-size: .9rem; text-decoration: none; margin: 0 16px 6px 0; }
.card .links a:hover { text-decoration: underline; }
.card .links a::after { content: " →"; }
/* "Novedades" (working papers + news, rendered by home-app/research.py): at most 3 across, never stretched */
.news .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.news .card .pic { aspect-ratio: 16 / 9; }

/* blue statement */
.statement { background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.statement::after { content: ""; position: absolute; right: -40px; top: -40px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(255,255,255,.18) 2px, transparent 2.5px) 0 0 / 22px 22px; pointer-events: none; }
.statement .wrap { position: relative; z-index: 1; }
.statement .eyebrow { color: #cfe0ff; }
.statement .big { font-weight: 200; font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.25; max-width: 22ch; margin: 14px 0 48px; }
.statement .big strong { font-weight: 800; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 36px; }
.pillar { border-top: 1px solid rgba(255,255,255,.35); padding-top: 22px; }
.pillar svg { width: 44px; height: 44px; margin-bottom: 12px; }
.pillar h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 700; }
.pillar p { margin: 0; font-weight: 300; color: #e6edfb; }

/* photo + text split */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split .photo { position: relative; }
.split .photo img { display: block; width: 100%; border-radius: 6px; aspect-ratio: 4 / 3; object-fit: cover; object-position: 60% 50%; }
.split .photo::before { content: ""; position: absolute; left: -16px; bottom: -16px; width: 55%; height: 55%; background: var(--blue); border-radius: 6px; z-index: -1; }
.split h2 { font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--blue); margin: 10px 0 16px; line-height: 1.2; }
.split p { color: var(--muted); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 30px; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-pale); color: var(--blue); font-weight: 800; display: grid; place-items: center; }
.steps strong { display: block; color: var(--ink); }
.steps span { color: var(--muted); font-size: .95rem; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split .photo::before { left: -8px; bottom: -8px; }
}

/* footer */
footer { background: var(--night); color: #b9c3d8; font-size: .92rem; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
footer .flogos { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
footer .flogos img { filter: brightness(0) invert(1); }
footer .flogos .tec { height: 30px; }
footer .flogos .beer { height: 44px; }
footer h4 { color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; margin: 6px 0 14px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; }
footer a { color: #fff; text-decoration: none; font-weight: 300; }
footer a:hover { text-decoration: underline; }
footer address { font-style: normal; }
footer .fnet { margin: 14px 0 0; }
footer .legal { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 16px; text-align: center; font-size: .8rem; color: #8894ad; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr; gap: 28px; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card, .card:hover { transition: none; transform: none; } }
