/* Sísifo Creative Agency: layout and components.
   Layers, bottom → top: page ground (html) · stage (rock canvas, fixed) · content screens · bottom veil
   · portfolio section and hero note · film grain · header. */

/* ---------- Base ---------- */

*, ::before, ::after { box-sizing: border-box; }
html {
  background: var(--site); color: var(--ink-1);
  overflow-x: clip; overscroll-behavior: none;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  --hd-inset: 4px; --hd-h: calc(var(--u) * 40 + var(--hd-inset) * 2);
}
body {
  margin: 0; overflow-x: clip; overscroll-behavior: none;
  font: 400 var(--t-m) / var(--lh-m) var(--font-text); letter-spacing: var(--tr-m);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
::selection { background: var(--orange); color: var(--white); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--orange); color: var(--white); border-radius: 8px; }
.skip:focus { top: 12px; }

/* Film grain over everything: the brand's analogue texture. A static SVG noise tile, so it costs no frames. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

/* Quentin, the brand's hand-made script, for short accents only. */
.script { font-family: var(--font-script); font-weight: 400; letter-spacing: 0; line-height: 1; color: var(--orange); }

/* ---------- Shared pieces ---------- */

.badge {
  display: inline-flex; align-items: center; gap: var(--s8);
  height: calc(var(--u) * 32); padding: 0 var(--s12); border-radius: var(--r-s);
  background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: var(--chip-blur); backdrop-filter: var(--chip-blur);
  font-size: var(--t-s); font-weight: 500; line-height: 1; letter-spacing: var(--tr-s); color: var(--ink-1); white-space: nowrap;
}
.badge__dot { width: calc(var(--u) * 6); height: calc(var(--u) * 6); border-radius: 50%; background: var(--orange); flex: none; }
.badge__dot--live { animation: pulse 1.8s ease-in-out infinite; }
.badge--orange { background: var(--orange); color: var(--white); }
@keyframes pulse { 50% { opacity: .35; } }

.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s16); font-size: var(--t-s); line-height: var(--lh-s); color: var(--ink-3); }
/* Section labels are handwritten (Quentin): script is unreadable at caps-label size, so ~2× it, sitting
   on the badge's baseline. */
.eyebrow__script {
  font-family: var(--font-script); font-size: calc(var(--t-l) * 1.15); font-weight: 400; line-height: 1;
  letter-spacing: 0; text-transform: none; color: var(--orange); transform: translateY(.06em);
}
.eyebrow:has(.badge) { gap: var(--s12); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s8); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s8);
  height: calc(var(--u) * 36); padding: 0 var(--s12); border-radius: var(--r-s);
  background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: var(--chip-blur); backdrop-filter: var(--chip-blur);
  font-size: var(--t-s); line-height: 1; color: var(--ink-1); white-space: nowrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s8);
  height: max(48px, calc(var(--u) * 52)); padding: 0 var(--s24); border: 0; border-radius: var(--r-s);
  background: var(--orange); color: var(--white); font-size: var(--t-m); font-weight: 500; line-height: 1; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) var(--ease-out);
}
.btn:active { transform: scale(var(--press)); }
.btn--ghost { background: var(--fill-2); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--orange-hi); }
  .btn--ghost:hover { background: var(--fill-3); }
}

/* Secondary CTA: a solid light button so it reads as clickable on the black page at a glance (a plain
   text link was too easy to miss). The orange arrow chip keeps it tied to the primary orange buttons. */
.more {
  display: inline-flex; align-items: center; gap: var(--s12); width: max-content;
  height: max(48px, calc(var(--u) * 52)); padding: 0 6px 0 var(--s24); border-radius: var(--r-s);
  background: var(--white); color: #000; font-size: var(--t-m); font-weight: 500; line-height: 1;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) var(--ease-out);
}
.more:active { transform: scale(var(--press)); }
.more__arrow {
  display: grid; place-items: center; width: max(36px, calc(var(--u) * 40)); aspect-ratio: 1; border-radius: calc(var(--r-s) - 3px);
  background: var(--orange); color: var(--white); transition: transform var(--dur-ui) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .more:hover { background: #ecebe9; }
  .more:hover .more__arrow { transform: translateX(3px); }
}
.more:focus-visible, .btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.panel {
  display: grid; gap: var(--s24); padding: var(--s24); border-radius: var(--r-l);
  background: rgba(28, 30, 33, .56); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  --ink-3: #959ba1;
}
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s16); }
.panel__title { font-size: var(--t-m); font-weight: 500; color: var(--ink-1); }
.panel__note { font-size: var(--t-s); line-height: var(--lh-s); color: var(--ink-3); }
.panel .chips { margin-top: calc(var(--s8) * -1); }

/* ---------- Header: gooey desktop capsules + liquid-glass mobile menu ---------- */

