/* Shared by every public page. Tokens documented in ../design.md. */
/* Fonts. DM Sans is served from this site. Garet is only needed at one weight (850).
   font-display: swap shows text in the fallback font at once instead of hiding it while the font downloads. */
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Garet"; src: url("https://fonts.cdnfonts.com/s/57477/Garet-Heavy.woff") format("woff"); font-weight: 850; font-style: normal; font-display: swap; }
:root {
  --bg: #050505;
  --surface: #0a0a0a;
  --surface-2: #121212;
  --border: #27272a;
  --text: #ffffff;
  --text-muted: #a1a1aa;
  --accent: #e50914;
  --accent-fg: #ffffff;
  --accent-text: #ff4d57; /* red for small text: 6.3:1 on the page. #e50914 is only 4.3:1, fine for fills and big type */
  --error: #ef4444;
  color-scheme: dark; /* dark scrollbars, form controls and dropdown popups */
  --display: Garet, "DM Sans", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --measure: 62ch;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; } /* keeps focused and linked items out from under the fixed header */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Brand glow: two red light pools on near-black, drifting slowly. Sits behind every section
   that has no solid background of its own. */
body::before {
  content: ""; position: fixed; inset: -12%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 32% at 82% 12%, rgb(229 9 20 / 0.32), transparent 70%),
    radial-gradient(34% 38% at 12% 88%, rgb(150 0 12 / 0.34), transparent 72%),
    radial-gradient(22% 22% at 55% 55%, rgb(229 9 20 / 0.07), transparent 70%),
    linear-gradient(160deg, #050505 0%, #0a0203 55%, #050505 100%);
  will-change: transform;
}
/* A second, smaller red light that roams across the page on its own path */
html::before {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  left: -10%; top: 15%; width: 48vmax; height: 48vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(229 9 20 / 0.22), transparent);
  will-change: transform, opacity;
}
body::after {
  /* fine grain so the gradient doesn't band on cheap screens */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: glow-drift 16s ease-in-out infinite alternate; }
  html::before { animation: glow-drift-2 11s ease-in-out infinite alternate; }
  @keyframes glow-drift {
    0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    33% { transform: translate3d(-12%, 8%, 0) rotate(14deg) scale(1.12); }
    66% { transform: translate3d(9%, 12%, 0) rotate(-10deg) scale(0.95); }
    100% { transform: translate3d(10%, -10%, 0) rotate(8deg) scale(1.08); }
  }
  @keyframes glow-drift-2 {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
    50% { transform: translate3d(30%, 25%, 0) scale(1.3); opacity: 1; }
    100% { transform: translate3d(55%, -10%, 0) scale(0.9); opacity: 0.6; }
  }
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
a, button, summary, input, select, textarea, label { touch-action: manipulation; } /* no double-tap-to-zoom delay on controls */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 850; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7.2vw, 6rem); line-height: 0.98; }
h2 { font-size: clamp(2rem, 4.6vw, 3.75rem); line-height: 1.04; }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.5; }
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }

.wrap { padding-inline: var(--gutter); max-width: 90rem; margin-inline: auto; }
.section { padding-block: var(--section); }
.on-light { background: var(--text); color: var(--bg); }
.on-light .muted { color: #52525b; }
.on-surface { background: rgb(10 10 10 / 0.6); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0.6rem 1.5rem;
  border: 0; border-radius: 99rem;
  background: var(--accent); color: var(--accent-fg);
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s;
}
@media (max-width: 30rem) { .nav .btn, .menu-toggle { padding-inline: 0.95rem; font-size: 0.9rem; } }
.btn:hover { background: #ff1f2b; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.more {
  display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: 1.5rem;
  font-weight: 700; text-underline-offset: 0.3em; text-decoration-thickness: 2px; text-decoration-color: var(--accent);
}
.more:hover { color: var(--accent-text); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  --edge: max(var(--gutter), calc((100% - 90rem) / 2 + var(--gutter)));
  padding: 1.25rem var(--edge);
  border-bottom: 1px solid transparent;
  /* Only transform and colors animate; padding snaps so scrolling never triggers a layout animation */
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.25s, border-color 0.25s;
  will-change: transform;
  view-transition-name: site-header;
}
.site-header.scrolled {
  padding-block: 0.6rem;
  /* Solid tint instead of a backdrop blur: a blur re-renders whatever scrolls or plays underneath, every frame */
  background: rgb(5 5 5 / 0.92);
  border-bottom-color: rgb(255 255 255 / 0.07);
}
@media (min-width: 72.01rem) { .site-header.scrolled .nav-links { background: transparent; border-color: transparent; } }
.site-header.away:not(:focus-within) { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; min-height: 2.75rem; }
.logo img { height: 2rem; width: auto; filter: brightness(0) invert(1); }
.nav { display: flex; align-items: center; gap: 0.5rem; }
.nav-links {
  display: flex; align-items: center;
  background: rgb(18 18 18 / 0.85); border: 1px solid var(--border); border-radius: 99rem;
  padding: 0 0.5rem;
}
.nav-links a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.9rem;
  font-size: 0.9rem; font-weight: 500; text-decoration: none; border-radius: 99rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent-text); }
