/* IS(t)MOS web v2 | style lock: .tastemaker/style-lock.md | manual de identidad v1.1 */

:root {
  --atardecer: #FF2E93;
  --istmo: #FFD60A;
  --amanecer: #19C3D6;
  --crepusculo: #FF8A3D;
  --tinta: #14100F;
  --papel: #F6EFE0;
  --noche: #10292D;
  --teal: #0B6F7C;
  --ambar: #F2B900;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 72px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.53;
  font-weight: 400;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 900; font-variation-settings: "opsz" 144, "SOFT" 0; letter-spacing: -0.01em; line-height: 1.08; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--papel); color: var(--tinta);
  font-family: var(--mono); font-size: 13px; padding: 10px 14px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--focus, var(--tinta)); outline-offset: 3px; }

/* ===== Surfaces ===== */
.sec { padding-block: 112px; background: var(--bg); color: var(--fg); }
.sec--connective { padding-block: 64px; }
.sec--hero { padding-block: 96px 128px; }

.sec--papel, .surface-papel {
  --bg: var(--papel); --fg: var(--tinta); --muted: rgba(20, 16, 15, 0.74); --line: rgba(20, 16, 15, 0.16);
  --label: var(--teal); --focus: var(--tinta);
}
.sec--noche, .surface-noche {
  --bg: var(--noche); --fg: var(--papel); --muted: rgba(246, 239, 224, 0.8); --line: rgba(246, 239, 224, 0.22);
  --label: var(--istmo); --focus: var(--istmo);
}

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* ===== Type ===== */
.label {
  font-family: var(--mono); font-size: 0.75rem; line-height: 1.4; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--label, var(--teal));
}
.label .t-lower { text-transform: lowercase; } /* keeps the logotype's lowercase t (IS(t)MOS) inside an uppercase label */
.note { font-family: var(--mono); font-size: 0.8125rem; line-height: 1.54; color: var(--muted); }

.h1 { font-size: clamp(2.4rem, 4.6vw, 4.25rem); line-height: 1.04; letter-spacing: -0.015em; }
.h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.06; letter-spacing: -0.012em; }
.h3 { font-size: 1.75rem; font-weight: 700; line-height: 1.21; letter-spacing: 0; }
.h4 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; }

.lead { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.55; max-width: 34em; }
.prose { max-width: 38em; }
.prose p { color: var(--fg); }
.muted { color: var(--muted); }

.sec-head { display: grid; gap: 20px; max-width: 46rem; margin-bottom: 56px; }
.sec-head .label { display: block; }
.sec-head--wide, .sec-head--wide .lead { max-width: none; } /* spans the full content width */

/* ===== Buttons & links ===== */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  text-decoration: none; padding: 16px 24px; border: 2px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.btn::after { content: "\2192"; transition: transform 200ms var(--ease-out); }
.surface-noche .btn, .sec--noche .btn { background: var(--papel); color: var(--tinta); }
.surface-papel .btn, .sec--papel .btn { background: var(--tinta); color: var(--papel); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover::after { transform: translateX(4px); }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  text-decoration: none; color: var(--fg); border-bottom: 2px solid currentColor; padding-bottom: 4px;
}
.link-arrow::after { content: "\2192"; transition: transform 200ms var(--ease-out); }
.sec--noche .link-arrow { color: var(--istmo); }
.sec--papel .link-arrow { color: var(--tinta); }
@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover::after { transform: translateX(4px); }
}

