/* Vendored from Google Fonts (SIL OFL 1.1, see ../fonts/OFL-*.txt). T6: Familjen Grotesk 400-700 for display, Schibsted Grotesk 400-900 for text. */
/* Poster -> reel between pages: native cross-document View Transitions. Must stay above every other rule. Browsers
   without support ignore it and navigate as before; reduced motion gets no transition at all. site.js names the one
   image that morphs. The morph runs at the brand ease (MANUAL «Movimiento»). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: 560ms; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
}
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/familjen-grotesk-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Familjen Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/familjen-grotesk-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(../fonts/schibsted-grotesk-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(../fonts/schibsted-grotesk-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Design B · Islas (chosen 2026-10-07) with the video-craft details of C on the reels and «el diafragma».
   Colors: branding/SISTEMA.md «Sistema elegido» (P4, kit/tokens/brand.css). The sea colour draws the chart.
   Textures: assets/img/{islas,curvas}.svg (branding/sistema/direcciones/texturas.mjs), used as masks. */
:root {
  color-scheme: light dark;
  --bg: #FBFBFA;      /* P9: P4 + lava P6 + mar de Bahía Academia */
  --surface: #FFFFFF;
  --text: #1D1D1F;
  --muted: #5E5E63;
  --ink: #1D1D1F;     /* plain blades */
  --b1: #FF5A26;      /* lava */
  --b2: #0092C4;      /* mar de Bahía Academia */
  --b3: #2F9437;      /* opuntia */
  --action: #006F96;
  --sea: #0092C4;     /* the chart: contours, depth bands, routes */
  --head: 4rem;       /* fixed header height, below the top safe area */
  --gut: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --ease: cubic-bezier(.2,.7,.2,1);  /* MANUAL «Movimiento»: cubic ease-out */
  --font: "Schibsted Grotesk", system-ui, sans-serif;
  --display: "Familjen Grotesk", "Schibsted Grotesk", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101213;
    --surface: #1A1D1F;
    --text: #F5F5F3;
    --muted: #A3A8AB;
    --ink: #F5F5F3;
    --b1: #FF5A26;
    --b2: #2CC4F2;
    --b3: #5CC25A;
    --action: #66D4F8;
    --sea: #2CC4F2;
  }
}
* { box-sizing: border-box; }
/* One section per step. Every section snaps its top under the fixed header; a section taller than the screen
   scrolls freely inside (its snap area is larger than the snapport). Reels never get skipped by a fast swipe. */
html { scroll-snap-type: y mandatory; scroll-padding-top: calc(var(--head) + env(safe-area-inset-top)); }
html:has(#player[open]) { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.55 var(--font); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }

/* Header: paper-coloured glass over every section, so it never sits as a heavy bar. */
.top { position: fixed; inset: 0 0 auto; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: calc(var(--head) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--gut) 0; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--sea) 22%, transparent); }
.mark { display: inline-flex; align-items: center; gap: 13px; /* 0.28 of the symbol, MANUAL horizontal lockup */ min-height: 44px; font: 700 1.375rem/1 var(--display); letter-spacing: -.01em; text-decoration: none; }
.top .symbol { width: 46px; height: 46px; flex: none; }
/* One ink below 48 px (MANUAL); the birds take colour only on the large symbol. */
.symbol path { fill: var(--ink); }
.symbol-xl .b1 { fill: var(--b1); }
.symbol-xl .b2 { fill: var(--b2); }
.symbol-xl .b3 { fill: var(--b3); }
.menu-btn { display: none; }
/* Desktop: the popover nav is simply shown inline (author display beats the UA's popover rule). */
#menu { display: flex; gap: .25rem 1.25rem; position: static; inset: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible; width: auto; height: auto; font-size: .9375rem; }
#menu a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
#menu a:hover { color: var(--action); text-decoration: underline; }

