/* SpeakMind — extra section styles: marquee, speed race, languages */

/* ---- hero speed stat strip (talk vs type, quantified up front) ---- */
.hstats { padding: 6px 0 18px; }
.hstats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hstat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 24px;
  box-shadow: 0 14px 36px -22px rgba(33, 26, 20, .4);
}
.hstat.dim { background: var(--bg2); box-shadow: none; }
.hstat.hot { background: var(--accent-soft); border-color: var(--accent-line); }
.hs-lab { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.hstat.hot .hs-lab { color: var(--accent-deep); }
.hs-big { font-size: clamp(34px, 4vw, 46px); font-weight: 700; letter-spacing: -.02em; line-height: 1; display: flex; align-items: baseline; gap: 6px; color: var(--text); }
.hstat.dim .hs-big { color: var(--text-dim); }
.hstat.hot .hs-big { color: var(--accent); }
.hs-big .u { font-size: 15px; font-weight: 600; color: var(--text-faint); letter-spacing: 0; }
.hstats-foot { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--text-faint); }
@media (max-width: 760px) { .hstats-grid { grid-template-columns: 1fr; } }

/* ---- big chapter dividers (group the feature story) ---- */
.chapter { padding: 78px 0 6px; text-align: center; }
.chapter-word { font-size: clamp(52px, 9vw, 112px); font-weight: 700; letter-spacing: -.03em; line-height: .95; color: var(--text); }
.chapter-sub { margin-top: 14px; font-size: clamp(15px, 1.5vw, 17px); color: var(--text-faint); }

/* ===== Variant B: living glass — drifting color blobs + frosted panels ===== */
/* A drifting, blurred aurora fixed behind everything; the white page lets it
   read as soft color in the gaps, and the glass panels float over it. */
