/* ============================================================
   Echo Affinity — landing
   Theme: light blue-tinted surfaces + navy ink + one electric
   blue accent. Nav and hero stage are scoped dark navy via
   .theme-dark, which rescopes the same token names.
   ============================================================ */

@font-face {
  font-family: "General Sans";
  src: url("assets/general-sans-var.woff2") format("woff2");
  font-weight: 200 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* Light theme (default): airy blue-tinted surfaces, navy text.
     Variable names kept from the original dark system so components
     restyle through the cascade; .theme-dark rescopes them to navy. */
  --ink:        #f5f7fb;   /* page base */
  --ink-2:      #ffffff;   /* raised surface */
  --ink-3:      #ffffff;   /* card surface */
  --line:       rgba(13, 27, 46, 0.13);
  --line-soft:  rgba(13, 27, 46, 0.07);

  --ivory:      #0d1b2e;   /* primary text */
  --ivory-dim:  rgba(13, 27, 46, 0.66);
  --ivory-mute: rgba(13, 27, 46, 0.42);

  --accent:     #2f7fff;   /* electric blue — single brand signal */
  --accent-hi:  #5a9dff;
  --accent-ink: #ffffff;   /* text on accent */

  --radius:     14px;
  --maxw:       1180px;

  --ease:       cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "General Sans", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* Dark navy scope: hero, nav, footer keep the cinematic look.
   Rescopes the same tokens so all descendants recolor via the cascade. */
.theme-dark {
  --ink:        #050d1c;
  --ink-2:      #0a1526;
  --ink-3:      #0f1d33;
  --line:       rgba(226, 238, 255, 0.13);
  --line-soft:  rgba(226, 238, 255, 0.07);

  --ivory:      #f2f6fd;
  --ivory-dim:  rgba(242, 246, 253, 0.66);
  --ivory-mute: rgba(242, 246, 253, 0.42);

  --accent:     #4b90ff;
  --accent-hi:  #78adff;
  --accent-ink: #04101f;

  color: var(--ivory);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Post-hero sections slide over the pinned hero during the stage
   transition. The section HEAD stays as plain text over the video
   (white, no panel); the light world fades in full-bleed at the
   cards grid, so there is no boxy white slab. */
.services, .work, .approach, .why, .team, .faq, .cta, .foot {
  position: relative;
  z-index: 2;
}
.services__grid { position: relative; }
.services__grid::after {
  content: ""; position: absolute; z-index: -1;
  top: -110px; bottom: -260px;
  left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: linear-gradient(180deg, rgba(245, 247, 251, 0) 0, var(--ink) 110px);
  pointer-events: none;
}
/* title floats on the video during the stage handoff (js motion mode) */
.js-heromo .services .section-title {
  color: #f2f6fd;
  text-shadow: 0 2px 30px rgba(3, 9, 20, 0.65);
}
@media (prefers-reduced-motion: reduce) {
  .js-heromo .services .section-title { color: var(--ivory); text-shadow: none; }
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent); }

/* grain ------------------------------------------------------- */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.05; mix-blend-mode: screen;
  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='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* shared ------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.accent { color: var(--accent); }

/* buttons ----------------------------------------------------- */
.btn {
  --pad-y: 0.85rem; --pad-x: 1.4rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 550; font-size: 0.97rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--solid {
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.btn--solid:hover { background: var(--accent-hi); transform: translateY(-2px); }

.btn--ghost {
  border-color: var(--line); color: var(--ivory);
  background: rgba(244, 241, 234, 0.02);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--text {
  padding-left: 0.4rem; padding-right: 0.4rem; color: var(--ivory);
}
.btn--text:hover { color: var(--accent); gap: 0.75rem; }

.btn--lg { --pad-y: 1.05rem; --pad-x: 2rem; font-size: 1.05rem; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; padding: 0 clamp(1rem, 4vw, 2.4rem);
  background: rgba(5, 13, 28, 0.94);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.nav__brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }
.nav__mark { color: var(--accent); display: inline-flex; }
.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  position: relative; display: inline-block;
  font-size: 0.95rem; color: var(--ivory-dim);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
/* electric-blue underline slides in on hover */
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  background: #2f7fff; border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav__links a:hover, .nav__links a:focus-visible {
  color: var(--ivory);
  transform: translateY(-1px) scale(1.06);
}
.nav__links a:hover::after, .nav__links a:focus-visible::after { transform: scaleX(1); }
.nav__right { display: flex; align-items: center; gap: 0.7rem; }
.nav__cta { font-size: 0.9rem; }

/* hamburger + card menu (mobile only) */
.nav__toggle {
  display: none; width: 42px; height: 38px;
  background: rgba(244,241,234,0.02); border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; position: relative;
}
.navcards { display: none; }
.nav__toggle span {
  position: absolute; left: 50%; width: 17px; height: 1.6px; background: var(--ivory);
  transform: translateX(-50%); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { top: 18px; transform: translateX(-50%) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { top: 18px; transform: translateX(-50%) rotate(-45deg); }

/* skip link (a11y) */
.skip {
  position: fixed; top: -60px; left: 12px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  padding: 0.7rem 1.1rem; border-radius: 8px; transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

/* visible keyboard focus everywhere */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* anchored sections clear the fixed nav */
#services, #work, #approach, #why, #team, #contact, #main { scroll-margin-top: 88px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex; align-items: center;
  padding: 0 clamp(1.2rem, 5vw, 3rem);
  overflow: visible;        /* let the field dissolve past the hero edge */
}
/* canvases extend below the hero and fade out, so the dot field /
   wave melt into the next section instead of hard-cutting */
.hero__canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: calc(100% + 220px);
  display: block; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 56%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 56%, transparent 100%);
}
.hero__canvas--wave { z-index: 0; }
.hero__canvas--dots { z-index: 1; }

/* hero background video (replaces the canvas field).
   The poster lives on .hero as a background layer and the video stays
   invisible until it is genuinely playing, so a deferred iOS autoplay
   (Low Power Mode, data saver) shows a clean still frame with no play
   glyph instead of a frozen video element. */
.hero { background: #050d1c url("assets/hero-wave-poster.jpg") center / cover no-repeat; }
.hero__video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.hero--video-live .hero__video { opacity: 1; }
/* iOS shows a tap-to-play overlay on the poster whenever it defers autoplay.
   The video is decorative and muted, so suppress the native control chrome. */
.hero__video::-webkit-media-controls,
.hero__video::-webkit-media-controls-start-playback-button,
.hero__video::-webkit-media-controls-panel,
.hero__video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
  .hero { background: #050d1c url("assets/hero-wave-poster.jpg") center / cover no-repeat; }
}
.hero__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 75% 30%, transparent 0%, rgba(5,13,28,0.30) 60%, var(--ink) 100%),
    linear-gradient(180deg, rgba(5,13,28,0.55) 0%, transparent 24%, transparent 82%, rgba(5,13,28,0.25) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding-top: 70px;
}
/* the accent word must not sink into the blue video behind it:
   lighter tone + electric glow lifts it off the field */
.hero__title .accent {
  color: #9cc8ff;
  text-shadow:
    0 0 16px rgba(90, 157, 255, 0.9),
    0 0 44px rgba(47, 127, 255, 0.55),
    0 2px 10px rgba(3, 9, 20, 0.55);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin: 1.1rem 0 1.4rem;
}
.hero__sub {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  color: var(--ivory-dim);
  max-width: 30rem;
  line-height: 1.5;
}
.hero__actions { display: flex; align-items: center; gap: 1.2rem; margin-top: 2.2rem; flex-wrap: wrap; }

/* ---- Echo Audit hero card ---- */
.hero__audit {
  margin-top: 2.6rem;
  max-width: 30rem;
  background: rgba(6, 16, 33, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(47,127,255,0.30);
  border-radius: 16px;
  padding: clamp(1.4rem, 2.4vw, 2rem);
}
.hero__audit-eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}
.hero__audit-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -0.02em;
  margin: 0.7rem 0 1.1rem;
}
.hero__audit-form { display: flex; flex-direction: column; gap: 0.7rem; }
.hero__audit-form input {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.85rem 1.3rem;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ivory);
  outline: none; transition: border-color 0.25s var(--ease);
  width: 100%;
}
.hero__audit-form input:focus { border-color: var(--accent); }
.hero__audit-form input::placeholder { color: var(--ivory-mute); }
.hero__audit-form .btn { border: 0; cursor: pointer; justify-content: center; }
.hero__audit-fine { margin-top: 0.9rem; font-size: 0.78rem; color: var(--ivory-mute); line-height: 1.5; }
.hero__audit-timer { color: var(--accent); white-space: nowrap; }
.hero__audit-timer svg { vertical-align: -1px; }
.hero__audit-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (min-width: 1060px) {
  .hero__inner {
    max-width: 1200px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
  }
  .hero__inner > .hero-el--eyebrow,
  .hero__inner > .hero-el--title,
  .hero__inner > .hero-el--sub,
  .hero__inner > .hero-el--actions { grid-column: 1; }
  .hero__audit { grid-column: 2; grid-row: 1 / span 4; margin-top: 70px; justify-self: end; width: 100%; max-width: 26.5rem; }
}

.hero__hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 2; font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ivory-mute); animation: pulse 3s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.3; } 50% { opacity: 0.8; } }

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.6rem, 5vw, 4rem) clamp(1.2rem, 5vw, 2rem) clamp(5rem, 11vw, 8rem);
}
.services__head { margin-bottom: 3.2rem; }
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: start;
  /* equal tile heights come from JS-set min-heights (equalize()), so an
     expanding tile grows alone instead of stretching its whole row */
}
@media (max-width: 1200px) {
  .services__grid { grid-template-columns: 1fr 1fr; }
}
@property --glint-ang { syntax: "<angle>"; initial-value: 0turn; inherits: false; }