.screen { position: relative; isolation: isolate; overflow: clip; min-height: calc(100svh - var(--head) - env(safe-area-inset-top)); display: grid; place-items: center; padding: 2rem var(--gut) 3rem; background: var(--bg); scroll-snap-align: start; }
.room { scroll-snap-stop: always; }
/* /trabajos: the first reel starts under the fixed header, as it did after the home's hero and method. */
.trabajos { padding-top: calc(var(--head) + env(safe-area-inset-top)); }
/* The way back and the reel count: fixed in the reel room's dark ink (both schemes), a pill each, under the header.
   The container lets taps through its gap; only the pills take them. The back pill's hit area is 44 px tall. */
.trabajos-nav { --bg: #101213; --text: #F5F5F3; --ink: #F5F5F3; --action: #66D4F8; position: fixed; z-index: 4; top: calc(var(--head) + env(safe-area-inset-top) + 6px); inset-inline: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0 var(--gut); pointer-events: none; font: 600 .9375rem/1 var(--font); }
.trabajos-nav > * { pointer-events: auto; display: inline-flex; align-items: center; height: 36px; margin: 0; padding: 0 .9rem; border-radius: 999px; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid color-mix(in srgb, var(--action) 40%, transparent); color: var(--text); text-decoration: none; }
.trabajos-nav .back { position: relative; gap: .5rem; }
.trabajos-nav .back::before { content: ""; position: absolute; inset: -4px 0; }
.trabajos-nav .back:hover { color: var(--action); }
/* Block flow, not flex: the spaces around "de" must survive. */
.trabajos-nav .count { display: block; line-height: 34px; font-variant-numeric: tabular-nums; }
/* Chart layers: the mask carries the drawing, the background carries the colour. */
.chart::before, .chart::after, .method::before, .closing-screen::before, .room::before, .islands::before, .islands::after { content: ""; position: absolute; pointer-events: none; }

/* Tagline: Schibsted 500 in the action colour, always with its full stop (MANUAL). */
.tagline { font: 500 1.375rem/1.35 var(--font); color: var(--action); margin: 0; }

/* Hero: the claim, then a second look (B2 + tagline), while the diaphragm opens over the chart. */
.hero { min-height: 100svh; padding-top: calc(var(--head) + env(safe-area-inset-top) + 1rem); place-items: center start; padding-inline: max(var(--gut), calc((100vw - 1100px) / 2)); }
.hero-in { max-width: 62rem; position: relative; }
.hero h1 { font: 700 clamp(2.75rem, 7.4vw, 6.25rem)/.98 var(--display); letter-spacing: -.03em; margin: 0 0 clamp(1.5rem, 4vw, 2.75rem); text-wrap: balance; max-width: 11ch; }
.hero-text { font-size: clamp(1.1875rem, 2.2vw, 1.5rem); line-height: 1.4; max-width: 26ch; margin: 0 0 .5rem; }
.hero .tagline { font-size: clamp(1.375rem, 2.6vw, 1.75rem); margin-bottom: 2.25rem; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin: 0; }
.link { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; color: var(--action); text-underline-offset: 5px; }
.motion .beat { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.motion.seen .beat { opacity: 1; transform: none; transition-delay: .7s; }
/* The chart of three synthetic islands in sight of each other (one per bird), bleeding off the right edge. */
.chart { position: absolute; z-index: -1; pointer-events: none; left: 47vw; top: 50%; width: min(1140px, 72vw); aspect-ratio: 1144 / 744; translate: 0 -46%; }
.chart::before, .chart::after { inset: 0; }
/* The chart fades into open paper at its edges (second mask layer, intersected). */
.chart::before {
  background: var(--sea); opacity: .8;
  -webkit-mask: url(../img/islas.svg) center / contain no-repeat, radial-gradient(closest-side, #000 62%, transparent) center / 100% 100% no-repeat;
  -webkit-mask-composite: source-in;
  mask: url(../img/islas.svg) center / contain no-repeat intersect, radial-gradient(closest-side, #000 62%, transparent) center / 100% 100% no-repeat;
}
/* One marker per island in the bird colours (MANUAL: the birds' colours mark three different things). */
.chart::after, .islands::after {
  background:
    radial-gradient(circle at 24% 38%, var(--b1) 0 8px, transparent 8.5px),
    radial-gradient(circle at 61% 24%, var(--b2) 0 8px, transparent 8.5px),
    radial-gradient(circle at 47% 70%, var(--b3) 0 8px, transparent 8.5px);
}
.chart .iris { left: 50%; top: 50%; width: 80%; translate: -50% -50%; }

/* «El diafragma»: six A7 blades on a ring (cucuve_iris() in functions.php). Each blade half turns on the blade's
   pin, transform only. Closed 28°, open −8° (diafragma.mjs). Shown only with motion; reduced motion shows the
   content open and still. Never takes taps. */
.iris { display: none; }
.motion .iris { display: block; position: absolute; z-index: 1; aspect-ratio: 1; border-radius: 50%; overflow: hidden; pointer-events: none; }
.iris i { position: absolute; inset: 0; }
.iris i:nth-child(6n+2) { rotate: 60deg; }
.iris i:nth-child(6n+3) { rotate: 120deg; }
.iris i:nth-child(6n+4) { rotate: 180deg; }
.iris i:nth-child(6n+5) { rotate: 240deg; }
.iris i:nth-child(6n) { rotate: 300deg; }
.iris svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform-origin: 93.5% -31.8%; rotate: 28deg; }
.iris use { fill: var(--ink); }
/* A one-step tone between neighbouring blades and a thin paper line on each cutting edge: overlap, not gradients. */
.iris i:nth-child(even) use { fill: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.iris use.edge { fill: none; stroke: var(--bg); stroke-width: 1.25px; stroke-opacity: .75; vector-effect: non-scaling-stroke; }
/* Hero: opens once, after the claim lands, then the ring itself fades out. */
/* Hidden until the reveal starts, so the closed iris never flashes on load or behind the sting. */
.motion .hero .iris { opacity: 0; }
.motion.seen .hero .iris { animation: iris-hero-fade 2.25s ease both; }
.motion.seen .hero .iris svg { animation: iris-hero-open 1.4s var(--ease) .35s both; }
@keyframes iris-hero-fade { 0% { opacity: 0; } 8% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes iris-hero-open { from { rotate: 28deg; } to { rotate: -8deg; } }

/* How we work: contour lines of open sea behind, the two phases as stations on a route. */
.method::before { inset: 0; z-index: -1; background: var(--sea); opacity: .2; -webkit-mask: url(../img/curvas.svg) center / max(100%, 1200px) auto repeat-y; mask: url(../img/curvas.svg) center / max(100%, 1200px) auto repeat-y; }
.method-in { width: min(1100px, 100%); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: start; }
.method h2, .name h2 { font: 700 clamp(2.25rem, 5vw, 4.25rem)/1 var(--display); letter-spacing: -.025em; margin: 0 0 1.25rem; text-wrap: balance; }
.lead { font-size: 1.1875rem; line-height: 1.45; max-width: 36ch; margin: 0 0 1.5rem; }
.speed { font: 700 clamp(1.375rem, 2.6vw, 1.75rem)/1.2 var(--display); letter-spacing: -.01em; max-width: 20ch; margin: 0; }
.speed .fig { display: block; width: fit-content; font-size: clamp(5.5rem, 12vw, 9rem); line-height: .9; letter-spacing: -.045em; padding-bottom: .1em; margin: .05em 0 .2em; border-bottom: 4px solid var(--sea); }
.phases { list-style: none; margin: 0; padding: 0; display: grid; counter-reset: phase; }
.phases > li { counter-increment: phase; display: grid; grid-template-columns: 3.75rem 1fr; column-gap: 1rem; padding-bottom: 2.5rem; }
.phases > li:last-child { padding-bottom: 0; }
/* The numerals are stations; a dotted route joins them. */
.phases > li::before { content: counter(phase); grid-row: 1 / span 3; font: 700 4.5rem/.85 var(--display); letter-spacing: -.04em; color: var(--sea); }
.phases > li:not(:last-child) { background: repeating-linear-gradient(to bottom, var(--sea) 0 3px, transparent 3px 9px) 1.2rem 4.75rem / 2px calc(100% - 5rem) no-repeat; }
.phases h3 { font: 700 1.625rem/1.15 var(--display); letter-spacing: -.01em; margin: .35rem 0 .5rem; }
.phases p { margin: 0; max-width: 46ch; }
.chain { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 1rem; padding: 0; }
.chain li { font-weight: 600; font-size: .9375rem; min-height: 36px; padding: .3rem .85rem .3rem .7rem; border: 1.5px solid var(--sea); background: var(--bg); border-radius: 999px; display: inline-flex; align-items: center; gap: .45rem; }
/* The check mark: each stage passes quality control before delivery. */
.chain li::before { content: ""; width: .7rem; height: .4rem; border: solid var(--action); border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
.pledge { grid-column: 1 / -1; margin: 0; padding: 1.5rem 0 0; border-top: 1px dashed color-mix(in srgb, var(--sea) 60%, transparent); }
.pledge p:first-child { font: 700 clamp(1.5rem, 3.2vw, 2.25rem)/1.15 var(--display); letter-spacing: -.015em; margin: 0; }

/* Why «cucuve»: a notebook page. The A8 symbol in colour beside the heading (≥ 48 px, ¼ clear space), plain
   paper around it (MANUAL: no busy backgrounds), and a field-note card with the islands and Darwin's line. */
.name { background: var(--surface); }
.name-in { width: min(1100px, 100%); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: center; }
.name-head { --s: clamp(88px, 11vw, 150px); display: flex; align-items: center; justify-content: space-between; gap: calc(var(--s) / 4); margin-bottom: 1.25rem; }
.name-head h2 { margin: 0; }
.symbol-xl { display: block; flex: none; width: var(--s); height: var(--s); }
.story p { max-width: 50ch; margin: 0 0 1rem; }
.story .tagline { margin-top: 1.75rem; font-size: 1.75rem; }
.notebook { margin: 0; padding: clamp(1rem, 3vw, 1.75rem); background: var(--bg); border: 1px solid color-mix(in srgb, var(--sea) 35%, transparent); border-radius: 6px; }
.islands { position: relative; aspect-ratio: 1144 / 744; margin-bottom: 1.25rem; }
.islands::before, .islands::after { inset: 0; }
.islands::before { background: var(--sea); opacity: .75; -webkit-mask: url(../img/islas.svg) center / contain no-repeat; mask: url(../img/islas.svg) center / contain no-repeat; }
.notebook blockquote { margin: 0 0 .75rem; }
.notebook blockquote p { margin: 0; font: 600 clamp(1.375rem, 2.4vw, 1.75rem)/1.25 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.notebook figcaption { color: var(--muted); font-size: .9375rem; }

/* Reels: a dark screening room in both schemes, one band deeper per reel, with the open-sea contours. */
.room, .closing-screen {
  --bg: #101213; --surface: #1A1D1F; --text: #F5F5F3; --muted: #A3A8AB; --ink: #F5F5F3;
  --b2: #2CC4F2; --b3: #5CC25A; --action: #66D4F8; --sea: #2CC4F2;
  --depth: 8%; color: var(--text); background: color-mix(in srgb, var(--sea) var(--depth), #101213);
}
.room + .room { --depth: 11%; }
.room + .room + .room { --depth: 14%; }
.room + .room + .room + .room { --depth: 17%; }
.room::before, .closing-screen::before { inset: 0; z-index: -1; background: var(--sea); opacity: .13; -webkit-mask: url(../img/curvas.svg) center / max(100%, 1200px) auto repeat-y; mask: url(../img/curvas.svg) center / max(100%, 1200px) auto repeat-y; }
.work { display: grid; grid-template-columns: auto minmax(0, 30rem); gap: clamp(2rem, 6vw, 6rem); align-items: center; width: min(1100px, 100%); }
/* The box is exactly 9:16 and the poster is contained, so the art is never cropped. */
.reel { position: relative; view-timeline: --reel block; width: min(calc(78svh * 9 / 16), 427px); aspect-ratio: 9/16; border: 0; padding: 0; background: #000; cursor: pointer; overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--sea) 40%, transparent), 0 24px 60px -30px rgb(0 0 0 / .6); }
.reel img, .reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.reel .iris { left: 50%; top: 50%; width: 204%; /* the reel's diagonal: the ring circumscribes the 9:16 frame */ translate: -50% -50%; }
/* Viewfinder corner marks on the poster's edges. */
.reel::after, .frame::after {
  --m: rgb(255 255 255 / .85);
  content: ""; position: absolute; inset: 12px; z-index: 2; pointer-events: none;
  background:
    linear-gradient(var(--m), var(--m)) left top / 22px 2px, linear-gradient(var(--m), var(--m)) left top / 2px 22px,
    linear-gradient(var(--m), var(--m)) right top / 22px 2px, linear-gradient(var(--m), var(--m)) right top / 2px 22px,
    linear-gradient(var(--m), var(--m)) left bottom / 22px 2px, linear-gradient(var(--m), var(--m)) left bottom / 2px 22px,
    linear-gradient(var(--m), var(--m)) right bottom / 22px 2px, linear-gradient(var(--m), var(--m)) right bottom / 2px 22px;
  background-repeat: no-repeat;
}
/* Each reel opens with the diaphragm as it scrolls in: scroll-driven where supported, else site.js adds .open. */
.motion .reel .iris svg { transition: rotate 1.1s var(--ease); }
.motion .reel.open .iris svg { rotate: -8deg; }
@supports (animation-timeline: view()) {
  .motion .reel .iris svg { animation: iris-open linear both; animation-timeline: --reel; animation-range: entry 0% cover 45%; }
}
@keyframes iris-open { from { rotate: 28deg; } to { rotate: -8deg; } }
.pos { font-size: .9375rem; color: var(--muted); margin: 0 0 .75rem; font-variant-numeric: tabular-nums; }
/* The record dot: lava as a small graphic, never as text. */
.pos::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .55em; border-radius: 50%; background: var(--b1); }
.work h2 { font: 700 clamp(2.25rem, 5vw, 4.25rem)/1 var(--display); letter-spacing: -.025em; margin: 0 0 1rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .125rem 1rem; margin: 0 0 1.25rem; font-size: .9375rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.work .desc { margin: 0 0 1.75rem; max-width: 40ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; font: 600 1rem var(--font); background: var(--action); color: var(--bg); border: 0; border-radius: 999px; padding: .75rem 1.4rem; cursor: pointer; }
.btn:hover { background: var(--ink); }

/* Services and contact: the end credits, in the deep room with the contours mirrored. */
.closing-screen { --depth: 6%; }
.closing-screen::before { transform: scaleX(-1); }
.closing { width: min(1100px, 100%); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 3rem clamp(2rem, 6vw, 6rem); }
.closing h2 { font: 700 clamp(2.25rem, 4.5vw, 3.25rem)/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 1rem; }
.svc { list-style: none; margin: 0; padding: 0; }
.svc li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1.5rem; align-items: start; padding: 1.25rem 0; border-top: 1px solid color-mix(in srgb, var(--sea) 35%, transparent); }
.svc strong { font: 700 1.3125rem/1.25 var(--display); }
.svc p { grid-column: 1; margin: 0; color: var(--muted); }
.svc .platforms { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: .75rem; color: var(--text); }
.svc .icon { width: 30px; height: 30px; fill: currentColor; }
.contact { margin: 0; }
.cta { display: inline-flex; flex-direction: column; justify-content: center; min-height: 4.5rem; padding: .85rem 1.5rem; border-radius: 14px; background: var(--action); color: var(--bg); text-decoration: none; font: 700 clamp(1.375rem, 3vw, 1.75rem)/1.15 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.cta span { font: 600 .9375rem/1.4 var(--font); letter-spacing: 0; }
.cta:hover { background: var(--ink); }
.small { color: var(--muted); margin: .75rem 0 0; }
.closing .lead { color: var(--muted); }
.sign { grid-column: 1 / -1; display: flex; align-items: center; gap: 13px; padding-top: 2rem; border-top: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.sign .symbol { width: 32px; height: 32px; flex: none; }
.sign p { margin: 0; color: var(--muted); font-size: .9375rem; }

/* First-visit sting (kit/motion), skippable by tap, Esc or the button, never under reduced motion. */
.sting { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: #101213; transition: opacity .35s; }
.sting.out { opacity: 0; }
.sting video { width: min(100vw, 1100px); max-height: 100svh; }
.sting button { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); min-height: 44px; font: 600 .9375rem var(--font); background: transparent; color: #F5F5F3; border: 1.5px solid #F5F5F3; border-radius: 999px; padding: .45rem 1.1rem; cursor: pointer; }
.sting button:focus-visible { outline-color: #66D4F8; }

dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
/* The player sits on a dark backdrop in both schemes, so it uses P2 dark values directly. */
dialog::backdrop { background: rgba(21,26,25,.92); }
.player-screen { height: min(86svh, 860px); aspect-ratio: 9/16; max-width: calc(100vw - 32px); background: #000; border-radius: 6px; overflow: hidden; }
.player-screen iframe, .player-screen video { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .75rem; color: #F5F5F3; }
.player-bar button { min-height: 44px; font: 600 .9375rem var(--font); background: #F5F5F3; color: #1D1D1F; border: 0; border-radius: 999px; padding: .5rem 1.25rem; cursor: pointer; }
.note { font-size: .875rem; margin: 0; max-width: 32ch; }

/* Landscape phones: wide enough for the desktop layout, too short for full-screen centring. */
@media (max-height: 500px) and (min-width: 761px) {
  .work { gap: 2rem; }
  .reel { width: calc((100svh - var(--head) - env(safe-area-inset-top) - 2.5rem) * 9 / 16); }
  #player .player-screen { height: calc(100svh - 5rem); }
  .room { padding-block: 1rem; }
  .work h2 { font-size: 2rem; margin-bottom: .5rem; }
  .work .facts { margin-bottom: .5rem; }
  .work .desc { display: none; }
  .hero h1 { font-size: 3rem; }
  .hero .beat { scroll-snap-align: start; }
}

/* Phones, portrait tablets and short landscape screens: text sections take the height they need, with one
   vertical rhythm, instead of a full screen each with bands of empty space. */
@media (max-width: 760px), (max-height: 500px), (orientation: portrait) and (max-width: 1100px) {
  .screen:not(.hero, .room) { min-height: 0; display: block; padding-top: 2rem; padding-bottom: 3.5rem; }
  /* The last section still fills the screen, so the final step lands on its start. */
  .screen.closing-screen { min-height: calc(100svh - var(--head) - env(safe-area-inset-top)); }
  /* Sections taller than the screen get inner snap points, one screenful or less apart, so a step never jumps
     past text (WebKit does not scroll freely inside a tall snap area the way Chromium does). */
  .phases > li, .pledge, .story p:nth-of-type(2), .notebook, .svc li:nth-child(2), .closing > div:nth-child(2), .sign { scroll-snap-align: start; }
  /* The poster grid (2 columns here) stops at the top of every row after the first; the first row is the section start. */
  .posters > li:nth-child(odd):nth-child(n+3) { scroll-snap-align: start; }
}

/* Phones. */
@media (max-width: 760px) {
  :root { --head: 3.75rem; }
  .top .symbol { width: 36px; height: 36px; }
  .mark { font-size: 1.1875rem; gap: .55rem; }
  /* The nav as a native popover menu. */
  .menu-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; font: 600 1rem var(--font); color: var(--text); background: transparent; border: 1.5px solid var(--ink); border-radius: 999px; cursor: pointer; }
  .menu-btn:hover { color: var(--action); border-color: var(--action); }
  #menu:not(:popover-open) { display: none; }
  #menu:popover-open { display: flex; flex-direction: column; position: fixed; inset: calc(var(--head) + env(safe-area-inset-top) + 4px) var(--gut) auto auto; width: min(18rem, calc(100vw - 32px)); margin: 0; padding: .5rem; font-size: 1.0625rem; color: var(--text); background: var(--surface); border: 1px solid color-mix(in srgb, var(--sea) 35%, transparent); border-radius: 14px; box-shadow: 0 24px 50px -24px rgb(0 0 0 / .5); }
  #menu a { min-height: 48px; padding: 0 1rem; border-radius: 8px; }
  #menu a:hover { background: color-mix(in srgb, var(--sea) 10%, transparent); }

  /* Hero: the claim on top, the chart below it in its own space, never under the text. */
  .hero { place-items: start; padding-top: calc(var(--head) + env(safe-area-inset-top) + 2rem); padding-bottom: 86vw; }
  .chart { top: auto; bottom: 0; left: -5vw; width: 135vw; translate: none; }
  .chart::before { opacity: .6; }
  .chart .iris { width: 64%; }

  .method-in, .name-in, .closing { grid-template-columns: 1fr; gap: 2.5rem; }
  .speed .fig { font-size: clamp(5.5rem, 30vw, 8rem); }
  .phases > li { grid-template-columns: 3.25rem 1fr; }
  .phases > li::before { font-size: 4rem; }
  .phases > li:not(:last-child) { background-position: 1rem 4.25rem; }
  .phases h3 { font-size: 1.5rem; }
  .name-head { --s: 92px; }
  .closing { gap: 2rem; }
  .cta { display: flex; width: 100%; }
  .svc .platforms { gap: .6rem; }

  /* One reel per screen: the whole poster, uncropped, inside the small viewport (iOS toolbar shown), with the
     title and button strip under it. Facts and description stay on desktop. */
  .room { height: calc(100svh - var(--head) - env(safe-area-inset-top)); min-height: 0; padding: .75rem var(--gut) calc(.75rem + env(safe-area-inset-bottom)); place-items: center; }
  /* /trabajos: the room's top band keeps the reel below the fixed back pill (.trabajos-nav). */
  .trabajos .room { padding-top: 2.75rem; }
  /* On short screens (360x640) the work column is taller than the fixed room height and overflow: clip would cut the
     button. Grow the room there only; taller phones keep the exact one-reel-per-screen height. */
  @media (max-height: 700px) {
    .trabajos .room { height: auto; min-height: calc(100svh - var(--head) - env(safe-area-inset-top)); }
  }
  .work { display: flex; flex-direction: column; align-items: center; gap: .875rem; width: 100%; }
  .reel { width: min(calc(100vw - 32px), calc((100svh - var(--head) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 11rem) * 9 / 16)); }
  .work > div { width: 100%; max-width: 30rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1rem; }
  .work .facts, .work .desc { display: none; }
  .work .pos { grid-column: 1; margin: 0; }
  .work h2 { grid-column: 1; font-size: 1.375rem; margin: 0; }
  .work .btn { grid-column: 2; grid-row: 1 / 3; padding: .7rem 1.1rem; }

  /* The player goes full screen: video contained, close button in the thumb zone above the home bar. */
  #player { width: 100vw; height: 100dvh; margin: 0; background: #000; }
  #player .player-screen { width: 100%; height: calc(100dvh - 4.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-width: none; aspect-ratio: auto; border-radius: 0; margin-top: env(safe-area-inset-top); }
  #player .player-bar { padding: .75rem var(--gut) calc(.75rem + env(safe-area-inset-bottom)); }
}

/* Without popover support the four links simply wrap under the mark. */
@supports not selector(:popover-open) {
  .menu-btn { display: none; }
  .top { flex-wrap: wrap; }
  #menu, #menu:not(:popover-open) { display: flex; flex-wrap: wrap; }
}

/* Home portfolio: the works as a poster grid on the reel room's dark ink, 2 columns on phones, 4 on desktop.
   Placed after the phone rules so it wins over the generic text-section rules at equal specificity. */
.screen.portfolio { scroll-snap-stop: always; display: block; min-height: 0; padding: 3.5rem var(--gut) 4rem; background: #101213; color: #F5F5F3; --bg: #101213; --ink: #F5F5F3; --action: #66D4F8; --muted: #A3A8AB; --sea: #2CC4F2; }
.portfolio-title { font: 700 clamp(2rem, 4.5vw, 3.5rem)/1.05 var(--display); letter-spacing: -.02em; margin: 0 auto 2rem; max-width: 1100px; text-wrap: balance; }
.posters { list-style: none; margin: 0 auto; padding: 0; max-width: 1100px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem .875rem; }
/* The film frame: the 9:16 poster uncropped on black, the reels' viewfinder marks (shared rule above), the diaphragm. */
.poster { display: block; color: inherit; text-decoration: none; border-radius: 6px; }
.frame { position: relative; display: block; isolation: isolate; overflow: hidden; aspect-ratio: 9/16; border-radius: 6px; background: #000; box-shadow: 0 0 0 1px color-mix(in srgb, var(--sea) 40%, transparent), 0 24px 60px -30px rgb(0 0 0 / .6); view-timeline: --frame block; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.poster:hover .frame::after, .poster:focus-visible .frame::after { --m: var(--action); }
/* The diaphragm as on the reels: it opens as the frame enters the screen (scroll-driven), else site.js adds .open. */
.frame .iris { left: 50%; top: 50%; width: 204%; /* the frame's diagonal: the ring circumscribes the 9:16 frame */ translate: -50% -50%; }
.motion .frame .iris svg { transition: rotate 1.1s var(--ease); }
.motion .frame.open .iris svg { rotate: -8deg; }
@supports (animation-timeline: view()) {
  .motion .frame .iris svg { animation: iris-open linear both; animation-timeline: --frame; animation-range: entry 0% cover 45%; }
}
/* Focusing a lens: the marks close in and the frame settles, transform only, never without motion. */
.motion .frame::after { transition: transform .5s var(--ease); }
.motion .poster:hover .frame::after, .motion .poster:focus-visible .frame::after { transform: scale(.92); }
.motion .frame img { transition: transform .6s var(--ease); }
.motion .poster:hover .frame img, .motion .poster:focus-visible .frame img { transform: scale(1.03); }
.caption { display: block; margin-top: .625rem; font: 500 .75rem/1.3 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .02em; color: var(--muted); font-variant-numeric: tabular-nums; }
/* The record dot before the take, as on the reels: lava as a small graphic. */
.caption::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .5em; border-radius: 50%; background: var(--b1); vertical-align: .05em; }
.poster-title { display: block; margin-top: .25rem; font: 700 1rem/1.25 var(--display); }
.poster:hover .poster-title { color: var(--action); }
.portfolio-more { max-width: 1100px; margin: 2.5rem auto 0; text-align: center; }
@media (min-width: 761px) {
  .posters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 1.5rem; }
  .posters > li:nth-child(4n+1):nth-child(n+5) { scroll-snap-align: start; }
  .poster-title { font-size: 1.0625rem; }
}
/* "Pide tu video" pill: every page but the order form. Bottom-right, no animation (so nothing to reduce). */
.pide-pill { position: fixed; z-index: 4; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; max-width: calc(100vw - 32px); padding: .6rem 1.1rem; border-radius: 999px; background: var(--action); color: var(--bg); font: 600 .9375rem/1.2 var(--font); text-decoration: none; box-shadow: 0 10px 30px -12px rgb(0 0 0 / .45); }
.pide-pill span { font-weight: 500; }
.pide-pill:hover { text-decoration: underline; text-underline-offset: 4px; }
.has-pide-pill { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
.pide-ico { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
/* /trabajos on phones and short landscape: an icon-only round button in the bottom-right corner, clear of each reel's
   "Ver el reel completo" button, the position counter and the back pill (measured in odd/tasks/encargo-form.md). The label
   stays for screen readers. */
@media (max-width: 760px), (max-height: 500px) {
  .pide-pill--compact { width: 48px; height: 48px; min-height: 0; padding: 0; justify-content: center; gap: 0; }
  .pide-pill--compact .pide-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* /trabajos: the reel gives up a band at the bottom so the corner button never sits on the text block. */
@media (max-width: 760px) {
  .trabajos { --trabajos-band: 17rem; }
  .trabajos .reel { width: min(calc(100vw - 32px), calc((100svh - var(--head) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--trabajos-band)) * 9 / 16)); }
}
/* The play glyph on "Ver el reel completo": 16 px, currentColor, same button height. */
.btn .btn-ico { flex: none; width: 16px; height: 16px; margin-right: .5rem; fill: currentColor; }
