/*
 * Home-hero stickers + dotted swirl trail, and the free website audit dialog.
 * Driven by js/playful.js; animations are switched off for prefers-reduced-motion.
 */

/* ---------- Hero: layers ---------- */
.home-hero {
  isolation: isolate;
}
.home-hero .hero-split {
  position: relative;
  z-index: 1;
}
.hero-doodles,
.hero-stickers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Trail behind copy/cube; stickers stay on top. */
.hero-doodles {
  z-index: 0;
}
.hero-stickers {
  z-index: 5;
}

/* ---------- Hero: dotted swirl trail ---------- */
.hero-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hero-trail-tall {
  display: none;
}
/* Thin round dots (reference look) — prominence from contrast, not thickness. */
.hero-trail-dots {
  fill: none;
  stroke: var(--brand-lime);
  stroke-width: 3.15;
  stroke-linecap: round;
  stroke-dasharray: 0 9.5;
  opacity: 1;
}
/* Solid stroke inside the mask; animating its dash draws start → end. */
.hero-trail-reveal {
  fill: none;
  stroke: #fff;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}
.has-js .hero-trail-reveal {
  stroke-dashoffset: 1;
}
.home-hero.is-live .hero-trail-reveal {
  animation: hero-trail-draw 5s cubic-bezier(0.45, 0, 0.25, 1) 0.4s forwards;
}
.home-hero.is-live .hero-trail-dots {
  animation: hero-trail-march 1.5s linear infinite;
}
@keyframes hero-trail-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes hero-trail-march {
  to {
    stroke-dashoffset: -9.5;
  }
}

/* ---------- Hero: stickers ---------- */
.hero-sticker {
  --r: 0deg;
  --s: 1;
  --depth: 1;
  --i: 0;
  position: absolute;
  left: var(--x, auto);
  top: var(--y, auto);
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  /* Decorations pass clicks through. Only real controls (audit, film) capture them. */
  pointer-events: none;
  /* --mx/--my: pointer position (-1..1), --sy: hero scroll offset; set by js/playful.js. */
  transform: translate3d(
      calc(var(--mx, 0) * var(--depth) * 22px),
      calc(var(--my, 0) * var(--depth) * 22px - var(--sy, 0) * var(--depth) * 1px),
      0
    )
    rotate(var(--r)) scale(var(--s));
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.sticker-pop {
  display: grid;
  place-items: center;
}
.has-js .home-hero:not(.is-live) .sticker-pop {
  opacity: 0;
  transform: scale(0);
}
.home-hero.is-live .sticker-pop {
  animation: sticker-pop 0.95s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--hero-intro, 0ms) + 650ms + var(--i) * 140ms);
}
.sticker-body {
  position: relative;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 12px 18px rgb(0 0 0 / 0.28));
  animation: sticker-float var(--fd, 5s) ease-in-out var(--fdel, 0s) infinite alternate;
  transition:
    scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    rotate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-sticker:hover .sticker-body,
.hero-sticker:focus-visible .sticker-body {
  scale: 1.14;
  rotate: -9deg;
}
.sticker-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.sticker-shape path {
  fill: var(--fill, currentColor);
}
.sticker-spin {
  animation: sticker-spin 22s linear infinite;
}
.sticker-text {
  position: relative;
  color: var(--ink, var(--brand-white));
  font-size: 14px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
}

.sticker-less {
  --x: 25%;
  --y: 6%;
  --r: -9deg;
  --i: 0;
  --depth: 0.7;
  --fd: 4.4s;
}
.sticker-less .sticker-body {
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--brand-lime);
}
.sticker-less .sticker-text {
  --ink: var(--brand-text);
}

.sticker-human {
  --x: 77.5%;
  --y: 7%;
  --r: 6deg;
  --i: 3;
  --depth: 1.1;
  --fd: 5.6s;
  --fdel: -1.2s;
}
.sticker-human .sticker-body {
  width: 178px;
  height: 76px;
  --fill: #5b3bdc;
}

.sticker-real {
  --x: 53%;
  --y: 21%;
  --r: -8deg;
  --i: 2;
  --depth: 1.4;
  --fd: 4.8s;
  --fdel: -2s;
}
.sticker-real .sticker-body {
  width: 118px;
  height: 118px;
  --fill: var(--brand-pink);
}