.svc {
  position: relative;
  background: var(--ink-3);
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}
.svc:hover {
  border-color: color-mix(in srgb, var(--tile-accent, var(--accent)) 45%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45),
              0 0 0 1px color-mix(in srgb, var(--tile-accent, var(--accent)) 12%, transparent),
              0 0 40px color-mix(in srgb, var(--tile-accent, var(--accent)) 10%, transparent);
}

/* travelling glint along the card's exterior shape */
.svc__glint {
  position: absolute; inset: 0; border-radius: inherit; padding: 1.4px;
  pointer-events: none; opacity: 0; z-index: 3;
  background: conic-gradient(from var(--glint-ang),
    transparent 0deg, transparent 250deg,
    color-mix(in srgb, var(--tile-accent, #5a9dff) 90%, transparent) 300deg,
    #fff 312deg,
    color-mix(in srgb, var(--tile-accent, #5a9dff) 90%, transparent) 324deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity 0.4s var(--ease);
}
.svc:hover .svc__glint,
.agent:hover .svc__glint { opacity: 1; animation: glint-travel 2.6s linear infinite; }
@keyframes glint-travel { to { --glint-ang: 360deg; } }

.svc { display: flex; flex-direction: column; }
.svc__body {
  padding: clamp(1.4rem, 2.2vw, 1.8rem); position: relative; z-index: 2;
  display: flex; flex-direction: column; flex: 1;
}

/* per-tile accent hues — the artwork carries the colour, these echo it in
   the tile chrome; amber stays the site-wide primary */
.svc--tex-ai    { --tile-accent: #3ccfcf; }
.svc--tex-web   { --tile-accent: #8b7cf6; }
.svc--tex-seo   { --tile-accent: #34d17b; }
.svc--tex-brand { --tile-accent: #e8628c; }
.agent--acc-amber  { --tile-accent: var(--accent); }
.agent--acc-teal   { --tile-accent: #3ccfcf; }
.agent--acc-green  { --tile-accent: #34d17b; }
.agent--acc-violet { --tile-accent: #8b7cf6; }
.agent--acc-rose   { --tile-accent: #e8628c; }
.agent--acc-blue   { --tile-accent: #4b90ff; }

/* artwork band atop each service tile */
.svc__art { position: relative; z-index: 2; height: 150px; overflow: hidden; flex: 0 0 auto; }
.svc__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.svc__index {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 500;
  color: var(--tile-accent, var(--accent)); letter-spacing: 0.1em;
}
.svc__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.1rem, 1.35vw, 1.4rem); letter-spacing: -0.02em;
  margin: 0.7rem 0 0;
  white-space: nowrap; /* titles always sit on one line */
}
/* amber tick above the title — same device as Approach / Why Us; scaleX so
   the motion never touches layout */
.svc__title::before, .agent__title::before {
  content: ""; display: block; width: 64px; height: 2px;
  background: var(--tile-accent, var(--accent)); margin-bottom: 0.8rem;
  transform: scaleX(0.47); transform-origin: left;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.svc:hover .svc__title::before, .svc--open .svc__title::before,
.agent:hover .agent__title::before, .agent--open .agent__title::before {
  transform: scaleX(1);
  box-shadow: 0 0 14px color-mix(in srgb, var(--tile-accent, var(--accent)) 75%, transparent);
}
.svc__copy { color: var(--ivory-dim); font-size: 0.95rem; line-height: 1.55; max-width: 44ch; padding-top: 0.9rem; }
.svc__tags, .agent__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: auto; padding-top: 1.2rem; }
.agent__tags { margin-top: 1rem; padding-top: 0; }
/* second, benefit-led pill row sits tight under the first */
.agent__tags--sell { margin-top: 0.45rem; }
/* agent pills run slightly smaller so a row of 3 always clears the tile */
.agent__tags { gap: 0.4rem; max-width: 100%; }
.agent__tags li { font-size: 0.72rem; padding: 0.28rem 0.55rem; min-width: 0; }
.svc__tags li, .agent__tags li {
  font-size: 0.78rem; color: var(--ivory-dim);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.7rem;
  background: rgba(47, 127, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14),
              0 2px 10px rgba(0, 0, 0, 0.35);
}
/* frosted glass on desktop; phones keep the translucent fill
   (static backdrop blur is fine there but not worth the GPU cost) */
@media (min-width: 881px) {
  .svc__tags li, .agent__tags li {
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
  }
}

/* glance-first fold: detail collapses only when JS is present (.js-fold),
   so no-JS visitors simply see everything. grid-rows 0fr -> 1fr keeps the
   height animation on the compositor-friendly path. */
.js-fold .svc__more,
.js-fold .agent__more {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.js-fold .svc__more-in,
.js-fold .agent__more-in { overflow: hidden; min-height: 0; }
.js-fold .svc--open .svc__more,
.js-fold .agent--open .agent__more { grid-template-rows: 1fr; }
.js-fold .svc,
.js-fold .agent { cursor: pointer; }

.svc__toggle, .agent__toggle {
  display: inline-flex; align-items: center; gap: 0.45rem;
  margin-top: 1rem; padding: 0.38rem 0.95rem;
  font: inherit; font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tile-accent, var(--accent)); cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--tile-accent, var(--accent)) 45%, transparent);
  background: color-mix(in srgb, var(--tile-accent, var(--accent)) 10%, transparent);
  border-radius: 999px;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.svc__toggle:hover, .agent__toggle:hover,
.svc--open .svc__toggle, .agent--open .agent__toggle {
  background: color-mix(in srgb, var(--tile-accent, var(--accent)) 18%, transparent);
  border-color: color-mix(in srgb, var(--tile-accent, var(--accent)) 70%, transparent);
}
/* no-JS: the fold is already open, hide the dead control */
html:not(.js-fold) .svc__toggle,
html:not(.js-fold) .agent__toggle { display: none; }
.svc__toggle svg, .agent__toggle svg { transition: transform 0.3s var(--ease); }
.svc--open .svc__toggle svg,
.agent--open .agent__toggle svg { transform: rotate(45deg); }

/* ============================================================
   APPROACH
   ============================================================ */
.approach {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 8rem) clamp(1.2rem, 5vw, 2rem);
  border-top: 1px solid var(--line-soft);
}
.approach__intro { margin-bottom: 3.4rem; display: flex; flex-direction: column; gap: 1rem; }
.approach__steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.step {
  padding: 1.8rem 1.3rem;
  border-top: 1px solid var(--line);
  position: relative;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease),
              box-shadow 0.4s var(--ease);
}
.step::before {
  content: ""; position: absolute; top: -1px; left: 1.3rem; width: 30px; height: 2px;
  background: var(--accent);
  transition: width 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.step:hover {
  transform: translateY(-7px);
  background: var(--ink-3);
  box-shadow: 0 20px 44px rgba(0,0,0,0.45), 0 0 34px rgba(47,127,255,0.10);
}
.step:hover::before { width: 64px; box-shadow: 0 0 14px rgba(47,127,255,0.75); }
.step__verb {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: 1.3rem; letter-spacing: -0.01em; margin-bottom: 0.7rem;
  transition: color 0.4s var(--ease);
}
.step:hover .step__verb { color: var(--accent); }
.step__copy { color: var(--ivory-dim); font-size: 0.95rem; line-height: 1.5; }

/* ============================================================
   WHY US
   ============================================================ */
.why {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 8rem) clamp(1.2rem, 5vw, 2rem);
  border-top: 1px solid var(--line-soft);
}
.why__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.why__copy { color: var(--ivory-dim); font-size: 1.08rem; line-height: 1.6; margin: 1.4rem 0 1.8rem; max-width: 42ch; }
.why__points { list-style: none; display: grid; gap: 0; }
.why__points li {
  position: relative; display: grid; gap: 0.4rem;
  padding: 1.4rem 1rem 1.4rem 1.3rem; border-top: 1px solid var(--line);
  border-radius: 10px;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease),
              box-shadow 0.4s var(--ease);
}
.why__points li:last-child { border-bottom: 1px solid var(--line); }
.why__points li::before {
  content: ""; position: absolute; top: -1px; left: 1.3rem; width: 28px; height: 2px;
  background: var(--accent);
  transition: width 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.why__points li:hover {
  transform: translateY(-4px);
  background: linear-gradient(90deg, rgba(47,127,255,0.07), transparent 70%);
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}
.why__points li:hover::before { width: 56px; box-shadow: 0 0 14px rgba(47,127,255,0.7); }
.why__k {
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem;
  transition: color 0.4s var(--ease);
}
.why__points li:hover .why__k { color: var(--accent); }
.why__v { color: var(--ivory-dim); font-size: 0.95rem; }

/* ============================================================
   WORK / AGENTS
   ============================================================ */
.work {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 8rem) clamp(1.2rem, 5vw, 2rem);
  border-top: 1px solid var(--line-soft);
}
.work__head { max-width: 760px; margin-bottom: 3.2rem; }
.work__lead { color: var(--ivory-dim); font-size: 1.1rem; line-height: 1.55; margin-top: 1.1rem; max-width: 60ch; }

.agent {
  position: relative;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.agent:hover {
  border-color: color-mix(in srgb, var(--tile-accent, var(--accent)) 42%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45),
              0 0 40px color-mix(in srgb, var(--tile-accent, var(--accent)) 8%, transparent);
}
.agent__media { position: relative; overflow: hidden; background: #0d0d10; }
.agent__media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.agent__body { padding: clamp(1.3rem, 2.2vw, 1.8rem); display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0; }
.agent__tag {
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ivory-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.38rem 0.8rem; margin-bottom: 1.1rem;
  white-space: nowrap; /* tag always one line so titles align across tiles */
}
.agent__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem); letter-spacing: -0.02em; margin-bottom: 0;
  white-space: nowrap; /* titles always sit on one line */
}
.agent__copy { color: var(--ivory-dim); font-size: 0.95rem; line-height: 1.55; max-width: 44ch; padding-top: 0.9rem; }
.agent__points { list-style: none; display: grid; gap: 0.55rem; margin: 0; padding-top: 0.9rem; }
.agent__points li { position: relative; padding-left: 1.4rem; color: var(--ivory-dim); font-size: 0.92rem; line-height: 1.45; }
.agent__points li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 7px; height: 7px; border-radius: 2px; background: var(--tile-accent, var(--accent)); }
.agent__foot { display: flex; align-items: center; gap: 1.3rem; margin-top: auto; padding-top: 0.4rem; }
.agent__foot .btn--text { margin-top: 1.1rem; padding-top: 0.4rem; padding-bottom: 0.4rem; font-size: 0.9rem; }

.agents-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
/* compact horizontal card: dashboard thumb left, glance copy right */
.agent--row { display: grid; grid-template-columns: minmax(0, 35fr) minmax(0, 65fr); }
/* one clean row of 3 pills on desktop; graceful wrap on tighter widths */
@media (min-width: 1200px) {
  .agent__tags { flex-wrap: nowrap; }
  .agent__tags li { white-space: nowrap; }
}
.agent--row .agent__media { min-height: 100%; border-right: 1px solid var(--line); }
.agent--row .agent__media img { position: absolute; inset: 0; height: 100%; }
/* CRM photo: favour the right side of the frame where the contact list sits */
.agent--acc-rose .agent__media img { object-position: 68% center; }

/* ============================================================
   TEAM
   ============================================================ */
.team {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 8rem) clamp(1.2rem, 5vw, 2rem);
  border-top: 1px solid var(--line-soft);
}
.team__head { margin-bottom: 3.2rem; }
.team__lead { color: var(--ivory-dim); font-size: 1.1rem; margin-top: 1rem; max-width: 48ch; }
.team__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.member {
  display: grid; grid-template-columns: 132px 1fr; gap: 1.6rem;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.member:hover { border-color: rgba(47,127,255,0.35); transform: translateY(-3px); }
.member__photo {
  position: relative; width: 132px; height: 132px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(150deg, #e8eef7, #dbe4f0); display: grid; place-items: center;
  border: 1px solid var(--line);
}
.member__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member__initials { font-family: var(--font-display); font-weight: 600; font-size: 2rem; color: var(--accent); }
.member__name { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; letter-spacing: -0.01em; }
.member__role { color: var(--accent); font-size: 0.9rem; margin: 0.25rem 0 0.9rem; }
.member__bio { color: var(--ivory-dim); font-size: 0.95rem; line-height: 1.55; }
.member__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.member__tags li { font-size: 0.77rem; color: var(--ivory-dim); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem; }

.svc__link { margin-top: 0.9rem; font-size: 0.85rem; }

/* ---- Echo Audit landscape pill ---- */
.audit-pill {
  display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: 2.4rem;
  background: linear-gradient(120deg, rgba(47,127,255,0.12), rgba(47,127,255,0.04) 55%, transparent);
  border: 1px solid rgba(47,127,255,0.35);
  border-radius: 999px;
  padding: clamp(1.1rem, 2vw, 1.5rem) clamp(1.4rem, 3vw, 2.4rem);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.audit-pill:hover { border-color: var(--accent); transform: translateY(-2px); }
.audit-pill__text { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.audit-pill__eyebrow { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.audit-pill__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -0.02em; }
.audit-pill__sub { font-size: 0.9rem; color: var(--ivory-dim); line-height: 1.5; }
.audit-pill__cta { margin-left: auto; white-space: nowrap; flex-shrink: 0; }
@media (max-width: 720px) {
  .audit-pill { flex-direction: column; align-items: flex-start; border-radius: 20px; }
  .audit-pill__cta { margin-left: 0; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 8rem) clamp(1.2rem, 5vw, 2rem);
  border-top: 1px solid var(--line-soft);
}
.faq__head { margin-bottom: 3.2rem; display: flex; flex-direction: column; gap: 1rem; }
.faq__list { max-width: 820px; }
.faq__item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ink-3); margin-bottom: 0.8rem;
  transition: border-color 0.35s var(--ease);
}
.faq__item:hover, .faq__item[open] { border-color: rgba(47,127,255,0.35); }
.faq__q {
  cursor: pointer; list-style: none; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  padding: 1.2rem 3.2rem 1.2rem 1.4rem;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+"; position: absolute; right: 1.4rem; top: 50%;
  transform: translateY(-50%); color: var(--accent); font-weight: 400;
  font-size: 1.3rem; transition: transform 0.3s var(--ease);
}
.faq__item[open] .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a {
  color: var(--ivory-dim); font-size: 0.98rem; line-height: 1.6;
  padding: 0 1.4rem 1.3rem; max-width: 70ch;
}
.faq__a a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  position: relative;
  padding: clamp(6rem, 14vw, 11rem) clamp(1.2rem, 5vw, 2rem);
  text-align: center;
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(60% 90% at 50% 0%, rgba(47,127,255,0.10), transparent 70%),
    var(--ink);
}
.cta__inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.cta__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em;
}
.cta__sub { color: var(--ivory-dim); font-size: 1.12rem; max-width: 40ch; }
.cta__alt { color: var(--ivory-mute); font-size: 0.95rem; margin-top: 0.4rem; }
.cta__alt a { color: var(--accent); }
.cta .btn--lg { margin-top: 0.6rem; }

/* contact form (CTA section) ---------------------------------- */
.cta__form {
  width: 100%; max-width: 560px; margin-top: 0.5rem;
  display: flex; flex-direction: column; gap: 0.9rem; text-align: left;
}
.cta__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.cta__field { display: flex; flex-direction: column; gap: 0.4rem; }
.cta__label { font-size: 0.82rem; color: var(--ivory-dim); font-weight: 500; }
.cta__opt { color: var(--ivory-mute); font-weight: 400; }
.cta__form input,
.cta__form textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ivory);
  background: #ffffff; border: 1px solid var(--line);
  border-radius: 10px; padding: 0.75rem 0.9rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.cta__form input:focus,
.cta__form textarea:focus {
  outline: none; border-color: var(--accent); background: #ffffff;
}
.cta__form textarea { resize: vertical; min-height: 96px; }
.cta__hp { position: absolute; left: -9999px; width: 0; height: 0; opacity: 0; }
.cta__submit { margin-top: 0.3rem; align-self: flex-start; cursor: pointer; }
.cta__submit:disabled { opacity: 0.6; cursor: default; }
.cta__status { font-size: 0.92rem; min-height: 1.2em; }
.cta__status.is-ok { color: var(--accent); }
.cta__status.is-error { color: #f87171; }
@media (max-width: 520px) {
  .cta__row { grid-template-columns: 1fr; }
  .cta__submit { align-self: stretch; justify-content: center; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.4rem clamp(1.2rem, 5vw, 2rem) 3rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.4rem; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  color: var(--ivory-dim);
}
.foot__brand { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-display); font-weight: 600; color: var(--ivory); }
.foot__brand .nav__mark { color: var(--accent); }
.foot__links { display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: center; }
.foot__links a { font-size: 0.92rem; transition: color 0.2s var(--ease); }
.foot__links a:hover { color: var(--accent); }
.foot__fine { font-size: 0.85rem; color: var(--ivory-mute); width: 100%; }

/* ============================================================
   AMBER SECTION DIVIDERS (wayfinding between sections)
   ============================================================ */
.approach, .why, .work, .team, .cta, .foot { border-top: none; }
.services, .work, .approach, .why, .team, .cta, .foot { position: relative; }
.work::before, .approach::before,
.why::before, .team::before, .cta::before, .foot::before {
  content: ""; position: absolute; top: 0;
  left: clamp(1.2rem, 5vw, 2rem); right: clamp(1.2rem, 5vw, 2rem);
  height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(47,127,255,0.45) 20%, rgba(47,127,255,0.45) 80%, transparent);
}

/* ============================================================
   REVEAL (scroll-in)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .nav__toggle { display: block; }
  .nav__links { display: none; }

  /* CardNav-style expanding card menu */
  .navcards {
    position: fixed; top: 78px; left: 10px; right: 10px; z-index: 49;
    display: flex; flex-direction: column; gap: 8px; padding: 10px;
    background: rgba(6, 16, 33, 0.94);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    transform: translateY(-12px) scale(0.99); opacity: 0;
    pointer-events: none; visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease),
                visibility 0s 0.35s;
  }
  .navcards.open {
    transform: none; opacity: 1; pointer-events: auto; visibility: visible;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }
  .navcard {
    border-radius: 12px; padding: 14px 16px 13px;
    background: var(--ink-3); border: 1px solid var(--line);
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }
  .navcards.open .navcard { opacity: 1; transform: none; }
  .navcards.open .navcard:nth-child(2) { transition-delay: 0.07s; }
  .navcards.open .navcard:nth-child(3) { transition-delay: 0.14s; }
  .navcard--accent {
    background: linear-gradient(135deg, rgba(47,127,255,0.16), rgba(47,127,255,0.04));
    border-color: rgba(47,127,255,0.32);
  }
  .navcard__label {
    display: block; margin-bottom: 10px;
    font-family: var(--font-display); font-weight: 600; font-size: 1.12rem;
    letter-spacing: -0.01em; color: var(--accent);
  }
  .navcard__links { display: flex; flex-direction: column; gap: 7px; }
  .navcard__links a {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 1.02rem; color: var(--ivory);
  }
  .navcard__links a::before { content: "↗"; color: var(--accent); font-size: 0.85em; }
  .services__grid { grid-template-columns: 1fr; }
  /* compressed services tiles on phone: same info, less air, faster scroll */
  .svc__art { height: 110px; }
  .svc__body { padding: 1.05rem 1.1rem 1.15rem; }
  .svc__index { font-size: 0.75rem; }
  .svc__title { font-size: 1.15rem; margin-top: 0.5rem; }
  .svc__title::before { margin-bottom: 0.55rem; }
  .svc__tags { padding-top: 0.8rem; gap: 0.35rem; }
  .svc__tags li { font-size: 0.72rem; padding: 0.24rem 0.55rem; }
  .svc__toggle { margin-top: 0.7rem; padding: 0.3rem 0.8rem; }
  .approach__steps { grid-template-columns: 1fr 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: 1fr; }
  .agent--row { grid-template-columns: 1fr; }
  .agent--row .agent__media { height: 160px; min-height: 0; border-right: none; border-bottom: 1px solid var(--line); }
  .agent--row .agent__media img { position: static; height: 100%; }
  .team__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .approach__steps { grid-template-columns: 1fr; }
  .hero__actions { gap: 0.8rem; }

  /* The hero was starting flush against the fixed nav, so the two read as
     one merged block. Give the content real clearance and let it breathe. */
  .hero__inner { padding-top: calc(70px + 2.4rem); padding-bottom: 2.5rem; }
  .hero { min-height: auto; padding-block: 0 3rem; }

  /* Nav is crowded at phone widths: the CTA also lives in the card menu. */
  .nav__cta { display: none; }

  /* Copy sits over the brightest part of the wave on a narrow screen —
     deepen the scrim so the sub-paragraph stays readable. */
  .hero__veil {
    background:
      linear-gradient(180deg, rgba(5,13,28,0.78) 0%, rgba(5,13,28,0.52) 42%,
                      rgba(5,13,28,0.68) 78%, var(--ink) 100%);
  }
  .hero__hint { display: none; }
  .member { grid-template-columns: 1fr; }
  .member__photo { width: 110px; height: 110px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__hint { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ============================================================
   CASE STUDIES BUTTON (work section)
   ============================================================ */
.work__cs-btn {
  text-align: center;
  padding-top: clamp(40px,5vw,64px);
}

/* ============================================================
   CASE STUDY STRIP
   ============================================================ */
.cs-strip { }
.cs-strip__card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  background: var(--ink-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(32px,4vw,52px);
  position: relative; overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
  cursor: pointer;
}
.cs-strip__card:hover { border-color: rgba(47,127,255,0.35); transform: translateY(-2px); }
.cs-strip__card::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(47,127,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.cs-strip__meta { }
.cs-score-pair {
  display: flex; flex-direction: column; gap: 2px; min-width: 120px;
}
.cs-score {
  padding: 16px 24px; display: flex; flex-direction: column; gap: 4px;
  border-radius: 8px;
}
.cs-score--before { background: rgba(248,113,113,0.07); }
.cs-score--after  { background: rgba(47,127,255,0.09); }
.cs-score__label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cs-score--before .cs-score__label { color: #f87171; }
.cs-score--after  .cs-score__label { color: var(--accent); }
.cs-score__num {
  font-family: var(--font-display); font-size: 32px; font-weight: 700;
  line-height: 1; letter-spacing: -0.03em;
}
.cs-score--before .cs-score__num { color: #f87171; }
.cs-score--after  .cs-score__num { color: var(--accent); }
.cs-score__num span { font-size: 14px; color: var(--ivory-mute); font-weight: 400; }

@media (max-width: 700px) {
  .cs-strip__card { grid-template-columns: 1fr; }
  .cs-score-pair { flex-direction: row; }
  .cs-strip__scores { order: -1; }
}

/* ============================================================
   MOBILE SCROLL POP (sections light up + zoom as they centre)
   Placed last so the active transform wins over .reveal.in
   ============================================================ */
/* Smooth scroll swell (mobile). Driven by JS: app.js sets --p (0..1 by an
   element's distance to the viewport centre) via a gated rAF loop, so it
   works on every phone, including iOS Safari versions that lack CSS
   scroll-driven timelines. Transform-only => compositor-smooth, and no
   glow/shadow that could bleed onto neighbours. */
@media (max-width: 880px) and (prefers-reduced-motion: no-preference) {
  /* scale (bumped a touch) — rAF drives --p per frame, so no transition */
  .services .svc, .work .agent {
    transform: scale(calc(1 + var(--p, 0) * 0.045));
    transition: none;
    border-color: color-mix(in srgb, var(--line),
      color-mix(in srgb, var(--tile-accent, var(--accent)) 60%, transparent) calc(var(--p, 0) * 100%));
  }
  .approach .step, .why .why__points li {
    transform: scale(calc(1 + var(--p, 0) * 0.035));
    transition: none;
  }

  /* travelling amber glint around the card edge, fading in with --p */
  .services .svc.in-view .svc__glint,
  .work .agent.in-view .svc__glint {
    opacity: var(--p, 0);
    transition: none;
    animation: glint-travel 2.6s linear infinite;
  }

  /* How we work: amber tick extends + verb lights up as it centres */
  .approach .step::before {
    width: calc(30px + var(--p, 0) * 34px);
    box-shadow: 0 0 calc(var(--p, 0) * 14px) rgba(47,127,255, calc(var(--p, 0) * 0.75));
    transition: none;
  }
  .approach .step .step__verb {
    color: color-mix(in srgb, var(--ivory), var(--accent) calc(var(--p, 0) * 100%));
    transition: none;
  }

  /* Built like a partner: tick extends + key lights up + soft amber wash */
  .why .why__points li {
    background: linear-gradient(90deg, rgba(47,127,255, calc(var(--p, 0) * 0.09)), transparent 72%);
  }
  .why .why__points li::before {
    width: calc(28px + var(--p, 0) * 28px);
    box-shadow: 0 0 calc(var(--p, 0) * 12px) rgba(47,127,255, calc(var(--p, 0) * 0.7));
    transition: none;
  }
  .why .why__points li .why__k {
    color: color-mix(in srgb, var(--ivory), var(--accent) calc(var(--p, 0) * 100%));
    transition: none;
  }
}

/* ============================================================
   HERO MOTION (intro choreography + scroll-scrubbed exit)
   Gated behind .js-heromo on <html>, added only by JS when
   motion is allowed. Without JS or with reduced motion the
   hero renders instantly, exactly as before.
   ============================================================ */
.js-heromo .hero-el { opacity: 0; }
.js-heromo .hero__title .hw { display: inline-block; }
.js-heromo .hero__title .hw__i { display: inline-block; }

/* entry: children animate in; exit: opacity scrubbed by --he (set on .hero) */
.js-heromo .hero--in .hero-el {
  opacity: calc(1 - var(--he, 0) * var(--xr, 1.25));
  animation: heroEl 0.7s var(--ease) backwards;
}
.js-heromo .hero--in .hero-el--eyebrow { animation-delay: 1.0s;  --xr: 2.1; }
.js-heromo .hero--in .hero-el--title   { animation: none;        --xr: 1.3; }
.js-heromo .hero--in .hero-el--sub     { animation-delay: 1.45s; --xr: 1.7; }
.js-heromo .hero--in .hero-el--actions { animation-delay: 1.6s;  --xr: 1.05; }
.js-heromo .hero--in .hero-el--audit   { animation-delay: 1.8s;  --xr: 1.0; }

.js-heromo .hero--in .hero__title .hw__i {
  animation: heroWord 0.6s var(--ease) backwards; /* per-word delay set inline by JS */
}
.js-heromo .hero--in .hero__title .accent .hw__i {
  animation: heroWord 0.6s var(--ease) backwards, heroGlow 0.9s ease-out backwards;
}

@keyframes heroEl   { from { opacity: 0; transform: translateY(12px); } }
@keyframes heroWord { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes heroGlow {
  0%   { text-shadow: 0 0 0 rgba(47,127,255,0); }
  35%  { text-shadow: 0 0 26px rgba(47,127,255,0.55); }
  100% { text-shadow: 0 0 0 rgba(47,127,255,0); }
}

/* exit scrub: parent transform only (children own their intro opacity) */
.js-heromo .hero__inner {
  transform: translateY(calc(var(--he, 0) * -56px)) scale(calc(1 - var(--he, 0) * 0.05));
  will-change: transform;
}
.js-heromo .hero--gone .hero__hint { animation: none; opacity: 0; transition: opacity 0.3s var(--ease); }

/* scrolling mid-intro completes everything instantly */
.js-heromo .hero--skip .hero-el,
.js-heromo .hero--skip .hw__i {
  animation-duration: 0.01s !important;
  animation-delay: 0s !important;
}

/* belt and braces: never hide hero text under reduced motion */
@media (prefers-reduced-motion: reduce) {
  .js-heromo .hero-el, .js-heromo .hw__i { opacity: 1 !important; animation: none !important; }
  .js-heromo .hero__inner { transform: none !important; }
}

/* ============================================================
   SCROLL STAGE — pinned hero + mission statement handoff.
   Only active under .js-heromo; without JS or with reduced
   motion the stage divs are inert and the flow is unchanged.
   ============================================================ */
/* svh, not dvh: dvh resizes as the mobile URL bar collapses, which
   shifted the whole stage mid-scroll and made the scrub jump/jank */
.js-heromo .stage { height: 170vh; height: 170svh; }
/* services rises underneath the departing hero: no dead viewport */
.js-heromo .services {
  position: relative; z-index: 4;
  margin-top: -60vh;
  margin-top: -60svh;
}
.js-heromo .stage__pin {
  position: sticky; top: 0; overflow: hidden;
  height: 100vh; height: 100svh;
}
.js-heromo .stage__pin .hero { min-height: 100%; }
/* faded hero text must not swallow clicks meant for content beneath */
.js-heromo .hero--gone .hero__inner { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .js-heromo .stage { height: auto; }
  .js-heromo .services { margin-top: 0; }
  .js-heromo .stage__pin { position: static; height: auto; overflow: visible; }
}

/* Narrow screens: the stacked hero (text + audit card) runs taller than
   one viewport, so pinning it in a 100svh overflow-hidden stage clips
   the audit card and the exit scrub fades it out while the user is
   still reaching for it; focusing the URL input then scroll-jumps the
   scrub mid-type. Static flow below the two-column breakpoint — the
   pinned outro is desktop-only. */
@media (max-width: 1059px) {
  .js-heromo .stage { height: auto; }
  .js-heromo .services { margin-top: 0; }
  .js-heromo .stage__pin { position: static; height: auto; overflow: visible; }
  .js-heromo .hero__inner { transform: none; }
  .js-heromo .hero--in .hero-el { opacity: 1; }
  /* 16px floor stops iOS Safari auto-zooming the page on input focus */
  .hero__audit-form input { font-size: 1rem; }
}

/* ============================================================
   SITE MOTION UPLIFT — richer entrances + desktop card field.
   Gated behind .js-heromo (JS present, motion allowed).
   ============================================================ */
/* cards rise in with depth; per-card stagger delay set inline by JS.
   Desktop only: animating blur is too heavy for phone GPUs and janked
   the scroll into services; mobile keeps the cheap base reveal. */
@media (min-width: 881px) {
  .js-heromo .reveal:not(.section-title):not(.cta__title) {
    transform: translateY(26px) scale(0.985);
    filter: blur(5px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  }
  .js-heromo .reveal.in:not(.section-title):not(.cta__title) { transform: none; filter: none; }

  /* services + agents tiles get a more pronounced entrance than the rest */
  .js-heromo .svc.reveal, .js-heromo .agent.reveal {
    transform: translateY(44px) scale(0.96);
    filter: blur(7px);
    transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  }
  .js-heromo .svc.reveal.in, .js-heromo .agent.reveal.in { transform: none; filter: none; }
}

/* accent bar sweeps as the tile lands (animation, not transition, so the
   per-tile --ed stagger never lags later hover response) */
.js-heromo .svc.reveal.in .svc__title::before,
.js-heromo .agent.reveal.in .agent__title::before {
  animation: bar-land 1.1s var(--ease) calc(var(--ed, 0ms) + 350ms) backwards;
}
@keyframes bar-land {
  0%   { transform: scaleX(0); }
  55%  { transform: scaleX(1);
         box-shadow: 0 0 18px color-mix(in srgb, var(--tile-accent, var(--accent)) 85%, transparent); }
  100% { transform: scaleX(0.47); box-shadow: 0 0 0 rgba(0,0,0,0); }
}

/* artwork cinematic reveal: zoomed-soft -> sharp over ~1.5s, synced to the
   tile's stagger; blur/brightness only on desktop (blur janks phone GPUs) */
.js-heromo .svc__art img { transform: scale(1.14); }
/* transition lives on the .in state so initial style application can never
   trigger a load-time animation */
.js-heromo .svc.reveal.in .svc__art img {
  transform: scale(1);
  transition: transform 1.5s var(--ease) calc(var(--ed, 0ms) + 120ms),
              filter 1.5s var(--ease) calc(var(--ed, 0ms) + 120ms);
}
@media (min-width: 881px) {
  .js-heromo .svc__art img { filter: blur(6px) brightness(0.82); }
  .js-heromo .svc.reveal.in .svc__art img { filter: blur(0) brightness(1); }
}
/* one-shot glow bloom in the tile's accent as the art sharpens */
.js-heromo .svc__art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 70% at 50% 55%,
    color-mix(in srgb, var(--tile-accent, var(--accent)) 26%, transparent), transparent 70%);
  opacity: 0;
}
.js-heromo .svc.reveal.in .svc__art::after {
  animation: art-bloom 1.6s var(--ease) calc(var(--ed, 0ms) + 200ms) both;
}
@keyframes art-bloom {
  0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; }
}

/* section titles speak the hero language: word-by-word rise on scroll */
.js-heromo .section-title.reveal, .js-heromo .cta__title.reveal {
  opacity: 1; transform: none; transition: none;
}
.js-heromo .sw { display: inline-block; opacity: 0; }
.js-heromo .reveal.in .sw { opacity: 1; animation: heroWord 0.55s var(--ease) backwards; }

/* ---- card field (vanilla MagicBento port, brand amber) ---- */
/* cursor spotlight over the card sections */
.js-heromo .cardspot {
  position: fixed; left: 0; top: 0; width: 760px; height: 760px;
  border-radius: 50%; pointer-events: none; z-index: 5;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(47,127,255,0.10) 0%, rgba(47,127,255,0.05) 20%,
    rgba(47,127,255,0.02) 42%, transparent 68%);
  mix-blend-mode: screen; opacity: 0;
}
/* proximity border glow, masked to the card's border ring */
.js-heromo .cardglow {
  position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(47,127,255, calc(var(--gi, 0) * 0.9)) 0%,
    rgba(47,127,255, calc(var(--gi, 0) * 0.35)) 32%, transparent 62%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none; z-index: 3;
}
/* short transform transition while the cursor drives tilt/magnetism */
.js-heromo .cardfx {
  transition: border-color 0.35s var(--ease), transform 0.16s ease-out,
              box-shadow 0.35s var(--ease);
  will-change: transform;
}
/* click ripple */
.js-heromo .cardrip {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 4;
  background: radial-gradient(circle, rgba(47,127,255,0.32) 0%,
    rgba(47,127,255,0.14) 30%, transparent 70%);
  animation: cardrip 0.7s ease-out forwards;
}
@keyframes cardrip {
  from { transform: scale(0); opacity: 1; }
  to   { transform: scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js-heromo .reveal { transform: none !important; filter: none !important; }
  .js-heromo .sw { opacity: 1 !important; animation: none !important; }
  .js-heromo .cardspot, .js-heromo .cardglow, .js-heromo .cardrip { display: none; }
  .js-heromo .svc__art img { transform: none !important; filter: none !important; transition: none !important; }
  .js-heromo .svc.reveal.in .svc__title::before,
  .js-heromo .agent.reveal.in .agent__title::before,
  .js-heromo .svc.reveal.in .svc__art::after { animation: none !important; }
}
