/* =========================================================
   Gold Tropical · WhatsApp Demo — visual system
   Editorial outdoor aesthetic + faithful WhatsApp inside the phone
   ========================================================= */

:root {
  /* page palette */
  --cream:        #f0e9db;
  --cream-deep:   #e6dcc8;
  --ink:          #18160f;
  --ink-soft:     #3a352a;
  --muted:        #786d59;
  --rule:         #d4c9b0;
  --clay:         #b8400f;
  --clay-deep:    #8a2d08;
  --pine:         #1f3a2e;
  --gold:         #b88746;

  /* WhatsApp authentic palette */
  --wa-teal:      #075e54;
  --wa-teal-dk:   #054d44;
  --wa-light:     #25d366;
  --wa-bubble-u:  #d9fdd3;
  --wa-bubble-b:  #ffffff;
  --wa-chat-bg:   #e0d8cb;
  --wa-text:      #111b21;
  --wa-text-mute: #667781;
  --wa-link:      #027eb5;
  --wa-stroke:    rgba(11,20,26,0.08);
  --wa-bubble-sh: 0 1px 0.5px rgba(11,20,26,0.13);

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body:    "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

body {
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(1100px 700px at 12% -10%, rgba(184,64,15,0.06), transparent 60%),
    radial-gradient(900px 700px at 110% 110%, rgba(31,58,46,0.06), transparent 55%),
    url("/assets/grain.svg");
  background-size: auto, auto, 180px 180px;
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* On phones, lock the page so only the chat list scrolls. JS keeps
   --app-height in sync with visualViewport.height so the layout stays
   inside the visible area when the keyboard opens. */
@media (max-width: 979px) {
  html, body {
    height: var(--app-height, 100svh);
    overflow: hidden;
    overscroll-behavior: none;
  }
  body {
    background-attachment: scroll;
    min-height: 0;
  }
}

.hidden { display: none !important; }

/* =========================================================
   LAYOUT — split editorial on desktop, mobile = pure WhatsApp
   ========================================================= */
body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
}

.pitch { display: none; }

@media (min-width: 980px) {
  body {
    grid-template-columns: minmax(420px, 1fr) minmax(420px, 560px);
    gap: 0;
    padding: 0 clamp(28px, 4vw, 64px);
    align-items: stretch;
  }
  .pitch { display: flex; }
}

/* =========================================================
   PITCH (editorial left column)
   ========================================================= */
.pitch {
  flex-direction: column;
  padding: clamp(36px, 5vw, 64px) clamp(20px, 3vw, 56px) 32px 0;
  gap: 28px;
  position: relative;
  min-height: 100dvh;
}

.pitch::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--rule) 20%, var(--rule) 80%, transparent);
}

.pitch__head {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.pitch__logo {
  height: 26px;
  width: auto;
  display: block;
}
.pitch__times {
  font-size: 18px;
  color: var(--muted);
  font-weight: 300;
}
.pitch__partner {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--clay);
}

.pitch__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  background: rgba(255,255,255,0.5);
  padding: 6px 12px;
  border-radius: 999px;
  width: fit-content;
}
.pitch__pulse {
  width: 7px; height: 7px;
  background: var(--clay);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(184,64,15,0.7);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(184,64,15,0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(184,64,15,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,64,15,0); }
}

.pitch__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  font-size: clamp(46px, 5.2vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 6px 0 0;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.pitch__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

.pitch__lede {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0;
}

.pitch__foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
.pitch__stat { display: flex; flex-direction: column; gap: 2px; }
.pitch__stat + .pitch__stat { border-left: 1px solid var(--rule); padding-left: 18px; }
.pitch__stat-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
}
.pitch__stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* =========================================================
   STAGE (phone container)
   ========================================================= */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: clamp(20px, 4vh, 60px) 0;
  min-height: 100dvh;
}
@media (max-width: 639px) {
  .stage {
    padding: 0;
    gap: 0;
    min-height: 0;
    height: 100%;
    justify-content: stretch;
  }
}
.stage__caption {
  display: none;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
  text-align: center;
  line-height: 1.4;
}
@media (min-width: 980px) {
  .stage__caption { display: block; }
}

