/* Layout: left-aligned editorial column; hero splits thesis copy / a live "relay" of one brief moving through the agents.
   Dark-first by brand choice (Hafla's black + orange→red→pink wordmark). */
:root {
  color-scheme: dark;
  --ink: #0d0b0c;          /* page ground, warm near-black biased to the pink */
  --surface: #161214;      /* raised blocks */
  --surface-2: #1e191b;
  --line: #2c2528;
  --fg: #f6f1f2;
  --muted: #a99da1;
  --faint: #6f6468;
  --orange: #f38023;       /* brand.ts */
  --red: #ee3d24;
  --pink: #dd579d;
  --deep-pink: #c33f86;
  --live: #4fd08f;
  --grad: linear-gradient(100deg, var(--orange) 0%, var(--red) 52%, var(--pink) 100%);

  --f-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  overflow-x: clip;
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font: 400 var(--step-0)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }
.mono { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.02em; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 var(--step--1)/1 var(--f-mono);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot--live { background: var(--live); box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 var(--step-0)/1 var(--f-display); letter-spacing: -0.01em;
  padding: 15px 22px; border-radius: 999px; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn--grad { background: var(--grad); color: #fff; box-shadow: 0 8px 30px -10px color-mix(in srgb, var(--red) 70%, transparent); }
.btn--grad:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -10px color-mix(in srgb, var(--pink) 80%, transparent); }
.btn--ghost { border: 1px solid var(--line); color: var(--fg); background: var(--surface); }
.btn--ghost:hover { border-color: var(--faint); }
.btn--sm { padding: 10px 16px; font-size: 0.875rem; }
.btn--lg { padding: 18px 28px; font-size: var(--step-1); }
.ico { width: 20px; height: 20px; flex: none; }

/* Nav */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.nav__logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.nav__logo img { height: 22px; width: auto; }
.nav__ai { font: 700 0.75rem/1 var(--f-mono); letter-spacing: 0.1em; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); }
.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.nav__links a:hover { color: var(--fg); }
@media (max-width: 860px) { .nav__links { display: none; } .nav .btn { margin-left: auto; } }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(24px, 3.5vw, 48px) clamp(40px, 6vw, 72px);
  position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: -10% -20% auto auto; width: 60%; height: 90%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--pink) 22%, transparent), transparent 70%);
  pointer-events: none; z-index: -1;
}
.hero__copy { display: grid; gap: 24px; min-width: 0; }
.hero__title { font-size: clamp(2.25rem, 1.4rem + 2.8vw, 3.6rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.hero__title em { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: -0.01em; padding-right: .06em; }
.hero__lede { font-size: var(--step-1); color: var(--muted); max-width: 36em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { font-size: var(--step--1); color: var(--faint); }

/* Relay */
.relay {
  margin: 0; min-width: 0; width: 100%; max-width: 380px; justify-self: end;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 40px 80px -40px #000, inset 0 1px 0 color-mix(in srgb, var(--fg) 6%, transparent);
  overflow: hidden;
}
.relay__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.relay__title { font: 600 0.8125rem/1.3 var(--f-display); }
.relay__tag { color: var(--faint); border: 1px solid var(--line); padding: 2px 7px; font-size: 0.625rem; border-radius: 999px; }
.relay__feed {
  list-style: none; margin: 0; padding: 12px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  height: 400px; overflow: hidden; /* a phone-style window: newest at the bottom, older lines scroll off the top */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 44px); mask-image: linear-gradient(180deg, transparent 0, #000 44px);
}
.relay__feed > * { flex: none; }
@media (max-width: 600px) { .relay__feed { height: 340px; } }
.msg { position: relative; display: grid; gap: 3px; max-width: 90%; padding: 8px 11px 6px; border-radius: 14px; font-size: 0.8125rem; line-height: 1.4; }
.msg time { justify-self: end; color: var(--faint); font-size: 0.5625rem; }
.msg__who { display: inline-flex; align-items: center; gap: 5px; font: 600 0.6875rem/1 var(--f-display); color: var(--muted); }
.msg--host { justify-self: end; align-self: flex-end; background: color-mix(in srgb, var(--pink) 16%, var(--surface-2)); border-bottom-right-radius: 4px; }
.msg--agent { align-self: flex-start; background: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.sys { justify-self: stretch; align-self: stretch; display: flex; justify-content: flex-start; text-align: left !important; align-items: center; gap: 7px; font-size: 0.75rem; line-height: 1.35; color: var(--muted); padding: 5px 10px; border: 1px dashed var(--line); border-radius: 12px; }
.sys .mono { color: var(--live); font-size: 0.6875rem; }
.sys .av { width: 18px; height: 18px; font-size: 0.5625rem; }
.quote-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 8px; min-width: 0; margin-top: 4px; padding: 7px 9px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.quote-card .mono { color: var(--muted); white-space: nowrap; font-size: 0.6875rem; }
.relay .msg__who .av { width: 16px; height: 16px; font-size: 0.5rem; }
.quote-card__pay { white-space: nowrap; font: 600 0.75rem/1 var(--f-display); padding: 6px 10px; border-radius: 999px; background: var(--grad); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  /* Live chat playback (site.js adds .relay--play): messages arrive one at a time */
  .relay--play .relay__feed > li:not(.is-shown) { display: none; }
  .relay--play .relay__feed > li.is-shown { animation: pop .45s cubic-bezier(.2,.8,.2,1.1) both; }
  .relay--play .relay__feed.is-leaving > li { animation: leave .5s ease both; }
  @keyframes pop { from { opacity: 0; translate: 0 12px; scale: .96; } to { opacity: 1; translate: none; scale: 1; } }
  @keyframes leave { to { opacity: 0; translate: 0 -8px; } }
  @keyframes rise { from { translate: 0 18px; opacity: .3; } to { translate: none; opacity: 1; } }
}

/* Typing indicator */
.typing { display: inline-flex; align-items: center; gap: 8px; justify-self: start; align-self: flex-start; padding: 8px 11px; border-radius: 14px; border-bottom-left-radius: 4px; background: var(--ink); border: 1px solid var(--line); font: 600 0.75rem/1 var(--f-display); color: var(--muted); }
.typing--host { justify-self: end; align-self: flex-end; border-radius: 16px; border-bottom-right-radius: 4px; background: color-mix(in srgb, var(--pink) 16%, var(--surface-2)); border-color: transparent; }
.typing__dots { display: inline-flex; gap: 4px; }
.typing__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: bounce 1.1s ease-in-out infinite; }
.typing__dots i:nth-child(2) { animation-delay: .15s; }
.typing__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.relay__live { display: inline-flex; align-items: center; gap: 6px; }

/* Avatars */
.av {
  --c: var(--pink);
  display: inline-grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  font: 700 0.625rem/1 var(--f-display); color: #fff; font-style: normal;
  background: var(--c);
}
.av--lg { width: 48px; height: 48px; font-size: 1.125rem; border-radius: 14px; }
.agent .av:not(.av--lg) { width: 40px; height: 40px; font-size: 0.9375rem; border-radius: 12px; }
.av--heba { --c: linear-gradient(135deg, var(--pink), var(--deep-pink)); background: var(--c); }
.av--oscar { background: linear-gradient(135deg, var(--orange), var(--red)); }
.av--simon { background: linear-gradient(135deg, #7a6cf0, #4a3fb8); }
.av--dexa { background: linear-gradient(135deg, #2cc3b8, #1a7f7a); }
.av--charlie { background: linear-gradient(135deg, #ff8e53, #ff6b6b); }
.av--maya { background: linear-gradient(135deg, #b54ad8, var(--deep-pink)); }
.av--eva { background: linear-gradient(135deg, #2f9bd6, #1f6aa8); }
.av--alfred { background: linear-gradient(135deg, #c9973f, #8e6526); }
.av--carl { background: linear-gradient(135deg, #3fb57e, #23835a); }
.av--human { background: var(--fg); color: var(--ink); }
.av-stack { display: inline-flex; }
.av-stack .av { box-shadow: 0 0 0 3px var(--surface); }
.av-stack .av + .av { margin-left: -10px; }

/* Proof */
.proof { display: grid; gap: 40px; padding-block: 24px 72px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.stats > div { padding: 24px 20px; display: grid; gap: 6px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dt { order: 2; color: var(--muted); font-size: var(--step--1); }
.stats dd { order: 1; margin: 0; font: 700 var(--step-3)/1 var(--f-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.logos { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.logos__label { color: var(--faint); font-size: var(--step--1); white-space: nowrap; }
.logos__row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; flex: 1; }
.logos__row img { height: 44px; width: auto; filter: grayscale(1) brightness(1.8); opacity: .7; transition: opacity .2s, filter .2s; }
.logos__row img:hover { opacity: 1; filter: none; }

/* Section heads */
section[id] { scroll-margin-top: 80px; }
.section-head { display: grid; gap: 14px; max-width: 44rem; margin-bottom: 40px; }
.section-head h2 { font-size: var(--step-3); font-weight: 700; line-height: 1.12; }
.section-head__lede { color: var(--muted); font-size: var(--step-1); }

/* How */
.how, .team, .new { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.step { display: flex; flex-direction: column; gap: 12px; padding: 24px 20px 24px 0; border-top: 2px solid var(--line); position: relative; min-width: 0; }
.step::before { content: ""; position: absolute; top: -2px; left: 0; width: 36px; height: 2px; background: var(--grad); }
.step + .step { padding-left: 20px; }
.step + .step::before { left: 20px; }
.step__n { color: var(--faint); }
.step h3 { font-size: var(--step-1); font-weight: 700; }
.step p { color: var(--muted); font-size: 0.9375rem; flex: 1; }
.step__owner { display: inline-flex; align-items: center; gap: 8px; font: 600 0.8125rem/1 var(--f-display); color: var(--fg); }
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
  .step, .step + .step { padding: 24px 0; }
  .step + .step::before { left: 0; }
}
@media (max-width: 700px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Team */
.agents { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.agent {
  grid-column: span 4; min-width: 0;
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
}
.agent--wide { grid-column: span 6; }
.agent--feature { grid-column: span 6; padding: 28px; background: linear-gradient(160deg, color-mix(in srgb, var(--pink) 9%, var(--surface)) 0%, var(--surface) 55%); }
.agent__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.agent h3 { font-size: var(--step-2); font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.agent:not(.agent--feature) h3 { font-size: var(--step-1); }
.agent__role { font: 500 var(--step--1)/1.2 var(--f-mono); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.agent p { color: var(--muted); font-size: 0.9375rem; }
.agent p b { color: var(--fg); font-weight: 600; }
.agent__link { margin-top: auto; font: 600 0.9375rem/1 var(--f-display); text-decoration: none; color: var(--orange); }
.agent__link:hover { text-decoration: underline; }
.facts { list-style: none; margin: auto 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--step--1); color: var(--muted); }
.facts b { color: var(--fg); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 0.6875rem/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip--live { color: var(--live); border-color: color-mix(in srgb, var(--live) 35%, var(--line)); }
.chip--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
@media (max-width: 980px) {
  .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent, .agent--feature, .agent--wide { grid-column: span 1; }
  .agent--group { grid-column: span 2; }
}
@media (max-width: 640px) {
  .agents { grid-template-columns: minmax(0, 1fr); }
  .agent, .agent--feature, .agent--wide, .agent--group { grid-column: auto; }
}

/* Grounded */
.grounded {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px);
  padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line);
}
.grounded__copy { display: grid; gap: 16px; align-content: start; }
.grounded__copy h2 { font-size: var(--step-3); font-weight: 700; line-height: 1.12; }
.grounded__copy p { color: var(--muted); font-size: var(--step-1); max-width: 34em; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.rules li { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.rules li:nth-child(even) { padding-left: 20px; padding-right: 0; border-left: 1px solid var(--line); }
.rules h3 { font-size: var(--step-0); font-weight: 700; }
.rules p { color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 860px) { .grounded { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .rules { grid-template-columns: minmax(0, 1fr); }
  .rules li, .rules li:nth-child(even) { padding: 20px 0; border-left: 0; }
}

/* What's new */
.log { list-style: none; margin: 0; padding: 0; display: grid; }
.log li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.log li:last-child { border-bottom: 1px solid var(--line); }
.log time { color: var(--orange); padding-top: 4px; }
.log h3 { font-size: var(--step-1); font-weight: 600; margin-bottom: 4px; }
.log p { color: var(--muted); max-width: 40em; }
@media (max-width: 560px) { .log li { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* Business */
.business { padding-block: 24px clamp(56px, 8vw, 104px); }
.business__card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--orange) 20%, transparent), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
}
.business__card > div:first-child { display: grid; gap: 16px; }
.business__card h2 { font-size: var(--step-3); font-weight: 700; line-height: 1.12; }
.business__card p { color: var(--muted); font-size: var(--step-1); max-width: 38em; }
.business__cta { display: grid; gap: 14px; justify-items: start; }
@media (max-width: 860px) { .business__card { grid-template-columns: minmax(0, 1fr); } }

/* CTA */
.cta h2 { font-size: var(--step-3); font-weight: 600; line-height: 1.15; max-width: 18em; }
.cta p { color: var(--muted); font-size: var(--step-1); max-width: 32em; }
.cta .btn { margin-top: 8px; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot__inner { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-block: 48px 32px; }
.foot__brand { display: grid; gap: 10px; align-content: start; }
.foot__brand img { height: 22px; width: auto; }
.foot__brand p { color: var(--muted); font-size: var(--step--1); }
.foot__col { display: grid; gap: 10px; align-content: start; font-size: 0.9375rem; }
.foot__col h4 { font: 500 0.75rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.foot__col a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.foot__col a:hover { color: var(--fg); }
.foot__muted { color: var(--faint); font-size: var(--step--1); }
.foot__legal { color: var(--faint); font-size: var(--step--1); padding-block: 0 32px; }
@media (max-width: 760px) { .foot__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot__brand { grid-column: 1 / -1; } }

/* Flow map */
.map { margin: 0 0 48px; padding: 8px; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--pink) 8%, var(--surface)), var(--surface)); overflow-x: auto; }
.map__svg { display: block; width: 100%; min-width: 760px; height: auto; }
.map__lane { font: 500 11px var(--f-mono); letter-spacing: .14em; fill: var(--faint); }
.map__div { stroke: var(--line); stroke-dasharray: 3 6; }
.map__edge { fill: none; stroke: var(--line); stroke-width: 2; }
.map__edge--dash { stroke-dasharray: 4 6; }
.map__pulses circle { fill: url(#mapGrad); fill: var(--pink); filter: drop-shadow(0 0 6px var(--pink)); }
.map__node rect { fill: var(--ink); stroke: var(--line); }
.map__node--planner rect { fill: var(--fg); stroke: none; }
.map__node--planner .map__name, .map__node--planner .map__role { fill: var(--ink); }
.map__node--host rect { fill: color-mix(in srgb, var(--pink) 18%, var(--surface-2)); stroke: none; }
.map__name { font: 700 14px var(--f-display); fill: var(--fg); text-anchor: middle; }
.map__role { font: 400 11px var(--f-mono); fill: var(--muted); text-anchor: middle; }
.map__l { text-anchor: start; }
.map__init { font: 700 12px var(--f-display); fill: #fff; text-anchor: middle; }
.map__note { font: 400 11px var(--f-mono); fill: var(--faint); text-anchor: middle; }

/* Category photo strip */
.cats { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.strip { overflow-x: auto; scrollbar-width: none; padding-inline: var(--gutter); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.strip::-webkit-scrollbar { display: none; }
.strip__track { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; width: max-content; }
.strip--auto { overflow: hidden; }
.strip--auto .strip__track { animation: marquee 48s linear infinite; }
.strip--auto:hover .strip__track, .strip--auto:focus-within .strip__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }
.tile { position: relative; width: clamp(200px, 22vw, 280px); aspect-ratio: 4 / 5; max-width: 100%; border-radius: 18px; overflow: hidden; flex: none; background: var(--surface); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tile:hover img { transform: scale(1.05); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(13, 11, 12, .85)); }
.tile__cap { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; color: #fff; min-width: 0; }
.tile__cap b { font: 700 clamp(0.9375rem, 0.8rem + 0.5vw, 1.1875rem)/1.1 var(--f-display); overflow-wrap: anywhere; }
.tile__cap > span { display: inline-flex; align-items: center; gap: 6px; font: 500 0.75rem/1 var(--f-mono); padding: 5px 8px 5px 5px; border-radius: 999px; background: rgba(13, 11, 12, .6); backdrop-filter: blur(6px); }
.tile .av { font-style: normal; }

/* Impact charts */
.impact { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.charts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.chart { margin: 0; min-width: 0; padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.chart figcaption { display: grid; gap: 6px; }
.chart figcaption b { font: 600 0.9375rem/1.3 var(--f-display); color: var(--muted); }
.chart figcaption span { font: 800 var(--step-3)/1 var(--f-display); letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chart__foot { color: var(--faint); margin-top: auto; font-size: 0.6875rem; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 56px minmax(0, 1fr) 32px; align-items: center; gap: 10px; }
.bar__label { font-size: var(--step--1); color: var(--muted); }
.bar__track { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: var(--v); border-radius: 99px; background: var(--grad); }
.bar__fill--muted { background: var(--faint); }
.bar__val { color: var(--fg); text-align: right; font-variant-numeric: tabular-nums; }
.ring { width: 100%; max-width: 150px; align-self: center; }
.ring__bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.ring__fg { fill: none; stroke: var(--pink); stroke-width: 10; stroke-linecap: round; stroke-dasharray: var(--v) 100; transform: rotate(-90deg); transform-origin: 60px 60px; }
.ring__txt { font: 800 22px var(--f-display); fill: var(--fg); text-anchor: middle; }
.tl { position: relative; padding-top: 6px; }
.tl__axis { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.tl__fill { display: block; height: 100%; width: 100%; background: var(--grad); }
.tl__marks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.tl__marks li { display: flex; justify-content: space-between; gap: 10px; font-size: var(--step--1); color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.tl__marks b { color: var(--fg); font: 600 var(--step--1)/1.3 var(--f-mono); white-space: nowrap; }
@media (max-width: 1040px) { .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .charts { grid-template-columns: minmax(0, 1fr); } }

/* Business photo + portal card */
.business__card { align-items: center !important; }
.business__copy { display: grid; gap: 16px; }
.business__cta { display: flex !important; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; }
.business__photo { position: relative; min-width: 0; }
.business__photo img { width: 100%; height: auto; aspect-ratio: 4 / 4.2; object-fit: cover; border-radius: 18px; }
@media (max-width: 860px) { .business__photo img { aspect-ratio: 4 / 3; } }
.portal-card { position: absolute; left: -24px; bottom: 24px; width: min(260px, 90%); padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(10px); display: grid; gap: 10px; box-shadow: 0 24px 50px -20px #000; }
.portal-card > .mono { color: var(--faint); }
.portal-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.portal-card li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.875rem; }
.portal-card li b { font-weight: 500; color: var(--orange); font-size: 0.6875rem; }
@media (max-width: 860px) { .portal-card { position: relative; left: auto; bottom: auto; margin: -44px 0 0 14px; } }

/* CTA photo */
.cta { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding-block: 0 !important; }
.cta__bg { position: absolute; inset: 0; z-index: 0; }
.cta__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .22; filter: saturate(1.2); }
.cta__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 50% 50%, transparent, var(--ink) 85%), linear-gradient(180deg, var(--ink), transparent 30%, transparent 70%, var(--ink)); }
.cta__inner { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; gap: 18px; padding-block: clamp(80px, 12vw, 160px); }

/* Reveal: elements are fully visible at rest; this only plays when they scroll in */
@media (prefers-reduced-motion: no-preference) {
  .reveal.in { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .chart.in .bar__fill { animation: grow 1.1s cubic-bezier(.2,.7,.2,1) .15s both; }
  .chart.in .ring__fg { animation: ring 1.4s cubic-bezier(.2,.7,.2,1) .15s both; }
  .chart.in .tl__fill { animation: grow 1.6s cubic-bezier(.2,.7,.2,1) .15s both; }
  @keyframes grow { from { width: 0; } }
  @keyframes ring { from { stroke-dasharray: 0 100; } }
}

/* Scroll progress + nav state */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.nav { transition: background-color .3s ease, box-shadow .3s ease; }
.nav.is-scrolled { background: color-mix(in srgb, var(--ink) 94%, transparent); box-shadow: 0 12px 30px -22px #000; }

/* Staggered reveals inside a group */
@media (prefers-reduced-motion: no-preference) {
  .stagger > .reveal.in { animation-delay: calc(var(--d, 0) * 90ms); }
  .step.in::before { animation: grow .9s cubic-bezier(.2,.7,.2,1) calc(var(--d, 0) * 90ms + .2s) both; }
  .map.in .map__edge:not(.map__edge--dash) { stroke-dasharray: 600; animation: draw 1.8s cubic-bezier(.2,.7,.2,1) .2s both; }
  @keyframes draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
}

/* Spotlight cards: a glow and gradient edge that follow the pointer */
.spot { position: relative; isolation: isolate; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
.spot::before, .spot::after { content: ""; position: absolute; border-radius: inherit; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.spot::before { inset: 0; z-index: -1; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--pink) 15%, transparent), transparent 60%); }
.spot::after {
  inset: -1px; padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--orange), var(--pink) 45%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.spot:hover { transform: translateY(-4px); box-shadow: 0 28px 60px -30px #000; }
.spot:hover::before, .spot:hover::after { opacity: 1; }
.agent .av { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.agent:hover .av--lg, .agent:hover > .agent__top > .av { transform: rotate(-6deg) scale(1.06); }

/* Button shine + icon nudge */
.btn--grad { position: relative; overflow: hidden; isolation: isolate; }
.btn--grad::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s ease; }
.btn--grad:hover::after { transform: translateX(120%); }
.btn .ico { transition: transform .3s ease; }
.btn:hover .ico { transform: scale(1.12) rotate(-6deg); }
.agent__link { display: inline-block; transition: transform .25s ease; }
.agent__link:hover { transform: translateX(4px); }

/* Steps: number goes gradient and the accent line runs the full width */
.step::before { transition: width .5s cubic-bezier(.2,.7,.2,1); }
.step:hover::before { width: calc(100% - 20px); }
.step__n { transition: color .3s ease; }
.step:hover .step__n { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { transition: transform .3s ease; }
.step:hover h3 { transform: translateX(3px); }

/* Stats, rules, log, tiles, map */
.stats > div { transition: background-color .3s ease; }
.stats > div:hover { background: color-mix(in srgb, var(--pink) 6%, transparent); }
.stats > div:hover dd { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rules li h3 { transition: color .25s ease; }
.rules li:hover h3 { color: var(--orange); }
.log li > div { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.log li:hover > div { transform: translateX(8px); }
.log li:hover time { color: var(--pink); }
.log time { transition: color .25s ease; }
.tile { transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease; }
.tile:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--pink) 50%, #000); }
.tile__cap { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.tile:hover .tile__cap { transform: translateY(-4px); }
.map__node rect { transition: stroke .25s ease; }
.map__node:hover rect { stroke: var(--pink); }
.business__photo img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.business__photo { border-radius: 18px; }
.business__photo:hover img { transform: scale(1.03); }
.portal-card { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.business__photo:hover .portal-card { transform: translate(6px, -6px); }
.relay { will-change: translate; }

/* EvWA intelligence layer */
.evwa {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: center;
  padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line);
}
.evwa__copy { display: grid; gap: 16px; align-content: start; }
.evwa__copy h2 { font-size: var(--step-3); font-weight: 700; line-height: 1.12; }
.evwa__copy > p { color: var(--muted); font-size: var(--step-1); max-width: 36em; }
.evwa__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.evwa__stats > div { display: grid; gap: 4px; align-content: start; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.evwa__stats > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.evwa__stats dt { order: 2; color: var(--fg); font: 600 0.875rem/1.3 var(--f-display); }
.evwa__stats dd { order: 1; margin: 0; font: 700 var(--step-3)/1 var(--f-display); letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.evwa__stats span { order: 3; color: var(--muted); font-size: var(--step--1); }

.pulse { margin: 0; min-width: 0; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 80px -40px #000; }
.pulse__head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: linear-gradient(100deg, color-mix(in srgb, var(--orange) 85%, #000) 0%, color-mix(in srgb, var(--deep-pink) 85%, #000) 100%); color: #fff; }
.pulse__ok { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .18); font-weight: 700; flex: none; }
.pulse__ok::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 2px #fff; }
.pulse__title { display: grid; gap: 4px; }
.pulse__title b { font: 700 var(--step-1)/1.2 var(--f-display); }
.pulse__title .mono { opacity: .8; font-size: 0.6875rem; }
.pulse__rows { list-style: none; margin: 0; padding: 6px 12px 10px; }
.src { border-bottom: 1px solid var(--line); }
.src:last-child { border-bottom: 0; }
.src__row {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 12px; color: var(--fg);
  transition: background-color .2s ease;
}
.src__row:hover, .src__row[aria-expanded="true"] { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.src__row:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.src__logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.src__logo img { width: 20px; height: 20px; object-fit: contain; }
.src__row:hover .src__logo { transform: translateY(-2px) rotate(-4deg); }
.src__name { display: grid; gap: 2px; min-width: 0; }
.src__name b { font: 600 0.9375rem/1.2 var(--f-body); }
.src__name span { color: var(--faint); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src__chev { width: 16px; height: 16px; color: var(--faint); transition: transform .25s ease, color .2s ease; }
.src__row:hover .src__chev { color: var(--fg); }
.src__row[aria-expanded="true"] .src__chev { transform: rotate(180deg); }
.src__detail { padding: 2px 8px 14px 54px; display: grid; gap: 10px; color: var(--muted); font-size: 0.875rem; }
.src__used { display: flex; align-items: center; gap: 10px; }
.src__used .mono { color: var(--faint); font-size: 0.6875rem; }
.src__used .av { width: 22px; height: 22px; font-size: 0.625rem; }
.src__used .av-stack .av { box-shadow: 0 0 0 2px var(--surface); }
.src__used .av-stack .av + .av { margin-left: -6px; }
@media (prefers-reduced-motion: no-preference) { .src__detail:not([hidden]) { animation: rise .35s cubic-bezier(.2,.7,.2,1) both; } }

/* "Run check" demo */
.pulse__head { flex-wrap: wrap; }
.pulse__title { flex: 1; min-width: 0; }
.pulse__run { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); color: #fff; font: 600 0.8125rem/1 var(--f-display); transition: background-color .2s ease; }
.pulse__run:hover { background: rgba(255,255,255,.26); }
.pulse__run:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pulse__run svg { width: 14px; height: 14px; }
.pulse__run[disabled] { opacity: .7; cursor: progress; }
.pulse.is-checking .pulse__run svg { animation: spin .9s linear infinite; }
.state.is-checking { color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); border-color: color-mix(in srgb, var(--orange) 35%, transparent); }
.state.is-checking::before { width: 8px; height: 8px; background: none; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.state.is-done { animation: state-in .4s cubic-bezier(.2,.8,.2,1.1) both; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes state-in { from { opacity: 0; scale: .9; } to { opacity: 1; scale: 1; } }
.pulse__when { color: var(--faint); font-size: 0.6875rem; }
.state { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 500 0.6875rem/1 var(--f-mono); color: var(--live); background: color-mix(in srgb, var(--live) 12%, transparent); border: 1px solid color-mix(in srgb, var(--live) 30%, transparent); white-space: nowrap; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) { .state--live::before { animation: pulse 2.4s ease-out infinite; } }
@media (max-width: 900px) { .evwa { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .src__row { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; } .src__row .pulse__when { display: none; } .src__detail { padding-left: 8px; } .pulse__run { width: 100%; justify-content: center; } }

/* Flow map: EvWA base layer */
.map__base rect { fill: color-mix(in srgb, var(--pink) 10%, var(--ink)); stroke: color-mix(in srgb, var(--pink) 45%, var(--line)); stroke-dasharray: 4 4; }
.map__base-name { font: 700 13px var(--f-display); fill: var(--fg); text-anchor: middle; }
.map__base-role { font: 400 10px var(--f-mono); fill: var(--muted); text-anchor: middle; }
.map__edge--base { stroke: transparent; }
.map__pulses--base circle { fill: var(--orange); filter: drop-shadow(0 0 5px var(--orange)); }

/* Hero stacking */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .relay { max-width: 420px; justify-self: start; }
}
@media (max-width: 480px) {
  .hero__ctas .btn { width: 100%; }
  .msg { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