.tlink { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sec--noche .tlink { text-decoration-color: var(--istmo); }
.sec--papel .tlink { text-decoration-color: var(--teal); }

/* ===== Header ===== */
.header { position: sticky; top: 0; z-index: 50; background: var(--noche); color: var(--papel); --focus: var(--istmo); border-bottom: 1px solid rgba(246, 239, 224, 0.14); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.header__logo { display: block; flex: none; }
.header__logo img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; color: rgba(246, 239, 224, 0.82); padding: 8px 0; border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav a[aria-current="page"] { color: var(--papel); border-bottom-color: var(--istmo); }
.nav a.nav__cta { color: var(--istmo); border: 2px solid var(--istmo); padding: 9px 16px; }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--papel); border-bottom-color: var(--amanecer); }
  .nav a.nav__cta:hover { border-bottom-color: var(--istmo); }
}
.nav-toggle { display: none; background: none; border: 2px solid rgba(246, 239, 224, 0.5); padding: 10px 14px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px;
    background: var(--noche); border-bottom: 1px solid rgba(246, 239, 224, 0.14);
  }
  .nav a { padding: 16px 0; border-bottom: 1px solid rgba(246, 239, 224, 0.14); }
  .nav a.nav__cta { margin-top: 16px; text-align: center; }
  .header.is-open .nav { display: flex; }
}

/* ===== Home hero: original video full-bleed, centered title. No scrim so the video keeps its own color;
   a Noche halo behind the letters carries the contrast (measured on the raw video: Papel alone is 2.1:1 to 3.8:1). ===== */
.hero { position: relative; display: grid; place-items: center; min-height: max(560px, calc(100svh - var(--header-h))); overflow: hidden; background: var(--noche); }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__center { position: relative; z-index: 1; width: 100%; max-width: 1120px; padding: 96px var(--gutter); text-align: center; color: var(--papel); }
.hero__title { font-size: clamp(2.25rem, 4.7vw, 4.75rem); line-height: 1.04; letter-spacing: -0.015em; color: var(--papel); text-wrap: balance; text-shadow: 0 0 2px rgba(16, 41, 45, 0.85), 0 2px 16px rgba(16, 41, 45, 0.7), 0 0 44px rgba(16, 41, 45, 0.55); }
.hero__rule { width: 200px; margin: 32px auto 28px; border: 0; border-top: 1px solid rgba(246, 239, 224, 0.9); }
.hero__sub { margin: 0; font-family: var(--mono); font-size: clamp(0.8rem, 1.5vw, 1.05rem); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--papel); text-shadow: 0 0 2px rgba(16, 41, 45, 0.85), 0 2px 16px rgba(16, 41, 45, 0.7), 0 0 44px rgba(16, 41, 45, 0.55); }
.hero__hl { color: var(--istmo); }
.hero__pause {
  position: absolute; right: var(--gutter); bottom: clamp(20px, 4vw, 40px); z-index: 2;
  width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer;
  background: var(--noche); color: var(--papel); border: 2px solid var(--papel); --focus: var(--istmo);
  transition: transform 160ms var(--ease-out);
}
.hero__pause svg { width: 16px; height: 16px; }
.hero__pause .i-play { display: none; }
.hero__pause[data-paused="true"] .i-pause { display: none; }
.hero__pause[data-paused="true"] .i-play { display: block; }
.hero__pause:active { transform: scale(0.94); }
.hero__scroll { position: absolute; left: 50%; bottom: 28px; z-index: 1; display: grid; justify-items: center; gap: 8px; margin-left: -20px; width: 40px; color: var(--papel); text-decoration: none; text-shadow: 0 0 2px rgba(16, 41, 45, 0.85), 0 2px 16px rgba(16, 41, 45, 0.7), 0 0 44px rgba(16, 41, 45, 0.55); --focus: var(--istmo); }
.hero__scroll .label { color: var(--papel); font-size: 0.6875rem; }
.hero__scroll i { position: relative; display: block; width: 1px; height: 36px; overflow: hidden; background: rgba(246, 239, 224, 0.4); }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--papel); transform: translateY(-100%); animation: scrollLine 2s cubic-bezier(0.645, 0.045, 0.355, 1) infinite; }
@keyframes scrollLine { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

@media (max-width: 899px) {
  .sec { padding-block: 72px; }
  .hero { min-height: 78svh; }
  .hero__center { padding: 72px var(--gutter); }
  .hero__scroll { display: none; }
  .hero__pause { right: 16px; bottom: 16px; }
}

/* ===== Intro (after the video): statement + symbol ===== */
.intro__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.intro__eyebrow { display: block; margin-bottom: 28px; color: var(--istmo); }
.intro__title { color: var(--papel); margin-bottom: 32px; max-width: 14em; }
.intro__hl { color: var(--istmo); }
.intro__sub { max-width: 32em; color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); margin-bottom: 40px; }
.intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; }
.intro__fig { margin: 0; }
.intro__fig svg { width: 100%; height: auto; overflow: visible; }
/* Symbol as three links: hover or focus a circle to reveal its dotted line and name (same type as .link-arrow). */
.sym { position: relative; width: 100%; max-width: 560px; margin-inline: auto; animation: sym-drift 13s ease-in-out infinite; }
/* Gentle continuous float + rotation in the space the symbol has. One keyframes with both in the same transform
   (rotar-eje and flotar-redondo below can't run together on one element: two separate animations targeting
   transform on the same element don't combine, the later one just wins). Applied to .sym, not the svg alone, so
   the LATE/ECO/NIDO labels (separate elements, positioned by percentage) drift and turn as one piece with the
   circles they point to. Up/down and rightward travel more pronounced than the left/rotation swing, per the
   client's request; duration lengthened alongside it so the bigger travel still reads as soft, not brisk. */