.sticker-personality {
  --x: 51%;
  --y: 51%;
  --r: 12deg;
  --i: 4;
  --depth: 0.9;
  --fd: 5.2s;
  --fdel: -0.6s;
}
.sticker-personality .sticker-body {
  padding: 16px 24px;
  border-radius: 60% 8px 60% 8px / 100% 8px 100% 8px;
  background: var(--brand-blue);
}

.sticker-people {
  --x: 36%;
  --y: 68%;
  --r: -5deg;
  --i: 5;
  --depth: 1.2;
  --fd: 6s;
  --fdel: -3s;
}
.sticker-people .sticker-body {
  width: 122px;
  height: 122px;
  --fill: var(--brand-white);
}
.sticker-people .sticker-text {
  --ink: var(--brand-text);
}

.sticker-audit {
  --y: 41%;
  --r: 10deg;
  --i: 6;
  --depth: 0.8;
  --fd: 4.2s;
  --fdel: -1.6s;
  left: auto;
  right: 1.2%;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 50%;
}
.sticker-audit .sticker-body {
  width: 130px;
  height: 130px;
  --fill: var(--brand-red);
}
.sticker-audit .sticker-text {
  font-size: 16px;
}
.sticker-audit:hover .sticker-spin {
  animation-duration: 4s;
}
.sticker-audit:focus-visible {
  outline: 3px solid var(--brand-lime);
  outline-offset: 6px;
}

.doodle-star {
  --x: 0.6%;
  --y: 31%;
  --i: 1;
  --depth: 0.5;
}
.doodle-star .sticker-body {
  width: 28px;
  height: 28px;
  --fill: var(--brand-pink);
}
.doodle-spiral {
  --y: 70%;
  --i: 7;
  --depth: 0.6;
  left: auto;
  right: 0.6%;
}
.doodle-spiral .sticker-body {
  width: 42px;
  height: 42px;
}
.doodle-spiral path,
.doodle-plus path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}
.doodle-spiral path {
  stroke: var(--brand-blue);
}
.doodle-plus path {
  stroke: var(--brand-lime);
}
.doodle-ring {
  --x: 7%;
  --y: 7%;
  --i: 1;
  --depth: 0.6;
}
.doodle-ring .sticker-body {
  width: 22px;
  height: 22px;
  border: 3px solid var(--brand-secondary);
  border-radius: 50%;
}
.doodle-plus {
  --x: 70%;
  --y: 90%;
  --i: 8;
  --depth: 0.5;
}
.doodle-plus .sticker-body {
  width: 24px;
  height: 24px;
}
.doodle-star .sticker-body,
.doodle-spiral .sticker-body,
.doodle-ring .sticker-body,
.doodle-plus .sticker-body {
  filter: none;
}

@keyframes sticker-pop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-40deg);
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes sticker-float {
  from {
    transform: translate(0, -7px) rotate(-3deg);
  }
  to {
    transform: translate(4px, 7px) rotate(3deg);
  }
}
@keyframes sticker-spin {
  to {
    rotate: 360deg;
  }
}

@media (max-width: 1100px) {
  .hero-sticker {
    --s: 0.8;
  }
  .sticker-less {
    --x: 30%;
    --y: 3%;
  }
  .sticker-real {
    --x: 50%;
    --y: 16%;
  }
  .sticker-personality {
    --x: 48%;
    --y: 62%;
  }
  .sticker-people {
    --x: 30%;
    --y: 78%;
  }
}

@media (max-width: 760px) {
  .hero-trail-wide {
    display: none;
  }
  .hero-trail-tall {
    display: block;
  }
  .hero-sticker {
    --s: 0.66;
  }
  .sticker-less {
    --x: 26%;
    --y: 50.5%;
    --r: -6deg;
  }
  .sticker-real {
    --x: -2%;
    --y: 47%;
  }
  .sticker-human {
    --x: 58%;
    --y: 1%;
    --r: 8deg;
  }
  .sticker-audit {
    --y: 60%;
    right: -1%;
  }
  .sticker-personality {
    --x: -3%;
    --y: 70%;
  }
  .sticker-people,
  .doodle-plus,
  .doodle-ring {
    display: none;
  }
  .doodle-star {
    --y: 35%;
  }
  .doodle-spiral {
    --y: 40%;
  }
}

