/* ==================================================================
   Fifty AudienceAI Assistant — scrollytelling page
   Tokens lifted from live fifty.io. Vanilla, standalone, no framework.
================================================================== */

:root {
  /* Ivory / bright world (fifty.io main website) */
  --ivory:        #edebe6;
  --ivory-card:   #f4f3f1;
  --ink:          #2c2d34;
  --ink-soft:     #35373d;
  --ink-mute:     #6c757d;

  /* Dark world (platform / chatbot) */
  --dark:         #2c2d34;
  --dark-2:       #35373d;
  --dark-panel:   #3a3c44;
  --dark-card:    #424550;
  --on-dark:      #edebe6;
  --on-dark-mute: #9aa0ad;

  /* Brand teal (accent) */
  --teal:         #36aa9c;
  --teal-light:   #67c2b8;
  --teal-deep:    #2f8f84;

  /* Tribe brights */
  --c-yellow:  #f5bf42;
  --c-blue:    #75bdff;
  --c-teal:    #67c2b8;
  --c-purple:  #c27ba7;
  --c-coral:   #d77676;
  --c-green:   #8cc56e;

  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--ink-soft);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ------------------------------------------------------------------
   Fixed backdrop — ivory + shapes, static to the viewport.
   Everything else (hero text, deck, CTA) scrolls / layers over this.
------------------------------------------------------------------ */
.backdrop {
  position: fixed; inset: 0; z-index: 0;
  background: var(--ivory);
  transform: translateZ(0); /* promote to GPU layer — contains all shape sub-layers so they can't punch through deck */
}
/* page sections layer above the backdrop */
.hero, .experience, .cta { position: relative; z-index: 1; background: transparent; }