/* =========================================================
   PHONE — realistic device frame (desktop), no frame on mobile
   ========================================================= */
.phone {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: 100%;
}

.phone__bezel {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}
.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--wa-chat-bg);
}
.phone__notch,
.phone__home,
.phone__shadow { display: none; }

@media (min-width: 640px) {
  .phone {
    width: 392px;
    height: min(820px, calc(100dvh - 80px));
    max-width: 100%;
  }
  .phone__bezel {
    background: linear-gradient(180deg, #2c2a26 0%, #0a0a08 50%, #1a1814 100%);
    border-radius: 56px;
    padding: 14px;
    box-shadow:
      inset 0 0 0 1.5px rgba(255,255,255,0.06),
      inset 0 0 0 2px rgba(0,0,0,0.5),
      inset 0 0 30px rgba(0,0,0,0.4),
      0 1px 0 rgba(255,255,255,0.04);
  }
  .phone__screen {
    border-radius: 42px;
    overflow: hidden;
    height: 100%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.7);
  }
  .phone__notch {
    display: block;
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 28px;
    background: #000;
    border-radius: 16px;
    z-index: 6;
    box-shadow:
      inset 0 -1px 1px rgba(255,255,255,0.04),
      0 1px 3px rgba(0,0,0,0.5);
  }
  .phone__home { display: none; }
  .phone__shadow {
    display: block;
    position: absolute;
    inset: auto 8% -36px 8%;
    height: 60px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, transparent 70%);
    filter: blur(10px);
    z-index: -1;
  }
}

/* =========================================================
   STATUS BAR (inside the screen)
   ========================================================= */
.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--wa-text);
  background: var(--wa-teal);
  color: #fff;
  letter-spacing: 0.02em;
}
.statusbar__time { font-feature-settings: "tnum"; }
.statusbar__cluster { display: flex; align-items: center; gap: 6px; }
.statusbar__icon { width: 16px; height: 11px; fill: currentColor; }
.statusbar__battery {
  position: relative;
  width: 24px;
  height: 11px;
  border: 1.2px solid currentColor;
  border-radius: 3px;
  padding: 1px;
}
.statusbar__battery::after {
  content: "";
  position: absolute;
  top: 3px; right: -3px;
  width: 2px; height: 5px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
}
.statusbar__battery-level {
  display: block;
  width: 78%;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
}

/* Hide the fake status bar on real mobile — the device already has its own.
   It re-appears inside the phone bezel on tablet/desktop where the aesthetic matters. */
@media (max-width: 639px) {
  .statusbar { display: none; }
}

@media (min-width: 640px) {
  .statusbar { padding-top: 18px; }
}

/* =========================================================
   WHATSAPP HEADER
   ========================================================= */
.wa-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 10px;
  background: var(--wa-teal);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  z-index: 4;
  position: relative;
}
@media (min-width: 640px) {
  .wa-header { padding-top: 8px; }
}
.wa-header__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  opacity: 0.85;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.wa-header__icon svg { width: 22px; height: 22px; }
.wa-header__icon:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.wa-header__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.wa-header__info { flex: 1; min-width: 0; line-height: 1.2; }
.wa-header__name {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.wa-header__status {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px;
  opacity: 0.78;
}
.wa-header__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--wa-light);
  box-shadow: 0 0 6px rgba(37,211,102,0.6);
}

/* =========================================================
   CHAT AREA
   ========================================================= */
.wa-chat {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 8px 12px;
  background-color: var(--wa-chat-bg);
  background-image: url("/assets/doodle-bg.svg");
  background-size: 220px 220px;
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scroll-behavior: smooth;
}
.wa-chat::-webkit-scrollbar { width: 6px; }
.wa-chat::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

/* date pill (optional, can be injected by JS) */
.date-pill {
  align-self: center;
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(225, 245, 254, 0.92);
  color: var(--wa-text-mute);
  font-weight: 500;
  box-shadow: var(--wa-bubble-sh);
  margin: 8px 0;
}

