/* =========================================================================
   DekWilde — US site
   Fonts are the brand's own: Major Mono Display (titles) and Roboto (text),
   served from assets/fonts so the site needs nothing from outside to draw.
   ========================================================================= */

@font-face {
  font-family: "Major Mono Display";
  src: url("../assets/fonts/major-mono-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../assets/fonts/roboto-latin-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../assets/fonts/roboto-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../assets/fonts/roboto-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* Theme colors are registered so they fade when the page goes from day to night */
@property --bg         { syntax: "<color>"; inherits: true; initial-value: #f4f7fd; }
@property --ink        { syntax: "<color>"; inherits: true; initial-value: #060a1c; }
@property --ink-2      { syntax: "<color>"; inherits: true; initial-value: rgba(6, 10, 28, .74); }
@property --ink-3      { syntax: "<color>"; inherits: true; initial-value: rgba(6, 10, 28, .5); }
@property --line       { syntax: "<color>"; inherits: true; initial-value: rgba(11, 42, 107, .16); }
@property --glass-a    { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .7); }
@property --glass-b    { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .36); }
@property --glass-edge { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .9); }
@property --glass-shade{ syntax: "<color>"; inherits: true; initial-value: rgba(11, 42, 107, .3); }
@property --accent     { syntax: "<color>"; inherits: true; initial-value: #1f4fb8; }
@property --on-accent  { syntax: "<color>"; inherits: true; initial-value: #ffffff; }

:root {
  --paper: #f4f7fd;
  --midnight: #060a1c;
  --navy: #0a2466;
  --cobalt: #1f4fb8;
  --periwinkle: #9aa5f3;

  --mono: "Major Mono Display", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 88px);
  --gap: clamp(16px, 2vw, 32px);
  --r-plate: clamp(20px, 2.2vw, 34px);
  --r-media: clamp(10px, 1.1vw, 18px);
  --blur: 22px;
  --ease: cubic-bezier(.19, 1, .22, 1);

  --bg: #f4f7fd;
  --ink: #060a1c;
  --ink-2: rgba(6, 10, 28, .74);
  --ink-3: rgba(6, 10, 28, .5);
  --line: rgba(11, 42, 107, .16);
  --glass-a: rgba(255, 255, 255, .7);
  --glass-b: rgba(255, 255, 255, .36);
  --glass-edge: rgba(255, 255, 255, .9);
  --glass-shade: rgba(11, 42, 107, .3);
  --accent: #1f4fb8;
  --on-accent: #ffffff;
}

html[data-theme="dark"] {
  --bg: #060a1c;
  --ink: #eef1ff;
  --ink-2: rgba(238, 241, 255, .8);
  --ink-3: rgba(238, 241, 255, .55);
  --line: rgba(154, 165, 243, .24);
  --glass-a: rgba(26, 38, 96, .46);
  --glass-b: rgba(9, 14, 42, .34);
  --glass-edge: rgba(154, 165, 243, .26);
  --glass-shade: rgba(0, 0, 0, .6);
  --accent: #aab4ff;
  --on-accent: #060a1c;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
  transition: --bg .9s ease, --ink .9s ease, --ink-2 .9s ease, --ink-3 .9s ease, --line .9s ease,
    --glass-a .9s ease, --glass-b .9s ease, --glass-edge .9s ease, --glass-shade .9s ease,
    --accent .9s ease, --on-accent .9s ease;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------------------------------------------------------------- background */
.scene { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }
.sky { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.sky::before, .sky::after { content: ""; position: absolute; inset: 0; transition: opacity 1.2s ease; }
.sky::before {
  background:
    radial-gradient(120% 90% at 88% -5%, rgba(154, 165, 243, .22), transparent 55%),
    radial-gradient(90% 80% at -5% 105%, rgba(31, 79, 184, .12), transparent 60%);
}
.sky::after {
  opacity: 0;
  background:
    radial-gradient(110% 80% at 82% 5%, rgba(31, 79, 184, .34), transparent 60%),
    radial-gradient(90% 90% at 5% 100%, rgba(154, 165, 243, .14), transparent 60%);
}
html[data-theme="dark"] .sky::before { opacity: 0; }
html[data-theme="dark"] .sky::after { opacity: 1; }
html.no-webgl .scene { display: none; }

main { position: relative; z-index: 2; }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------------------------------------------------------------- type */
.display {
  font: 400 clamp(42px, 8.7vw, 160px)/.9 var(--mono);
  letter-spacing: -.045em;
}
.title {
  font: 400 clamp(28px, 4.3vw, 70px)/1.03 var(--mono);
  letter-spacing: -.035em;
  max-width: 24ch;
}
.title-big { font-size: clamp(46px, 9vw, 150px); line-height: .95; letter-spacing: -.045em; }
.lead { font: 300 clamp(19px, 1.65vw, 26px)/1.42 var(--sans); color: var(--ink-2); max-width: 34em; }
h3 { font: 400 clamp(19px, 1.6vw, 24px)/1.2 var(--mono); letter-spacing: -.02em; }

/* Major Mono draws capital letters as a second, stylised alphabet that turns into
   blobs at small sizes: everything set in it stays lowercase */
.display, .title, h3, .btn, .bar-nav a, .land-name, .line, .band-text, .services-list a,
.contact-line, .foot-note, .form label span, .rail, .loader-count, .viewer-btn, .viewer-title,
.cursor-label, .hero-scroll, .logo.is-text, .faq summary::after { text-transform: lowercase; }

/* letters of a title while it decodes */
[data-decode] .w { display: inline-block; white-space: nowrap; }
[data-decode] .c { display: inline-block; }
html.js:not(.calm) [data-decode]:not(.is-split) { visibility: hidden; }

/* words of a paragraph rising from behind their own line */
.rw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.ri { display: inline-block; will-change: transform; }

/* ---------------------------------------------------------------- glass */
.glass {
  background: linear-gradient(140deg, var(--glass-a), var(--glass-b));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
  backdrop-filter: blur(var(--blur)) saturate(165%);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 34px 70px -46px var(--glass-shade);
}
.plate { border-radius: var(--r-plate); padding: clamp(24px, 3vw, 52px); }
.plate p { color: var(--ink-2); max-width: 62ch; }

/* weak machine: the scene asks to drop the blur */
html.lowfx .glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.lowfx[data-theme="light"] { --glass-a: rgba(255, 255, 255, .92); --glass-b: rgba(255, 255, 255, .82); }
html.lowfx[data-theme="dark"] { --glass-a: rgba(18, 26, 70, .92); --glass-b: rgba(9, 14, 42, .86); }

/* ---------------------------------------------------------------- buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 400 14px/1 var(--mono); letter-spacing: .02em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  overflow: hidden;
  transition: color .45s var(--ease), border-color .45s var(--ease);
  will-change: transform;
}
.btn span { position: relative; z-index: 1; pointer-events: none; }
.btn::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  background: var(--ink);
  transform: translateY(102%);
  transition: transform .55s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--bg); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-solid::before { background: var(--ink); }
.btn-solid:hover, .btn-solid:focus-visible { color: var(--bg); border-color: var(--ink); }
.btn-small { min-height: 42px; padding: 0 20px; font-size: 12.5px; }
.btn-big { min-height: 68px; padding: 0 44px; font-size: 16px; }

/* ---------------------------------------------------------------- header */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  display: flex; align-items: center; gap: 18px;
  padding: 16px var(--gutter);
  transition: transform .7s var(--ease);
}
.bar.is-hidden { transform: translateY(-110%); }
.bar-logo { margin-right: auto; display: block; }
.logo { transition: filter .9s ease; }
html[data-theme="light"] .logo { filter: invert(1); }
.bar-logo .logo { height: 40px; width: auto; }
.logo.is-text { font: 400 22px/1 var(--mono); letter-spacing: -.04em; color: var(--ink); filter: none !important; text-decoration: none; display: inline-block; }
.bar-nav {
  display: flex; gap: 6px; padding: 5px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--glass-a), var(--glass-b));
  -webkit-backdrop-filter: blur(16px) saturate(165%);
  backdrop-filter: blur(16px) saturate(165%);
  border: 1px solid var(--glass-edge);
}
.bar-nav a {
  padding: 9px 16px; border-radius: 999px;
  font: 400 13px/1 var(--mono); letter-spacing: .02em; text-decoration: none;
  transition: background-color .35s, color .35s;
}
.bar-nav a:hover, .bar-nav a.is-current { background: var(--ink); color: var(--bg); }
/* language: pt / en */
.lang {
  display: flex; gap: 2px; padding: 4px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--glass-a), var(--glass-b));
  -webkit-backdrop-filter: blur(16px) saturate(165%);
  backdrop-filter: blur(16px) saturate(165%);
  border: 1px solid var(--glass-edge);
}
.lang button {
  min-width: 36px; height: 34px; padding: 0 9px;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 400 12.5px/1 var(--mono); letter-spacing: .02em; text-transform: lowercase; color: var(--ink-2);
  transition: background-color .35s, color .35s;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.bar-menu { display: none; position: relative; width: 46px; height: 46px; border: 1px solid var(--ink); border-radius: 50%; background: none; cursor: pointer; }
.bar-menu span { position: absolute; left: 13px; right: 13px; height: 1px; background: var(--ink); transition: transform .45s var(--ease); }
.bar-menu span:first-child { top: 19px; }
.bar-menu span:last-child { top: 26px; }
.bar-menu[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.bar-menu[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------------------------------------------------------------- loader, cursor, progress */
.loader {
  position: fixed; inset: 0; z-index: 5000;
  display: grid; place-items: center;
  /* no background: the scattered pieces of the scene show behind the wordmark */
}
html:not(.js) .loader, html.no-webgl .loader { background: var(--paper); }
html:not(.js) .loader { display: none; }
.loader-logo { width: clamp(220px, 34vw, 520px); height: auto; filter: invert(1) !important; }
.loader-logo.is-text { font-size: clamp(44px, 8vw, 120px); color: var(--midnight); }
.loader-count {
  position: absolute; left: var(--gutter); bottom: clamp(22px, 5vh, 48px);
  font: 400 clamp(40px, 7vw, 104px)/.9 var(--mono); letter-spacing: -.05em; color: var(--midnight);
}
.loader-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.loader-bar i { display: block; height: 100%; background: var(--cobalt); transform: scaleX(0); transform-origin: left; }

.cursor { position: fixed; top: 0; left: 0; z-index: 4000; pointer-events: none; display: none; }
html.has-cursor .cursor { display: block; }
.cursor-ring {
  position: absolute; left: 0; top: 0;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--accent);
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background-color .4s, opacity .3s;
}
.cursor-label { font: 400 12px/1 var(--mono); color: var(--on-accent); opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cursor.is-link .cursor-ring { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cursor.is-play .cursor-ring { width: 86px; height: 86px; margin: -43px 0 0 -43px; }
.cursor.is-play .cursor-label { opacity: 1; }
.cursor.is-out .cursor-ring { opacity: 0; }

.progress { position: fixed; inset: 0 0 auto 0; z-index: 1100; height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.rail {
  position: fixed; left: calc(var(--gutter) * .3); bottom: 30px; z-index: 900;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 400 12px/1 var(--mono); letter-spacing: .04em; color: var(--ink-3);
  pointer-events: none;
  opacity: 0; transition: opacity .8s ease;
}
html.is-in .rail, html.calm .rail, html:not(.js) .rail { opacity: 1; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: end; padding: 120px 0 clamp(56px, 10vh, 120px); }
.hero-sub { margin: clamp(18px, 3vh, 34px) 0 0; font: 300 clamp(19px, 1.9vw, 30px)/1.3 var(--sans); color: var(--ink-2); max-width: 26em; }
.hero-scroll {
  position: absolute; right: var(--gutter); bottom: clamp(56px, 10vh, 120px);
  font: 400 12px/1 var(--mono); letter-spacing: .08em; color: var(--ink-2);
  writing-mode: vertical-rl;
}
.hero-scroll::after { content: ""; display: block; width: 1px; height: 64px; margin: 12px auto 0; background: var(--ink); transform-origin: top; animation: scroll-hint 2.4s var(--ease) infinite; }
@keyframes scroll-hint { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
html.js:not(.calm) [data-hero] { opacity: 0; }

/* ---------------------------------------------------------------- reel */
.reel { position: relative; height: 240vh; }
.reel-pin { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: clip; }
.reel-frame {
  display: block; position: relative; padding: 0; border: 0; cursor: pointer;
  width: min(92vw, 160vh); aspect-ratio: 16 / 9;
  border-radius: var(--r-plate); overflow: hidden;
  background: linear-gradient(140deg, var(--glass-a), var(--glass-b));
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  box-shadow: 0 60px 120px -60px var(--glass-shade);
  transform-origin: 50% 50%;
  will-change: transform;
}
.reel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel.is-empty { display: none; }

/* ---------------------------------------------------------------- lines */
.lines { padding: clamp(80px, 16vh, 200px) 0; overflow: clip; }
.line { white-space: nowrap; font: 400 clamp(40px, 8.2vw, 148px)/1.08 var(--mono); letter-spacing: -.045em; }
.line-track { display: inline-flex; will-change: transform; }
.line-track span { padding-right: .35em; }
.line-outline { color: transparent; -webkit-text-stroke: 1px var(--ink); }

/* ---------------------------------------------------------------- statement */
.statement { padding: clamp(60px, 12vh, 160px) 0 clamp(100px, 20vh, 240px); }
.statement-text {
  max-width: 17em; margin: 0 0 .7em;
  font: 300 clamp(26px, 3.6vw, 58px)/1.14 var(--sans); letter-spacing: -.022em;
}
.statement-text .sw { transition: none; }

/* ---------------------------------------------------------------- clients + where it happens */
.about { padding-top: clamp(20px, 4vh, 60px); }
.clients { margin-inline: var(--gutter); border-radius: 999px; overflow: hidden; padding: 8px 0; background: #fff; }
.clients-track { display: flex; align-items: center; gap: clamp(28px, 4.5vw, 76px); width: max-content; padding-left: clamp(28px, 4.5vw, 76px); animation: clients 46s linear infinite; }
.clients-track img { width: clamp(70px, 7.2vw, 112px); height: auto; filter: grayscale(1) contrast(1.15); }
.clients:hover .clients-track { animation-play-state: paused; }
@keyframes clients { to { transform: translateX(-50%); } }

.lands { position: relative; }
.lands-pin { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: clip; }
.lands-title { padding-inline: var(--gutter); margin-bottom: clamp(24px, 5vh, 60px); max-width: none; }
.lands-track { display: flex; align-items: flex-start; gap: var(--gap); padding-inline: var(--gutter); width: max-content; will-change: transform; }
.land {
  display: flex; flex-direction: column;
  width: clamp(300px, 36vw, 580px); min-height: clamp(300px, 46vh, 460px);
  padding: clamp(24px, 2.6vw, 44px);
  border-radius: var(--r-plate);
}
.land:nth-child(even) { margin-top: clamp(20px, 6vh, 72px); }
.land-name { font: 400 clamp(24px, 2.7vw, 44px)/1.05 var(--mono); letter-spacing: -.035em; margin-bottom: auto; padding-bottom: 1.2em; }
.land p { color: var(--ink-2); max-width: 34ch; }
.land .land-proof { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-3); max-width: none; }

/* ---------------------------------------------------------------- included */
.included { padding: clamp(100px, 18vh, 220px) 0; }
.included-head { grid-column: 1 / span 5; align-self: start; position: sticky; top: 22vh; }
.included-head .lead { margin-top: 1.4em; }
.included-list { grid-column: 7 / -1; }
.inc { padding: clamp(20px, 2.4vw, 34px) 0; border-top: 1px solid var(--line); }
.inc:first-child { border-top: 0; padding-top: 0; }
.inc:last-child { padding-bottom: 0; }
.inc h3 { margin-bottom: .6em; }

/* ---------------------------------------------------------------- form */
.project { padding: clamp(60px, 12vh, 160px) 0 clamp(100px, 18vh, 220px); }
.project-head { grid-column: 1 / span 5; align-self: center; }
.project-head .lead { margin-top: 1.4em; }
.form { grid-column: 7 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 26px; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form .wide { grid-column: 1 / -1; }
.form label span { font: 400 12px/1 var(--mono); letter-spacing: .02em; color: var(--ink-3); }
.form input, .form textarea {
  width: 100%; padding: 8px 0 10px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; outline: none;
  font: 400 17px/1.4 var(--sans); color: var(--ink);
  transition: border-color .3s;
}
.form textarea { resize: vertical; min-height: 84px; }
.form input::placeholder, .form textarea::placeholder { color: var(--ink-3); }
.form input:focus, .form textarea:focus { border-color: var(--accent); }
.form input.is-wrong { border-color: #c2334d; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.form-note { margin: 0; min-height: 1.4em; font-size: 14.5px; color: var(--ink-2); }

/* ---------------------------------------------------------------- services */
.services { padding: clamp(80px, 14vh, 180px) 0 clamp(100px, 18vh, 220px); }
.services-list { display: flex; flex-direction: column; align-items: flex-start; }
.services-list a {
  display: block; padding: .07em 0;
  font: 400 clamp(22px, 4vw, 78px)/1.1 var(--mono); letter-spacing: -.045em;
  text-decoration: none;
  transition: opacity .45s, transform .7s var(--ease);
}
.services-list a span { display: inline-block; }
@media (hover: hover) {
  .services-list:hover a { opacity: .2; }
  .services-list a:hover { opacity: 1; transform: translateX(.45em); }
}

/* ---------------------------------------------------------------- chapters */
.chapter { position: relative; padding: clamp(90px, 16vh, 200px) 0; }
.chapter-title { position: relative; z-index: 3; }
.chapter-copy { position: relative; z-index: 2; }
.chapter .title { --overlap: clamp(14px, 2.1vw, 34px); }
.chapter .title-big { --overlap: clamp(22px, 4.2vw, 70px); }
.chapter-copy.plate { margin-top: calc(var(--overlap, 24px) * -1); padding-top: calc(clamp(24px, 3vw, 52px) + var(--overlap, 24px) * 1.5); }

/* wide: title, a plate to one side, then the row of videos edge to edge */
.is-wide > .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.is-wide .chapter-title { grid-column: 1 / span 10; --overlap: clamp(14px, 2.1vw, 34px); }
.is-wide .chapter-copy { grid-column: 6 / -1; }
.is-wide.flip .chapter-title { grid-column: 3 / -1; }
.is-wide.flip .chapter-copy { grid-column: 1 / span 7; }
.chapter-strip { margin-top: clamp(40px, 8vh, 100px); }

/* split: plate on one side, videos on the other */
.is-split .chapter-title { grid-column: 1 / span 9; grid-row: 1; }
.is-split .chapter-copy { grid-column: 1 / span 5; grid-row: 2; align-self: start; }
.is-split .chapter-media { grid-column: 7 / -1; grid-row: 2; margin-top: clamp(30px, 6vh, 90px); }
.is-split.flip .chapter-title { grid-column: 6 / -1; }
.is-split.flip .chapter-copy { grid-column: 8 / -1; }
.is-split.flip .chapter-media { grid-column: 1 / span 6; }

/* stage: one big word, a line of text, tall videos side by side */
.is-stage .chapter-lead { margin: clamp(18px, 3vh, 36px) 0 clamp(40px, 8vh, 100px); }

/* ---------------------------------------------------------------- galleries */
.gallery { position: relative; }
.tile { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
/* every tile has the shape of its own video: vertical (shorts) or horizontal */
.tile-media {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-media);
  background: var(--line);
  box-shadow: 0 30px 60px -40px var(--glass-shade);
}
.tile-v .tile-media { aspect-ratio: 9 / 16; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.3s var(--ease); }
.tile:hover .tile-media img, .tile:focus-visible .tile-media img { transform: scale(1.13); }
/* the video playing inside the tile: the picture stays in front of it until the video is
   running and YouTube's own buttons are gone (see "YouTube's own buttons" in gallery.js) */
.tile-live { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .16s linear; }
/* the player is built at 90% of the tile and enlarged back: YouTube picks the video quality from
   the size of the player, and at full size it sends one step more than the tile can show */
.tile-live iframe {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--fw, 100%) * .9); height: calc(var(--fh, 100%) * .9);
  border: 0; pointer-events: none;
  transform: translate(-50%, -50%) scale(1.134);
}
.tile.is-playing .tile-live { opacity: 1; transition: opacity .8s ease; }
.tile-preview { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transform: scale(1.02); transition: opacity .6s; pointer-events: none; }
.tile.previewing .tile-preview { opacity: 1; }
.tile-title { display: block; margin-top: 12px; font: 400 13.5px/1.35 var(--sans); color: var(--ink-2); }

/* strip: a row as tall as a vertical video (--sh). Vertical videos stand in it whole, every
   other one a step lower; a horizontal video alone lies across the row; horizontal ones in
   a run are stacked two by two. The row has the same height whatever it holds. */
.is-strip { --sh: clamp(320px, 60vh, 620px); --drop: clamp(14px, 2.6vw, 44px); --pair: 14px; --tline: calc(13.5px * 1.35); }
.g-strip-track {
  display: flex; align-items: flex-start; gap: var(--gap);
  min-height: calc(var(--sh) + 12px + 2 * var(--tline) + var(--drop) + 30px);
  padding: 0 var(--gutter) 30px; overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; cursor: grab;
}
.g-strip-track::-webkit-scrollbar { display: none; }
.g-strip-track.dragging { cursor: grabbing; }
.g-strip-track.dragging .tile { pointer-events: none; }
.g-slot { flex: none; display: flex; flex-direction: column; gap: var(--pair); }
.g-slot-v { width: calc(var(--sh) * 9 / 16); }
.g-slot-v.is-low { margin-top: var(--drop); }
.g-slot-big { width: min(calc(var(--sh) * 16 / 9), 86vw); align-self: center; }
.g-slot-pair { width: min(calc((var(--sh) - 12px - var(--pair)) * 8 / 9), 86vw); align-self: center; }
.g-strip .tile-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-height: calc(2 * var(--tline)); }
.g-slot-pair .tile-title { -webkit-line-clamp: 1; line-clamp: 1; min-height: var(--tline); }

.g-feature .tile-main.tile-v { width: min(100%, 380px); margin-inline: auto; }
.g-feature-rest { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: var(--gap); margin-top: var(--gap); }

/* mosaic: 6 columns; gallery.js decides how many each video takes, from its shape */
.g-mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-flow: dense; align-items: start; gap: var(--gap); }
.g-mosaic .span-2 { grid-column: span 2; }
.g-mosaic .span-3 { grid-column: span 3; }
.g-mosaic .span-6 { grid-column: 1 / -1; }
.g-mosaic .span-alone { grid-column: 1 / -1; width: 50%; justify-self: center; }

.g-portrait { display: flex; justify-content: center; align-items: flex-start; gap: var(--gap); }
.g-portrait .tile { width: clamp(170px, 23vw, 340px); }
.g-portrait .tile-h { width: clamp(280px, 40vw, 600px); }
.g-portrait .tile:nth-child(2) { margin-top: clamp(30px, 9vh, 110px); }
.g-portrait .tile:nth-child(3) { margin-top: clamp(10px, 3vh, 40px); }
.is-split .g-portrait .tile { width: min(340px, 78%); }
.is-split .g-portrait .tile-h { width: 100%; }

.tile.is-ghost { cursor: default; }
.tile.is-ghost .tile-media { animation: wait 1.5s ease-in-out infinite; box-shadow: none; }
.tile.is-ghost .tile-title { color: transparent; }
@keyframes wait { 50% { opacity: .35; } }
.g-error { padding: 24px var(--gutter); color: var(--ink-2); }
.is-split .g-error { padding-inline: 0; }

/* ---------------------------------------------------------------- band */
.band { min-height: 130vh; display: grid; place-items: center; text-align: center; padding: 20vh 0; }
.band-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(30px, 6vh, 64px); }
/* a clearing in the middle of the tunnel, so the words stay readable */
.band-in::before {
  content: ""; position: absolute; z-index: -1; inset: -32% -6%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 82%, transparent), color-mix(in srgb, var(--bg) 55%, transparent) 55%, transparent);
  pointer-events: none;
}
.band-text { margin: 0; max-width: 24ch; font: 400 clamp(24px, 3.9vw, 64px)/1.08 var(--mono); letter-spacing: -.04em; }

/* ---------------------------------------------------------------- agencies */
.agencies { padding: clamp(110px, 20vh, 240px) 0 clamp(90px, 16vh, 200px); }
.agencies-title { position: relative; z-index: 3; max-width: 26ch; --overlap: clamp(14px, 2.1vw, 34px); }
.agencies-copy { width: min(820px, 100%); margin: calc(var(--overlap) * -1) 0 0 auto; padding-top: calc(clamp(24px, 3vw, 52px) + var(--overlap) * 1.5); }
.agencies-copy .lead { color: var(--ink); }

/* ---------------------------------------------------------------- faq */
.faq-section { padding: clamp(90px, 16vh, 200px) 0; }
.faq-title { grid-column: 1 / span 4; align-self: start; position: sticky; top: 22vh; }
.faq { grid-column: 6 / -1; padding-block: clamp(10px, 1.4vw, 22px); }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font: 400 clamp(17px, 1.45vw, 21px)/1.3 var(--sans);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 22px/1 var(--mono); transition: transform .5s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-body { overflow: hidden; }
.faq-body p { padding: 0 0 24px; }

/* ---------------------------------------------------------------- contact */
.contact { padding-top: clamp(120px, 24vh, 280px); }
.contact-title { font-size: clamp(38px, 7.6vw, 136px); max-width: none; }
.contact-lead { margin: clamp(24px, 4vh, 48px) 0 clamp(28px, 5vh, 56px); }
.contact-line { margin: 0 0 .3em; font: 400 clamp(20px, 2.7vw, 42px)/1.2 var(--mono); letter-spacing: -.035em; }
.contact-line a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .7s var(--ease); padding-bottom: .08em; }
.contact-line a:hover, .contact-line a:focus-visible { background-size: 100% 1px; }
.contact-actions { margin-top: clamp(30px, 5vh, 60px); align-items: center; }
.foot { margin-top: clamp(90px, 18vh, 220px); padding-bottom: 34px; }
.foot-logo { width: min(100%, 760px); height: auto; }
.foot-logo.is-text { font-size: clamp(56px, 14vw, 220px); }
.foot-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: clamp(30px, 6vh, 70px); padding-top: 18px; border-top: 1px solid var(--line); font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); }