.hd {
  position: fixed; top: 12px; left: 0; right: 0; z-index: 40;
  width: max-content; max-width: calc(100% - 24px); margin: 0 auto;
  font-size: var(--t-s); font-weight: 500; line-height: 1; letter-spacing: var(--tr-s); white-space: nowrap;
}
.hd__goodef { position: absolute; width: 0; height: 0; }
.hd__bar { position: relative; display: flex; align-items: stretch; gap: 6px; }
/* Blob layer: dark capsule backgrounds fused by the goo filter; positioned under each segment by JS. */
.hd__blobs { position: absolute; inset: 0; z-index: 0; filter: url(#hd-goo); pointer-events: none; }
.hd__blob {
  position: absolute; border-radius: var(--r-m);
  background: rgba(18, 18, 20, .92); /* fallback without color-mix */
  background: color-mix(in srgb, #d1381f calc(var(--o, 0) * 100%), rgba(18, 18, 20, .92));
}
/* Per-segment orange amount; the home drain (lib/header.js) animates --o-tile / --o-links on scroll. */
.hd__blob[data-blob="tile"] { --o: var(--o-tile, 0); }
.hd__blob[data-blob="links"] { --o: var(--o-links, 0); }
.hd__blob[data-blob="cta"] { --o: 1; }
/* Fallback fill + a protected orange for the drained Contacto blob. */
.hd.is-light .hd__blob { background: rgba(236, 235, 233, .9); }
.hd.is-light .hd__blob[data-blob="cta"] { background: #d1381f; }
/* Segments sit above the blobs, transparent, so their own text/logo stays crisp. */
.hd__tile, .hd__links, .hd__btn--main, .hd__burger { position: relative; z-index: 1; background: transparent; }
.hd__tile { display: grid; place-items: center; height: calc(var(--u) * 44); padding: 0 var(--s16); border-radius: var(--r-m); }
.hd__tile img { width: auto; height: calc(var(--u) * 22); transition: filter 400ms var(--ease-out); }
.hd.is-light .hd__tile img { filter: invert(1); }
.hd__links { display: flex; align-items: center; gap: var(--s16); padding: 0 var(--s16); height: calc(var(--u) * 44); }
.hd__links a { color: #c8ccd0; color: color-mix(in srgb, #fff calc(var(--o-links, 0) * 100%), #c8ccd0); text-shadow: 0 1px 2px rgba(0, 0, 0, calc(var(--o-links, 0) * .35)); transition: color var(--dur-ui) var(--ease-out); }
.hd__links a[aria-current="page"] { color: #fff; }
.hd.is-light .hd__links a { color: #55514c; }
.hd.is-light .hd__links a[aria-current="page"] { color: #17140f; }
.hd__btn--main {
  display: inline-flex; align-items: center; height: calc(var(--u) * 44); padding: 0 var(--s24);
  border: 0; border-radius: var(--r-m); cursor: pointer; color: var(--white); font-weight: 500;
}
/* Fallback (no color-mix): the Contacto blob is orange. */
@supports not (background: color-mix(in srgb, red, blue)) { .hd__blob[data-blob="cta"] { background: var(--orange); } }
@media (hover: hover) and (pointer: fine) {
  .hd__links a:hover { color: var(--ink-1); }
  .hd.is-light .hd__links a:hover { color: #17140f; }
  /* Playful: the hovered segment's blob swells a touch, stretching the liquid neck. */
  .hd__tile:hover ~ .hd__blobs .hd__blob:nth-child(1),
  .hd__links:hover ~ .hd__blobs .hd__blob:nth-child(2) { transform: scale(1.06); }
  .hd__btn--main:hover ~ .hd__blobs .hd__blob:nth-child(3) { transform: scale(1.08); }
}
.hd__blob { transition: background 120ms linear, transform var(--dur-ui) var(--ease-out); }
.hd__links a:focus-visible, .hd__btn--main:focus-visible, .hd__tile:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: var(--r-s); }

/* Burger: icon-only, becomes an X when open. */
.hd__burger { display: none; width: 44px; height: 44px; border: 0; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border-radius: var(--r-m); }
.hd__burger span { display: block; width: 20px; height: 2px; background: var(--ink-1); border-radius: 2px; transition: transform var(--dur-ui) var(--ease-out), opacity var(--dur-ui) var(--ease-out); }
.hd__burger[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
.hd__burger[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }

.js .hd { animation: block-in 820ms var(--ease-expo) 700ms backwards; }

/* Full-screen liquid-glass menu (mobile). */
.navov { position: fixed; inset: 0; z-index: 39; height: 100vh; height: 100dvh; }
.navov[hidden] { display: none; }
.navov__glow {
  position: absolute; inset: 0;
  background: radial-gradient(90% 70% at 85% 8%, rgba(233, 74, 46, .28), rgba(233, 74, 46, 0) 60%), rgba(6, 6, 8, .6);
}
.navov__sheet {
  /* Flex column that distributes when it fits and scrolls internally when it doesn't, so the logo row
     and the email/legal row are never clipped by the URL bar, notch or home indicator. */
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: max(14px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  /* Frosted glass over the dimmed page. */
  background: rgba(10, 10, 12, .6);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .navov__sheet { background: rgba(8, 8, 10, .96); }
}
/* Brand row at the top of the open menu; the X is the header burger at top-right (above the overlay). */
.navov__top { display: flex; align-items: center; min-height: 44px; padding-right: 56px; }
.navov__logo img { width: auto; height: calc(var(--u) * 24); display: block; }
.navov__links { display: grid; align-content: center; gap: clamp(4px, 1.6vh, 14px); flex: 1 1 auto; min-height: 0; }
.navov__links a {
  display: flex; align-items: baseline; gap: 14px; padding: 8px 12px; border-radius: var(--r-m);
  font-size: clamp(30px, 10vw, 52px); font-weight: 500; letter-spacing: -.03em; line-height: 1.04; color: var(--ink-1);
}
.navov__idx { font-size: var(--t-s); font-weight: 400; color: var(--orange); letter-spacing: 0; }
.navov__links a[aria-current="page"] { color: #f26a4c; }
.navov__links a[aria-current="page"] .navov__idx { color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .navov__links a:hover { background: rgba(255, 255, 255, .06); } }
.navov__links a:active { background: rgba(255, 255, 255, .08); }
.js .navov:not([hidden]) .navov__links a { animation: navov-in 420ms var(--ease-expo) backwards; animation-delay: calc(var(--i) * 45ms + 80ms); }
@keyframes navov-in { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
.navov__foot { display: grid; gap: 6px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); }
/* The full email is wider than a 390px phone at --t-l, so clamp it down and let it shrink to fit the gutter. */
.navov__email { display: block; max-width: 100%; font-size: clamp(16px, 5vw, calc(var(--t-l))); letter-spacing: -.02em; color: var(--ink-1); overflow-wrap: anywhere; }
.navov__legal { font-size: var(--t-s); color: var(--ink-3); }
html.menu-open { overflow: hidden; }
@media (max-height: 640px) { .navov__links a { font-size: clamp(24px, 7vh, 38px); } .navov__links { gap: 2px; } .navov__top { min-height: 36px; } }
.hd.is-open .hd__tile, .hd.is-open .hd__blobs { visibility: hidden; }

@media (max-width: 767px) {
  .hd { top: 8px; left: 8px; right: 8px; width: auto; max-width: none; margin: 0; }
  /* Simple clean liquid-glass bar (no goo, no drain): white logo left, orange Contacto + white burger right. */
  .hd__bar {
    align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--r-l);
    background: rgba(14, 14, 16, .55);
    -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .08);
  }
  .hd.is-light .hd__bar { background: rgba(236, 235, 233, .82); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(0, 0, 0, .08); }
  .hd__blobs, .hd__links { display: none; }
  /* White wordmark, no capsule. */
  .hd__tile { height: 40px; padding: 0; background: transparent; }
  .hd__tile img { filter: none; }
  .hd.is-light .hd__tile img { filter: invert(1); }
  /* Orange glass pill, pushed right; the burger follows it. */
  .hd__btn--main {
    display: inline-flex; margin-left: auto; height: 40px; padding: 0 18px; border-radius: var(--r-pill);
    background: var(--orange); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  }
  /* Plain white burger icon, no capsule. */
  .hd__burger { display: inline-flex; width: 44px; height: 44px; border-radius: var(--r-s); gap: 5px; background: transparent; box-shadow: none; }
  .hd__burger span, .hd__burger span:first-child { width: 22px; height: 2px; background: var(--ink-1); }
  .hd.is-light .hd__burger span { background: #1a1a1a; }
}
/* Very narrow phones: drop the Contacto pill so the logo + burger never crowd. */
@media (max-width: 360px) { .hd__btn--main { display: none !important; } }
@media (min-width: 768px) { .navov { display: none; } }

/* First-load page fade (all pages): a soft opacity rise so navigation isn't snappy. Opacity-only, so
   it never shifts layout and is safe under reduced motion. */
@keyframes page-fade { from { opacity: 0; } }
.js body { animation: page-fade 500ms var(--ease-out) both; }

/* ---------- Stage (the rock) ---------- */

.stage {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; transform-origin: 50% 50%;
  background-size: cover; background-position: center;
}
.stage.is-framed { overflow: hidden; background-color: var(--site); }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* First-load: the WebGL canvas eases in instead of popping (JS adds .is-in when the cloud is ready). */
.stage { opacity: 0; transition: opacity .9s var(--ease-out); }
.stage.is-in { opacity: 1; }
html.no-webgl .stage.is-in { opacity: .55; }

/* ---------- Home: hero ---------- */

/* The hero is a spacer: its scroll length is where he pushes and the rock falls (scroll.js PUSH / RELEASE). */
.hero { position: relative; height: 80vh; }

/* "sisifo" in the brand script, behind the rock; a soft window in its mask lets the rock stand in front. */
.hero__title {
  position: absolute; z-index: 0; left: 0; right: 0; margin: 0;
  top: var(--rock-y, 55%); transform: translateY(-50%);
  font-family: var(--font-script); font-size: var(--hero-fs, min(28vw, 40vh)); font-weight: 400; line-height: 1.1;
  letter-spacing: 0; text-align: center; white-space: nowrap; color: rgba(255, 255, 255, .6);
  /* Two mask layers composited: the soft window around the rock, intersected with a top/bottom
     fade so the script's long ascenders and descenders dissolve at the edges instead of hard-clipping. */
  -webkit-mask-image:
    radial-gradient(var(--hrx, 24vh) var(--hry, 20vh) at var(--hx, 50%) var(--hy, 50%), transparent 0%, transparent 64%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 11%, #000 80%, transparent 99%);
  mask-image:
    radial-gradient(var(--hrx, 24vh) var(--hry, 20vh) at var(--hx, 50%) var(--hy, 50%), transparent 0%, transparent 64%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 11%, #000 80%, transparent 99%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
html.no-webgl .hero__title { -webkit-mask-image: none; mask-image: none; }

.hero__note {
  position: fixed; left: 24px; bottom: 24px; z-index: 3; max-width: min(calc(100% - 48px), calc(var(--u) * 420));
  display: grid; justify-items: start; gap: var(--s16);
  font-size: var(--t-l); line-height: var(--lh-l); letter-spacing: var(--tr-l);
}
/* Soft dark scrim anchored to the bottom-left corner so the hero copy stays the protagonist over the wordmark. */
.hero__note::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: -24px; bottom: -24px; width: 150%; height: 300%;
  background: radial-gradient(130% 100% at 0% 100%, rgba(0, 0, 0, .74), rgba(0, 0, 0, .42) 44%, transparent 74%);
}
/* Slightly smaller "Agencia creativa" badge in the hero. */
.hero__note .badge { height: calc(var(--u) * 28); padding: 0 var(--s12); font-size: calc(var(--t-s) * .92); }
.hero__cta { margin-top: var(--s4); }
.hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s12);
  font-size: var(--t-s); line-height: var(--lh-s); letter-spacing: var(--tr-s); color: var(--ink-3); white-space: nowrap;
}
.hero__lead { color: var(--ink-1); text-wrap: balance; }
.hero__lead span { display: block; color: var(--ink-3); }
.hero__scroll {
  position: fixed; right: 24px; bottom: 24px; z-index: 3; display: flex; align-items: center; gap: var(--s12);
  font-size: var(--t-s); color: var(--ink-3);
}
.hero__scroll .script { font-size: calc(var(--u) * 30); }

@keyframes title-in { from { opacity: 0; transform: translateY(calc(-50% + var(--in-y))); filter: blur(var(--in-blur)); } }
@keyframes block-in { from { opacity: 0; transform: translateY(var(--in-y)); filter: blur(var(--in-blur)); } }
/* The rock assembles first (~0.5s), then the copy cascades, then the header — an orchestrated intro. */
.js .hero__title { animation: title-in 1000ms var(--ease-expo) 450ms backwards; }
.js .hero__meta { animation: block-in 900ms var(--ease-expo) 560ms backwards; }
.js .hero__lead { animation: block-in 900ms var(--ease-expo) 680ms backwards; }
.js .hero__pills { animation: block-in 900ms var(--ease-expo) 800ms backwards; }
.js .hero__cta { animation: block-in 900ms var(--ease-expo) 900ms backwards; }
.js .hero__scroll { animation: block-in 900ms var(--ease-expo) 1000ms backwards; }

/* Exit on the first scroll step, using the individual transform properties so they don't fight the entrance. */
.hero__title, .hero__meta, .hero__lead, .hero__scroll {
  transition: opacity 1100ms var(--ease-expo), translate 1100ms var(--ease-expo), scale 1100ms var(--ease-expo), filter 1100ms var(--ease-expo), visibility 0s;
}
.hero__meta { transition-delay: 80ms; }
.hero__lead, .hero__scroll { transition-delay: 160ms; }
html.is-hero-out .hero__title, html.is-hero-out .hero__meta, html.is-hero-out .hero__lead, html.is-hero-out .hero__scroll {
  opacity: 0; visibility: hidden;
  transition: opacity 700ms cubic-bezier(.45, 0, .55, 1), translate 700ms var(--ease-out), scale 700ms var(--ease-out), filter 700ms var(--ease-out), visibility 0s 760ms;
}
html.is-hero-out .hero__title { translate: 0 -4vh; scale: .97; filter: blur(16px); }
html.is-hero-out .hero__meta, html.is-hero-out .hero__lead, html.is-hero-out .hero__scroll { translate: 0 -16px; filter: blur(10px); }
html.is-hero-out .hero__lead, html.is-hero-out .hero__scroll { transition-delay: 70ms, 70ms, 70ms, 70ms, 830ms; }
/* On phones the note is a glass card, so the card itself must leave too or an empty panel stays pinned. */
.hero__note { transition: opacity 700ms var(--ease-out) 160ms, visibility 0s; }
html.is-hero-out .hero__note { opacity: 0; visibility: hidden; transition: opacity 500ms var(--ease-out) 200ms, visibility 0s 760ms; }

/* ---------- Home: portfolio zoom-out ---------- */

.os { position: relative; z-index: 3; height: 420vh; }
.os__pin { position: sticky; top: 0; height: 100vh; overflow: clip; pointer-events: none; }

.frame-head {
  position: absolute; z-index: 1; top: 5.5%; left: 0; right: 0;
  display: grid; justify-items: center; gap: var(--s16); text-align: center;
  opacity: 0; visibility: hidden; transform-origin: 50% 0;
}
.frame-head__title { font-size: var(--t-l); line-height: var(--lh-l); letter-spacing: var(--tr-l); color: var(--ink-1); }
.frame-head__title span { display: block; color: var(--ink-3); }
/* On phones the frame is only ~56vw wide, so the headline must wrap inside it instead of running off both edges. */
@media (max-width: 767px) {
  .frame-head { padding: 0 24vw; }
  .frame-head__title { font-size: max(13px, calc(var(--u) * 15)); text-wrap: balance; }
}

/* A card flying in from past the camera: solid while near the eye, glass once it lands. */
.ow {
  position: absolute; isolation: isolate; will-change: transform, opacity; contain: layout style; opacity: 0;
  border-radius: var(--r-m); background: rgba(24, 25, 28, calc(.8 * var(--glass, 0))); box-shadow: var(--l-lift);
  color: var(--ink-1); font-size: var(--t-s); line-height: 1.2; letter-spacing: var(--tr-s);
  --ink-2: #cdd0d4; --ink-3: #aeb3b8;
}
.ow::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgb(24, 25, 28); opacity: var(--solid, 1); pointer-events: none;
}
.ow.has-glass {
  -webkit-backdrop-filter: blur(calc(var(--u) * 16 * var(--glass))) saturate(calc(1 + .4 * var(--glass)));
  backdrop-filter: blur(calc(var(--u) * 16 * var(--glass))) saturate(calc(1 + .4 * var(--glass)));
}

.ow--case { display: grid; gap: var(--s8); padding: calc(var(--u) * 6) calc(var(--u) * 6) var(--s8); border-radius: var(--r-l); width: var(--w); }
.ow--case img { width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; border-radius: calc(var(--r-l) - var(--u) * 6); background: #111; }
.ow--case figcaption { display: grid; gap: 3px; padding: 0 calc(var(--u) * 6); font-weight: 500; }
.ow--case figcaption span { font-weight: 400; color: var(--ink-3); }

.ow--toast { display: flex; align-items: center; gap: var(--s12); height: calc(var(--u) * 48); padding: 0 var(--s16) 0 var(--s12); white-space: nowrap; font-weight: 500; }
.ow--toast .script { font-size: calc(var(--u) * 26); }
.ow--pill {
  display: inline-flex; align-items: center; gap: var(--s8); height: calc(var(--u) * 48); padding: 0 var(--s24);
  font-size: var(--t-m); font-weight: 500; white-space: nowrap; pointer-events: auto; border-radius: var(--r-pill);
}
/* Solid orange: the shared .ow glass fill would otherwise darken it into a muddy, easy-to-miss button. */
.ow--pill, .ow--pill.has-glass { background: var(--orange); color: var(--white); -webkit-backdrop-filter: none; backdrop-filter: none; }
.ow--pill::before { background: var(--orange); opacity: 1; }
@media (hover: hover) and (pointer: fine) { .ow--pill:hover { background: var(--orange-hi); } }

/* Card placement around the frame (the frame ends at 22–78 vw × 22–78 vh). */
.ow--c1 { left: 5vw;  top: 18vh; --w: calc(var(--u) * 270); --ar: 1400 / 968; z-index: 4; }
.ow--c2 { left: 22vw; top: 46vh; --w: calc(var(--u) * 150); --ar: 734 / 1316; z-index: 6; }
.ow--c3 { left: 3vw;  top: 62vh; --w: calc(var(--u) * 240); --ar: 1110 / 546; z-index: 7; }
.ow--c4 { left: 64vw; top: 16vh; --w: calc(var(--u) * 250); --ar: 1400 / 782; z-index: 3; }
.ow--c5 { left: 74vw; top: 42vh; --w: calc(var(--u) * 260); --ar: 1400 / 783; z-index: 5; }
.ow--c6 { left: 61vw; top: 57vh; --w: calc(var(--u) * 140); --ar: 770 / 1380; z-index: 8; }
.ow--c7 { left: 86vw; top: 64vh; --w: calc(var(--u) * 130); --ar: 660 / 1178; z-index: 4; }
.ow--toast { left: 0; right: 0; width: max-content; margin: 0 auto; top: calc(80vh - 10px); z-index: 9; }
.ow--pill { left: 40vw; top: 89vh; z-index: 9; }

/* ---------- Home: pillar screens ---------- */

.screen { position: relative; z-index: 2; padding: 64vh 0 24vh; }
.screen__col { display: grid; gap: var(--s72); width: min(calc(var(--u) * 520), 38vw); }
.screen--right .screen__col { margin-left: 56vw; }
.screen--left .screen__col { margin-left: 24px; }
/* Text-left screens have open space to the right, so the service chips may run wider than the copy column and
   sit on one line instead of leaving a lone chip on a second row. They still wrap if the window is too narrow. */
.screen--left .screen__col > .chips { width: max(100%, min(calc(var(--u) * 880), 62vw)); }
.screen__head { display: grid; gap: var(--s24); }
.screen__title { font-size: var(--t-l); font-weight: 400; line-height: var(--lh-l); letter-spacing: var(--tr-l); color: var(--ink-1); }
/* The second phrase is the accent, so it is lit in a lighter brand orange instead of fading into grey. */
.screen__title .sub { display: block; color: var(--orange-soft, #f26a4c); }
.screen__title .sub--inline { display: inline; }
/* Social Media has five services: kept to the copy column so they split into two rows (3 + 2) instead of 4 + 1. */
#social-media .screen__col > .chips { width: 100%; }
@media (max-width: 767px) { .screen--left .screen__col > .chips, #social-media .screen__col > .chips { width: 100%; } }
.text { max-width: 44ch; color: var(--ink-2); }

.steps { display: grid; gap: var(--s16); }
.steps li { display: grid; grid-template-columns: calc(var(--u) * 28) 1fr; gap: var(--s12); align-items: baseline; }
.steps__n { font-size: var(--t-s); color: var(--orange); font-variant-numeric: tabular-nums; }
.steps strong { display: block; font-weight: 500; color: var(--ink-1); }
.steps p { font-size: var(--t-s); line-height: var(--lh-s); color: var(--ink-3); }

.feature { display: grid; gap: var(--s16); }
.feature img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-m); }
.feature p { font-size: var(--t-s); line-height: var(--lh-s); color: var(--ink-2); }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s8); }
.thumbs figure { display: grid; gap: var(--s8); }
.thumbs img { width: 100%; aspect-ratio: 3 / 5; object-fit: cover; border-radius: var(--r-s); }
.thumbs figcaption { font-size: var(--t-s); line-height: var(--lh-s); color: var(--ink-3); }

/* ---------- Home: brands, closing ---------- */


.brands { position: relative; z-index: 2; padding: var(--s120) var(--gutter); display: grid; gap: var(--s48); }
.brands__head { display: grid; gap: var(--s24); max-width: calc(var(--u) * 760); }
.h2 { font-size: var(--d-2); line-height: var(--lh-d2); font-weight: 500; letter-spacing: -.03em; color: var(--ink-1); }
/* Logo marquee: two rows drifting in opposite directions, full bleed while the heading keeps the gutter.
   Each row holds its 8 logos twice; sliding the track by -50 % lands exactly on the copy, so the loop
   is seamless. Pure CSS: no frames are spent here, and it pauses on hover and off-screen. */
.marquee {
  display: grid; gap: var(--s12); margin: 0 calc(var(--gutter) * -1); overflow: clip;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.marquee__row { overflow: clip; }
.marquee__track { display: flex; gap: var(--s12); width: max-content; margin: 0; padding: 0; list-style: none; animation: marquee 52s linear infinite; }
.marquee__row--rev .marquee__track { animation-direction: reverse; animation-duration: 58s; }
.marquee.is-off .marquee__track { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee__track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--s12) / 2)); } }
.brands__logo {
  flex: none; width: clamp(130px, calc(var(--u) * 200), 220px); display: grid; place-items: center; aspect-ratio: 3 / 2;
  border-radius: var(--r-m); background: rgba(24, 24, 26, .6); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.brands__logo img { display: block; max-width: 64%; max-height: 46%; width: auto; height: auto; opacity: .72; transition: opacity var(--dur-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .brands__logo:hover img { opacity: 1; } }
@media (max-width: 767px) { .brands__logo { width: 130px; } }
/* Reduced motion: no drift; the original logos wrap into a static grid and the copies disappear. */
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; margin: 0; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee [data-dup] { display: none; }
}
.effie { display: inline-flex; align-items: center; gap: var(--s12); color: var(--ink-2); font-size: var(--t-s); }

/* ---------- Home: manifesto ---------- */

/* One viewport tall, not pinned: the paragraphs ignite character by character once in view
   (lib/glow.js). Same black as the site: depth comes only from faint light, which fades out at the
   section's edges so there is no visible block. */
/* Pinned with extra scroll length: the glow reveal (lib/glow.js) maps onto this travel. */
.manifesto { --manifesto-vh: 200vh; position: relative; z-index: 2; height: var(--manifesto-vh); }
.manifesto__sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: clip; isolation: isolate; }
.manifesto__atmos {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 42% 30%, rgba(233, 74, 46, .08), rgba(233, 74, 46, 0) 70%),
    radial-gradient(26% 30% at 60% 26%, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0) 70%),
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, .03) 28%, transparent 46%),
    linear-gradient(165deg, rgba(255, 255, 255, .045) 0%, transparent 30%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
/* Faint scanlines, the studio-monitor texture of the reference. */
.manifesto__atmos::after {
  content: ""; position: absolute; inset: 0; opacity: .2;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 5px);
}
.manifesto__inner { width: min(80vw, 1180px); display: grid; justify-items: center; gap: clamp(20px, calc(var(--u) * 40), 48px); text-align: center; }
/* Quentin's long descenders (p, g) hang well below its line box, so the accent needs real room above the rule. */
.manifesto__head { display: grid; justify-items: center; gap: var(--s24); }
.manifesto__rule { margin-bottom: var(--s8); }
/* "The concept" as a watermark: huge script behind the copy, faded with a vertical gradient so it reads
   as texture rather than a heading, and never competes with the headline. */
.manifesto__mark {
  position: absolute; z-index: 0; left: 50%; top: 46%; margin: 0;
  translate: -50% -50%; rotate: -6deg;
  font-size: min(15vw, calc(var(--u) * 230)); line-height: 1; white-space: nowrap; pointer-events: none; user-select: none;
  background: linear-gradient(180deg, rgba(233, 74, 46, .26) 0%, rgba(233, 74, 46, .1) 55%, rgba(233, 74, 46, 0) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: blur(.5px);
}
.manifesto__inner { position: relative; z-index: 1; }
@media (max-width: 767px) { .manifesto__mark { font-size: 22vw; top: 40%; rotate: -8deg; } }
/* A short rule with a soft glow, between the accent and the headline. */
.manifesto__rule { display: block; width: 96px; height: 1px; background: var(--orange); opacity: .6; box-shadow: 0 0 18px rgba(233, 74, 46, .9); }
.manifesto__punch { font-size: calc(var(--d-2) * 1.15); line-height: var(--lh-d2); font-weight: 500; letter-spacing: -.03em; color: var(--ink-1); text-wrap: balance; }
.manifesto__fill { position: relative; width: 100%; }
.manifesto__text {
  font: 400 clamp(18px, 1.8vw, 29px) / 1.4 var(--font-text); letter-spacing: -.005em;
  color: #c9c9ce; margin: 0; text-wrap: pretty;
}
.manifesto__text + .manifesto__text { margin-top: .7em; }
.manifesto__text strong { font-weight: 500; color: #f26a4c; }

/* Per-character ignite/glow/settle; lib/glow.js sets opacity, colour and shadow inline per scroll head. */
.gw { display: inline-block; white-space: nowrap; }
[data-glow].is-glow-ready .gc { display: inline-block; opacity: 0; will-change: opacity, color; }
html:not(.js) .manifesto { height: auto; }
html:not(.js) .manifesto__sticky { position: static; height: auto; padding: 120px 0; }

/* ---------- Closing CTA: a split card that turns the line into a choice ---------- */

.cta { position: relative; z-index: 2; padding: var(--s48) var(--gutter) 0; }
.cta__card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s48);
  padding: var(--s72) var(--s48); border-radius: var(--r-l);
  /* Grainy brand photo (crew silhouettes on red) under a dark wash so the copy always wins. */
  background:
    linear-gradient(100deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .72) 45%, rgba(0, 0, 0, .55) 100%),
    url("/assets/photos/brand-04.webp") center / cover;
}
.cta__lead { display: grid; align-content: space-between; gap: var(--s48); }
.cta__script { font-size: calc(var(--u) * 46); transform: rotate(-5deg); transform-origin: left bottom; width: max-content; }
.cta__title { font-size: var(--d-2); line-height: var(--lh-d2); font-weight: 500; letter-spacing: -.03em; max-width: 13ch; text-wrap: balance; }
/* The hand-drawn oval circles "la montaña", like a note on a print-out. */
.cta__ring { position: relative; display: inline-block; white-space: nowrap; }
.cta__ring img { position: absolute; left: -12%; top: -32%; width: 124%; height: 164%; max-width: none; pointer-events: none; }
.cta__pick { display: grid; gap: var(--s16); align-content: start; }
.cta__ask { font-size: var(--t-l); line-height: var(--lh-l); letter-spacing: var(--tr-l); color: var(--ink-1); }
.cta__options { display: grid; gap: var(--s8); }
.cta__opt {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s16);
  min-height: calc(var(--u) * 84); padding: var(--s16) var(--s24); border-radius: var(--r-m);
  background: rgba(20, 21, 23, .62); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  transition: background-color var(--dur-ui) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.cta__opt:active { transform: scale(var(--press)); }
.cta__n { font-size: var(--t-s); color: var(--orange); font-variant-numeric: tabular-nums; }
.cta__txt { display: grid; gap: 4px; }
.cta__txt strong { font-size: var(--t-l); font-weight: 400; letter-spacing: var(--tr-l); line-height: var(--lh-l); }
.cta__txt small { font-size: var(--t-s); line-height: var(--lh-s); color: var(--ink-2); }
.cta__go { font-size: var(--t-l); color: var(--orange); transition: transform var(--dur-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .cta__opt:hover { background: rgba(233, 74, 46, .22); }
  .cta__opt:hover .cta__go { transform: translateX(4px); }
}
.cta__foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s16) var(--s24); margin-top: var(--s8); }
.cta__contact { font-size: var(--t-s); color: var(--ink-2); }

/* ---------- Footer ---------- */

.ft { position: relative; z-index: 3; background: var(--site, #000); padding: var(--s192) var(--gutter) 0; display: grid; gap: var(--s72); overflow: hidden; }
.ft__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s48); }
.ft__intro { display: grid; gap: var(--s16); align-content: start; }
.ft__seal { width: clamp(88px, calc(var(--u) * 104), 112px); height: auto; }
.ft__lede { max-width: 30ch; font-size: var(--t-l); line-height: var(--lh-l); letter-spacing: var(--tr-l); color: var(--ink-2); }
.ft__label { font-size: var(--t-s); color: var(--ink-3); margin-bottom: var(--s16); }
.ft__col li + li { margin-top: var(--s12); }
.ft__col a { font-size: var(--t-m); color: var(--ink-2); transition: color var(--dur-ui) var(--ease-out); }
.ft__col a[href]:hover { color: var(--ink-1); }
.is-pending { color: var(--ink-3) !important; }
.ft__bottom { display: flex; justify-content: space-between; gap: var(--s16); flex-wrap: wrap; padding-top: var(--s24); border-top: 1px solid var(--rule); font-size: var(--t-s); color: var(--ink-3); }
/* The wordmark spans the page edge to edge (24 px gutters) and is cut by the bottom of the page.
   It is the vector logo (assets/logo/wordmark.svg) used as a mask, so it stays crisp at any width and
   takes a vertical orange → ember fill. */
/* ~70 % of the full-bleed width: still wide and loud, no longer overwhelming. */
.ft__crop { --mark-w: min(70vw, 1400px); overflow: hidden; height: calc(var(--mark-w) * 463 / 1144 * .9); }
.ft__mark {
  display: block; width: var(--mark-w); aspect-ratio: 1144 / 463; margin-inline: auto;
  background: linear-gradient(180deg, #ff6747 0%, #e94a2e 40%, #8a2616 78%, #3a1009 100%);
  -webkit-mask: url("/assets/logo/wordmark.svg") center / contain no-repeat;
  mask: url("/assets/logo/wordmark.svg") center / contain no-repeat;
}
.js .ft__mark.rv { --rv-y: 38%; filter: none; }
/* Particle version (lib/particlelogo.js): the canvas takes over once drawn; the mask stays as fallback. */
.ft__mark { position: relative; }
.ft__mark.has-particles { background: none; -webkit-mask: none; mask: none; }
.ft__particles { position: absolute; left: 0; top: 0; display: block; }

/* ---------- Bottom veil ---------- */

.veil { position: fixed; left: 0; right: 0; bottom: 0; height: 16vh; z-index: 2; pointer-events: none; }
.veil__layer { position: absolute; inset: 0; }

/* ---------- Inner pages ---------- */

.page { position: relative; z-index: 2; }
.section { padding: var(--s120) var(--gutter); display: grid; gap: var(--s48); }
.section__head { display: grid; gap: var(--s16); max-width: calc(var(--u) * 760); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 260), 1fr)); gap: var(--s16); }
.card {
  display: grid; align-content: space-between; gap: var(--s32); min-height: calc(var(--u) * 210); padding: var(--s24);
  border-radius: var(--r-l); background: rgba(24, 26, 29, .68); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.card__n { font-size: var(--t-s); color: var(--orange); font-variant-numeric: tabular-nums; }
.card h3 { font-size: var(--t-l); font-weight: 400; line-height: var(--lh-l); letter-spacing: var(--tr-l); }
.card p { margin-top: var(--s8); font-size: var(--t-s); line-height: var(--lh-s); color: var(--ink-2); }

.filters { display: inline-flex; flex-wrap: wrap; gap: var(--s4); padding: var(--s4); border-radius: var(--r-s); background: var(--fill-1); width: max-content; max-width: 100%; }
.filters button {
  height: calc(var(--u) * 36); padding: 0 var(--s16); border: 0; border-radius: var(--r-xs); background: transparent;
  font-size: var(--t-s); font-weight: 500; color: var(--ink-2); cursor: pointer;
  transition: background-color var(--dur-ui) var(--ease-out), color var(--dur-ui) var(--ease-out);
}
.filters button[aria-pressed="true"] { background: var(--orange); color: var(--white); }
@media (hover: hover) and (pointer: fine) { .filters button:not([aria-pressed="true"]):hover { color: var(--ink-1); } }
.note { font-size: var(--t-s); color: var(--ink-3); }


/* Contact form fields (contact page). */
.contact__list { display: grid; gap: var(--s16); }
.contact__list li { display: grid; gap: 4px; padding-bottom: var(--s16); border-bottom: 1px solid var(--rule); }
.contact__list span { font-size: var(--t-s); color: var(--ink-3); }
.contact__list a, .contact__list p { font-size: var(--t-l); letter-spacing: var(--tr-l); line-height: var(--lh-l); }
.form { display: grid; gap: var(--s16); padding: var(--s32); border-radius: var(--r-l); background: rgba(28, 30, 33, .62); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s16); }
.field { display: grid; gap: var(--s8); }
.field label { font-size: var(--t-s); color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: var(--btn-h); padding: 12px 14px; border: 1px solid transparent; border-radius: var(--r-s);
  background: var(--fill-1); color: var(--ink-1); font-size: 16px; outline: none;
  transition: border-color var(--dur-ui) var(--ease-out), background-color var(--dur-ui) var(--ease-out);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: #141516; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); background: var(--fill-2); }
.field [aria-invalid="true"] { border-color: #ff8a73; }
.field__error { min-height: 1em; font-size: 12px; color: #ff8a73; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s16); flex-wrap: wrap; }
.form__status { font-size: var(--t-s); color: var(--ink-2); }
.form__status.is-ok { color: var(--ink-1); }
.form__status.is-error { color: #ff8a73; }
.form.is-sending .btn { opacity: .6; pointer-events: none; }

/* ---------- Service pages ---------- */

/* Shared atmosphere: the manifesto's faint light on black, fading out at the block's edges. */
.atmos {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 24% 40%, rgba(233, 74, 46, .08), rgba(233, 74, 46, 0) 70%),
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, .03) 28%, transparent 46%),
    linear-gradient(165deg, rgba(255, 255, 255, .045) 0%, transparent 30%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
.atmos::after { content: ""; position: absolute; inset: 0; opacity: .2; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 5px); }

/* Hero: copy on the left two-thirds; the dimmed rock sits top-right (scroll.js SIDE). */
.svc-hero { position: relative; isolation: isolate; min-height: 100vh; display: grid; align-items: end; padding: calc(var(--hd-h) + 80px) var(--gutter) var(--s120); }
.svc-hero__inner { display: grid; gap: var(--s24); max-width: min(56vw, calc(var(--u) * 760)); }
/* Service + contact heroes share one restrained display size (the home's .h2 step), so they don't
   dwarf the page the way --d-1 did. */
.svc-hero__title, .ct-hero__title { font-size: var(--d-2); line-height: 1.05; letter-spacing: -.03em; font-weight: 500; color: var(--ink-1); }
.svc-hero__title { text-wrap: balance; }
.svc-hero__title .sub { display: block; }
.svc-hero__title .sub--inline { display: inline; }
.svc-hero__title .sub, .h2 .sub, .ct-hero__title .sub { color: #f26a4c; }
.svc-hero__lede { max-width: 52ch; }
.svc-hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s12); margin-top: var(--s8); }

.svc-section .section__head { max-width: calc(var(--u) * 820); }
.svc-cards { margin: 0; padding: 0; list-style: none; }
.svc-card {
  position: relative; display: grid; align-content: space-between; gap: var(--s32); min-height: calc(var(--u) * 220); padding: var(--s24);
  border-radius: var(--r-l); background: rgba(22, 23, 26, .72); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.svc-card__n { font-size: var(--t-s); color: var(--orange); font-variant-numeric: tabular-nums; }
.svc-card h3 { font-size: var(--t-l); font-weight: 400; line-height: var(--lh-l); letter-spacing: var(--tr-l); }
.svc-card p { font-size: var(--t-s); line-height: var(--lh-s); color: var(--ink-2); }

/* Impact Unlock: three overlapping circles meeting at an orange point, with the steps beside them. */
.unlock-viz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s72); align-items: center; }
.venn { position: relative; width: min(100%, calc(var(--u) * 460)); aspect-ratio: 1; justify-self: center; }
.venn__c {
  position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center;
  border: 1px solid rgba(255, 255, 255, .22); background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015) 70%);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.venn__c em { max-width: 9ch; font-style: normal; font-size: var(--t-s); line-height: 1.25; color: var(--ink-2); }