/* ------------------------------------------------------------------
   Brand shapes — Figma-accurate independent shapes.
   8 shapes total: 6 solid + 2 atmospheric blur layers.
   Each shape is independently positioned, rotated, and parallax-driven.
   Colours transition per beat via JS + CSS transition.
------------------------------------------------------------------ */
.shapes {
  position: absolute; inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.shp { position: absolute; will-change: transform; pointer-events: none; }
/* 22% = Fifty squircle spec — don't "fix" this */
.blk { width: 100%; height: 100%; border-radius: 22%; transition: background-color 0.8s ease; }
/* Glass shapes — translucent overlay, no backdrop-filter (causes GPU flicker on scroll) */
.shp--blur { will-change: auto; }
.shp--blur .blk { background: rgba(255,255,255,0.18); }

/* Solid shapes — bottom-left cluster (yellow) + top-right cluster (teal) for diagonal framing */
/* Left cluster — bottom-left (parallax drifts them up to top-left by CTA) */
/* rotate lives on .blk so JS translate() on .shp stays in screen space */
.shp--1 { left: -34vw;    top: 38vh;    width: 64vw;   height: 64vw;   }
.shp--1 .blk { background: #f5bf42;  rotate: 14.5deg;   }

.shp--2 { left: -1vw;     top: 62vh;    width: 46vw;   height: 46vw;   }
.shp--2 .blk { background: #f5cb70;  rotate: -7.2deg;   }

.shp--3 { left: 14vw;     top: 60.5vh;  width: 15.5vw; height: 15.5vw; }
.shp--3 .blk { background: #f4b633;  rotate: 28deg;     }

/* Right cluster */
.shp--4 { right: 18.5vw;  top: -20vh;   width: 18vw;   height: 18vw;   }
.shp--4 .blk { background: #36aa9c;  rotate: 26deg;     }

.shp--5 { right: -16vw;   top: -16vh;   width: 40.5vw; height: 40.5vw; }
.shp--5 .blk { background: #3eb4a7;  rotate: 12.1deg;   }

.shp--6 { right: -13.5vw; top: 7vh;     width: 34.5vw; height: 34.5vw; }
.shp--6 .blk { background: #67c2b8;  rotate: -102.3deg; }

/* Glass shapes */
.shp--7 { left: 6.5vw;    top: 28vh;    width: 30vw;   height: 30vw;   }
.shp--7 .blk { rotate: 56deg;  }
.shp--8 { right: 6vw;     top: -7.5vh;  width: 26vw;   height: 26vw;   }
.shp--8 .blk { rotate: 236deg; }

/* Responsive */
@media (max-width: 1024px) {
  .shp--3, .shp--4 { display: none; }
  .shp--1 { width: 44vw; height: 44vw; }
  .shp--2 { width: 32vw; height: 32vw; }
  .shp--5 { width: 44vw; height: 44vw; }
  .shp--6 { width: 32vw; height: 32vw; }
  .shp--7 { width: 24vw; height: 24vw; }
  .shp--8 { width: 20vw; height: 20vw; }
}
@media (max-width: 768px) {
  .shp--2, .shp--3, .shp--4, .shp--6 { display: none; }
  .shp--1 { width: 68vw; height: 68vw; left: -12vw; }
  .shp--5 { width: 68vw; height: 68vw; right: -12vw; }
  .shp--7 { width: 40vw; height: 40vw; }
  .shp--8 { width: 36vw; height: 36vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------
   HERO
------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6vw;
}
.hero__inner {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
}
.hero__eyebrow {
  font-weight: 400; font-size: clamp(1rem, 1.6vw, 1.4rem);
  color: var(--ink-mute); letter-spacing: 0.02em; margin-bottom: 0.4em;
}
.hero__title {
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1.02;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero__sub {
  margin: 1.4em auto 0; max-width: 34ch;
  font-size: clamp(1rem, 1.5vw, 1.25rem); color: var(--ink-soft); opacity: 0.85;
}
/* single fixed logo — sits in the right margin above everything */
.site-logo-link {
  position: fixed; right: 2vw; bottom: 3.5vh;
  z-index: 6; display: block; line-height: 0;
}
.site-logo {
  height: clamp(24px, 3vw, 36px); width: auto;
}

/* Persistent demo CTA — fixed top-right, above the deck; inherits the dark
   .cta__btn look + ivory ripple-to-white hover. Hidden on mobile (overlaps). */
a.demo-fab {
  position: fixed; top: 2.4vh; right: 2vw; z-index: 7;
  height: 44px; padding: 0 1.5rem;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
@media (max-width: 768px) { a.demo-fab { display: none; } }

/* ------------------------------------------------------------------
   EXPERIENCE — invisible scroll driver (grow + locked journey + exit)
------------------------------------------------------------------ */
.experience { height: 100vh; }   /* post-lock scroll for the exit slide; CTA follows */

/* ------------------------------------------------------------------
   DECK — the chat, fixed over the backdrop. Grows from a bottom tease
   to near-fullscreen (margins keep shapes visible), then slides off.
------------------------------------------------------------------ */
.deck-layer {
  position: fixed; inset: 0; z-index: 5;
  pointer-events: none;
  transform: translateZ(0);        /* stable GPU layer — prevents shapes flashing through */
  isolation: isolate;
}
.deck-layer.is-locked { pointer-events: auto; }

.deck {
  position: absolute;
  top: 4.5vh; bottom: 4.5vh;
  left: max(3.5vw, calc(50% - 600px));
  right: max(3.5vw, calc(50% - 600px));
  display: flex; flex-direction: column; gap: 0;
  padding: clamp(1rem, 2vw, 1.8rem);
  background: var(--dark);
  color: var(--on-dark);
  border-radius: 26px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.32);
  transform-origin: center bottom;
  transform: translateY(86vh) scale(0.9);   /* JS overrides each frame */
  will-change: transform;
  overflow: hidden;
}

/* Deck header — avatar + title, single row, flex 0 so stage can fill below */
.deck__head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 0.9rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.9rem;
}
.deck__head .chat__avatar { width: 40px; height: 40px; }
.deck__head .chat__title  { font-size: 1.25rem; }
/* Change-audience button — top-right of the deck header, shown only during takeover */
.deck__change {
  margin-left: auto; flex: 0 0 auto;
  background: none; cursor: pointer; font: inherit; font-size: 0.8rem;
  color: var(--on-dark-mute);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 999px;
  padding: 0.4rem 1rem; transition: color 0.2s, border-color 0.2s;
}
.deck__change:hover { color: var(--on-dark); border-color: rgba(255,255,255,0.4); }
.deck__change[hidden] { display: none; }


/* RIGHT: content stage */
.stage {
  position: relative; flex: 1 1 auto;
  overflow: hidden;
  color: var(--on-dark);
}

/* Panel stack — container only, panels positioned absolutely by JS */
.panel-stack {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
}

.stage__panel {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
  padding: 1.5rem 0;
  overflow: hidden;
}

/* Prompt bubble — fixed top-right, out of flex flow */
.stage__bubble {
  position: absolute; top: 0; right: 0;
  max-width: 72%;
  background: var(--teal); color: #08110f; font-weight: 600;
  border-radius: 14px; border-bottom-right-radius: 4px;
  padding: 0.7rem 0.95rem; font-size: 0.95rem; line-height: 1.45;
  z-index: 2;
  transform-origin: top right;
}

/* Deck input bar */
.deck__input-wrap {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--dark-2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 0.6rem 0.75rem;
  margin-top: 0.75rem;
}
.deck__input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--on-dark); font-family: inherit; font-size: 1rem;
  font-style: italic; cursor: default; user-select: none; caret-color: transparent;
}
.deck__input::placeholder { color: var(--on-dark-mute); }
.deck__send {
  flex: 0 0 auto; width: 32px; height: 32px; border: none; padding: 0;
  background: transparent;
  cursor: default; pointer-events: none; display: grid; place-items: center;
  opacity: 0.25; transition: opacity 0.25s;
}
.deck__send.is-ready { opacity: 1; }

/* Suggestion chip — shows next prompt in bottom-right of stage */
.deck__suggestion {
  position: absolute; right: 0; bottom: 0.5rem;
  max-width: 260px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-top: 2px solid rgba(60,220,160,0.35);
  border-radius: 16px;
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem; color: var(--on-dark-mute); line-height: 1.4;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.2s;
}
.deck__suggestion.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.deck__suggestion:hover { background: rgba(255,255,255,0.1); color: var(--on-dark); }

/* AI reply section */
.stage__reply {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 0.5rem 0 1rem;
}

/* Streaming response text */
.stage__stream {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--on-dark); line-height: 1.5;
  min-height: 1.2em;
}
/* Word-by-word typewriter — triggered when panel gets .is-active */
.word { opacity: 0; display: inline; transition: opacity 0.2s ease var(--d, 0s); }
.stage__panel.is-active .word { opacity: 1; }

/* Welcome panel overlays the stack; JS controls its opacity */
.stage__welcome {
  position: absolute; inset: 0;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  background: var(--dark); /* blocks panel stack showing through during grow-in */
}
.stage__kicker {
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal-light);
}
.stage__heading { font-weight: 400; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.02; }
.stage__stream strong { font-weight: 600; color: var(--on-dark); }
.stage__lead { font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--on-dark-mute); max-width: 46ch; }
.stage__statement {
  font-weight: 300; font-size: clamp(1.4rem, 2.2vw, 2.2rem); line-height: 1.28;
  max-width: none; color: var(--on-dark);
}

/* stage card grid (benefits / leaders beats — 2-col list style) */
.stage__grid {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(2, 1fr);
}
.stage__grid--5col {
  grid-template-columns: repeat(5, 1fr);
  gap: 0 2rem;
  align-items: start;
}
.scol { display: flex; flex-direction: column; gap: 0.35rem; }
.scol__icon { width: 26px; height: 26px; color: var(--teal-light); margin-bottom: 0.4rem; }
.scol__icon svg { width: 100%; height: 100%; display: block; }
.scol b { font-weight: 600; font-size: clamp(0.88rem, 1vw, 1rem); line-height: 1.25; }
.scol span { font-size: clamp(0.75rem, 0.85vw, 0.85rem); line-height: 1.5; color: var(--on-dark-mute); }
.scard {
  border-left: 2px solid var(--teal);
  padding-left: 1rem;
  display: flex; flex-direction: row; align-items: stretch;
}
.scard__body {
  flex: 1; padding: 0.5rem 0;
  display: flex; flex-direction: column; justify-content: center;
}
.scard b { display: block; font-weight: 600; font-size: clamp(0.9rem, 1.1vw, 1.05rem); margin-bottom: 0.2rem; }
.scard span { font-size: clamp(0.78rem, 0.9vw, 0.88rem); line-height: 1.45; color: var(--on-dark-mute); }

/* stage video (large) */
.stage__video {
  position: relative; width: 100%; max-width: 760px; aspect-ratio: 16/9; border-radius: 16px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 14px, rgba(255,255,255,0.06) 14px 28px),
    linear-gradient(160deg, var(--dark-2), #1f2025);
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.08); color: var(--on-dark-mute);
}
.stage__video .play {
  width: 72px; height: 72px; border-radius: 50%; background: var(--teal);
  display: grid; place-items: center; color: #08110f; font-size: 1.6rem;
}
.stage__video .vlabel {
  position: absolute; bottom: 1rem; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
}

.stage__video--real { background: #000; overflow: hidden; cursor: pointer; }
.stage__video-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage__video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--teal); color: #08110f; font-size: 1.6rem;
  display: grid; place-items: center; pointer-events: none;
  transition: transform 0.2s, background 0.2s;
}
.stage__video--real:hover .stage__video-play { background: var(--teal-light); transform: translate(-50%, -50%) scale(1.08); }

/* video modal */
.vid-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85); display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.vid-modal.is-open { opacity: 1; pointer-events: auto; }
.vid-modal__inner { position: relative; width: min(90vw, 1100px); }
.vid-modal__video { width: 100%; border-radius: 12px; display: block; max-height: 90vh; }
.vid-modal__close {
  position: absolute; top: -44px; right: 0;
  background: transparent; border: none; color: #fff;
  font-size: 2rem; line-height: 1; cursor: pointer; padding: 8px;
  opacity: 0.7; transition: opacity 0.2s;
}
.vid-modal__close:hover { opacity: 1; }