/* ---------- Free website audit dialog ---------- */
.audit-dialog {
  width: min(640px, calc(100vw - 24px));
  max-width: min(640px, calc(100vw - 24px)) !important;
  overflow-x: hidden !important;
}
.audit-dialog .inquiry-dialog-scroll {
  overflow-x: hidden !important;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.audit-dialog .audit-form {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.audit-dialog .audit-form h2 {
  margin: 0 0 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding-right: 36px; /* keep clear of the close button */
}
.audit-intro {
  margin: 0 0 28px;
  max-width: 100%;
  color: var(--brand-muted);
  overflow-wrap: anywhere;
}
.audit-form .form-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  max-width: calc(100% - 48px); /* room for the close button */
  margin-bottom: 8px;
}
.audit-form .form-grid {
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.audit-form .field,
.audit-form .field-wide {
  min-width: 0;
  max-width: 100%;
}
.audit-form .field-wide {
  grid-column: 1 / -1;
}
.audit-form .field input,
.audit-form .field select,
.audit-form .field textarea {
  max-width: 100%;
  box-sizing: border-box;
}
/* Visually hidden honeypot — never use a large negative offset (that causes horizontal scroll). */
.audit-form .audit-honey {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  left: 0;
  top: 0;
  pointer-events: none;
}
.audit-form .consent {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.audit-form .form-navigation {
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 100%;
}
.audit-form .form-navigation .button {
  max-width: 100%;
}
.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-red);
  color: var(--brand-white);
  font-weight: 800;
  transform: rotate(-3deg);
  transform-origin: left center;
}
@media (max-width: 560px) {
  .audit-form .form-grid {
    grid-template-columns: 1fr;
  }
  .audit-dialog .audit-form h2 {
    padding-right: 28px;
  }
}

/* ---------- Hero film: play badge beside “Speed.” + themed popup ---------- */
.home-hero .hero-copy h1 .hero-reel {
  --reel-size: clamp(72px, 0.92em, 108px);
  position: relative;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: var(--reel-size);
  height: var(--reel-size);
  margin: 0 0 0 0.08em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--brand-text);
  vertical-align: middle;
  cursor: pointer;
  transform: translateY(-0.04em);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.has-js .home-hero:not(.is-live) .hero-reel {
  opacity: 0;
  transform: translateY(-0.06em) scale(0.72);
}
.home-hero.is-live .hero-reel {
  animation: reel-arrive 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both;
}
.hero-reel:hover,
.hero-reel:focus-visible {
  transform: translateY(-0.04em) scale(1.08);
}
.hero-reel:hover .hero-reel-core,
.hero-reel:focus-visible .hero-reel-core {
  animation: none;
  transform: none;
}
.hero-reel:hover .hero-reel-ring,
.hero-reel:focus-visible .hero-reel-ring {
  animation-duration: 4s;
}
.hero-reel:focus-visible {
  outline: 3px solid var(--brand-lime);
  outline-offset: 4px;
}
.hero-reel-ring {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 2.5px dashed color-mix(in srgb, var(--brand-lime) 88%, white);
  pointer-events: none;
}
.hero-reel-spark {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  color: var(--brand-pink);
}
.hero-reel-spark svg {
  position: absolute;
  top: 2%;
  left: 50%;
  width: 26%;
  height: 26%;
  margin-left: -13%;
  filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.35));
}
.hero-reel-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58%;
  height: 58%;
  overflow: hidden;
  border-radius: 50%;
  border: 1.5px solid var(--brand-text);
  background: var(--brand-lime);
  color: var(--brand-text);
  box-shadow: 0 8px 18px rgb(0 0 0 / 0.28);
}
.hero-reel-core::after {
  content: '';
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgb(255 255 255 / 0.55) 50%,
    transparent 62%
  );
  transform: translateX(-120%) rotate(18deg);
  pointer-events: none;
}
.hero-reel-core svg {
  position: relative;
  z-index: 1;
  width: 46%;
  height: 46%;
  margin-left: 8%;
}
@media (prefers-reduced-motion: no-preference) {
  .home-hero.is-live .hero-reel-ring {
    animation: reel-spin 9s linear infinite;
  }
  .home-hero.is-live .hero-reel-spark {
    animation: reel-spin 7s linear infinite;
  }
  .home-hero.is-live .hero-reel-core {
    animation: reel-wiggle 3.2s ease-in-out infinite;
  }
  .home-hero.is-live .hero-reel-core::after {
    animation: reel-shine 3.2s ease-in-out infinite;
  }
}
@keyframes reel-arrive {
  from {
    opacity: 0;
    transform: translateY(-0.06em) scale(0.72) rotate(-18deg);
  }
  to {
    opacity: 1;
    transform: translateY(-0.06em) scale(1) rotate(0deg);
  }
}
@keyframes reel-wiggle {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-6%) rotate(5deg);
  }
}
@keyframes reel-shine {
  0%,
  55% {
    transform: translateX(-120%) rotate(18deg);
  }
  75%,
  100% {
    transform: translateX(120%) rotate(18deg);
  }
}