.venn__c--1 { left: 21%; top: 0; }
.venn__c--1 em { transform: translateY(-34%); }
.venn__c--2 { left: 0; top: 38%; }
.venn__c--2 em { transform: translate(-22%, 18%); }
.venn__c--3 { right: 0; top: 38%; }
.venn__c--3 em { transform: translate(22%, 18%); }
/* Where all three meet: the stone worth pushing. */
.venn__core {
  position: absolute; left: 50%; top: 57%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 0 6px rgba(233, 74, 46, .18), 0 0 40px 8px rgba(233, 74, 46, .55);
}
.unlock-viz__copy { display: grid; gap: var(--s32); }
.unlock-viz__copy .steps { gap: var(--s24); }
.unlock-viz__copy .steps strong { font-size: var(--t-l); font-weight: 400; letter-spacing: var(--tr-l); }
.unlock-viz__out { display: grid; gap: var(--s8); padding-top: var(--s24); border-top: 1px solid var(--rule); color: var(--ink-2); font-size: var(--t-m); }
.unlock-viz__out .script { font-size: calc(var(--u) * 44); }

/* Pull quote with the glowing character reveal (lib/glow.js). */
.svc-quote { position: relative; isolation: isolate; display: grid; justify-items: center; gap: var(--s16); padding: var(--s192) var(--gutter); text-align: center; }
.svc-quote__accent { font-size: calc(var(--u) * 48); }
.svc-quote__text { max-width: 22ch; font-size: var(--d-2); line-height: var(--lh-d2); font-weight: 500; letter-spacing: -.03em; text-wrap: balance; }
.svc-quote__text strong { font-weight: 500; }