/* welcome panel (step 0) */
.stage__hints { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.stage__hint {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.9rem; color: var(--on-dark);
}

.chat__avatar {
  width: 54px; height: 54px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden; border-radius: 50%;
}
.chat__avatar svg { width: 100%; height: 100%; display: block; }
.chat__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* audience takeover — gradient halo behind the photo while it loads */
.chat__avatar--aud {
  --card-accent: var(--teal);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--card-accent) 50%, #fff), var(--card-accent));
}
.chat__title { font-weight: 300; font-size: 1.5rem; line-height: 1.1; }
.chat__title span { color: var(--on-dark-mute); }
.chat__title strong { font-weight: 700; }

/* ------------------------------------------------------------------
   Step UI (dots + hint + skip) — only visible during the locked journey
------------------------------------------------------------------ */
.stepui {
  position: absolute; inset: 0; z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.stepui--on { opacity: 1; }

/* page dots — fixed to body, visible on hero / journey / CTA */
.pagdots {
  position: fixed; right: 1.6vw; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.55rem;
  z-index: 10; pointer-events: none;
}
.pagdots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(44,45,52,0.25); transition: background 0.3s, transform 0.3s;
}
.pagdots span.on { background: var(--teal); transform: scale(1.25); }

/* scroll arrow — bouncing chevron just above the input field */
.stepui__scrollarrow {
  position: absolute;
  bottom: calc(4.5vh + 70px); /* 4.5vh = deck bottom margin; 70px ≈ input bar height + gap */
  left: 50%;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  animation: arrowBounce 1.6s ease-in-out infinite;
}
.stepui__scrollarrow::before,
.stepui__scrollarrow::after {
  content: '';
  display: block;
  width: 10px; height: 10px;
  border-right: 2px solid var(--teal-light);
  border-bottom: 2px solid var(--teal-light);
  border-radius: 1px;
  transform: rotate(45deg);
}
.stepui__scrollarrow::after { opacity: 0.45; }
.stepui--end .stepui__scrollarrow { opacity: 0; transition: opacity 0.3s; }
@keyframes arrowBounce {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.55; }
  50%       { transform: translateX(-50%) translateY(7px); opacity: 1;    }
}