.menu-toggle {
  display: none; min-height: 2.75rem; padding: 0 1.1rem;
  background: rgb(18 18 18 / 0.85); color: var(--text); border: 1px solid var(--border); border-radius: 99rem;
  font: 500 0.9rem/1 var(--body); cursor: pointer;
}
@media (max-width: 72rem) {
  .menu-toggle { display: inline-flex; align-items: center; }
  /* Phone menu: a solid panel that drops and scales open from the Menu button; links follow in sequence */
  .nav-links {
    display: flex; position: absolute; top: calc(100% + 0.5rem); right: var(--gutter); left: var(--gutter);
    flex-direction: column; align-items: stretch; padding: 0.5rem; border-radius: 1.25rem;
    background: var(--surface-2); border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.05);
    transform-origin: top right;
    opacity: 0; visibility: hidden; transform: translateY(-0.75rem) scale(0.95);
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.3s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-links a {
    min-height: 3rem; padding: 0 1rem; font-size: 1.05rem; border-radius: 0.75rem;
    opacity: 0; transform: translateX(-0.75rem);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.15s, background-color 0.15s;
  }
  .nav-links a + a { border-top: 1px solid rgb(255 255 255 / 0.06); }
  .nav-links a:hover, .nav-links a[aria-current="page"] { background: rgb(229 9 20 / 0.1); }
  .nav-links.open a { opacity: 1; transform: none; }
  .nav-links.open a:nth-child(1) { transition-delay: 0.04s; }
  .nav-links.open a:nth-child(2) { transition-delay: 0.08s; }
  .nav-links.open a:nth-child(3) { transition-delay: 0.12s; }
  .nav-links.open a:nth-child(4) { transition-delay: 0.16s; }
  .nav-links.open a:nth-child(5) { transition-delay: 0.2s; }
  .menu-toggle[aria-expanded="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
}

/* Home hero */
.hero { position: relative; min-height: min(100svh, 60rem); display: flex; align-items: flex-end; isolation: isolate; }
.hero-media, .hero-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-media > video { opacity: 0; transition: opacity 0.7s ease; } /* clips fade into each other */
.hero-media > video.on { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  /* The text sits in the lower half, so the shade is strongest there and fades out by the middle:
     the top of the video stays clear. Measured against every frame of the video so the headline
     stays above 3:1 and the small text above 4.5:1 (see the audit notes in design.md). */
  background: linear-gradient(0deg, rgb(5 5 5 / 0.66) 0%, rgb(5 5 5 / 0.48) 30%, rgb(5 5 5 / 0.3) 52%, transparent 78%),
              linear-gradient(90deg, rgb(5 5 5 / 0.3) 0%, transparent 65%),
              linear-gradient(0deg, var(--bg) 0%, transparent 14%),
              linear-gradient(180deg, rgb(5 5 5 / 0.45) 0%, transparent 16%);
}
.hero-copy { padding-block: 8rem clamp(3.5rem, 9vh, 6.5rem); width: 100%; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); max-width: 12em; text-shadow: 0 2px 28px rgb(0 0 0 / 0.5); }
.hero h1 > span { display: block; }
.hero .lead { margin-top: 1.25rem; max-width: 30rem; color: #e4e4e7; font-size: clamp(1rem, 1.3vw, 1.15rem); text-shadow: 0 1px 16px rgb(0 0 0 / 0.6); }
@media (max-width: 40rem) {
  .hero::after { background: linear-gradient(0deg, rgb(5 5 5 / 0.92) 0%, rgb(5 5 5 / 0.55) 40%, transparent 65%), linear-gradient(180deg, rgb(5 5 5 / 0.45) 0%, transparent 16%); }
}
.hero .lead strong { display: block; color: var(--text); font-weight: 700; margin-bottom: 0.35rem; }
.hero .btn { margin-top: 2rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 > span { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero h1 > span:nth-child(2) { animation-delay: 0.12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(0.4em); } }
}

/* Inner page hero */
.page-hero {
  padding-block: clamp(8rem, 16vw, 12rem) clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--border);
  background: radial-gradient(60% 90% at 95% 0%, rgb(229 9 20 / 0.22), transparent 70%);
}
.page-hero h1 { font-size: clamp(2.5rem, 6.5vw, 5rem); }
.page-hero .lead { margin-top: 1.5rem; max-width: 46rem; }