/* =========================================================
   BUBBLES (faithful WhatsApp)
   ========================================================= */
.bubble-row {
  display: flex;
  width: 100%;
  padding: 0 4px;
}
.bubble-row.user { justify-content: flex-end; }
.bubble-row.bot  { justify-content: flex-start; }

.bubble {
  position: relative;
  /* fit-content so short text wraps tight like real WhatsApp, instead of
     stretching to fill max-width. The voice/card variants below control min sizing. */
  width: fit-content;
  max-width: min(75%, 420px);
  font-size: 14.2px;
  line-height: 1.4;
  color: var(--wa-text);
  padding: 6px 9px 8px 10px;
  margin: 1px 0;
  border-radius: 7.5px;
  box-shadow: var(--wa-bubble-sh);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  animation: bubblePop 0.16s ease-out;
}
/* Audio bubbles: bubble apenas más alto que el botón de play.
   Padding 1px → total bubble height ≈ 36px (34px botón + 2px de aire).
   El timestamp `.meta` se oculta en burbujas de audio — es redundante con el
   orden de mensajes y agregaba ~13px de altura que no necesitamos.

   Usamos `.bubble-voice` (clase agregada desde JS en `appendBubble`) en vez
   de `.bubble:has(.voice)` porque el selector :has() no funciona en algunos
   browsers (Safari viejo). Esta es la versión compatible. */
/* Bubble compacto: botón 32px + onda + duración en la primera línea,
   timestamp (HH:MM) + checks azules en la segunda línea (esquina inferior
   derecha). Total ~50px de alto, como WhatsApp real.

   CRÍTICO: `white-space: normal` revierte el `pre-wrap` del .bubble base.
   Sin esto, los `\n` y espacios del template de `renderVoiceBubble` se
   renderizan como líneas vacías visibles (~20px cada una) y el bubble crece
   sin control. */
.bubble.bubble-voice {
  padding: 3px 8px 2px 4px;
  white-space: normal;
  line-height: 1;
}
.bubble.bubble-voice .voice__play {
  width: 32px; height: 32px;
}
.bubble.bubble-voice .voice__play svg {
  width: 14px; height: 14px;
}
.bubble.bubble-voice .voice__wave {
  height: 18px;
}
/* Timestamp + checks: alineado derecha debajo del audio. Sin margen top
   (no necesita aire extra — el padding del bubble ya lo da). */