@keyframes sym-drift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(13px, -15px) rotate(2.4deg); }
  50%  { transform: translate(-5px, 13px) rotate(-2deg); }
  75%  { transform: translate(-9px, -9px) rotate(1.4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.sym__node { cursor: pointer; }
.sym__node:focus-visible { outline: none; }
.sym__node:focus-visible circle { stroke: var(--papel); stroke-width: 0.5; }
.sym__line { fill: none; stroke-width: 2px; stroke-dasharray: 1 6; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 180ms var(--ease-out); }
.sym__line--late { stroke: var(--atardecer); }
.sym__line--eco { stroke: var(--istmo); }
.sym__line--nido { stroke: var(--amanecer); }
.sym__label {
  position: absolute; text-decoration: none; white-space: nowrap;
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  opacity: 0; transition: opacity 180ms var(--ease-out); --focus: var(--istmo);
}
/* positions map straight onto the SVG viewBox (-3 -6 41 45) */
.sym__label--late { left: 29.3%; top: 92.2%; transform: translate(-50%, 0); color: var(--atardecer); }
.sym__label--eco { left: 73.9%; top: 71.1%; transform: translate(10px, -50%); color: var(--istmo); }
.sym__label--nido { left: 63.4%; top: 9.8%; transform: translate(-50%, -100%); color: var(--amanecer); }
.sym:has(.sym__node--late:hover, .sym__node--late:focus-visible, .sym__label--late:hover) .sym__line--late,
.sym:has(.sym__node--late:hover, .sym__node--late:focus-visible, .sym__label--late:hover) .sym__label--late,
.sym:has(.sym__node--eco:hover, .sym__node--eco:focus-visible, .sym__label--eco:hover) .sym__line--eco,
.sym:has(.sym__node--eco:hover, .sym__node--eco:focus-visible, .sym__label--eco:hover) .sym__label--eco,
.sym:has(.sym__node--nido:hover, .sym__node--nido:focus-visible, .sym__label--nido:hover) .sym__line--nido,
.sym:has(.sym__node--nido:hover, .sym__node--nido:focus-visible, .sym__label--nido:hover) .sym__label--nido { opacity: 1; }
/* touch screens and browsers without :has() have no hover, so the names stay visible */
@media (hover: none) { .sym__line, .sym__label { opacity: 1; } }
@supports not selector(:has(*)) { .sym__line, .sym__label { opacity: 1; } }

@media (max-width: 899px) {
  .sec--hero { padding-block: 56px 72px; }
  .intro__grid { grid-template-columns: 1fr; }
  .intro__fig { order: -1; }
  .intro__fig svg { max-width: 300px; }
}

/* ===== Concept ===== */
.concept__grid {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(40px, 7vw, 112px); row-gap: 28px; align-items: start;
  grid-template-areas: "label label" "title text" "word phrase" "more more";
}
.name__q { grid-area: label; margin: 0; font-variation-settings: normal; }
/* headline and paragraph share one top line; the label sits above both */
.name__title { grid-area: title; margin: 0; max-width: 14em; color: var(--tinta); }
.name__hl { color: var(--atardecer); } /* magenta on Papel is 3.0:1: the manual allows it for large headlines only */
.name__text { grid-area: text; padding-top: 0.35rem; }
.name__text .lead { margin: 0; }
/* is(t)mos: the official logotype pieces in one SVG, vertically centered on the three-spheres list beside it */
.name__more { grid-area: more; justify-self: start; margin-top: 8px; }
.sec--papel .link-arrow.name__more { color: var(--atardecer); } /* Atardecer on Papel is 3.02:1: fine for large type, low for this small label */
.words { grid-area: word; align-self: center; margin-top: clamp(16px, 3vw, 40px); }
.words svg { display: block; width: 100%; height: auto; overflow: visible; }
/* Phrases: shown one at a time when a sphere or a color of the (t) is clicked. Without JS all three are listed. */
.phrase { grid-area: phrase; align-self: center; margin-top: clamp(16px, 3vw, 40px); min-height: 9.5rem; display: grid; align-content: center; }
.phrase__hint { display: none; margin: 0; }
.js-pick .phrase__hint { display: block; }
.js-pick .phrase.has-pick .phrase__hint { display: none; }
.phrase__item { display: grid; grid-template-columns: 24px 1fr; gap: 20px; align-items: start; padding-block: 18px; border-top: 1px solid var(--line); }
.phrase__item p { margin: 0; font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; }
.js-pick .phrase__item { display: none; padding: 0; border-top: 0; }
.js-pick .phrase__item.is-on { display: grid; animation: phraseIn 240ms var(--ease-out); }
@keyframes phraseIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* pick targets: only the set that is visible can be clicked (the dots while the symbol is out, the (t) once formed) */
.words [data-pick] { pointer-events: none; cursor: pointer; }
.words[data-mode="word"] [data-g][data-pick], .words[data-mode="symbol"] [data-d] [data-pick] { pointer-events: auto; }
.words [data-pick]:focus-visible { outline: 2px solid var(--tinta); outline-offset: 4px; }
.orb { display: block; width: 20px; height: 20px; margin-top: 0.3em; border-radius: 50%; }
.orb--atardecer { background: var(--atardecer); }
.orb--istmo { background: var(--istmo); }
.orb--amanecer { background: var(--amanecer); }
@media (max-width: 899px) {
  .concept__grid { grid-template-columns: 1fr; grid-template-areas: "label" "title" "word" "phrase" "more" "text"; row-gap: 24px; }
  .name__text { padding-top: 0; }
  .words, .phrase { margin-top: 0; }
  .phrase { min-height: 0; }
}

/* ===== About ===== */
.sobre__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: center; } /* same ratio as .intro__grid, and the figure reuses .intro__fig/.sym directly, so the floating symbol here matches the intro one's size by construction, not a copied max-width */
.sobre__hl { color: var(--istmo); } /* Istmo yellow on Noche: 10.80:1, text-safe */
.sobre__more { display: inline-flex; margin-top: 40px; } /* color comes from .sec--noche .link-arrow (Istmo yellow), same as .link-arrow typography everywhere else */
.sobre__grid > .intro__fig { order: -1; } /* symbol on the left, text on the right */
@media (max-width: 899px) { .sobre__grid { grid-template-columns: 1fr; } }

/* ===== Labs orbit ===== */
.labs__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; margin-bottom: 72px; }
.labs__top .sec-head { margin-bottom: 0; }
.labs__hl { color: var(--amanecer); } /* Amanecer cyan, chosen by the client over yellow for this headline on Papel */
.labs__more { justify-self: start; margin-top: 4px; }
.sec--papel .link-arrow.labs__more { color: var(--amanecer); }
@media (min-width: 900px) { .labs__more { white-space: nowrap; } }
.orbit { position: relative; width: min(480px, 44vw); display: grid; justify-items: center; gap: 4px; }
.orbit__svg { display: block; width: 100%; height: auto; overflow: visible; }
.orbit__sphere { cursor: pointer; }
.orbit__ball { transform-box: fill-box; transform-origin: center; transition: transform 260ms var(--ease-out); }
.orbit__sphere.is-active .orbit__ball { transform: scale(1.12); }
.orbit__hint { margin: 0; color: var(--muted); text-align: center; transition: opacity 220ms var(--ease-out); }
[data-labs][data-active] .orbit__hint { opacity: 0; }
/* keyboard route: the buttons stay out of sight until focused, then show as a small row under the band */
.orbit__keys { display: flex; gap: 8px; justify-content: center; }
.orbit__link { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; background: none; border: 1.5px solid var(--line); padding: 6px 12px; cursor: pointer; color: var(--fg); }
.orbit__link[aria-pressed="true"] { border-color: var(--tinta); }
.orbit__keys:not(:focus-within):not(.is-fallback) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Lab detail panel: three-column grid, logo in the first column, text across the other two */
.lab-detail { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-block: 32px; border-block: 1px solid var(--line); }
.lab-detail > .lab-detail__empty, .lab-detail > .lab-detail__card { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: subgrid; align-items: center; transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out); }
.lab-detail__card { opacity: 0; transform: translateY(8px); pointer-events: none; visibility: hidden; transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out), visibility 0s 240ms; } /* hidden cards leave the tab order */
.lab-detail__art { aspect-ratio: 1; display: grid; place-items: center; }
.lab-detail__logo { width: 88%; height: 88%; overflow: visible; }
.lab-detail__body { grid-column: 2 / -1; max-width: 40rem; }
.lab-detail__sigla { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 900; letter-spacing: -0.012em; line-height: 1.06; margin-bottom: 8px; } /* same face, weight and tracking as the section titles (.h1/.h2) */
.lab-detail__name { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.55; color: var(--muted); margin-bottom: 24px; }
.lab-detail__desc { margin: 0; }
.lab-detail__more { margin-top: 28px; }
.lab-detail__placeholder { width: 60%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line); }
.lab-detail__hint { grid-column: 2 / -1; max-width: 26em; margin: 0; }
.lab-detail__empty { pointer-events: none; }
[data-labs][data-active] .lab-detail__empty { opacity: 0; visibility: hidden; } /* opacity makes it a layer above the cards; hide it so their links stay clickable */
[data-labs][data-active="late"] [data-card="late"],
[data-labs][data-active="eco"] [data-card="eco"],
[data-labs][data-active="nido"] [data-card="nido"] { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.lab-detail__unpin { position: absolute; top: 20px; right: 0; display: none; background: none; border: 0; padding: 6px 0; cursor: pointer; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lab-detail__unpin:hover { color: var(--tinta); }
[data-labs][data-pinned] .lab-detail__unpin { display: block; }

/* Logo motion, running only while the lab is showing */
@keyframes late-pulse { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(0.97); } 36% { transform: scale(1.08); } 52% { transform: scale(1); } }
@keyframes eco-wave { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes eco-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 25% { transform: translateY(-7px) rotate(-2.5deg); } 50% { transform: translateY(-12px) rotate(0deg); } 75% { transform: translateY(-6px) rotate(2.5deg); } }
@keyframes nido-wobble { 0%, 100% { transform: rotate(0deg) translateX(0); } 8% { transform: rotate(-9deg) translateX(-1.5px); } 16% { transform: rotate(8deg) translateX(1.5px); } 24% { transform: rotate(-7deg); } 32% { transform: rotate(5deg); } 40% { transform: rotate(-2deg); } 48% { transform: rotate(0deg); } }
@keyframes nido-tremble { 0%, 100% { transform: rotate(0deg); } 8% { transform: rotate(-3.5deg); } 16% { transform: rotate(3deg); } 24% { transform: rotate(-2.5deg); } 32% { transform: rotate(1.8deg); } 40% { transform: rotate(-0.8deg); } 48% { transform: rotate(0deg); } }
.logo-late { transform-origin: 50% 50%; }
.eco-waves circle { transform-box: view-box; transform-origin: 367px 551px; opacity: 0; }
.eco-bat { transform-box: view-box; transform-origin: 367px 551px; }
.nido-nest { transform-box: view-box; transform-origin: 60px 92px; } /* pivots on the base of the nest */
.nido-egg { transform-box: view-box; transform-origin: 70px 66px; }
[data-labs][data-active="late"] .logo-late { animation: late-pulse 2.4s infinite cubic-bezier(0.645, 0.045, 0.355, 1); }
[data-labs][data-active="eco"] .eco-waves circle { animation: eco-wave 3.6s infinite ease-out; }
[data-labs][data-active="eco"] .eco-waves circle:nth-child(2) { animation-delay: 1.2s; }
[data-labs][data-active="eco"] .eco-waves circle:nth-child(3) { animation-delay: 2.4s; }
[data-labs][data-active="eco"] .eco-bat { animation: eco-float 7s infinite ease-in-out; }
[data-labs][data-active="nido"] .nido-nest { animation: nido-tremble 5.6s infinite ease-in-out; }
[data-labs][data-active="nido"] .nido-egg { animation: nido-wobble 5.6s infinite ease-in-out; animation-delay: 0.25s; }
.labs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.lab { display: flex; flex-direction: column; }
.lab > div:not(.lab__art) { flex: 1; display: flex; flex-direction: column; }
.lab__facts { margin-top: auto; }
.lab__art { aspect-ratio: 1; margin-bottom: 24px; display: grid; place-items: center; }
.lab__art img { width: 88%; height: 88%; object-fit: contain; }

/* Hover motion carried over from the June index (latido, rotar-eje, flotar-redondo). Transform only, pointer devices only. */
@keyframes latido { 0% { transform: scale(1); } 15% { transform: scale(1.03); } 28% { transform: scale(0.98); } 42% { transform: scale(1.02); } 70%, 100% { transform: scale(1); } }
@keyframes rotar-eje { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(6deg); } 50% { transform: rotate(-4deg); } 75% { transform: rotate(3deg); } }
@keyframes flotar-redondo { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(6px, -4px); } 50% { transform: translate(0, 4px); } 75% { transform: translate(-6px, -4px); } }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .lab:hover .latido, .lab:focus-within .latido { animation: latido 3s infinite cubic-bezier(0.645, 0.045, 0.355, 1); }
  .lab:hover .rotacion-sutil, .lab:focus-within .rotacion-sutil { animation: rotar-eje 5s infinite linear; }
  .lab:hover .nido-flotante, .lab:focus-within .nido-flotante { animation: flotar-redondo 4s infinite cubic-bezier(0.645, 0.045, 0.355, 1); }
}
.lab__sigla { font-size: clamp(2.5rem, 4vw, 3.5rem); margin: 8px 0 8px; }
.lab__name { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.55; color: var(--muted); margin-bottom: 20px; min-height: calc(3 * 1.55em); }
.lab__desc { color: var(--tinta); margin-bottom: 20px; }
.lab__facts { display: grid; gap: 4px; margin-bottom: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.lab .link-arrow { justify-self: start; }
.lab .label { display: flex; align-items: center; }
@media (max-width: 899px) {
  .labs { grid-template-columns: 1fr; gap: 64px; }
  .labs__top { grid-template-columns: 1fr; justify-items: center; gap: 40px; margin-bottom: 40px; }
  .labs__top .sec-head { justify-self: stretch; }
  .orbit { width: min(400px, 92vw); }
  .lab-detail { grid-template-columns: 1fr; padding-block: 28px; }
  .lab-detail > .lab-detail__empty, .lab-detail > .lab-detail__card { grid-template-columns: 1fr; gap: 20px; }
  .lab-detail__art { width: min(220px, 60vw); justify-self: center; }
  .lab-detail__body, .lab-detail__hint { grid-column: 1; }
  .lab-detail__hint { text-align: center; justify-self: center; }
  .lab-detail__unpin { top: 12px; }
  .lab__name { min-height: 0; }
}

/* ===== Entradas ===== */
.entradas { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.entrada { padding: 40px 32px 40px 0; border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 16px; }
.entrada + .entrada { padding-left: 32px; border-left: 1px solid var(--line); }
.entrada svg { width: 56px; height: 56px; margin-bottom: 16px; }
.entrada p { color: var(--muted); }
.entrada .link-arrow { justify-self: start; margin-top: 8px; }
@media (max-width: 899px) {
  .entradas { grid-template-columns: 1fr; }
  .entrada, .entrada + .entrada { padding: 32px 0; border-left: 0; }
}

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__head { display: grid; gap: 20px; justify-items: start; }
.contact__btn { margin-top: 12px; }
.contact__list { border-top: 1px solid var(--line); }
.contact__row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; align-items: baseline; padding-block: 22px; border-bottom: 1px solid var(--line); }
.contact__row dd { margin: 0; font-size: 1.125rem; line-height: 1.5; color: var(--fg); }
.contact__mail { font-family: var(--mono); font-size: clamp(1rem, 1.6vw, 1.3rem); letter-spacing: 0.01em; color: var(--tinta); white-space: nowrap; } /* never split the address mid-word */
@media (max-width: 899px) {
  .contact { grid-template-columns: 1fr; }
  .contact__row { grid-template-columns: 1fr; gap: 6px; }
  .contact__mail { white-space: normal; overflow-wrap: anywhere; }
}

/* ===== Footer ===== */
.footer { padding-block: 72px 32px; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.footer__brand img { height: 44px; width: auto; margin-bottom: 20px; }
.footer__brand p { color: var(--muted); max-width: 26em; font-size: 0.9375rem; }
.footer h2 { font-family: var(--mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--istmo); margin-bottom: 16px; font-variation-settings: normal; }
.footer li + li { margin-top: 10px; }
.footer a { text-decoration: none; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--papel); text-decoration: underline; text-underline-offset: 4px; } }
.footer__bottom { padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer__top > * { min-width: 0; }
.footer a { overflow-wrap: anywhere; }
@media (max-width: 899px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer__top { grid-template-columns: 1fr; } }

/* ===== Lab page hero ===== */
.lab-hero__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.crumb { display: block; margin-bottom: 32px; color: var(--muted); }
.crumb a { color: var(--istmo); text-decoration: none; }
.lab-hero__sigla { font-size: clamp(4.5rem, 13vw, 10rem); line-height: 0.92; letter-spacing: -0.03em; margin-bottom: 20px; color: var(--papel); }
.lab-hero__name { font-family: var(--serif); font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.25; margin-bottom: 28px; max-width: 24em; }
.lab-hero__promise { color: var(--muted); max-width: 32em; font-size: clamp(1.05rem, 1.4vw, 1.2rem); margin-bottom: 0; }
.lab-hero__panel { position: relative; background: var(--papel); aspect-ratio: 1; }
.lab-hero__panel img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 8%; }
.lab-hero__shape { position: absolute; }
.lab-hero__shape--a { width: 22%; aspect-ratio: 1; border-radius: 50%; right: -8%; bottom: -8%; }
.lab-hero__shape--late { background: var(--atardecer); }
.lab-hero__shape--eco { background: var(--istmo); }
.lab-hero__shape--nido { background: var(--amanecer); }
@media (max-width: 899px) {
  .lab-hero__grid { grid-template-columns: 1fr; }
  .lab-hero__panel { max-width: 420px; }
  .lab-hero__shape--a { right: 0; bottom: -16px; }
}