/* Intro band */
.intro { text-align: center; }
.intro .lead { max-width: 46rem; margin: 1.25rem auto 0; }

/* Reels */
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--text); }
.reels video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }

/* Split layout + hairline rows */
.split { display: grid; gap: 3rem; }
@media (min-width: 60rem) {
  .split { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; }
  .split > .sticky { position: sticky; top: 3rem; }
}
.split .lead { margin-top: 1.25rem; max-width: 30rem; }
.rows > li { display: grid; gap: 0.4rem 2rem; padding-block: 1.6rem; border-top: 1px solid var(--border); }
.rows > li:last-child { border-bottom: 1px solid var(--border); }
@media (min-width: 40rem) { .rows.pairs-2 > li { grid-template-columns: 14rem 1fr; } }
.rows.tight > li { padding-block: 0.9rem; font-weight: 500; }
.on-light .rows > li { border-color: #d4d4d8; }

/* Services page */
.service { display: grid; gap: 2rem; padding-block: clamp(3rem, 7vw, 6rem); border-top: 1px solid var(--border); }
.service:first-of-type { border-top: 0; }
@media (min-width: 56rem) {
  .service { grid-template-columns: 5fr 6fr; gap: clamp(3rem, 6vw, 6rem); align-items: center; }
  .service:nth-of-type(even) .service-media { order: 2; }
}
.service-media { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: clip; }
.service-media > img, .service-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.service-media > span { color: var(--text-muted); font-size: 0.95rem; border: 1px dashed var(--border); position: absolute; inset: 0; display: grid; place-items: center; }
.service-media:has(img:not([hidden]), video:not([hidden])) > span { display: none; }
.service-media > video:not([hidden]) ~ img { display: none; } /* video wins; image is only the fallback */
/* Gallery: design pieces shown whole (contain), crossfading */
.service-media:has(.slides img) > img { display: none; }
.slides { position: absolute; inset: 0; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.9s ease; }
.slides img.on { opacity: 1; }
.service .lead { margin-top: 1.25rem; max-width: 34rem; }
.service .rows { margin-top: 2rem; }

/* About */
.about { position: relative; isolation: isolate; }
.about-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.about::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(5 5 5 / 0.86); }
.about p.lead { max-width: var(--measure); margin-top: 1.5rem; }
.prose { max-width: var(--measure); display: grid; gap: 1.25rem; }
.stats { display: flex; flex-wrap: wrap; gap: 2.5rem 4rem; margin-top: 3rem; }
.stats strong { display: block; font: 850 clamp(2.75rem, 6vw, 4.5rem)/1 var(--display); letter-spacing: -0.03em; }
.pairs { display: grid; gap: 2rem 3rem; margin-top: 4rem; padding-top: 3rem; border-top: 1px solid rgb(255 255 255 / 0.18); }
@media (min-width: 40rem) { .pairs { grid-template-columns: 1fr 1fr; } }
@media (min-width: 72rem) { .pairs { grid-template-columns: repeat(4, 1fr); } }
.pairs p { margin-top: 0.4rem; }
.on-light .pairs { border-color: #d4d4d8; }
.wide-image { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

/* Process */
.process-head { max-width: 44rem; }
.process-head .lead { margin-top: 1rem; }
.steps { counter-reset: step; display: grid; gap: 2.25rem; margin-top: 3.5rem; }
@media (min-width: 40rem) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 72rem) { .steps { grid-template-columns: repeat(5, 1fr); gap: 2rem; } }
.steps li { counter-increment: step; border-top: 2px solid currentColor; padding-top: 1rem; }
.steps > li::before, .steps-long > li::before { content: counter(step); display: block; font: 850 2.5rem/1 var(--display); color: var(--accent); margin-bottom: 0.9rem; }
.steps p { margin-top: 0.4rem; }
.steps-long { counter-reset: step; }
.steps-long > li { counter-increment: step; display: grid; gap: 1rem 3rem; padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--border); }
.steps-long > li::before { font-size: clamp(3.5rem, 8vw, 6rem); margin: 0; }
@media (min-width: 56rem) { .steps-long > li { grid-template-columns: 8rem 5fr 6fr; align-items: start; } }
.steps-long h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.steps-long .rows { margin-top: 1.5rem; }
.service .details, .steps-long .details { margin-top: 1rem; max-width: var(--measure); }