.bubble.bubble-voice .meta {
  display: flex;
  justify-content: flex-end;
  margin: 1px 0 0 0;
  float: none;
  line-height: 1;
}
/* Bubbles with product links keep regular text bubble sizing. */
@keyframes bubblePop {
  from { opacity: 0; transform: translateY(4px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.bubble strong { font-weight: 600; }
.bubble em     { font-style: italic; }
.bubble a      { color: var(--wa-link); text-decoration: underline; }
.bubble a:hover { opacity: 0.8; }

/* tail (the little nipple of the bubble) */
.bubble::before {
  content: "";
  position: absolute;
  top: 0;
  width: 8px; height: 13px;
  background-repeat: no-repeat;
  background-size: 8px 13px;
}
.bubble-bot {
  background: var(--wa-bubble-b);
  border-top-left-radius: 0;
}
.bubble-bot::before {
  left: -8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'><path d='M8 0 L0 0 L8 13 Z' fill='%23ffffff'/></svg>");
}
.bubble-user {
  background: var(--wa-bubble-u);
  border-top-right-radius: 0;
}
.bubble-user::before {
  right: -8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'><path d='M0 0 L8 0 L0 13 Z' fill='%23d9fdd3'/></svg>");
}

.bubble .meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  float: right;
  margin: 6px 0 -4px 8px;
  font-size: 11px;
  color: var(--wa-text-mute);
  user-select: none;
}
.bubble .meta svg { width: 16px; height: 11px; color: var(--wa-link); }

/* typing indicator */
.typing { padding: 12px 14px !important; }
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.typing-dots span {
  width: 7px; height: 7px;
  background: #9aa0a6;
  border-radius: 50%;
  animation: bounceDot 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.30s; }
@keyframes bounceDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* =========================================================
   CUSTOM AUDIO PLAYER (WhatsApp voice-note look, single-line)
   Bubble lands at ~42-46px tall — play button hugged by wave + duration
   on the same row, no stacking.
   ========================================================= */
.voice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  min-width: 230px;
  max-width: 280px;
}
.voice__play {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--wa-teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.12s ease;
}
.voice__play:hover { transform: scale(1.04); }
.voice__play svg { width: 16px; height: 16px; fill: currentColor; }
.voice__wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  min-width: 0;
}
.voice__wave span {
  display: block;
  width: 3px;
  background: #b6b6b6;
  border-radius: 1.5px;
  transition: background 0.06s linear;
}
.voice__wave span.played { background: var(--wa-teal); }
.voice__time {
  font-size: 11px;
  color: var(--wa-text-mute);
  font-feature-settings: "tnum";
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.voice__transcript {
  margin-top: 4px;
  font-size: 12px;
  color: var(--wa-text-mute);
  font-style: italic;
  line-height: 1.35;
  border-left: 2px solid rgba(0,0,0,0.08);
  padding-left: 8px;
}


/* =========================================================
   INPUT BAR
   ========================================================= */
.wa-input {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: #f0f2f5;
  border-top: 1px solid rgba(0,0,0,0.04);
}
@media (min-width: 640px) {
  .wa-input { padding-bottom: 8px; }
}
.wa-input__icon {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--wa-text-mute);
  border-radius: 50%;
  flex-shrink: 0;
}
.wa-input__icon svg { width: 24px; height: 24px; }
.wa-input textarea {
  flex: 1;
  resize: none;
  border: 0;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  padding: 9px 14px;
  border-radius: 18px;
  background: #fff;
  color: var(--wa-text);
  max-height: 112px;
  line-height: 1.35;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}
.wa-input textarea::placeholder { color: #98a2a8; }

.wa-input__send,
.wa-input__mic {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--wa-teal);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  color: #fff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background 0.15s ease;
}
.wa-input__send svg,
.wa-input__mic  svg { width: 22px; height: 22px; }
.wa-input__send:hover,
.wa-input__mic:hover { transform: scale(1.04); }

.wa-input__mic.is-recording {
  background: #d92d20;
  animation: micPulse 1.2s infinite;
}
.wa-input__mic.is-recording svg { color: #fff; }
@keyframes micPulse {
  0%,100% { box-shadow: 0 0 0 0   rgba(217,45,32,0.55); }
  50%     { box-shadow: 0 0 0 10px rgba(217,45,32,0);   }
}

/* =========================================================
   RECORDING BAR + LOCK HINT (press-and-hold UX)
   ========================================================= */
.wa-input { position: relative; }

/* While recording, hide the regular input bits (textarea, emoji, send). */
.wa-input.is-recording .wa-input__icon,
.wa-input.is-recording textarea,
.wa-input.is-recording .wa-input__send { visibility: hidden; }

.wa-rec {
  position: absolute;
  inset: 0 56px 0 8px; /* leave space for the mic on the right */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #f0f2f5;
  border-radius: 22px;
  font-size: 14px;
  color: #1f2a30;
  user-select: none;
  pointer-events: none; /* default; we enable on individual buttons in locked state */
}
.wa-rec[hidden] { display: none; }
.wa-rec__trash {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  display: grid; place-items: center;
  color: #6b7a82;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, color 0.15s, background 0.15s;
}
.wa-rec.is-canceling .wa-rec__trash {
  color: #d92d20;
  transform: scale(1.25);
  background: rgba(217, 45, 32, 0.12);
}
.wa-rec__trash svg { width: 20px; height: 20px; }
.wa-rec__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d92d20;
  animation: recDotPulse 1s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes recDotPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
.wa-rec__time {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 14px;
  color: #1f2a30;
  min-width: 36px;
}
.wa-rec__hint {
  margin-left: auto;
  font-size: 12px;
  color: #6b7a82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s, transform 0.15s;
}
.wa-rec.is-canceling .wa-rec__hint { color: #d92d20; font-weight: 500; }
.wa-rec.is-locked .wa-rec__hint { display: none; }
.wa-rec__send {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--wa-teal);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  margin-left: auto;
}
.wa-rec__send[hidden] { display: none; }
.wa-rec__send svg { width: 18px; height: 18px; }

/* Lock hint chip — floats above the mic button. */
.wa-lock-hint {
  position: absolute;
  right: 14px;
  bottom: 58px; /* sits above the mic button */
  width: 36px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 6px;
  gap: 6px;
  color: #6b7a82;
  pointer-events: none;
  z-index: 5;
  transition: transform 0.12s, color 0.12s, background 0.12s;
}
.wa-lock-hint[hidden] { display: none; }
.wa-lock-hint svg { width: 18px; height: 18px; }
.wa-lock-hint .arrow { animation: lockArrow 1.2s ease-in-out infinite; }
@keyframes lockArrow {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(-3px); opacity: 1; }
}
/* When the swipe is close to the lock threshold, highlight. */
.wa-lock-hint.is-locking {
  color: var(--wa-teal);
  background: #d9fdd3;
  transform: translateY(-4px) scale(1.05);
}
.wa-lock-hint.is-locking .arrow { animation: none; opacity: 1; }