/* Related cases: open the shared lightbox. */
.svc-cases__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s24); flex-wrap: wrap; max-width: none !important; }
.svc-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(var(--u) * 240), 1fr)); gap: var(--s16); margin: 0; padding: 0; list-style: none; }
.svc-case {
  display: grid; gap: var(--s12); width: 100%; padding: calc(var(--u) * 6) calc(var(--u) * 6) var(--s16); border: 0; cursor: zoom-in;
  border-radius: var(--r-l); background: rgba(22, 23, 26, .72); color: var(--ink-1); text-align: left;
}
.svc-case__media { display: block; overflow: hidden; aspect-ratio: 4 / 5; border-radius: calc(var(--r-l) - var(--u) * 6); background: #0d0d0e; }
.svc-case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-expo); }
.svc-case__cap { display: grid; gap: 4px; padding: 0 var(--s12); }
.svc-case__cap span { font-size: var(--t-s); color: #f26a4c; }
.svc-case__cap strong { font-size: var(--t-l); font-weight: 400; letter-spacing: var(--tr-l); line-height: var(--lh-l); }
@media (hover: hover) and (pointer: fine) { .svc-case:hover .svc-case__media img { transform: scale(1.04); } }

/* ---------- Contact page ---------- */

.ct-hero { position: relative; isolation: isolate; min-height: 70vh; display: grid; align-items: end; padding: calc(var(--hd-h) + 80px) var(--gutter) var(--s72); overflow: hidden; }
/* Grainy brand photo (camera), darkened hard on the copy side so the text always wins. */
.ct-hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .9) 38%, rgba(0, 0, 0, .55) 70%, rgba(0, 0, 0, .7) 100%),
    linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 40%),
    url("/assets/photos/brand-06.webp") 70% 30% / cover no-repeat;
}
.ct-hero__inner { display: grid; gap: var(--s24); max-width: calc(var(--u) * 820); }
.ct-hero__title { text-wrap: balance; }
.ct-hero__inner .text { font-size: var(--t-l); line-height: var(--lh-l); letter-spacing: var(--tr-l); }
.ct-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s24); align-items: start; padding: 0 var(--gutter) var(--s120); }
.ct-form { padding: var(--s32); }
.ct-form .field input, .ct-form .field textarea { border-radius: var(--r-s); }
.ct-form .field input:focus-visible, .ct-form .field textarea:focus-visible { box-shadow: 0 0 0 3px rgba(233, 74, 46, .35); }
/* Service as pill chips (radio inputs): same field name, keyboard and screen-reader friendly. */
.pills { border: 0; margin: 0; padding: 0; min-width: 0; }
.pills legend { padding: 0; margin-bottom: var(--s8); font-size: var(--t-s); color: var(--ink-2); }
.pills__row { display: flex; flex-wrap: wrap; gap: var(--s8); }
.pill { position: relative; display: inline-flex; cursor: pointer; border-radius: var(--r-s); }
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; height: calc(var(--u) * 42); min-height: 40px; padding: 0 var(--s16); border-radius: var(--r-s);
  background: var(--fill-1); color: var(--ink-2); font-size: var(--t-s); font-weight: 500;
  transition: background-color var(--dur-ui) var(--ease-out), color var(--dur-ui) var(--ease-out);
}
.pill input:checked + span { background: var(--orange); color: var(--white); }
.pill input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .pill:hover input:not(:checked) + span { color: var(--ink-1); background: var(--fill-2); } }
.ct-panel {
  display: grid; gap: var(--s24); padding: var(--s32); border-radius: var(--r-l);
  background: rgba(22, 23, 26, .72); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.ct-panel__seal { width: 96px; height: auto; }
.ct-panel__who { display: grid; gap: 4px; }
.ct-panel__name { font-size: var(--t-l); letter-spacing: var(--tr-l); line-height: var(--lh-l); }
.ct-panel__role { font-size: var(--t-s); color: var(--ink-2); }
.ct-panel .contact__list a, .ct-panel .contact__list p { font-size: var(--t-m); line-height: var(--lh-m); letter-spacing: var(--tr-m); }

@media (max-width: 1000px) {
  .unlock-viz { grid-template-columns: 1fr; gap: var(--s48); }
  .ct-split { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .svc-hero { min-height: 92vh; padding: calc(var(--hd-h) + 48px) 16px 72px; }
  .svc-hero__inner { max-width: none; }
  .svc-quote { padding: 120px 16px; }
  .ct-hero { min-height: 60vh; padding: calc(var(--hd-h) + 48px) 16px 48px; }
  .ct-split { padding: 0 16px 72px; }
  .ct-form, .ct-panel { padding: 20px 16px; }
  .venn__c em { font-size: 12px; }
}

/* ---------- Portfolio playground (lib/playground.js) ---------- */

/* Pinned stage: the heading stays centred while two columns of frames stream past it, above it. The
   section's height (its scroll length) is set by JS from the column lengths. */
.pg { position: relative; z-index: 2; min-height: 300vh; }
.pg__pin { position: sticky; top: 0; height: 100vh; overflow: clip; isolation: isolate; }
.pg__center {
  position: absolute; inset: 0; z-index: 10; display: grid; place-content: center; justify-items: center; gap: var(--s24);
  padding: 0 var(--gutter); text-align: center;
}
.pg__eyebrow { display: flex; align-items: center; gap: var(--s12); }
.pg__eyebrow i { width: 32px; height: 1px; background: var(--orange); box-shadow: 0 0 12px rgba(233, 74, 46, .8); }
.pg__title { max-width: 13ch; font-size: calc(var(--d-1) * .56); line-height: var(--lh-d1); font-weight: 500; letter-spacing: -.035em; text-wrap: balance; }
.pg__title .sub { color: #f26a4c; }
.pg__sub { max-width: 40ch; font-size: var(--t-l); line-height: var(--lh-l); letter-spacing: var(--tr-l); }
/* Columns float above the heading; only the cards catch the pointer, so the CTA under them stays usable. */
.pg__cols {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 10vw, 160px);
  max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter);
}
.pg__col { display: grid; gap: clamp(48px, 9vh, 120px); align-content: start; margin: 0; padding: 0; list-style: none; will-change: transform; }
/* Columns hug the outer edges so the heading stays readable in the open middle as the cards stream past. */
.pg__col--l { justify-items: start; }
.pg__col--r { justify-items: end; }

.pg-card {
  position: relative; display: block; width: calc(min(300px, 21vw) * var(--s, 1)); aspect-ratio: 1; padding: 0; border: 0; cursor: zoom-in;
  /* Scatter (lib/playground.js): sideways nudge, extra gap, and a depth drift relative to the column. */
  margin-top: var(--mt, 0); translate: var(--x, 0) calc((var(--pz, 1) - 1) * var(--py, 0) * 1px);
  border-radius: var(--r-l); overflow: hidden; background: #0d0d0e; pointer-events: auto;
  transform: rotate(var(--rot, 0deg)); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform 500ms var(--ease-out);
}
.pg-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-expo); }
/* Halftone dots over the photo, like print grain. */
.pg-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .2; mix-blend-mode: multiply;
  background: radial-gradient(circle, #000 1px, transparent 1px) 0 0 / 4px 4px;
}
/* Hover: dark blur wash and a white pill with the case title. */
.pg-card::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity var(--dur-ui) var(--ease-out);
}
.pg-card__label {
  position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -40%); opacity: 0; white-space: nowrap;
  max-width: 88%; overflow: hidden; text-overflow: ellipsis;
  padding: 10px 16px; border-radius: var(--r-pill); background: var(--white); color: var(--black); font-size: var(--t-s); font-weight: 500;
  transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out);
}
.pg-card__label em { font-style: normal; color: var(--orange); }
@media (hover: hover) and (pointer: fine) {
  .pg-card:hover { transform: rotate(0deg); }
  .pg-card:hover img { transform: scale(1.05); }
  .pg-card:hover::after { opacity: 1; }
  .pg-card:hover .pg-card__label { opacity: 1; transform: translate(-50%, -50%); }
}
.pg-card:focus-visible::after { opacity: 1; }
.pg-card:focus-visible .pg-card__label { opacity: 1; transform: translate(-50%, -50%); }