/* Work */
.work-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; }
.tabs { display: flex; gap: 0.5rem; }
.tabs button {
  min-height: 2.75rem; padding: 0 1.4rem; border-radius: 99rem; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--border); font: 500 0.95rem/1 var(--body);
}
.tabs button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 48rem) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 72rem) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; overflow: clip; text-align: left; }
.tile img { width: 100%; object-fit: cover; transition: transform 0.4s; }
.tile.video img { aspect-ratio: 9 / 16; }
.tile.image img { aspect-ratio: 3 / 4; }
.tile:hover img { transform: scale(1.03); }
.tile .caption { position: absolute; inset: auto 0 0 0; padding: 2.5rem 0.9rem 0.8rem; font-size: 0.9rem; font-weight: 500; background: linear-gradient(0deg, rgb(5 5 5 / 0.85), transparent); }
.tile .caption small { display: block; color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.tile.video::after {
  content: ""; position: absolute; top: 0.9rem; right: 0.9rem; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 1.5rem no-repeat;
}

/* Industries */
.industries { border-block: 1px solid var(--border); padding-block: 3rem; }
.industries h2 { font: 500 1rem/1.4 var(--body); letter-spacing: 0; color: var(--text-muted); margin-bottom: 1rem; }
.industries ul { display: flex; flex-wrap: wrap; gap: 0.25rem 2rem; }
.industries li { font: 850 clamp(1.75rem, 4.5vw, 3.5rem)/1.15 var(--display); letter-spacing: -0.03em; }

/* Team */
.members { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 4rem; }
@media (min-width: 48rem) { .members { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 72rem) { .members { grid-template-columns: repeat(4, 1fr); } }
.member .photo { aspect-ratio: 4 / 5; background: var(--surface-2); border: 1px dashed var(--border); display: grid; place-items: center; color: var(--text-muted); font-size: 0.9rem; overflow: hidden; }
.member .photo:has(img:not([hidden])) { border: 0; }
.member .photo img { width: 100%; height: 100%; object-fit: cover; }
.member .photo img:not([hidden]) + span { display: none; }
.member h3 { margin-top: 0.9rem; font-size: 1.05rem; }
.member p + p { margin-top: 0.5rem; font-size: 0.95rem; }

/* Testimonial */
.testimonial { text-align: center; }
.testimonial blockquote { font: 850 clamp(1.5rem, 3.4vw, 2.75rem)/1.2 var(--display); letter-spacing: -0.02em; max-width: 56rem; margin-inline: auto; text-wrap: balance; }
.testimonial figcaption { margin-top: 2rem; }
.testimonial figcaption strong { display: block; }

/* Closing call to action */
.cta-band {
  text-align: center; border-top: 1px solid var(--border);
  background: radial-gradient(70% 120% at 50% 110%, rgb(229 9 20 / 0.5), transparent 70%), rgb(10 10 10 / 0.6);
}
.cta-band .lead { max-width: 40rem; margin: 1.25rem auto 2rem; }

/* FAQ */
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; min-height: 3.5rem; padding-block: 1rem; font: 700 1.1rem/1.35 var(--body); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; padding-left: 1rem; font-size: 1.5rem; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 1.25rem; max-width: var(--measure); }

/* Contact */
.contact-info { margin-top: 2.5rem; display: grid; gap: 0.25rem; }
.contact-info a, .contact-info span { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1.15rem; font-weight: 500; text-decoration: none; }
.contact-info a:hover, .socials a:hover, .site-footer a:hover { color: var(--accent-text); }
.socials { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 1.5rem; }
.socials a { display: inline-flex; align-items: center; min-height: 2.75rem; }
form { display: grid; gap: 1.25rem; }
.field-row { display: grid; gap: 1.25rem; }
@media (min-width: 36rem) { .field-row { grid-template-columns: 1fr 1fr; } }
label { display: grid; gap: 0.4rem; font-size: 0.9rem; font-weight: 500; }
input, select, textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 0;
  font: 400 1rem/1.4 var(--body);
}
textarea { min-height: 8rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 0; border-color: var(--text); }
.form-note { min-height: 1.5rem; font-size: 0.95rem; }
.form-note.error { color: var(--error); }
form .btn { justify-self: start; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 3.5rem 2.5rem; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 4fr 2fr 3fr 2fr; } }
.site-footer .logo img { height: 1.75rem; }
.site-footer p { margin-top: 1rem; max-width: 24rem; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.5rem; margin-inline: -0.5rem; text-decoration: none; } /* wider tap area, same look */
.site-footer h2 { font: 700 0.95rem/1.4 var(--body); letter-spacing: 0; margin-bottom: 0.5rem; }
.copyright { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.copyright a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Viewer */
dialog { padding: 0; border: 0; background: #000; color: var(--text); max-width: min(92vw, 64rem); max-height: 92svh; overscroll-behavior: contain; }
dialog::backdrop { background: rgb(0 0 0 / 0.88); }
dialog video, dialog img { max-height: 92svh; max-width: 100%; margin: auto; }
dialog form { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1; display: block; }
dialog button { min-width: 2.75rem; min-height: 2.75rem; padding: 0 1rem; border: 0; border-radius: 99rem; background: rgb(5 5 5 / 0.8); color: var(--text); font: 500 0.9rem/1 var(--body); cursor: pointer; }

/* Page-to-page transition (Chrome, Edge, Safari 18.2+; other browsers just load the page).
   Old page sinks back, new page wipes up from the bottom; the header stays put. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: 420ms cubic-bezier(0.7, 0, 0.3, 1) both page-out; }
  ::view-transition-new(root) { animation: 620ms cubic-bezier(0.7, 0, 0.3, 1) 80ms both page-in; }
  @keyframes page-out { to { opacity: 0.2; transform: scale(0.94) translateY(-2%); } }
  @keyframes page-in { from { clip-path: inset(100% 0 0 0); transform: translateY(6%); } }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Reveal on scroll, no JS. Browsers without scroll timelines show everything as is. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main h2, main .lead, .rows > li, .service, .steps > li, .steps-long > li,
    .pairs > li, .stats > li, .tile, .member, .reels li, .wide-image, .carousel-wrap,
    .cards > li, .job, .facts > div, .faq details {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    .hero h1, .hero .lead { animation: none; }
    @keyframes reveal { from { opacity: 0; transform: translateY(2.5rem); } }

    /* Performance rule for everything below: scroll-linked animations only touch scale, translate,
       transform and opacity. Those run on the GPU compositor; filter, blur, letter-spacing or colors
       would make the main thread redo style and paint on every scrolled frame.

       Cars punch in: footage and photos start zoomed in and faded, then settle as they scroll into view.
       Uses the separate `scale` property so it stacks with the hover zoom on tiles. */
    .service-media > video, .service-media > img, .slides, .tile img, .tile video, .reels video, .about-bg, .card-img img {
      animation: car-zoom linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    @keyframes car-zoom { from { scale: 1.45; opacity: 0.35; } }

    /* Hero: footage pushes in and the copy lifts away as you scroll past it */
    .hero-media { animation: hero-push linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    .hero-copy { animation: hero-lift linear both; animation-timeline: scroll(root); animation-range: 0 75vh; }
    @keyframes hero-push { to { scale: 1.3; } }
    @keyframes hero-lift { to { translate: 0 -30%; opacity: 0; } }

    /* Industry words drive in from alternating sides */
    .industries li { animation: drive-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .industries li:nth-child(odd) { animation-name: drive-in-r; }
    @keyframes drive-in { from { translate: -45vw 0; opacity: 0; } }
    @keyframes drive-in-r { from { translate: 45vw 0; opacity: 0; } }
  }
}
.hero, .about, .industries, .reels li { overflow: clip; } /* clip, not hidden: hidden would make each a scroll container and break the scroll-linked zoom */

/* "performs." glitch: short RGB-split bursts every few seconds, then holds still */
.glitch { position: relative; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .glitch { animation: glitch-main 3.6s 1.2s infinite steps(1, end); }
  .glitch::before { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0; }
  /* No blend modes: blending over the playing hero video would re-composite every video frame.
     Flash safety: one short burst per 3.6s with three position changes and one cyan layer that turns on once and
     off once, so nothing changes brightness more than 3 times in any second (WCAG 2.3.1). */
  .glitch::before { color: #00e5ff; animation: glitch-a 3.6s 1.2s infinite steps(1, end); }
  @keyframes glitch-main {
    0%, 9%, 100% { transform: none; }
    1% { transform: skewX(-12deg) translateX(-3px); }
    4% { transform: skewX(8deg) translateX(4px); }
    7% { transform: translateX(2px); }
  }
  @keyframes glitch-a {
    0%, 9%, 100% { opacity: 0; transform: none; clip-path: inset(0); }
    1% { opacity: 0.9; transform: translate(-6px, 1px); clip-path: inset(8% 0 62% 0); }
    4% { transform: translate(6px, -2px); clip-path: inset(52% 0 20% 0); }
    7% { transform: translate(-3px, 0); clip-path: inset(30% 0 44% 0); }
  }
}

.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 20; padding: 0.75rem 1rem; background: var(--text); color: var(--bg); font-weight: 700; }
.skip:focus { top: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  .nav-links, .nav-links a { transition-duration: 0s !important; transition-delay: 0s !important; transform: none !important; }
}

/* Hamburger: three bars that fold into an X when the menu is open */
.menu-toggle.menu-toggle {
  position: relative; width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 50%;
  justify-content: center; align-items: center; flex-direction: column; gap: 0.3rem;
}
.menu-toggle span { display: block; width: 1.15rem; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(calc(0.3rem + 2px)) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(calc(-0.3rem - 2px)) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .menu-toggle span { transition: none; } }

/* Links that wrap a heading keep the heading look */
.rows h3 a, .service h2 a, .card { text-decoration: none; color: inherit; }
.rows h3 a:hover, .service h2 a:hover { color: var(--accent-text); }
/* Taller tap area for title links without moving anything: padding grows the hit area, the negative margin cancels it out */
.rows h3 a, .service h2 a { display: inline-block; padding-block: 0.7rem; margin-block: -0.7rem; }
.back { margin: 0 0 1.25rem; }

/* Cards: case studies and journal posts */
.cards { display: grid; gap: 2.5rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); margin-top: 2.5rem; }
.card { display: block; height: 100%; }
.card-img { display: block; overflow: clip; background: var(--surface-2); }
.card-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-meta { display: block; margin-top: 1rem; font-size: 0.9rem; }
.card h3 { margin-top: 0.35rem; font-size: 1.4rem; transition: color 0.15s; }
.card p { margin-top: 0.5rem; }
.card:hover h3 { color: var(--accent); }
.page-hero .card-meta { margin: 0 0 0.75rem; }

/* Case study facts: Creative / Scope / Deliverables */
.facts { display: grid; gap: 3rem; }
@media (min-width: 56rem) { .facts { grid-template-columns: 4fr 3fr 3fr; } }
.facts h2, .label-h { font: 700 1rem/1.4 var(--body); letter-spacing: 0; color: var(--text-muted); margin-bottom: 1.25rem; }
.label-h { margin-bottom: 2rem; }
.tile video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.tile.image img { object-fit: cover; }

/* Journal post */
.post-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 3rem; }
.post-body { display: grid; gap: 1.4rem; max-width: var(--measure); margin: 3rem auto 0; font-size: 1.15rem; line-height: 1.75; }

/* Testimonial carousel: one quote at a time, swipe or use the arrows */
.testimonial h2 { font: 500 1rem/1.4 var(--body); letter-spacing: 0; color: var(--text-muted); margin-bottom: 2rem; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > li { scroll-snap-align: center; padding-inline: 0.5rem; }
.carousel-nav { display: flex; justify-content: center; gap: 0.75rem; margin-top: 2.5rem; }
.carousel-btn { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text); font: 400 1.5rem/1 var(--body); cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.carousel-btn:hover { background: var(--accent); border-color: var(--accent); }
.carousel-wrap:not(:has(.carousel > li + li)) .carousel-nav { display: none; }

/* Careers */
.jobs { margin-top: 0; }
.job { border-top: 1px solid var(--border); }
.job:last-of-type { border-bottom: 1px solid var(--border); }
.job summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.25rem; padding-block: 1.5rem; cursor: pointer; list-style: none; }
.job summary::-webkit-details-marker { display: none; }
.job summary strong { font: 850 clamp(1.3rem, 2.5vw, 1.75rem)/1.2 var(--display); margin-right: auto; }
.job summary::after { content: "+"; font-size: 1.5rem; color: var(--accent); }
.job[open] summary::after { content: "−"; }
.job > div { display: grid; gap: 1.25rem; padding-bottom: 2rem; max-width: var(--measure); justify-items: start; }

/* Hover preview on video tiles: the clip fades in over the poster, the play badge fades out */
.tile video.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
.tile.playing video.preview { opacity: 1; }
.tile.video::after { transition: opacity 0.2s, transform 0.2s; }
.tile.video.playing::after { opacity: 0; transform: scale(0.6); }

/* Our Work: pictures and videos are black and white until you hover (or tab to) them, then fade to full color.
   Only where hovering exists: on a touch screen there is nothing to hover, so color stays on. */
@media (hover: hover) {
  .tile img, .tile video.preview { filter: grayscale(1); transition: transform 0.4s, filter 0.5s ease, opacity 0.3s; }
  .tile:hover img, .tile:focus-visible img, .tile.playing img,
  .tile:hover video.preview, .tile:focus-visible video.preview, .tile.playing video.preview { filter: none; }
}

/* Off-screen and low-end: pause what nobody is looking at */
.hero-off .glitch, .hero-off .glitch::before { animation-play-state: paused; }
html.lite::before, html.lite body::before { animation: none; }
html.lite .glitch, html.lite .glitch::before { animation: none; }
html.lite body::after { display: none; }
@supports (animation-timeline: view()) {
  html.lite .service-media > video, html.lite .service-media > img, html.lite .slides, html.lite .tile img,
  html.lite .tile video, html.lite .reels video, html.lite .about-bg, html.lite .card-img img,
  html.lite .industries li, html.lite .hero-media { animation: none; }
}

/* FAQ: one answer open at a time (details name="faq"), answer eases in */
.faq summary { transition: color 0.15s; }
.faq summary:hover, .faq details[open] summary { color: var(--accent-text); }
.faq summary::after { transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { color: var(--text-muted); line-height: 1.7; padding-right: 2rem; }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] p { animation: faq-in 0.3s ease both; }
  @keyframes faq-in { from { opacity: 0; transform: translateY(-0.4rem); } }
}