/* ---------------------------------------------------------------- video popup */
.viewer { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; }
.viewer[hidden] { display: none; }
.viewer-back { position: absolute; inset: 0; background: rgba(6, 10, 28, .84); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transition: opacity .4s var(--ease); }
.viewer.is-open .viewer-back { opacity: 1; }
.viewer-box { position: relative; width: min(1240px, 92vw, 150vh); opacity: 0; transform: translateY(30px) scale(.97); transition: opacity .5s var(--ease), transform .7s var(--ease); }
.viewer.is-open .viewer-box { opacity: 1; transform: none; }
.viewer.is-portrait .viewer-box { width: min(46vh, 92vw); }
.viewer-player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-media); overflow: hidden; background: #000; }
.viewer.is-portrait .viewer-player { aspect-ratio: 9 / 16; }
.viewer-player iframe, .viewer-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer-title { margin: 14px 0 0; font: 400 13px/1.4 var(--mono); color: rgba(238, 241, 255, .8); text-align: center; }
.viewer-btn { position: absolute; padding: 10px 18px; border: 1px solid rgba(238, 241, 255, .5); border-radius: 999px; background: rgba(6, 10, 28, .5); color: #eef1ff; font: 400 12.5px/1 var(--mono); cursor: pointer; transition: background-color .3s, color .3s; }
.viewer-btn:hover { background: #eef1ff; color: #060a1c; }
.viewer-close { top: 22px; right: 22px; }
.viewer-prev { left: 22px; bottom: 22px; }
.viewer-next { right: 22px; bottom: 22px; }
.viewer.is-single .viewer-prev, .viewer.is-single .viewer-next { display: none; }

/* thumbnail that follows the mouse on the services list */
.peek { position: fixed; top: 0; left: 0; z-index: 800; width: clamp(240px, 24vw, 380px); aspect-ratio: 16 / 9; margin: -11vw 0 0 2vw; pointer-events: none; opacity: 0; transform: scale(.6) rotate(-4deg); transition: opacity .35s var(--ease), transform .55s var(--ease); }
.peek.is-on { opacity: 1; transform: scale(1) rotate(0); }
.peek-frame { width: 100%; height: 100%; border-radius: var(--r-media); overflow: hidden; box-shadow: 0 40px 80px -40px var(--glass-shade); background: var(--line); }
.peek img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1100px) {
  .rail { display: none; }
}

@media (max-width: 900px) {
  :root { --blur: 16px; }
  body { font-size: 16.5px; }

  .bar-cta { display: none; }
  .bar-menu { display: block; }
  .bar-nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
    padding: 0 var(--gutter); border: 0; border-radius: 0;
    -webkit-backdrop-filter: blur(26px) saturate(165%); backdrop-filter: blur(26px) saturate(165%);
    opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s;
  }
  .bar-nav.is-open { opacity: 1; visibility: visible; }
  .bar-nav a { font-size: clamp(34px, 11vw, 64px); letter-spacing: -.04em; padding: 6px 0; border-radius: 0; }
  .bar-nav a:hover, .bar-nav a.is-current { background: none; color: var(--accent); }

  .hero-scroll { display: none; }
  .reel { height: 170vh; }
  /* text that sits straight on the scene gets a soft halo of the background color */
  .display, .title, .lead, .hero-sub, .statement-text, .services-list a, .contact-line {
    text-shadow: 0 0 5px var(--bg), 0 0 16px var(--bg), 0 0 28px var(--bg);
  }

  .lands-pin { position: static; height: auto; display: block; overflow: visible; padding: clamp(70px, 12vh, 120px) 0 0; }
  .lands-track { flex-direction: column; width: auto; transform: none !important; }
  .land { width: auto; min-height: 0; }
  .land:nth-child(even) { margin-top: 0; }
  .land-name { padding-bottom: 1.6em; }

  .grid { display: block; }
  .included-head, .faq-title { position: static; }
  .included-list, .form, .faq { margin-top: clamp(28px, 5vh, 48px); }
  .form { grid-template-columns: 1fr; }

  .is-wide > .wrap { display: block; }
  .is-split .chapter-media { margin-top: clamp(28px, 5vh, 48px); }
  .is-strip { --sh: clamp(280px, 56vh, 480px); --drop: 16px; }
  .g-feature-rest { grid-template-columns: 1fr 1fr; }
  .g-mosaic .span-2 { grid-column: span 3; }
  .g-portrait { justify-content: flex-start; overflow-x: auto; padding-bottom: 20px; scrollbar-width: none; }
  .g-portrait::-webkit-scrollbar { display: none; }
  .g-portrait .tile { flex: none; width: clamp(180px, 56vw, 280px); }
  .g-portrait .tile-h { width: 86vw; }
  .g-portrait .tile:nth-child(n) { margin-top: 0; }
  .is-split .g-portrait .tile { width: clamp(200px, 64vw, 300px); }
  .is-split .g-portrait .tile-h { width: 86vw; }

  .agencies-copy { margin-left: 0; }
  .band { min-height: 100vh; }
  .viewer-prev, .viewer-next { bottom: 14px; }
  .peek { display: none; }
}

/* ---------------------------------------------------------------- calm: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll::after, .clients-track, .tile.is-ghost .tile-media { animation: none; }
  html { transition: none; }
  * { scroll-behavior: auto !important; }
}
html.calm .lands-pin { position: static; height: auto; padding-top: clamp(70px, 12vh, 140px); }
html.calm .lands-track { flex-wrap: wrap; width: auto; }
html.calm .land { width: calc(50% - var(--gap)); }
html.calm .reel { height: auto; padding: 10vh 0; }
html.calm .reel-pin { position: static; height: auto; }