/* Toast (small ephemeral message). */
.wa-rec-toast {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(31, 42, 48, 0.92);
  color: #fff;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
  animation: toastIn 0.2s ease-out;
}
.wa-rec-toast[hidden] { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================================
   MENU DROPDOWN
   ========================================================= */
.menu {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 248px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px -8px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.1);
  padding: 10px 8px;
  z-index: 50;
  font-size: 14px;
  border: 1px solid rgba(0,0,0,0.05);
}
@media (min-width: 640px) {
  .menu { left: auto; transform: none; }
}
.menu__title {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
  padding: 4px 12px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 6px;
}
.menu__item,
.menu__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  width: 100%;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease;
}
.menu__item:hover,
.menu__toggle:hover { background: rgba(0,0,0,0.04); }
.menu__icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.menu__toggle { justify-content: space-between; }
.menu__toggle > span { display: inline-flex; align-items: center; gap: 10px; flex: 1; }
.menu__toggle input { display: none; }
.menu__switch {
  width: 32px; height: 18px;
  background: #d4cfc1;
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.18s ease;
}
.menu__switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.menu__toggle input:checked + .menu__switch { background: var(--wa-teal); }
.menu__toggle input:checked + .menu__switch::after { transform: translateX(14px); }

/* =========================================================
   ABOUT MODAL
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 12, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fadeBg 0.2s ease-out;
}
@keyframes fadeBg { from { opacity: 0; } to { opacity: 1; } }
.modal__card {
  max-width: 380px;
  width: 100%;
  background: var(--cream);
  border-radius: 18px;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,0.4);
  border: 1px solid var(--rule);
  position: relative;
  animation: rise 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal__logo { height: 56px; margin: 4px auto 18px; display: block; }
.modal__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
}
.modal__body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.modal__meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 18px;
}
.modal__meta strong { color: var(--clay); font-weight: 700; }
.modal__close {
  width: 100%;
  background: var(--ink);
  color: var(--cream);
  padding: 12px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background 0.15s ease;
}
.modal__close:hover { background: var(--clay-deep); }
.modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal__form input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}
.modal__form input[type="text"]:focus {
  border-color: var(--clay);
}

/* =========================================================
   PAGE LOAD STAGGER
   ========================================================= */
.pitch > *           { animation: fadeUp 0.6s ease-out both; }
.pitch__head         { animation-delay: 0.05s; }
.pitch__eyebrow      { animation-delay: 0.12s; }
.pitch__title        { animation-delay: 0.18s; }
.pitch__lede         { animation-delay: 0.28s; }
.pitch__foot         { animation-delay: 0.36s; }

.stage               { animation: fadeIn 0.7s 0.2s ease-out both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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