@media (max-width: 1024px) {
  .stage__grid--5col { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
}
@media (max-width: 680px) {
  .stage__grid    { grid-template-columns: 1fr; }
  .stage__grid--5col { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .stage__vcards  { grid-template-columns: 1fr; }
  .stage__bubble  { max-width: 90%; }
  .pagdots        { display: none; }
}

/* ------------------------------------------------------------------
   CTA  (transparent — the fixed shapes show through)
------------------------------------------------------------------ */
.cta {
  position: relative; min-height: 100svh;
  display: grid; place-items: center; text-align: center; padding: 6vw;
}
.cta__inner { position: relative; z-index: 1; }
.cta__title { font-weight: 300; font-size: clamp(2.2rem, 6vw, 5rem); line-height: 1.02; color: var(--ink); }
.cta__sub { margin: 1.2em auto 2em; max-width: 52ch; font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--ink-soft); }
/* CTA button — dark pill with ivory ripple wipe */
.cta__btn {
  display: inline-flex; align-items: center;
  height: 52px; padding: 0 2.2rem;
  background: var(--ink); color: var(--on-dark);
  border: 2px solid transparent;
  border-radius: 999px; overflow: hidden; position: relative;
  font-family: inherit; font-weight: 700; font-size: clamp(0.9rem, 1.1vw, 1rem);
  text-transform: uppercase; letter-spacing: 0.06em;
  text-decoration: none; white-space: nowrap;
  transition: border-color 0.3s ease;
}
.cta__btn:hover { border-color: var(--ink); }
.cta__btn > div { display: inline-flex; align-items: center; gap: 0.55rem; }
/* calendar icon (from fifty.io) sits after the label, above the ripple */
.cta__btn-icon { position: relative; z-index: 2; display: inline-flex; color: var(--teal-light); flex: 0 0 auto; }
.cta__btn-icon svg { width: 16px; height: 16px; display: block; }
.cta__btn-ripple {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden; border-radius: inherit;
}
.cta__btn-ripple span {
  display: block; width: 100%; height: 100%;
  transform: translateY(101%); background: var(--ivory);
  border-radius: 50% 50% 0 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0, 1), border-radius 0.5s cubic-bezier(0.4, 0, 0, 1);
}
.cta__btn:hover .cta__btn-ripple span { transform: translateY(0); border-radius: 0; }
.cta__btn-title { position: relative; z-index: 2; overflow: hidden; line-height: 1.2; }
.cta__btn-title span { display: block; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.cta__btn-title span::after { content: attr(data-text); position: absolute; top: 110%; left: 0; color: var(--ink); }
.cta__btn:hover .cta__btn-title span { transform: translateY(-110%); }

/* ------------------------------------------------------------------
   Try it now beat — audience selection cards (rendered in the chat feed)
------------------------------------------------------------------ */
.aud-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(3, 1fr);
  /* inset from the panel's overflow:hidden edges so card shadows aren't clipped */
  padding: 6px 16px 20px;
}