.pf-cases .svc-cases__head { align-items: flex-end; }
/* Project related: tidier, smaller, aligned to the content column (scoped so service pages are untouched). */
.project__related { padding-top: var(--s72); padding-bottom: var(--s120); display: grid; gap: var(--s32); }
.project__related .h2 { font-size: calc(var(--d-2) * .7); }
.project__related .svc-cases { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s16); }
.project__related .svc-case { padding: calc(var(--u) * 5) calc(var(--u) * 5) var(--s12); gap: var(--s8); }
.project__related .svc-case__media { aspect-ratio: 4 / 3; }
.project__related .svc-case__cap { padding: 0 calc(var(--u) * 5); }
.project__related .svc-case__cap span { font-size: calc(var(--t-s) * .92); }
.project__related .svc-case__cap strong { font-size: var(--t-m); font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
.project__related .more { font-size: var(--t-s); }

/* Case detail lightbox (lib/lightbox.js): a framed glass panel over a dimmed, blurred page. */
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 24px; }
.lb[hidden] { display: none; }
.lb .scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .68); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: zoom-out; }
.lb__panel {
  position: relative; display: grid; grid-template-columns: auto minmax(260px, 340px); align-items: stretch;
  width: max-content; max-width: min(92vw, 1040px); margin: 0; overflow: hidden; border-radius: var(--r-l);
  background: rgba(18, 19, 21, .92); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  box-shadow: 0 50px 130px -30px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(255, 255, 255, .08); transform-origin: 50% 50%;
}
/* The image sits in a defined area and is shown whole (contain), so a tall portrait never blows up. */
.lb__media { display: grid; place-items: center; width: min(52vw, 560px); height: min(72vh, 640px); background: #0d0d0e; }
.lb__panel.is-portrait .lb__media { width: min(42vw, 430px); }
.lb__media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.lb__body { display: grid; align-content: center; gap: var(--s16); padding: var(--s32); }
.lb__where { font-size: var(--t-s); letter-spacing: var(--tr-caps); text-transform: uppercase; color: #f26a4c; }
.lb__title { font: 500 var(--t-l) / 1.12 var(--font-text); letter-spacing: var(--tr-l); color: var(--ink-1); }
.lb__note { font-size: var(--t-m); line-height: var(--lh-m); color: var(--ink-2); }
.lb__close {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; cursor: pointer; z-index: 2;
  display: grid; place-items: center; font-size: 24px; line-height: 1; color: var(--ink-1);
  border-radius: var(--r-s); background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: var(--chip-blur); backdrop-filter: var(--chip-blur);
  transition: background-color var(--dur-ui) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .lb__close:hover { background: var(--orange); } }
@media (max-width: 640px) {
  /* The panel becomes a scrollable sheet: photo on top, text below, a big close target. */
  .lb { padding: 0; place-items: stretch; }
  .lb__panel { grid-template-columns: 1fr; grid-template-rows: auto 1fr; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; overflow-y: auto; }
  .lb__media { width: 100%; height: min(52vh, 420px); }
  .lb__panel.is-portrait .lb__media { width: 100%; }
  .lb__body { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .lb__close { width: 48px; height: 48px; top: 10px; right: 10px; }
  .pg__cols { gap: 14px; padding: 0 12px; }
  .pg-card { width: calc(min(42vw, 200px) * var(--s, 1)); }
  .pg__title { font-size: calc(var(--d-1) * .9); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .lb__media { height: min(82vh, 420px); }
}
/* Reduced motion: no pin, no parallax — the heading, then a static two-column grid of frames. */
@media (prefers-reduced-motion: reduce) {
  .pg { min-height: 0; height: auto !important; }
  .pg__pin { position: static; height: auto; overflow: visible; }
  .pg__center { position: static; padding: calc(var(--hd-h) + 80px) var(--gutter) var(--s72); }
  .pg__cols { position: static; padding-bottom: var(--s72); }
  .pg__col { transform: none !important; }
  .pg-card { transform: rotate(var(--rot, 0deg)); translate: none; }
}

/* ---------- Reveal ---------- */

:root { --rv-in: 800ms; --rv-out: 420ms; }
.js .rv {
  --rv-y: 32px; opacity: 0; transform: translateY(var(--rv-y)); filter: blur(calc(var(--u) * 12));
  transition: opacity var(--rv-out) var(--ease-out), transform var(--rv-out) var(--ease-out), filter var(--rv-out) var(--ease-out);
}
.js [data-dir="up"]:not(.is-in) .rv, .js .rv[data-dir="up"]:not(.is-in) { --rv-y: -24px; }
.js .rv--word { display: inline-block; --rv-y: .35em; filter: blur(calc(var(--u) * 10)); }
.js .rv--chip, .js .rv--panel { filter: none; }
.js .rv--panel { --rv-y: 48px; }
.js .is-in .rv, .js .rv.is-in {
  opacity: 1; transform: none; filter: none;
  transition: opacity var(--rv-in) var(--ease-expo), transform var(--rv-in) var(--ease-expo), filter var(--rv-in) var(--ease-expo);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js .is-in .rv--word { transition-duration: 750ms; }
/* Catch-up (fast scroll, or a block already passed): everything at once, quickly. */
.js .rv-now .rv, .js .rv.rv-now { transition-delay: 0ms !important; transition-duration: 280ms !important; }
/* The brand marquee never waits on a cascade: a short fade the moment it is in view (lib/marquee.js). */
.js .marquee { opacity: 0; transition: opacity 400ms var(--ease-out); }
.js .marquee.is-seen { opacity: 1; }

/* ---------- Phones ---------- */

@media (max-width: 767px) {
  .hero__title { font-size: var(--hero-fs, 34vw); }
  .hero__note {
    left: 8px; right: 8px; bottom: 8px; max-width: none; padding: 16px; border-radius: var(--r-l);
    background: var(--glass); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
    font-size: var(--t-m); line-height: var(--lh-m); letter-spacing: var(--tr-m);
  }
  .hero__meta { margin-bottom: var(--s12); color: var(--ink-2); white-space: normal; }
  .hero__lead span { color: var(--ink-2); }
  .hero__scroll { display: none; }

  .ow--c1 { left: 4vw;  top: 14vh; --w: calc(var(--u) * 180); }
  .ow--c2 { left: 6vw;  top: 52vh; --w: calc(var(--u) * 96); }
  .ow--c3 { left: 2vw;  top: 72vh; --w: calc(var(--u) * 160); }
  .ow--c4 { left: 52vw; top: 11vh; --w: calc(var(--u) * 170); }
  .ow--c5 { left: 54vw; top: 74vh; --w: calc(var(--u) * 170); }
  .ow--c6 { left: 76vw; top: 44vh; --w: calc(var(--u) * 90); }
  .ow--c7 { display: none; }
  .ow--toast { top: calc(88vh - 10px); }
  .ow--pill { left: 0; right: 0; width: max-content; margin: 0 auto; top: 93vh; }

  .screen { padding: 72vh 0 20vh; }
  .screen__col, .screen--right .screen__col, .screen--left .screen__col { width: auto; margin: 0 16px; gap: var(--s48); }
  .thumbs { grid-template-columns: repeat(3, 1fr); }

  /* Keep the pin on phones so the scroll-driven glow still has travel, just shorter. */
  .manifesto { --manifesto-vh: 180vh; }
  .manifesto__sticky { padding: 0 16px; }
  .manifesto__inner { width: 100%; gap: 20px; }
  .manifesto__punch { font-size: calc(var(--d-2) * .92); }
  .manifesto__text { font-size: 16px; }
  .cta { padding: var(--s24) 16px 0; }
  .cta__card { grid-template-columns: 1fr; gap: 40px; padding: 32px 18px 22px; }
  .cta__opt { padding: 14px 16px; gap: 12px; }
  .ft { padding: 96px 16px 0; gap: 48px; }
  .ft__grid { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .ft__intro { grid-column: 1 / -1; }
  .ft__crop { --mark-w: calc(100vw - 32px); }
  .form { padding: 18px; }
  .form__row { grid-template-columns: 1fr; }
  .filters { width: 100%; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .hero__title, .js .hero__meta, .js .hero__lead, .js .hero__pills, .js .hero__cta, .js .hero__scroll, .js .hd { animation: none; }
  .js body { animation: none; }
  .stage { transition: opacity .3s ease; }
  .hero__title, .hero__meta, .hero__lead, .hero__scroll,
  html.is-hero-out .hero__title, html.is-hero-out .hero__meta, html.is-hero-out .hero__lead, html.is-hero-out .hero__scroll {
    translate: none; scale: none; filter: none; transition: opacity 200ms ease, visibility 0s;
  }
  .js .rv, .js .is-in .rv, .js .rv.is-in { transform: none; filter: none; transition: opacity 200ms ease; transition-delay: 0ms; }
  .badge__dot--live { animation: none; }
  /* The scroll-driven glow shows fully lit at once, so the manifesto needs no pin travel. */
  .manifesto { height: auto !important; }
  .manifesto__sticky { position: relative; height: auto; min-height: 60vh; padding: var(--s120) 0; }
}

/* Portfolio backdrop rock: quieter than on other pages so the heading and the orange accent stay legible over it. */
.stage[data-stage-pose="backdrop"].is-in { opacity: .38; }

/* Portfolio: the home page's brand marquee between the pinned hero and the case grid; tighter than on the home page. */
.pf-brands { padding-block: var(--s72); gap: var(--s32); }

/* ---------- Mobile polish (phones ≤ 640px) ---------- */
/* One pass tightening type scale, spacing and tap targets so every page reads at 375–430px. */
@media (max-width: 640px) {
  /* Section rhythm: desktop padding is far too tall on a phone. */
  .section { padding: var(--s72) var(--gutter); gap: var(--s32); }
  .brands { padding: var(--s72) var(--gutter); gap: var(--s32); }
  .svc-quote { padding: 96px 16px; }

  /* Display headings: keep them bold but inside the viewport, no clipping. */
  .h2 { font-size: calc(var(--d-2) * .92); }
  /* The single grid column must be capped to the container (minmax 0 1fr) + min-width:0, or the long heading
     forces a ~2000px auto track that the body clips. */
  .brands { grid-template-columns: minmax(0, 1fr); }
  .brands, .brands__head { min-width: 0; }
  .brands__head { max-width: 100%; }
  .brands .h2, .brands .h2 .w { max-width: 100%; min-width: 0; font-size: calc(var(--d-2) * .78); overflow-wrap: anywhere; text-wrap: balance; }
  .svc-hero__title, .ct-hero__title { font-size: calc(var(--d-2) * .96); }
  .svc-hero__lede, .ct-hero__inner .text, .svc-hero__lede.text { font-size: var(--t-m); }
  .svc-quote__text { font-size: calc(var(--d-2) * .95); }
  .cta__title { font-size: calc(var(--d-2) * .95); }
  .pg__title { font-size: calc(var(--d-1) * .82); }
  .pg__sub { font-size: var(--t-m); max-width: 28ch; }

  /* Tap targets ≥ ~44px: chips, filters, service pills, form controls. */
  .chip { height: 40px; }
  .filters { gap: 6px; }
  .filters button { height: 42px; padding: 0 var(--s12); }
  .pill span { height: 44px; min-height: 44px; }
  .field input, .field select, .field textarea { min-height: 46px; }
  .seg__btn { height: 40px; }

  /* Playground: calm the card scatter so tilted cards don't collide or crowd the heading. */
  .pg-card { transform: rotate(calc(var(--rot, 0deg) * .4)); }
  .pg__cols { gap: 12px; }

  /* Brand marquee tiles a touch smaller so two fit with breathing room. */
  .brands__logo { width: 120px; }
}

/* ======================================================================
   Portfolio detail pages, carousel, portfolio carry, FAQ, service bands,
   mobile hero note, mobile frame cards, playground scatter.
   ====================================================================== */

/* ---------- Portfolio decorative carry section ---------- */
/* Scroll length for the portfolioScroll beat; the fixed [data-stage] canvas draws the carry over it. */
.pf-rock { position: relative; z-index: 2; height: 220vh; pointer-events: none; }
/* The portfolio stage is the payoff: full opacity (no dimming), the rock is gone except in this beat. */
.stage[data-stage-pose="portfolio"].is-in { opacity: 1; }
@media (max-width: 767px) { .stage[data-stage-pose="journey"].is-in { opacity: .5; } }
@media (max-width: 767px) { .pf-rock { height: 180vh; } }
@media (prefers-reduced-motion: reduce) { .pf-rock { height: 120vh; } }

/* ---------- Project pages ---------- */
.project { position: relative; z-index: 2; }
/* Back link as a small liquid-glass pill aligned to the title column. */
.project__back {
  display: inline-flex; align-items: center; gap: 8px; width: max-content;
  /* Inside .project__head, which already pads for the fixed header + the gutter — so no extra top/left offset here. */
  margin: 0 0 var(--s24) 0;
  height: 38px; padding: 0 var(--s16) 0 var(--s12); border-radius: var(--r-pill);
  font-size: var(--t-s); letter-spacing: var(--tr-s); color: var(--ink-2);
  background: rgba(20, 20, 24, .5);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: color var(--dur-ui) var(--ease-out), background-color var(--dur-ui) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.project__back .more__arrow {
  width: auto; height: auto; aspect-ratio: auto; display: inline-flex; padding: 0; border-radius: 0;
  background: none; color: var(--orange); font-size: 1.15em; transition: transform var(--dur-ui) var(--ease-out);
}
.project__back:active { transform: scale(var(--press)); }
@media (hover: hover) and (pointer: fine) {
  .project__back:hover { color: var(--ink-1); background: rgba(32, 32, 38, .6); }
  .project__back:hover .more__arrow { transform: translateX(-3px); }
}
/* No-backdrop-filter fallback. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .project__back { background: rgba(28, 28, 32, .92); }
}
.project__hero { position: relative; isolation: isolate; display: grid; gap: var(--s24); padding: var(--s48) var(--gutter) var(--s72); }
.project__hero-inner { display: grid; gap: var(--s16); max-width: calc(var(--u) * 900); }
.project__title { font-size: var(--d-1); line-height: var(--lh-d1); font-weight: 500; letter-spacing: -.035em; color: var(--ink-1); text-wrap: balance; }
.project__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s16); }
.project__brand { font-size: var(--t-l); letter-spacing: var(--tr-l); color: #f26a4c; }
.project__year { font-size: var(--t-s); color: var(--ink-3); }

/* Carousel */
.project__gallery { padding: 0 var(--gutter) var(--s72); }
.car { position: relative; max-width: calc(var(--u) * 1100); margin: 0 auto; }
.car__viewport { overflow: hidden; border-radius: var(--r-l); background: #0d0d0e; }
.car__track { display: flex; transition: transform 500ms var(--ease-expo); }
.car.is-static .car__track { transition: none; }
.car__slide { flex: 0 0 100%; margin: 0; display: grid; place-items: center; aspect-ratio: 16 / 10; background: #0d0d0e; }
.car__slide img { width: 100%; height: 100%; object-fit: contain; }
.car__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; cursor: pointer; z-index: 2;
  display: grid; place-items: center; font-size: 26px; line-height: 1; color: var(--ink-1);
  border-radius: var(--r-s); background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: var(--chip-blur); backdrop-filter: var(--chip-blur);
  transition: background-color var(--dur-ui) var(--ease-out), opacity var(--dur-ui) var(--ease-out);
}
.car__arrow--prev { left: 12px; }
.car__arrow--next { right: 12px; }
.car__arrow:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .car__arrow:not(:disabled):hover { background: var(--orange); } }
.car__dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--s16); }
.car__dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: var(--fill-3); cursor: pointer; transition: background-color var(--dur-ui) var(--ease-out); }
.car__dot[aria-current="true"] { background: var(--orange); }

/* Body: description + case blocks */
.project__body .project__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s48); align-items: start; }
.project__lead { display: grid; gap: var(--s16); }
.project__case { display: grid; gap: var(--s16); }
.project__block { padding: var(--s24); border-radius: var(--r-l); background: rgba(22, 23, 26, .72); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); }
.project__block h3 { font-size: var(--t-l); font-weight: 400; letter-spacing: var(--tr-l); color: var(--ink-1); margin-bottom: var(--s8); }
.project__block p { font-size: var(--t-m); line-height: var(--lh-m); color: var(--ink-2); }
.is-pending { color: var(--ink-3); }

/* ---------- Contact: compact hero + FAQ ---------- */
.ct-hero { min-height: 48vh; padding: calc(var(--hd-h) + 56px) var(--gutter) var(--s48); }
.ct-hero__inner { max-width: calc(var(--u) * 680); gap: var(--s16); }
.ct-hero__inner .text { font-size: var(--t-m); max-width: 46ch; }
.faq { padding: var(--s72) var(--gutter) var(--s120); display: grid; gap: var(--s32); max-width: calc(var(--u) * 900); }
.faq__head { display: grid; gap: var(--s12); }
.faq__list { display: grid; gap: var(--s8); }
.faq__item { border-radius: var(--r-l); background: rgba(22, 23, 26, .6); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); overflow: hidden; }
.faq__q {
  display: flex; align-items: center; gap: var(--s16); width: 100%; padding: var(--s24); cursor: pointer; list-style: none;
  font-size: var(--t-l); letter-spacing: var(--tr-l); line-height: 1.2; color: var(--ink-1);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-s); background: var(--fill-2); color: var(--orange); font-size: 22px; line-height: 1; transition: transform var(--dur-ui) var(--ease-out); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__q-text { flex: 1; }
.faq__a { padding: 0 var(--s24) var(--s24) calc(var(--s24) + 40px + var(--s16)); }
.faq__a p { font-size: var(--t-m); line-height: var(--lh-m); color: var(--ink-2); }
.faq__a .is-pending { color: var(--ink-3); }

/* ---------- Service pages: distinct dark photo band ---------- */
.svc-band { position: relative; isolation: isolate; min-height: 46vh; display: grid; align-items: end; padding: var(--s72) var(--gutter); overflow: hidden; }
.svc-band__bg {
  position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center;
  /* Melt the image into the black above and below instead of a hard rectangular cut. */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
}
.svc-band__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #000 0%, rgba(0,0,0,.84) 44%, rgba(0,0,0,.5) 100%), linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,0) 60%); }
.svc-band--estrategia .svc-band__bg { background-image: url("/assets/photos/brand-03.webp"); }
.svc-band--campanas .svc-band__bg { background-image: url("/assets/photos/brand-04.webp"); }
.svc-band--social .svc-band__bg { background-image: url("/assets/photos/brand-10.webp"); }
.svc-band__inner { display: grid; gap: var(--s16); max-width: calc(var(--u) * 620); }
.svc-band__title { font-size: var(--d-2); line-height: 1.05; font-weight: 500; letter-spacing: -.03em; color: var(--ink-1); }
.svc-band__text { font-size: var(--t-m); line-height: var(--lh-m); color: var(--ink-2); max-width: 44ch; }

/* ---------- Home hero note: finished full-bleed block on phones ---------- */
@media (max-width: 767px) {
  .hero__note {
    left: 12px; right: 12px; bottom: calc(6vh + env(safe-area-inset-bottom)); max-width: none;
    padding: 20px; border-radius: var(--r-l); display: grid; gap: 12px;
    background: rgba(12, 12, 14, .52); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .06);
  }
  .hero__meta { margin-bottom: 0; gap: 10px; color: var(--ink-2); white-space: normal; }
  .hero__lead { font-size: 26px; line-height: 1.12; letter-spacing: -.02em; font-weight: 500; }
  .hero__lead span { display: block; font-size: .78em; font-weight: 400; color: var(--ink-3); margin-top: 4px; }
  .hero__cta { width: 100%; justify-content: center; margin-top: 4px; }
  .hero__pills { width: 100%; }
}