/* Admin preview: outline around the section being edited */
.admin-focus { outline: 3px dashed var(--accent); outline-offset: -3px; }
/* Admin preview, click to edit: everything with content behind it highlights on hover */
html.admin-pick [data-path], html.admin-pick [data-fallback] { cursor: pointer; }
html.admin-pick [data-path]:hover { outline: 2px solid var(--accent-text); outline-offset: -2px; }
html.admin-pick .admin-picked { outline: 3px solid var(--accent-text) !important; outline-offset: -3px; }
html.admin-pick .motion-toggle { display: none; }

/* Pause motion: stops everything that moves on its own (WCAG 2.2.2). Scrolling effects are user-driven and stay. */
.motion-toggle {
  position: fixed; left: var(--gutter); bottom: 1rem; z-index: 15;
  min-height: 2.75rem; padding: 0 1.1rem; border-radius: 99rem; cursor: pointer;
  background: rgb(18 18 18 / 0.92); color: var(--text); border: 1px solid var(--border);
  font: 500 0.88rem/1 var(--body);
}
.motion-toggle:hover { border-color: var(--text-muted); }
html.calm::before, html.calm body::before,
html.calm .glitch, html.calm .glitch::before { animation: none; }

/* Links to pages that are not switched on yet (livePages in content.js): they look the same but do nothing */
.not-live { pointer-events: none; cursor: default; }

/* Pages */
.nojs { padding: 6rem var(--gutter) 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* spam trap: people never see or fill it */
.privacy-note { font-size: 0.88rem; }
.privacy-note a { text-underline-offset: 0.2em; }
.legal { display: grid; gap: 2.5rem; max-width: var(--measure); }
.legal h2 { font-size: 1.5rem; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.legal p + p { margin-top: 0.8rem; }

/* Footer awards */
.awards { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.awards li { display: flex; align-items: center; gap: 0.75rem; }
.awards img { height: 3rem; width: auto; }