body[data-variant="b"] { background: #fff; }
body[data-variant="b"] .hero-stage .aurora { display: none; } /* replaced by the global bg */
body[data-variant="b"]::before,
body[data-variant="b"]::after {
  content: ""; position: fixed; inset: -25%;
  z-index: -1; pointer-events: none;
  filter: blur(72px) saturate(1.1);
  will-change: transform;
}
/* faint color wash, kept to the center column */
body[data-variant="b"]::before {
  background:
    radial-gradient(40% 46% at 50% 40%, rgba(217, 72, 31, 0.09), transparent 70%),
    radial-gradient(32% 38% at 50% 74%, rgba(255, 176, 87, 0.07), transparent 70%);
  animation: bdrift1 32s ease-in-out infinite alternate;
}
body[data-variant="b"]::after { content: none; }

/* on-theme flowing sound waves (the SpeakMind motif) — center band only,
   faded out left/right so it never sits behind the side text. */
.bwave {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  display: grid; place-items: center;
  opacity: 0.14; /* static fallback; the breathe animation overrides it */
  animation: bwbreathe 9s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(58% 58% at 50% 50%, #000 52%, transparent 100%);
  mask-image: radial-gradient(58% 58% at 50% 50%, #000 52%, transparent 100%);
}
.bw-bars {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  width: min(680px, 56vw); height: 44vh;
  animation: bwfloat 7s ease-in-out infinite alternate;
}
.bw-bars i {
  flex: 1 1 0; max-width: 5px; height: 100%;
  border-radius: 999px;
  background: linear-gradient(var(--accent), var(--accent-deep));
  opacity: 0.30;
  transform: scaleY(0.1); transform-origin: center;
  animation-name: bwpulse;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
@keyframes bwpulse { to { transform: scaleY(var(--peak)); } }
@keyframes bwfloat { from { transform: translateY(-2.5%); } to { transform: translateY(2.5%); } }
@keyframes bwbreathe { 0%, 100% { opacity: 0.05; } 50% { opacity: 0.30; } }
@media (prefers-reduced-motion: reduce) {
  .bwave, .bw-bars, .bw-bars i { animation: none; }
}
@keyframes bdrift1 {
  from { transform: translate3d(-4%, -3%, 0) scale(1); }
  to   { transform: translate3d(5%, 4%, 0) scale(1.16); }
}
@keyframes bdrift2 {
  from { transform: translate3d(4%, 3%, 0) scale(1.1); }
  to   { transform: translate3d(-5%, -4%, 0) scale(1); }
}

/* frosted-glass panels floating over the drift */
body[data-variant="b"] .nav.scrolled {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
body[data-variant="b"] .ba-cards {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-color: rgba(255, 255, 255, 0.75);
}
body[data-variant="b"] .ba-card { background: rgba(255, 255, 255, 0.85); }
body[data-variant="b"] .ba-card.raw { background: rgba(255, 255, 255, 0.72); }
body[data-variant="b"] .ba-card.out { background: rgba(255, 255, 255, 0.95); }
body[data-variant="b"] .hstat {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
body[data-variant="b"] .hstat.dim { background: rgba(255, 255, 255, 0.34); }
body[data-variant="b"] .price-card:not(.featured) {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
/* featured card keeps its dark fill (its text is light) — just glass it */
body[data-variant="b"] .price-card.featured {
  background: color-mix(in srgb, var(--text) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
@media (prefers-reduced-motion: reduce) {
  body[data-variant="b"]::before, body[data-variant="b"]::after { animation: none; }
}

/* ---- Variant B: lean "spoken → clean" sequence ---- */
.lean-sec { padding: 30px 0 20px; }
.lean-sec .section-head.center { max-width: 640px; margin: 0 auto 8px; text-align: center; }
.ba-list { display: flex; flex-direction: column; gap: 64px; margin-top: 44px; }
.ba-row {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px; align-items: center;
}
.ba-row.alt { grid-template-columns: 1.15fr 0.85fr; }
.ba-row.alt .ba-copy { order: 2; }
.ba-row.alt .ba-cards { order: 1; }
.ba-copy h3 { font-size: clamp(20px, 2.3vw, 27px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.ba-copy p { margin-top: 12px; font-size: 15px; color: var(--text-dim); line-height: 1.6; max-width: 38ch; }
.ba-cards {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 24px; border-radius: 24px;
  background: var(--bg2); border: 1px solid var(--border2);
  box-shadow: 0 28px 64px -38px rgba(33, 26, 20, .5);
}
.ba-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r-lg); padding: 16px 18px;
  box-shadow: 0 8px 22px -18px rgba(33, 26, 20, .35);
}
.ba-card.raw { background: var(--surface); }
.ba-card.out { border-color: var(--accent-line); box-shadow: 0 12px 28px -16px var(--accent-glow); }
.ba-cap { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.ba-dot { width: 7px; height: 7px; border-radius: 50%; }
.ba-dot.rec { background: var(--text-faint); }
.ba-dot.ok { background: var(--green); }
.ba-card.raw p { font-size: 15px; color: var(--text-dim); line-height: 1.55; }
.ba-clean { font-size: 15.5px; color: var(--text); line-height: 1.6; }
.ba-clean ol { margin: 6px 0 0; padding-left: 20px; }
.ba-clean ol li { margin: 3px 0; }
.ba-arrow { align-self: center; font-size: 11px; color: var(--accent); letter-spacing: .04em; padding: 1px 0; }
@media (max-width: 820px) {
  .ba-row, .ba-row.alt { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .ba-row.alt .ba-copy { order: 1; }
  .ba-row.alt .ba-cards { order: 2; }
}

/* ---- app marquee ---- */
.marq-sec { padding: 30px 0 50px; }
.marq-cap { text-align: center; font-size: 15px; color: var(--text-dim); margin-bottom: 26px; }
.marq-cap strong { color: var(--text); }
.marq { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.marq-row { display: flex; gap: 14px; width: max-content; animation: marquee 38s linear infinite; }
.marq:hover .marq-row { animation-play-state: paused; }
.app-chip {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  font-size: 14px; font-weight: 600; color: var(--text);
  padding: 10px 18px 10px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border2);
  box-shadow: 0 4px 14px -10px rgba(33,26,20,.3);
}
.app-chip .g { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 12px; }

/* ---- speed race ---- */
.speed-sec { padding: 80px 0 70px; }
.race { margin-top: 46px; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 40px); box-shadow: 0 24px 60px -34px rgba(33,26,20,.25); }
.race-row { display: grid; grid-template-columns: 180px 1fr 120px; align-items: center; gap: 20px; padding: 16px 0; }
.race-row + .race-row { border-top: 1px solid var(--hair); }
.race-lab { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.race-lab .ico { font-size: 18px; }
.race-track { height: 16px; border-radius: 999px; background: var(--surface2); overflow: hidden; position: relative; }
.race-fill { height: 100%; border-radius: 999px; width: 0; }
.race-fill.talk { background: linear-gradient(90deg, var(--accent), #ff7a4d); }
.race-fill.talk.go { animation: fillTalk 1.5s var(--ease) forwards; }
.race-fill.type { background: var(--text-faint); }
.race-fill.type.go { animation: fillType 1.5s var(--ease) forwards; }
@keyframes fillTalk { to { width: 100%; } }
@keyframes fillType { to { width: 24%; } }
.race-num { text-align: right; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.race-num .u { font-size: 13px; font-weight: 500; color: var(--text-faint); }
.race-foot { margin-top: 18px; font-size: 12px; color: var(--text-faint); text-align: center; }
@media (max-width: 640px) {
  .race-row { grid-template-columns: 1fr 90px; grid-template-areas: "lab num" "track track"; gap: 10px 14px; }
  .race-lab { grid-area: lab; } .race-num { grid-area: num; } .race-track { grid-area: track; }
}

/* ---- languages ---- */
.lang-sec { padding: 70px 0 80px; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .lang-grid { grid-template-columns: 1fr; gap: 40px; } }
.lang-copy h2 { font-size: clamp(28px, 3.8vw, 46px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin: 14px 0 0; text-wrap: balance; }
.lang-copy p { color: var(--text-dim); font-size: 17px; margin-top: 18px; max-width: 46ch; text-wrap: pretty; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.lang-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border2); color: var(--text-dim); }
.lang-chip.live { background: var(--surface); color: var(--text); border-color: var(--accent-line); }
.lang-chip .ld { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.lang-chip .soon { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }

.lang-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px; box-shadow: 0 24px 60px -34px rgba(33,26,20,.28); }
.lc-row { padding: 6px 0; }
.lc-tag { font-size: 10px; letter-spacing: .12em; color: var(--text-faint); display: block; margin-bottom: 8px; }
.lc-row.src p { font-size: 19px; line-height: 1.45; color: var(--text-dim); }
.lc-row.dst p { font-size: 19px; line-height: 1.45; color: var(--text); font-weight: 500; }
.lc-arrow { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.lc-arrow::before, .lc-arrow::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.lc-arrow span { font-family: var(--font-mono); font-size: 11px; color: var(--accent); padding: 5px 12px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft); }