/* ---------- Home frame (zoom-out) cards on phones: fewer, clear of the heading ---------- */
@media (max-width: 767px) {
  /* Hold the frame heading above the cards and keep it legible. */
  .frame-head { z-index: 3; }
  .frame-head__title { text-shadow: 0 2px 20px rgba(0,0,0,.8); }
  /* Show a tidy handful around the edges; hide the rest so nothing piles on the centre. */
  .ow--c5, .ow--c6, .ow--c7 { display: none; }
}

/* ---------- Playground scatter: interleaved, hand-placed feel ---------- */
/* Brick offset: the right column starts lower so cards never sit on the same band as the left column. */
.pg__col--r { margin-top: 22vh; }
/* Per-card variance (seeded inline --mt / --nudge) plus the tilt. */
.pg-card { margin-top: var(--mt, 0px); transform: translateX(var(--nudge, 0px)) rotate(var(--rot, 0deg)); }
@media (max-width: 640px) {
  .pg__col--r { margin-top: 14vh; }
  .pg-card { transform: translateX(calc(var(--nudge, 0px) * .5)) rotate(calc(var(--rot, 0deg) * .4)); }
}

/* ---------- Phone safeguards for the new pages ---------- */
@media (max-width: 640px) {
  .project__back { margin: 0 0 var(--s16) 0; }
  .project__hero { padding: var(--s32) 16px var(--s48); }
  .project__title { font-size: calc(var(--d-2) * 1.05); }
  .project__gallery { padding: 0 16px var(--s48); }
  .project__body .project__grid { grid-template-columns: 1fr; gap: var(--s24); }
  .car__slide { aspect-ratio: 4 / 5; }
  .car__arrow { width: 42px; height: 42px; }
  .svc-band { min-height: 40vh; padding: var(--s48) 16px; }
  .svc-band__bg::after { background: linear-gradient(0deg, #000 8%, rgba(0,0,0,.4) 100%); }
  .faq { padding: var(--s48) 16px var(--s72); }
  .faq__q { padding: 18px; font-size: var(--t-m); gap: 12px; }
  .faq__icon { width: 36px; height: 36px; }
  .faq__a { padding: 0 18px 18px calc(18px + 36px + 12px); }
}

/* ---------- Project pages: editorial case study ---------- */
.project__head { padding: calc(var(--hd-h) + 40px) var(--gutter) var(--s32); max-width: calc(var(--u) * 1040); margin: 0 auto; }
.project__title { font-size: calc(var(--d-2) * .9); line-height: 1.04; font-weight: 500; letter-spacing: -.03em; color: var(--ink-1); }
.project__descr { display: block; font-size: .5em; font-weight: 400; letter-spacing: -.01em; color: var(--ink-3); margin-top: .4em; }
.project__rule { height: 1px; margin: var(--s32) 0 var(--s24); border: 0; background: var(--rule); }
.project__meta { display: grid; grid-template-columns: repeat(3, minmax(0, .7fr)) minmax(0, 1.6fr); gap: var(--s24) var(--s32); align-items: start; }
.project__meta-label { font-size: var(--t-s); letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.project__meta-val { font-size: var(--t-m); color: var(--ink-1); }
.project__meta-desc { font-size: var(--t-m); line-height: var(--lh-m); color: var(--ink-2); }
.project__more { margin-top: var(--s12); }
.project__more summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--orange); font-size: var(--t-s); }
.project__more summary::-webkit-details-marker { display: none; }
.project__more summary::after { content: "+"; font-size: 1.1em; }
.project__more[open] summary::after { content: "–"; }
.project__more p { margin-top: var(--s8); }

/* Editorial image flow: measured rows, some full-width, some two-up, generous spacing. */
.pf-flow { display: grid; gap: clamp(16px, 4vh, 44px); max-width: calc(var(--u) * 940); margin: 0 auto; padding: var(--s16) var(--gutter) var(--s72); }
.pf-row--full { }
.pf-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 40px); align-items: center; }
.pf-row--single { display: grid; justify-items: center; }
.pf-row--single .pf-shot { max-width: min(100%, calc(var(--u) * 440)); }
.pf-shot { width: 100%; height: auto; display: block; border-radius: var(--r-l); background: #0d0d0e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }

@media (max-width: 640px) {
  .project__head { padding-top: calc(var(--hd-h) + 24px); padding-bottom: var(--s32); }
  .project__title { font-size: calc(var(--d-2) * .82); }
  .project__descr { font-size: .56em; }
  .project__meta { grid-template-columns: 1fr 1fr; gap: var(--s16); }
  .project__meta-desc { grid-column: 1 / -1; }
  .pf-flow { gap: 20px; padding-top: var(--s16); padding-bottom: var(--s48); }
  .pf-row--split { grid-template-columns: 1fr; gap: 20px; }
  .project__related { padding-top: var(--s48); padding-bottom: var(--s72); }
  .project__related .svc-cases { grid-template-columns: 1fr 1fr; }
  .project__related .h2 { font-size: calc(var(--d-2) * .82); }
}


/* ---------- Hero service pills (liquid glass) ---------- */
.hero__pills { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.gpill {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: var(--t-s); font-weight: 500; color: var(--ink-1); white-space: nowrap;
  background: rgba(255, 255, 255, .06); /* fallback */
  background: rgba(20, 20, 24, .5);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .gpill:hover { transform: translateY(-1px); background: rgba(233, 74, 46, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 0 0 1px rgba(233, 74, 46, .4); }
}
.gpill:active { transform: translateY(0) scale(var(--press)); }
.gpill:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gpill { background: rgba(28, 28, 32, .92); }
}
@media (prefers-reduced-motion: reduce) { .gpill { transition: background-color .2s ease; } .gpill:hover { transform: none; } }
@media (max-width: 767px) {
  /* Keep the row tidy inside the glass hero card; tap targets stay comfortable. */
  .hero__pills { gap: 6px; }
  .gpill { min-height: 34px; padding: 0 12px; }
}