/* ===== Lab page components ===== */
.toc { position: sticky; top: var(--header-h); z-index: 40; background: var(--papel); border-bottom: 1px solid var(--line); --focus: var(--tinta); }
.toc ul { display: flex; flex-wrap: wrap; gap: 4px 28px; padding-block: 14px; }
.toc a { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--tinta); padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .toc a:hover { border-bottom-color: var(--tinta); } }
.toc a.is-active { border-bottom-color: var(--tinta); }
@media (max-width: 899px) { .toc { position: static; } }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.facts > div { padding: 22px 24px 22px 0; border-bottom: 1px solid var(--line); }
.facts dt { margin-bottom: 6px; }
.facts dd { font-weight: 400; }
@media (max-width: 899px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

.two { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.two > header { position: sticky; top: calc(var(--header-h) + 72px); display: grid; gap: 16px; }
@media (max-width: 899px) { .two { grid-template-columns: 1fr; } .two > header { position: static; } }

.pull { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.35; font-weight: 400; max-width: 24em; padding-left: 24px; border-left: 4px solid var(--bar, var(--tinta)); margin-block: 40px; }
.bar-late { --bar: var(--atardecer); } .bar-eco { --bar: var(--istmo); } .bar-nido { --bar: var(--amanecer); }
.sec--noche .pull { color: var(--papel); }

.rows { border-top: 1px solid var(--line); }
.rows > div { display: grid; grid-template-columns: 4fr 8fr; gap: 24px; padding-block: 20px; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows dt { font-weight: 700; }
.rows dd { color: var(--muted); max-width: 40em; }
.rows--cols3 > div { grid-template-columns: 3fr 2fr 7fr; }
.rows .amount { font-family: var(--mono); color: var(--fg); white-space: nowrap; }
.rows__total dt, .rows__total dd { font-weight: 700; color: var(--fg); }
@media (max-width: 899px) { .rows > div, .rows--cols3 > div { grid-template-columns: 1fr; gap: 6px; } }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards > * { padding: 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cards h3, .cards h4 { margin-bottom: 12px; }
.cards p { color: var(--muted); margin: 0; }
.cards .num { display: block; margin-bottom: 16px; }
@media (max-width: 899px) { .cards, .cards--3, .cards--4 { grid-template-columns: 1fr; } }

.shift { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 28px; }
.shift + .shift { border-top: 0; }
.shift .from { color: var(--muted); font-size: 1.25rem; text-decoration: line-through; text-decoration-thickness: 1px; }
.shift .to { font-weight: 900; font-variation-settings: "opsz" 144, "SOFT" 0; font-size: 1.5rem; }
.shift .arrow { font-family: var(--mono); }
@media (max-width: 560px) { .shift { grid-template-columns: 1fr; gap: 6px; } .shift .arrow { display: none; } }

.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; padding: 8px 14px; border: 1px solid var(--line); }

.steps { counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 96px 1fr; gap: 24px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 0.875rem; letter-spacing: 0.1em; color: var(--label); padding-top: 6px; }
.steps--weeks li::before { content: "Semana " counter(step); }
.steps--weeks li { grid-template-columns: 112px 1fr; }
.steps h3, .steps h4 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }

.list-plain li { padding-block: 12px; border-bottom: 1px solid var(--line); }
.list-plain li:first-child { border-top: 1px solid var(--line); }
.list-plain--arrow li { display: grid; grid-template-columns: 32px 1fr; }
.list-plain--arrow li::before { content: "\2192"; font-family: var(--mono); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding-block: 22px; font-weight: 700; font-size: 1.125rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-weight: 400; font-size: 1.5rem; line-height: 1; transition: transform 200ms var(--ease-out); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding-bottom: 24px; max-width: 42em; color: var(--muted); }

.lab-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.lab-nav a { display: grid; gap: 8px; padding: 32px 0; text-decoration: none; }
.lab-nav a:last-child { text-align: right; }
@media (hover: hover) and (pointer: fine) { .lab-nav a:hover .h3 { text-decoration: underline; text-underline-offset: 6px; } }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

@media print {
  .header, .toc, .nav-toggle { display: none; }
  .sec { padding-block: 24px; }
}
