/*
  Layout: a deep stage with the headline and a row of creators, a bright sheet for the work,
  a moving blue ribbon, a quiet dark stretch, and an electric blue finish.
*/
:root {
  --ink: #05070f;
  --ink-2: #0d1324;
  --blue: #0051ff;
  --sky: #86b0ff;
  --ice: #edf3ff;
  --white: #fff;
  --text: #0a1124;
  --text-soft: #4b5874;
  --on-dark-soft: #aab6d0;
  --line: rgb(150 182 255 / 18%);
  --display: "Funnel Display", "Segoe UI", system-ui, sans-serif;
  --body: "Funnel Sans", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--ink);
  color: var(--white);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); text-wrap: balance; }
img, iframe, canvas { display: block; max-width: 100%; border: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 4px; }
.works :focus-visible { outline-color: var(--blue); }

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}
.title {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
}
.title em { color: var(--sky); font-style: normal; }
.works .title em { color: var(--blue); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Floating header */
.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(960px, calc(100% - 24px));
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(8 12 25 / 82%);
  box-shadow: 0 16px 40px rgb(0 5 25 / 28%);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand img { width: 48px; height: 48px; border-radius: 50%; background: var(--blue); object-fit: cover; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--on-dark-soft);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .25s, background .25s;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--white); background: rgb(134 176 255 / 14%); }
.site-nav .nav-contact { margin-left: 8px; background: var(--blue); color: var(--white); font-weight: 600; }
.site-nav .nav-contact:hover, .site-nav .nav-contact[aria-current] { background: #2b6dff; }
.menu-button {
  display: none;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  font-size: .95rem;
  font-weight: 600;
}

/* Hero */
/* The extra 48px at the bottom sits behind the rounded top of Works. */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(124px, 19vh, 190px) calc(clamp(48px, 6vw, 80px) + 48px);
  isolation: isolate;
}
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(38% 34% at var(--mx, 50%) var(--my, 30%), rgb(45 112 255 / 24%), transparent),
    radial-gradient(75% 58% at 50% 100%, #0048e6, rgb(0 60 200 / 38%) 48%, transparent 100%);
}
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }

.hero h1 {
  max-width: 12.6em;
  font-size: clamp(2.7rem, 6.7vw, 6.1rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.018em;
  text-wrap: wrap;
}
.word { display: inline-block; }
.layer {
  position: relative;
  display: inline-block;
  margin-top: .16em;
  padding: 0 .14em .08em;
  border: 2px solid #4b88ff;
  background: rgb(0 81 255 / 20%);
  color: #b9d2ff;
  white-space: nowrap;
  transform-origin: 0 0;
}
.handles i {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 2px solid #4b88ff;
  background: var(--white);
}
.handles i:nth-child(1) { top: -6px; left: -6px; }
.handles i:nth-child(2) { top: -6px; right: -6px; }
.handles i:nth-child(3) { bottom: -6px; left: -6px; }
.handles i:nth-child(4) { right: -6px; bottom: -6px; }
.cursor { position: absolute; top: 100%; left: 100%; z-index: 2; letter-spacing: 0; }
.cursor svg { position: absolute; top: 0; left: 0; width: 26px; height: 26px; fill: var(--white); stroke: var(--blue); stroke-width: 1.5; }
.cursor b {
  position: absolute;
  top: 24px;
  left: 18px;
  padding: 5px 11px;
  border-radius: 4px 12px 12px;
  background: var(--blue);
  color: var(--white);
  font: 600 .85rem/1.2 var(--body);
}
/* Every frame of the opening stays readable. */
.motion .word { animation: word-in .9s var(--ease) backwards; animation-delay: calc(var(--i) * 70ms); }
.motion .layer { animation: layer-scale 1.35s cubic-bezier(.7, 0, .15, 1) .35s backwards; }
@keyframes word-in { from { opacity: .35; transform: translateY(.4em) rotate(5deg); } }
@keyframes layer-scale { from { transform: scale(.66) rotate(-3deg); } }

.hero-sub { margin-top: 26px; color: var(--ice); font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .4s var(--spring), background .25s;
}
.button:hover { transform: translateY(-3px) scale(1.03); }
.button:active { transform: scale(.97); }
.button svg { width: 20px; height: 20px; transition: transform .4s var(--spring); }
.button:hover svg { transform: translateY(4px); }
.button-blue { background: var(--white); color: var(--blue); }
.button-ghost { border: 1px solid rgb(185 210 255 / 42%); background: rgb(5 7 15 / 45%); }
.button-ghost:hover { background: rgb(0 81 255 / 45%); }


/* Moving rows */
.marquee { overflow: hidden; }
.track { display: flex; width: max-content; will-change: transform; }
.clients { padding-top: clamp(64px, 10vh, 112px); }
.clients h2 {
  margin-bottom: 18px;
  padding-inline: 16px;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -.03em;
  text-align: center;
}
.clients .marquee, .feedback .marquee {
  padding-block: 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.client {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-right: 20px;
  padding: 14px 34px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-2);
  white-space: nowrap;
  transition: transform .5s var(--spring), background .3s;
}
.client:hover { background: var(--blue); transform: translateY(-6px) rotate(-1.5deg); }
.client img { width: 76px; height: 76px; border-radius: 50%; background: var(--blue); object-fit: cover; }
.client strong { display: block; font: 600 1.35rem/1.2 var(--display); letter-spacing: -.025em; }
.client small { color: var(--on-dark-soft); font-size: .95rem; transition: color .3s; }
.client:hover small { color: var(--white); }

/* Works */
.sheet { position: relative; border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0; }
.works {
  margin-top: -48px;
  padding-block: clamp(72px, 9vw, 128px) clamp(40px, 6vw, 80px);
  background: var(--ice);
  color: var(--text);
}
.works-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(44px, 6vw, 76px);
}
.tabs { position: relative; display: flex; padding: 6px; border-radius: 999px; background: #d7e4ff; }
.tab-thumb {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: var(--w, 0);
  border-radius: 999px;
  background: var(--blue);
  transform: translateX(var(--x, 0));
  transition: transform .5s var(--ease), width .5s var(--ease);
}
.tabs button {
  position: relative;
  min-height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font-weight: 600;
  transition: color .3s;
}
.tabs button[aria-selected="true"] { color: var(--white); }
.work-group + .work-group { margin-top: clamp(64px, 8vw, 104px); }
.work-group > h3 { margin-bottom: 24px; font: 600 clamp(1.3rem, 2vw, 1.65rem)/1.2 var(--display); letter-spacing: -.015em; }
/* Cards in a group are always the same size; a row that is not full stays centered. */
.cards { --per-row: 3; --gap: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 44px var(--gap); }
.cards-two { --per-row: 2; }
.cards-shorts { --per-row: 4; }
.cards > * { width: calc((100% - var(--gap) * (var(--per-row) - 1)) / var(--per-row)); min-width: 0; }
.work { display: flex; }
/* No frame: the thumbnail fills the width and the text sits on the page. */
.work-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: none;
  perspective: 1200px;
  text-align: left;
}
.poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #cbdafa;
  box-shadow: 0 14px 34px rgb(0 40 130 / 14%);
}
.work-card:hover .poster { box-shadow: 0 28px 60px rgb(0 60 200 / 28%); }
.poster-vertical { aspect-ratio: 9 / 16; }
.tilt {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease), box-shadow .4s;
}
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.work-card:hover .poster img { transform: scale(1.04); }
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgb(255 255 255 / 32%), transparent 46%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.work-card:hover .poster::after { opacity: 1; }
.work-info { display: flex; flex: 1; align-items: flex-start; justify-content: space-between; gap: 16px; padding-top: 20px; }
.work-copy { min-width: 0; }
.work-title { display: block; font: 600 1.12rem/1.3 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.cards-two .work-title { font-size: clamp(1.12rem, 1.7vw, 1.4rem); }
.work-label { display: block; margin-top: 4px; color: var(--text-soft); font-size: 1rem; }
.play {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #d3e2ff;
  color: var(--blue);
  transition: background .3s, color .3s, transform .45s var(--spring);
}
.play svg { width: 18px; height: 18px; margin-left: 2px; fill: currentColor; }
.work-card:hover .play, .work-card:focus-visible .play { background: var(--blue); color: var(--white); transform: scale(1.1); }

/* Placeholders only appear in the local preview. */
.placeholder {
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 24px;
  border: 2px dashed #88aaf0;
  border-radius: 22px;
  color: var(--text-soft);
  font-size: .95rem;
  text-align: center;
}
.placeholder strong { color: var(--text); }
.placeholder-vertical { aspect-ratio: 9 / 16; background: #e0eaff; }
.feedback .placeholder { width: min(400px, 82vw); min-height: 220px; margin-right: 20px; border-color: rgb(134 176 255 / 45%); color: var(--on-dark-soft); }
.feedback .placeholder strong { color: var(--white); }

/* Ribbon */
.ribbon-wrap { overflow: hidden; padding-block: calc(2vw + 22px); background: linear-gradient(var(--ice) 50%, var(--ink) 50%); }
.ribbon { width: 106%; margin-left: -3%; padding-block: clamp(16px, 2vw, 26px); background: var(--blue); transform: rotate(-2deg); }
.ribbon-item {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding-right: clamp(28px, 4vw, 56px);
  font: 600 clamp(1.6rem, 3.6vw, 3rem)/1.1 var(--display);
  letter-spacing: -.035em;
  white-space: nowrap;
}
.ribbon-item svg { width: .8em; height: .8em; color: #b9d2ff; }

/* About */
.about { padding-block: clamp(80px, 11vw, 160px); }
.about-copy { display: grid; grid-template-columns: 4fr 8fr; align-items: start; gap: clamp(28px, 5vw, 72px); }
.about-copy > * { min-width: 0; }
.about-text { font: 500 clamp(1.45rem, 2.9vw, 2.5rem)/1.32 var(--display); letter-spacing: -.02em; }
.motion .about-text span { color: #8290ae; transition: color .5s; }
.motion .about-text .lit { color: var(--white); }
.years { margin-top: clamp(64px, 8vw, 112px); }
.years-copy { display: flex; align-items: flex-end; gap: clamp(16px, 2.4vw, 32px); }
.years-copy strong {
  color: var(--sky);
  font: 600 clamp(7rem, 19vw, 16rem)/.8 var(--display);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.years-copy strong + span { font: 500 clamp(1.25rem, 2.4vw, 2.1rem)/1.2 var(--display); letter-spacing: -.02em; }
/* --p is the playhead position, from 0 to 1. Without motion it stays at 1. */
.timeline {
  position: relative;
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 6px;
  height: clamp(64px, 8vw, 108px);
  margin-top: clamp(44px, 5vw, 68px);
}
.timeline i { position: relative; overflow: hidden; border-radius: 14px; background: #131c33; }
.timeline i::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--clip);
  transform: scaleX(var(--fill, 1));
  transform-origin: 0 50%;
}
.timeline i:nth-child(1) { --clip: #003cc0; }
.timeline i:nth-child(2) { --clip: #0051ff; }
.timeline i:nth-child(3) { --clip: #3d7dff; }
.timeline i:nth-child(4) { --clip: #86b0ff; }
.timeline b {
  position: absolute;
  top: -18px;
  bottom: -18px;
  left: calc(var(--p, 1) * 100%);
  width: 2px;
  margin-left: -1px;
  background: var(--white);
}
.timeline b::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 18px;
  height: 16px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 50% 100%, 0 45%);
  transform: translateX(-50%);
}

/* Toolbox */
.toolbox {
  overflow: hidden;
  padding-block: clamp(64px, 8vw, 112px) clamp(80px, 10vw, 140px);
  background: radial-gradient(46% 46% at 50% 58%, rgb(0 81 255 / 22%), transparent);
  text-align: center;
}
.deck { --size: clamp(82px, 14vw, 172px); display: flex; justify-content: center; margin-top: clamp(84px, 9vw, 120px); }
/* The button stays still while the tile moves, so the hover never flickers. */
.tool {
  position: relative;
  width: var(--size);
  height: var(--size);
  margin: 0 calc(var(--size) * -.045);
  padding: 0;
  border: 0;
  border-radius: 24%;
  background: none;
  perspective: 700px;
}
.tool:nth-child(1) { --turn: -7deg; --drop: 4px; z-index: 1; }
.tool:nth-child(2) { --turn: 4deg; --drop: -5px; z-index: 3; }
.tool:nth-child(3) { --turn: -4deg; --drop: 5px; z-index: 2; }
.tool:nth-child(4) { --turn: 7deg; --drop: -2px; z-index: 4; }
.tile {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24%;
  background: linear-gradient(145deg, var(--tile-a), var(--tile-b));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tile-ink) 55%, transparent), 0 16px 34px rgb(0 0 0 / 45%);
  color: var(--tile-ink);
  transform: translate(var(--push, 0), var(--drop)) rotate(var(--turn));
  transition: transform .6s var(--spring), filter .4s, box-shadow .4s;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 0%), rgb(255 255 255 / 34%), transparent 55%);
  opacity: .45;
  transition: opacity .3s;
}
.mark { font: 600 calc(var(--size) * .43)/1 var(--body); letter-spacing: -.04em; transition: transform .6s var(--spring); }
img.mark { width: 56%; height: 56%; filter: brightness(0) invert(1); }
.tool-pr { --tile-a: #17178f; --tile-b: #00005b; --tile-ink: #b3b3ff; --shine: #7373ff; }
.tool-ae { --tile-a: #2b1191; --tile-b: #0d0058; --tile-ink: #cfa6ff; --shine: #9b62ff; }
.tool-ps { --tile-a: #00456e; --tile-b: #001e36; --tile-ink: #5bbdff; --shine: #31a8ff; }
.tool-bl { --tile-a: #ff9c3d; --tile-b: #d96500; --tile-ink: #fff; --shine: #ff8b1f; }
.deck.has-active .tile { filter: brightness(.48) saturate(.7); }
.deck .tool.is-active { z-index: 10; }
.deck .is-active .tile {
  filter: none;
  box-shadow: inset 0 0 0 1.5px var(--tile-ink), 0 26px 80px color-mix(in srgb, var(--shine) 75%, transparent);
  transform: translateY(-20%) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.24);
}
.deck .is-active .tile::after { opacity: 1; }
.deck .is-active .mark { transform: scale(1.08); }
.motion .tool { animation: float 5s ease-in-out infinite alternate; }
.motion .tool:nth-child(even) { animation-delay: -2.5s; }
.motion .tool.is-active { animation-play-state: paused; }
@keyframes float { from { translate: 0 -4px; } to { translate: 0 6px; } }
/* Room for a two-line description, so the page does not jump between tools. */
.tool-info { min-height: 96px; margin-top: 52px; }
.tool-name { font: 600 clamp(1.5rem, 2.6vw, 2.1rem)/1.2 var(--display); letter-spacing: -.03em; }
.tool-text { margin-top: 8px; color: var(--on-dark-soft); }

/* Feedback */
.feedback { padding-bottom: clamp(80px, 10vw, 140px); scroll-margin-top: 80px; }
.feedback .title { margin-bottom: 44px; text-align: center; }
.quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  width: min(400px, 82vw);
  margin: 0 20px 0 0;
  padding: 30px;
  border-radius: 24px;
  background: var(--ink-2);
}
.quote blockquote { margin: 0; font-size: 1.15rem; }
.quote figcaption { font-weight: 600; }
.quote figcaption span { display: block; color: var(--on-dark-soft); font-size: .95rem; font-weight: 400; }

/* Contact */
.contact {
  overflow: hidden;
  padding-block: clamp(80px, 11vw, 150px) clamp(40px, 5vw, 72px);
  background: radial-gradient(80% 90% at 85% 0%, #3c7dff, transparent), var(--blue);
}
.contact h2 {
  max-width: 11em;
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr 1.7fr; gap: 16px; margin-top: clamp(48px, 7vw, 96px); }
.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 210px;
  padding: 28px;
  border: 0;
  border-radius: 28px;
  background: var(--ink);
  color: var(--white);
  text-align: left;
  text-decoration: none;
}
.contact-email { background: var(--white); color: var(--blue); }
.contact-label { font-weight: 500; }
.contact-value { max-width: 100%; margin-top: 6px; font: 600 clamp(1.25rem, 2vw, 1.75rem)/1.25 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.contact-card svg { width: 38px; height: 38px; margin-top: auto; align-self: flex-end; transition: transform .45s var(--spring); }
.contact-card:hover svg { transform: translate(5px, -5px) scale(1.1); }
.contact-card:focus-visible { outline-color: var(--white); }
.copy-status { margin-top: auto; align-self: flex-end; color: var(--on-dark-soft); }
.contact-card:hover .copy-status { color: var(--white); }

/* Video window */
.player {
  width: min(1120px, calc(100vw - 32px), calc((100dvh - 170px) * 1.778));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
}
.player.is-vertical { width: min(420px, calc(100vw - 32px), calc((100dvh - 170px) * .5625)); }
.player::backdrop { background: rgb(3 6 16 / 90%); }
.motion .player[open] { animation: player-in .5s var(--ease); }
@keyframes player-in { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.player-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.player-head p { font: 600 1.15rem/1.3 var(--display); }
.player-close { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--white); color: var(--text); }
.player-close svg { width: 22px; height: 22px; }
.player-frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 20px; background: #000; }
.is-vertical .player-frame { aspect-ratio: 9 / 16; }
.player-frame iframe { width: 100%; height: 100%; }
.player-link { display: inline-block; margin-top: 14px; text-underline-offset: 4px; }
.noscript { padding: 24px; text-align: center; }

/* Scroll reveals: only active once the script is ready. */
.motion [data-reveal] {
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.motion [data-reveal]:not(.seen) { opacity: 0; transform: translateY(70px) rotate(1.5deg) scale(.96); }

@media (max-width: 860px) {
  /* The header stays at the top of the page and scrolls away with it. */
  html { scroll-padding-top: 0; }
  .site-header {
    position: absolute;
    padding-inline: 4px;
    border-color: transparent;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
  }
  .menu-button { display: block; }

  /* The ribbon is straight and still, with each phrase shown once. */
  .ribbon-wrap { padding-block: 0; }
  .ribbon { width: 100%; margin-left: 0; padding: 24px 16px; transform: none; }
  .ribbon .track {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    width: 100%;
    transform: none !important; /* Overrides the position set by main.js. */
    will-change: auto;
  }
  .ribbon-item { gap: 16px; padding-right: 0; font-size: 1.3rem; letter-spacing: -.02em; }
  .ribbon-item:nth-child(n + 5), .ribbon-item:nth-child(n + 3) svg { display: none; }
  .ribbon-item:nth-child(4) { flex-basis: 100%; justify-content: center; color: #cfe0ff; }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #080c19;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 16px; font-size: 1.1rem; }
  .site-nav .nav-contact { margin: 8px 0 0; text-align: center; }
  .cards { --per-row: 2; --gap: 18px; row-gap: 36px; }
  .about-copy { grid-template-columns: 1fr; }
  .feedback { scroll-margin-top: 0; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-email { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  /* Hero */
  .cursor { display: none; }
  .hero { padding-block: 124px 96px; }
  .hero-copy { padding-inline: 16px; }
  .hero-sub { max-width: 18em; margin-top: 22px; }
  .hero-actions { flex-wrap: nowrap; gap: 10px; margin-top: 24px; }
  .button { gap: 8px; min-height: 50px; padding: 0 18px; font-size: 1rem; white-space: nowrap; }
  .button svg { width: 18px; height: 18px; }
  .clients { padding-top: 60px; }
  .clients h2 { margin-bottom: 8px; font-size: 1.25rem; }
  .client { gap: 14px; margin-right: 12px; padding: 10px 24px 10px 10px; }
  .client img { width: 54px; height: 54px; }
  .client strong { font-size: 1.15rem; }

  /* Sections */
  .works { padding-block: 56px 60px; }
  .works-head { gap: 20px; margin-bottom: 36px; }
  .work-group + .work-group { margin-top: 52px; }
  .work-group > h3 { margin-bottom: 18px; }
  .work-info { padding-top: 14px; }
  .play { width: 42px; height: 42px; }
  .ribbon-item:nth-child(2) svg { display: none; }
  .ribbon-item:nth-child(3) { flex-basis: 100%; justify-content: center; }
  .about { padding-block: 64px; }
  .about-copy { gap: 20px; }
  .about-text { font-size: 1.3rem; line-height: 1.4; }
  .years { margin-top: 52px; }
  .toolbox { padding-block: 40px 56px; }
  .deck { margin-top: 64px; }
  .tool-info { margin-top: 40px; }

  /* Contact: compact rows */
  .contact { padding-block: 56px 40px; }
  .contact h2 { font-size: 2.6rem; }
  .contact-grid { gap: 10px; margin-top: 32px; }
  .contact-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 14px;
    padding: 18px 20px;
    border-radius: 20px;
  }
  .contact-label, .contact-value { grid-column: 1; }
  .contact-value { margin-top: 2px; font-size: 1.12rem; }
  .contact-card svg, .copy-status { grid-row: 1 / 3; grid-column: 2; align-self: center; margin: 0; }
  .contact-card svg { width: 26px; height: 26px; }
  .copy-status { max-width: 9em; font-size: .9rem; text-align: right; }
  .cards { --per-row: 1; }
  .cards-shorts { --per-row: 2; --gap: 12px; }
  .cards-shorts .work-info { gap: 8px; padding-top: 14px; }
  .cards-shorts .work-title { font-size: 1rem; }
  .cards-shorts .work-label { font-size: .9rem; }
  .cards-shorts .play { width: 36px; height: 36px; }
  .contact-grid { grid-template-columns: 1fr; }
  .placeholder-vertical { padding: 12px; }
  .contact-card { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee { overflow-x: auto; }
}