.reel-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-white);
  overflow: visible;
}
.reel-dialog:focus {
  outline: none;
}
.reel-dialog::backdrop {
  background: rgb(12 4 24 / 0.76);
  backdrop-filter: blur(10px);
}
.reel-dialog[open] {
  animation: reel-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes reel-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.reel-player {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  border-radius: 28px;
  border: 2px solid color-mix(in srgb, var(--brand-lime) 82%, white);
  background: #150735;
  box-shadow:
    0 30px 80px rgb(0 0 0 / 0.45),
    8px 10px 0 var(--brand-lime);
  overflow: hidden;
}
.reel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px 12px 18px;
}
.reel-kicker {
  margin: 0 0 2px;
  color: var(--brand-lime);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.reel-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.reel-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--brand-text);
  border-radius: 50%;
  background: var(--brand-lime);
  color: var(--brand-text);
  transform: rotate(-8deg);
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.2s ease;
}
.reel-close svg {
  width: 20px;
  height: 20px;
}
.reel-close:hover {
  transform: rotate(0deg) scale(1.06);
  background: var(--brand-white);
}
.reel-screen {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - 196px);
  background: #0a0414;
  cursor: pointer;
}
.reel-screen .hero-reel-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0414;
}
.reel-bigplay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--brand-text);
  border-radius: 50%;
  background: var(--brand-lime);
  color: var(--brand-text);
  transform: translate(-50%, -50%);
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease;
}
.reel-bigplay svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
}
.reel-bigplay:hover {
  transform: translate(-50%, -50%) scale(1.06) rotate(-6deg);
}
.reel-screen.is-playing .reel-bigplay {
  opacity: 0;
  pointer-events: none;
}
.reel-screen.is-buffering:not(.is-paused)::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: 3px solid rgb(255 255 255 / 0.22);
  border-top-color: var(--brand-lime);
  border-radius: 50%;
  animation: reel-spin 0.8s linear infinite;
}
.reel-error {
  display: none;
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}
.reel-screen.is-broken .reel-error {
  display: block;
}
.reel-screen.is-broken .reel-bigplay,
.reel-screen.is-broken.is-buffering::after {
  display: none;
}
@keyframes reel-spin {
  to {
    transform: rotate(360deg);
  }
}
.reel-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 14px 14px;
}
.reel-icon-btn {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brand-lime) 70%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--brand-lime);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
.reel-icon-btn svg {
  width: 18px;
  height: 18px;
}
.reel-icon-btn:hover {
  background: var(--brand-lime);
  color: var(--brand-text);
  transform: translateY(-1px);
}
.reel-toggle {
  background: var(--brand-lime);
  border-color: var(--brand-lime);
  color: var(--brand-text);
}
.reel-speed {
  width: auto;
  min-width: 52px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.reel-time {
  flex-shrink: 0;
  min-width: 42px;
  color: color-mix(in srgb, var(--brand-white) 82%, transparent);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.reel-time-end {
  text-align: right;
}
.reel-scrub {
  position: relative;
  flex: 1 1 180px;
  min-width: 120px;
  display: flex;
  align-items: center;
}
.reel-volume {
  flex: 0 0 88px;
  width: 88px;
  min-width: 0;
}
.reel-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.reel-range:focus-visible {
  outline: none;
}
.reel-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(var(--brand-lime), var(--brand-lime)) 0 0 / var(--p, 0%) 100% no-repeat,
    linear-gradient(rgb(255 255 255 / 0.28), rgb(255 255 255 / 0.28)) 0 0 / var(--b, 0%) 100% no-repeat,
    rgb(255 255 255 / 0.14);
}
.reel-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border: 2px solid #150735;
  border-radius: 50%;
  background: var(--brand-lime);
  box-shadow: 0 0 0 2px var(--brand-lime);
}
.reel-range::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
}
.reel-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--brand-lime);
}
.reel-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #150735;
  border-radius: 50%;
  background: var(--brand-lime);
}
.reel-player :focus-visible {
  outline: 2px solid var(--brand-lime);
  outline-offset: 3px;
}
.reel-player:fullscreen,
.reel-player:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  border-color: transparent;
  box-shadow: none;
}
.reel-player:fullscreen .reel-screen,
.reel-player:-webkit-full-screen .reel-screen {
  aspect-ratio: auto;
  max-height: none;
}
@media (max-width: 1100px) {
  .home-hero .hero-copy h1 .hero-reel {
    --reel-size: clamp(64px, 0.88em, 92px);
  }
}
@media (max-width: 760px) {
  .home-hero .hero-copy h1 .hero-reel {
    --reel-size: clamp(56px, 0.9em, 74px);
  }
}
@media (max-width: 640px) {
  .reel-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }
  .reel-player {
    border-radius: 20px;
    box-shadow:
      0 20px 50px rgb(0 0 0 / 0.45),
      5px 6px 0 var(--brand-lime);
  }
  .reel-heading {
    font-size: 16px;
  }
  .reel-volume,
  .reel-time-end {
    display: none;
  }
  .reel-bigplay {
    width: 74px;
    height: 74px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .has-js .hero-trail-reveal,
  .home-hero.is-live .hero-trail-reveal {
    stroke-dashoffset: 0;
    animation: none;
  }
  .home-hero.is-live .hero-trail-dots,
  .home-hero .sticker-body,
  .sticker-spin {
    animation: none;
  }
  .has-js .home-hero .sticker-pop,
  .home-hero.is-live .sticker-pop {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hero-sticker,
  .sticker-body {
    transition: none;
  }
  .has-js .home-hero:not(.is-live) .hero-reel,
  .home-hero.is-live .hero-reel,
  .reel-dialog[open] {
    opacity: 1;
    animation: none;
    transform: translateY(-0.06em);
  }
  .hero-reel-ring,
  .hero-reel-spark,
  .hero-reel-core,
  .hero-reel-core::after,
  .reel-screen.is-buffering:not(.is-paused)::after {
    animation: none;
  }
  .hero-reel,
  .reel-close,
  .reel-bigplay,
  .reel-icon-btn {
    transition: none;
  }
  .hero-reel:hover,
  .hero-reel:focus-visible {
    transform: translateY(-0.04em);
  }
}


/* ==========================================================================
   Mobile layout (phones, <= 760px)
   Loaded last so these rules intentionally win over the exported design system.
   ========================================================================== */

/* Page-turn leaf used by the single-page review book (all viewports; only used on phones). */
.review-turn.review-turn-single {
  left: 0;
  width: 100%;
  transform-origin: left center;
}

/* The menu's phone-only actions stay hidden on larger screens (the header shows them there). */
.mega-mobile-actions {
  display: none;
}

@media (max-width: 760px) {
  /* ---------- Header: logo + Menu only; CTA + phone live inside the menu ---------- */
  .site-header .header-controls .header-cta,
  .site-header .header-controls .header-phone-cta {
    display: none !important;
  }
  .site-header,
  .site-header.site-header--hero {
    min-height: 68px;
    height: auto;
    padding: 12px 5%;
    grid-template-rows: auto;
    gap: 12px;
  }
  .site-header .brand-logo,
  .creative-mega .brand-logo {
    width: 142px;
    height: 34px;
  }
  /* The desktop -23px nudge cropped the logo on narrow screens. */
  .site-header .brand-logo img,
  .creative-mega .brand-logo img {
    margin-left: 0;
    object-position: left center;
  }
  .brand-logo img {
      margin-left: -20px !important;
  }
  .site-header .header-navigation .menu-control {
    min-height: 42px;
    padding: 8px 14px;
  }

  /* ---------- Menu: compact cards + Start a project / phone first ---------- */
  .creative-mega .mega-container {
    display: flex;
    flex-direction: column;
  }
  .creative-mega .mega-top {
    order: 0;
    margin-bottom: 18px;
  }
  .creative-mega .mega-intro {
    order: 1;
    padding-bottom: 16px;
  }
  .mega-mobile-actions {
    order: 2;
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
  }
  .creative-mega nav.mega-grid {
    order: 3;
  }
  .mega-mobile-cta,
  .mega-mobile-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 20px;
    border-radius: 999px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }
  .mega-mobile-cta {
    border: 0;
    background: var(--brand-lime);
    color: var(--brand-text);
    cursor: pointer;
  }
  .mega-mobile-phone {
    border: 1px solid color-mix(in srgb, var(--brand-white) 40%, transparent);
    color: var(--brand-white);
  }
  .creative-mega nav.mega-grid .mega-link,
  .creative-mega nav.mega-grid .mega-link:hover,
  .creative-mega nav.mega-grid .mega-link.active {
    min-height: 88px;
    padding: 12px 16px;
    gap: 8px;
  }
  .creative-mega .mega-label {
    font-size: clamp(26px, 7vw, 32px) !important;
  }

  /* ---------- Global rhythm: tighter spacing, smaller headings ---------- */
  .section {
    padding: 48px 5%;
  }
  .section h2 {
    font-size: clamp(30px, 8.4vw, 38px);
    line-height: 1.1;
    margin: 16px 0 26px;
  }
  .section-top {
    gap: 10px 16px;
    flex-wrap: wrap;
  }

  /* ---------- Hero ---------- */
  .home-hero {
    padding: 26px 5% 24px;
  }
  .home-hero .hero-split .hero-copy h1 {
    font-size: 10.6vw;
    line-height: 1.12;
  }
  /* Scales with the headline so the play badge always sits beside “Speed.” inside the screen. */
  .home-hero .hero-copy h1 .hero-reel {
    --reel-size: 12.4vw;
    margin-left: 0.12em;
  }
  /* The flag sticker sat on top of the headline on narrow screens. */
  .hero-sticker.sticker-human {
    display: none;
  }
  .hero-intro {
    padding-top: 18px;
  }
  .hero-intro > p {
    font-size: 16px !important;
    line-height: 1.6;
  }
  .hero-actions {
    margin-top: 20px;
  }
  .circle-cta {
    width: 124px;
    height: 124px;
  }

  /* ---------- Workflow cards: horizontal swipe row ---------- */
  .workflow-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .workflow-cards::-webkit-scrollbar {
    display: none;
  }
  .workflow-cards .workflow-step {
    flex: 0 0 78%;
    scroll-snap-align: start;
    padding: 20px 18px;
    border-radius: 16px;
  }
  .workflow-cards .workflow-step h3 {
    font-size: 24px;
  }

  /* ---------- Service rows: one-line headings ---------- */
  .service-main {
    gap: 12px;
    min-height: 74px;
    padding: 16px 4px;
  }
  .service-main > svg {
    width: 22px;
    height: 22px;
    flex: none;
    margin-left: 0;
  }
  .service-main > svg:last-child {
    margin-left: auto;
  }
  .service-main h3 {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(15px, 4.8vw, 20px);
    letter-spacing: -0.035em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---------- Project grid: swipe slider ---------- */
  .work-preview .project-grid {
    display: flex;
    gap: 14px;
    margin-inline: -5vw;
    padding: 4px 5vw 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 5vw;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: stretch;
  }
  .work-preview .project-grid::-webkit-scrollbar {
    display: none;
  }
  .work-preview .project-grid > .project {
    flex: 0 0 82%;
    width: auto;
    margin-top: 0;
    scroll-snap-align: start;
  }
  .work-preview .project-visual,
  .work-preview .project-1 .project-visual {
    aspect-ratio: 4 / 3.4;
  }
  .project-meta {
    padding-top: 14px;
  }
  .project-meta h3 {
    font-size: 24px;
  }

  /* ---------- Choice panels (idea / AI rescue) ---------- */
  .choice-panel {
    padding: 28px 6% 32px;
  }
  .choice-panel h2 {
    font-size: clamp(38px, 11.5vw, 46px);
    line-height: 1.04;
    margin: 28px 0 14px;
  }
  .choice-panel h2 span {
    margin-left: 8px;
  }
  .choice-panel p {
    max-width: 230px;
    font-size: 15px;
    margin-bottom: 16px;
  }
  .choice-panel > .brand-graphic {
    width: 150px;
    height: 128px;
    right: -18px;
    top: 22px;
    opacity: 0.55;
  }

  /* ---------- Review book: one page at a time ---------- */
  .review-book[data-single='true'] .review-spread {
    grid-template-columns: minmax(0, 1fr);
  }
  .review-book[data-single='true'] .review-page:not([data-active]) {
    display: none;
  }
  .review-book[data-single='true'] .review-page {
    min-height: 380px;
    padding: 24px 20px;
  }
  .review-book[data-single='true'] .review-page .review-quote {
    font-size: 19px !important;
    line-height: 1.5;
  }
  .review-book[data-single='true'] .review-spine {
    display: none;
  }
  .review-book-controls {
    margin-top: 28px;
  }
}