.aud-card {
  --card-accent: var(--teal);
  position: relative;
  width: 100%; font-family: inherit; text-align: center; cursor: pointer;
  background: #2b2d34;
  border: 1px solid #404045;
  border-radius: 18px;
  padding: 1.5rem 1.1rem 1.3rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.aud-card:hover,
.aud-card:focus-visible {
  border-color: var(--card-accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.55);
  outline: none;
}
.aud-card__avatar {
  width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  font-family: var(--font-mono); font-weight: 600; font-size: 2rem;
  letter-spacing: 0.04em; color: rgba(0,0,0,0.55);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--card-accent) 45%, #fff), var(--card-accent) 80%);
}
/* Tinted photo fills the circle; gradient stays behind as load fallback */
.aud-card__avatar img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; display: block;
}
.aud-card__name {
  font-weight: 300; font-size: 1.35rem; line-height: 1.1;
  color: #fff; text-align: center;
}

/* Vertical grouping — each column is a vertical (Wellness / Retail / Luxury)
   with its label above and its tribes stacked beneath */
.aud-grid--verticals { align-items: start; }
.aud-vertical { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.aud-vertical__label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal-light);
  padding-left: 0.15rem;
}
.aud-vertical__cards { display: flex; flex-direction: column; gap: 0.85rem; }
/* stacked-in-column cards are a touch more compact than the old flat grid */
.aud-grid--verticals .aud-card { padding: 1.1rem 1rem; gap: 0.7rem; }
.aud-grid--verticals .aud-card__avatar { width: 92px; height: 92px; font-size: 1.5rem; }
.aud-grid--verticals .aud-card__name { font-size: 1.15rem; }

/* Responsive — must come after base rules so the cascade works correctly */
@media (max-width: 760px) {
  .aud-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  /* verticals stack; each vertical's two tribes sit side by side */
  .aud-grid--verticals { grid-template-columns: 1fr; gap: 0.9rem; padding: 4px 10px 16px; }
  .aud-grid--verticals .aud-vertical__cards { flex-direction: row; gap: 0.6rem; }
  .aud-grid--verticals .aud-card { padding: 0.9rem 0.7rem; gap: 0.5rem; }
  .aud-grid--verticals .aud-card__avatar { width: 64px; height: 64px; font-size: 1.2rem; }
  .aud-grid--verticals .aud-card__name { font-size: 0.92rem; }
  .aud-card { padding: 0.9rem 0.8rem 0.85rem; gap: 0.6rem; border-radius: 14px; }
  .aud-card__avatar { width: 72px; height: 72px; font-size: 1.35rem; }
  .aud-card__name { font-size: 1rem; }
}
@media (max-width: 460px) { .aud-grid { grid-template-columns: 1fr; } }

/* per-audience colour theming — sampled from each photo's duotone tint so the
   hover stroke + avatar halo match the image */
.aud-card--urbanites    { --card-accent: #5899da; }  /* blue */
.aud-card--athletes     { --card-accent: #dd55c1; }  /* magenta */
.aud-card--homemakers   { --card-accent: #61d16c; }  /* green */
.aud-card--shoppers     { --card-accent: #e052c2; }  /* hot pink */
.aud-card--fashionistas { --card-accent: #5a98d8; }  /* blue */
.aud-card--trendsetters { --card-accent: #dd5563; }  /* red */

/* hidden states must win over the grid/flex display rules above */
.aud-grid[hidden], .aud-flow[hidden], .aud-intro[hidden] { display: none !important; }

/* slide swap between the audience grid and the question options */
.aud-grid, .aud-flow, .aud-intro { transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.aud-grid.is-off-left, .aud-intro.is-off-left { transform: translateX(-64px); opacity: 0; pointer-events: none; }
.aud-flow.is-off-right { transform: translateX(64px); opacity: 0; pointer-events: none; }

/* question options (revealed after an audience is selected) */
.aud-flow { display: flex; flex-direction: column; gap: 1rem; }

.qcard-grid { display: flex; flex-direction: column; gap: 0.7rem; }
.qcard {
  text-align: left; cursor: pointer; font: inherit; width: 100%;
  display: flex; flex-direction: row; align-items: center; gap: 1.2rem;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 1rem 1.2rem;
  transition: border-color 0.25s, background 0.25s;
}
.qcard:hover { border-color: var(--teal); background: rgba(255,255,255,0.06); }
.qcard b {
  flex: 0 0 130px; color: var(--teal-light);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.qcard span { color: var(--on-dark); font-size: 1.02rem; line-height: 1.5; }
@media (max-width: 560px) {
  .qcard { flex-direction: column; align-items: flex-start; gap: 0.45rem; }
  .qcard b { flex: none; }
}

/* ------------------------------------------------------------------
   Answer chat pane — slides up over the stage; Q + answer + teaser
   stack as chat blocks and auto-scroll (no modal).
------------------------------------------------------------------ */
.chatpane {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column;
  background: var(--dark);
  transform: translateY(100%); opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.35s var(--ease);
  pointer-events: none;
}
.chatpane.is-open { transform: none; opacity: 1; pointer-events: auto; }
.chatpane__head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 0.7rem;
  padding-bottom: 0.85rem; margin-bottom: 0.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chatpane__back {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.85rem;
  color: var(--on-dark-mute); padding: 0.2rem 0.4rem 0.2rem 0; transition: color 0.2s;
}
.chatpane__back:hover { color: var(--on-dark); }
.chatpane__back svg { width: 18px; height: 18px; }
.chatpane__scroll {
  position: relative; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1rem 0.1rem 1.4rem; scroll-behavior: smooth;
  scrollbar-width: none;
}
.chatpane__scroll::-webkit-scrollbar { display: none; }

.chatmsg { opacity: 0; transform: translateY(18px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.chatmsg.is-in { opacity: 1; transform: none; }
.chatmsg--user {
  align-self: flex-end; max-width: 82%;
  background: var(--teal); color: #08110f; font-weight: 600;
  border-radius: 14px; border-bottom-right-radius: 4px;
  padding: 0.7rem 0.95rem; font-size: 0.95rem; line-height: 1.4;
}
.chatmsg--bot { align-self: stretch; }
.answer { font-size: 0.98rem; line-height: 1.55; color: var(--on-dark); }
.answer p { margin: 0 0 0.9em; }
.answer p:last-child { margin-bottom: 0; }
.answer ul { margin: 0 0 0.9em; padding-left: 1.1em; }
.answer li { margin: 0 0 0.5em; }
.answer strong { color: var(--on-dark); font-weight: 600; }
/* word-by-word "typing" stream for the intro; .word base (opacity 0 + delay) lives above */
.answer.is-streaming .word { opacity: 1; }
/* once the intro has streamed, the table writes itself out row-by-row:
   the container fades in fast, then each row reveals on a staggered delay */
.answer__table { opacity: 0; margin-top: 1.5rem; transition: opacity 0.25s var(--ease); }
.answer__table.is-revealed { opacity: 1; }
.answer__table tr { opacity: 0; transition: opacity 0.35s var(--ease); }
.answer__table.is-revealed tr { opacity: 1; }

/* verbatim source table — scrolls horizontally if wide */
.ans-table { overflow-x: auto; margin: 0 0 1.2em; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); scrollbar-width: none; }
.ans-table::-webkit-scrollbar { display: none; }
.ans-table table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.86rem; }
.ans-table th, .ans-table td {
  text-align: left; vertical-align: top; padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.08); line-height: 1.45;
}
.ans-table th { background: rgba(255,255,255,0.05); color: var(--teal-light); font-weight: 600; white-space: nowrap; }
.ans-table tr:last-child td { border-bottom: 0; }
.ans-table td:first-child { color: var(--on-dark); font-weight: 600; }

/* gated teaser — the sales hook. Column: [copy | CTA] row, then a disclaimer note */
.ans-locked {
  margin-top: 1.4em; padding: 1.5rem 1.6rem; border-radius: 14px;
  background: linear-gradient(160deg, rgba(54,170,156,0.10), rgba(255,255,255,0.03));
  border: 1px solid rgba(54,170,156,0.30);
  display: flex; flex-direction: column; gap: 1.3rem;
}
.ans-locked__row { display: flex; align-items: center; gap: 2rem; }
.ans-locked__main { flex: 1 1 auto; min-width: 0; }
.ans-locked__head {
  display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.9rem;
  font-weight: 700; color: var(--on-dark); font-size: 1.15rem;
}
.ans-locked__lock { display: inline-flex; width: 20px; height: 20px; color: var(--teal-light); }
.ans-locked__lock svg { width: 100%; height: 100%; }
.ans-locked__list { margin: 0; padding-left: 1.2em; }
.ans-locked__list li { margin: 0 0 0.45em; color: var(--on-dark); font-size: 1.02rem; line-height: 1.4; }
.ans-locked__list li:last-child { margin-bottom: 0; }
.ans-locked__cta {
  flex: 0 0 auto; height: 50px; align-self: center;
  background: var(--teal); color: var(--on-dark);   /* green default; base .cta__btn keeps the ivory ripple-to-white hover */
}
.ans-locked__cta:hover { border-color: var(--teal); }
/* disclaimer small print, above the teaser box */
.ans-locked__note {
  margin: 0 0 1.3em; padding: 0;
  font-size: 0.8rem; line-height: 1.5; color: var(--on-dark-mute);
}
.ans-locked__note a { color: var(--teal-light); text-decoration: underline; }
.ans-locked__note a:hover { color: var(--on-dark); }
@media (max-width: 620px) {
  .ans-locked__row { flex-direction: column; align-items: stretch; gap: 1.3rem; }
  .ans-locked__cta { width: 100%; }
}

/* ------------------------------------------------------------------
   Video item grid (ask beat — 5 clickable/playable video cards)
------------------------------------------------------------------ */
.stage__vcards {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(2, 1fr);
}

.vcard {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: row; align-items: stretch;
  min-height: 100px;
  transition: border-color 0.3s;
}
.vcard:hover { border-color: rgba(255,255,255,0.22); }
.vcard.is-playing { border-color: var(--teal); }

.vcard__thumb {
  position: relative; flex: 0 0 120px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 12px, rgba(255,255,255,0.055) 12px 24px),
    linear-gradient(160deg, var(--dark-2), #1f2025);
  display: grid; place-items: center;
}

/* Sequence number — inline teal marker before each theme title */
/* plain text prefix, same style as the title so it reads as one heading
   (higher specificity than .vcard__info span so it isn't muted) */
.vcard__info b .vcard__num {
  margin-right: 0.4rem;
  color: inherit;
  font: inherit;   /* match the title font/size/weight, not the muted span */
}

.vcard__video-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.vcard__soon {
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-mute); opacity: 0.7;
}

.vcard__play {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--teal); border: none; cursor: pointer;
  display: grid; place-items: center;
  color: #08110f; font-size: 0.9rem;
  transition: transform 0.2s var(--ease), background 0.2s;
  z-index: 1;
}
.vcard:hover .vcard__play { transform: scale(1.1); }
.vcard.is-playing .vcard__play { background: var(--teal-light); }

.vcard__progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.1);
  display: none;
}
.vcard.is-playing .vcard__progress { display: block; }
.vcard__bar {
  height: 100%; width: 0;
  background: var(--teal);
}
.vcard.is-playing .vcard__bar {
  animation: vplay 15s linear forwards;
}
@keyframes vplay { to { width: 100%; } }

.vcard__info {
  flex: 1; padding: 1.2rem 1.4rem;
  display: flex; flex-direction: column; justify-content: center;
}
.vcard__info b {
  display: block; font-weight: 600;
  font-size: clamp(0.92rem, 1.1vw, 1.05rem); margin-bottom: 0.2rem;
}
.vcard__info span {
  font-size: clamp(0.78rem, 0.9vw, 0.88rem); line-height: 1.45;
  color: var(--on-dark-mute);
}

/* Vcard stagger-in when beat panel becomes active */
@keyframes vcard-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stage__vcards .vcard { opacity: 0; }
.stage__panel.is-active .vcard {
  animation: vcard-in 0.45s var(--ease) forwards;
}
.stage__panel.is-active .vcard:nth-child(1) { animation-delay: 0.05s; }
.stage__panel.is-active .vcard:nth-child(2) { animation-delay: 0.17s; }
.stage__panel.is-active .vcard:nth-child(3) { animation-delay: 0.29s; }
.stage__panel.is-active .vcard:nth-child(4) { animation-delay: 0.41s; }
.stage__panel.is-active .vcard:nth-child(5) { animation-delay: 0.53s; }

/* ------------------------------------------------------------------
   FOOTER
------------------------------------------------------------------ */
.site-footer {
  position: relative; z-index: 1; overflow: hidden;
  background: var(--dark);
  padding: 5rem 6vw 2.5rem;
}

.site-footer__watermark {
  position: absolute; right: -2vw; bottom: -2vh;
  height: 90%; width: auto; opacity: 1;
  pointer-events: none; user-select: none;
}

.site-footer__inner { position: relative; z-index: 1; }

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.4fr;
  gap: 2rem 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-footer__col h2 {
  font-size: 1rem; font-weight: 700;
  color: var(--on-dark); margin-bottom: 1.2rem;
  letter-spacing: 0.01em;
}

.site-footer__col ul { list-style: none; }
.site-footer__col ul li { margin-bottom: 0.55rem; }
.site-footer__col ul a {
  color: var(--teal); text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}
.site-footer__col ul a:hover { color: var(--teal-light); }

.site-footer__social {
  display: flex; gap: 0.75rem;
  margin-bottom: 1.8rem;
}
.site-footer__social li { list-style: none; }
.site-footer__social a { display: block; opacity: 0.85; transition: opacity 0.2s; }
.site-footer__social a:hover { opacity: 1; }
.site-footer__social img { width: 44px; height: 44px; display: block; }

.site-footer__email-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--on-dark);
  margin-bottom: 0.3rem;
}
.site-footer__email {
  color: var(--teal); text-decoration: none; font-size: 0.92rem;
  transition: color 0.2s;
}
.site-footer__email:hover { color: var(--teal-light); }

.site-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  padding-top: 1.5rem;
}

.site-footer__legal {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  list-style: none;
}
.site-footer__legal a {
  color: var(--teal); text-decoration: none; font-size: 0.82rem;
  transition: color 0.2s;
}
.site-footer__legal a:hover { color: var(--teal-light); }

.site-footer__copy {
  font-size: 0.82rem; color: var(--on-dark);
}

@media (max-width: 900px) {
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .site-footer__col--contact { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer__cols { grid-template-columns: 1fr; }
  .site-footer__col--contact { grid-column: auto; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}
