/* Hallmark · macrostructure: Demo-first centered stack · tone: playful · anchor hue: coral
 * pre-emit critique: P5 H5 E4 S5 R4 V4 · palette + type unchanged from the Workbench build
 * nav: N9 edge-aligned (wordmark + sections hung on the left rail, no centre group,
 *   no hairline bar) · footer: Ft5 statement (one line + one inline row of links)
 * sections: hero → group phone → together (asks, nudges, hands off) → 3-up → flow rail →
 *   channels + Reel → next (calls, accounts; deeper full-bleed band) → integrations row →
 *   pricing → FAQ → closing
 * motion: load reveal → reveal-once → thread playback, three phone stories with a
 *   pause/replay control; hero beat 800ms, walkthroughs 990ms; one tapback pop
 * scheme: light and dark via prefers-color-scheme (tokens.css), phone mock follows iOS dark
 * contrast: pass (40-41) · slop: pass (42-45) · honest: pass (46) · chrome: pass (47)
 * tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50-57)
 * reduced-motion + no-JS fallbacks at foot of file */

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

/* The header is sticky, so a jumped-to heading has to clear it. It stacks
   to two rows below 48rem, which is why the offset is the taller one. */
html {
  scroll-padding-block-start: var(--space-4xl);
}

html[data-dialog-open="true"],
html[data-dialog-open="true"] body {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  color: var(--color-ink);
  background-color: var(--color-paper);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: var(--rule-hair);
  height: var(--rule-hair);
  padding: 0;
  margin: calc(var(--rule-hair) * -1);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration-thickness: var(--rule-hair);
  text-underline-offset: var(--space-2xs);
}

a:not(.button):active {
  opacity: 0.72;
}

a[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button):focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: var(--space-2xs);
}

h1,
h2,
h3,
p,
figure,
ol,
ul {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h1 {
  margin-block-end: var(--space-lg);
  font-size: var(--text-display);
  line-height: 0.98;
}

h2 {
  margin-block-end: var(--space-lg);
  font-size: var(--text-heading);
  line-height: 1.02;
}

h3 {
  margin-block-end: var(--space-md);
  font-size: var(--text-xl);
  line-height: 1.12;
}

.site-frame {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline-start: max(var(--page-gutter), env(safe-area-inset-left));
  padding-inline-end: max(var(--page-gutter), env(safe-area-inset-right));
}

.skip-link {
  position: fixed;
  inset-block-start: var(--space-md);
  inset-inline-start: var(--space-md);
  z-index: var(--z-tooltip);
  min-height: var(--control-height);
  padding: var(--space-sm) var(--space-md);
  color: var(--color-paper-light);
  background-color: var(--color-ink);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.site-header {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-block: var(--space-sm);
}

.wordmark {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  padding-inline: var(--space-lg);
  border: var(--rule-hair) solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-out);
}

.button-compact {
  padding-inline: var(--space-md);
}

.button-primary {
  color: var(--color-accent-ink);
  background-color: var(--color-accent);
  border-color: var(--color-ink);
}

.button-secondary {
  color: var(--color-ink);
  background-color: var(--color-paper-light);
  border-color: var(--color-ink-soft);
}

.button:active {
  transform: translateY(var(--space-3xs));
}

.button[aria-disabled="true"],
.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.button[aria-busy="true"],
.button[data-state="loading"] {
  cursor: progress;
}

.button[data-state="error"] {
  border-style: double;
  text-decoration: underline;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-xl);
  padding-block: var(--space-xl) var(--space-2xl);
}

.hero-lede {
  max-width: 48ch;
  margin-block-end: var(--space-xl);
  color: var(--color-ink-soft);
  font-size: var(--text-md);
  line-height: 1.5;
}

.hero-action {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-xs);
}

.hero-trust,
.conversation-figure figcaption,
.copy-status {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.hero-trust {
  max-width: 48ch;
  margin-block: var(--space-xl) 0;
  padding-block-start: var(--space-md);
  border-block-start: var(--rule-hair) solid var(--color-rule);
}

.conversation-figure {
  min-width: 0;
  margin: 0;
}

.hero-conversation {
  width: min(100%, 36rem);
  justify-self: center;
  opacity: 0;
  transform: translateY(var(--space-xs));
  animation: conversation-in var(--dur-long) var(--ease-out) forwards;
}

@keyframes conversation-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.phone-stage {
  position: relative;
  min-height: clamp(37rem, 165vw, 41rem);
  isolation: isolate;
}

.phone-device {
  position: absolute;
  aspect-ratio: 540 / 1152;
}

.phone-hardware {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  display: block;
  overflow: hidden;
  /* The hardware asset has no alpha channel: it ships a cream background
     around the device. Measured body edges are 2.08% top, 1.48% sides,
     2.52% bottom, so crop just past them or that cream reads as a halo. */
  clip-path: inset(2.2% 1.6% 2.7% round var(--radius-phone-screen));
  pointer-events: none;
}

.phone-hardware img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-screen {
  position: absolute;
  inset-block: 3.2% 3.4%;
  inset-inline: 4.55%;
  z-index: var(--z-raised);
  display: flex;
  overflow: hidden;
  flex-direction: column;
  color: var(--color-phone-ink);
  background-color: var(--color-phone-paper);
  border-radius: var(--radius-phone-screen);
  font-family: var(--font-body);
}

.phone-date {
  margin-block-end: var(--space-sm);
  color: var(--color-phone-muted);
  font-size: var(--text-phone-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.phone-message-list {
  display: grid;
  gap: var(--space-xs);
  padding: 0;
  margin: 0;
  list-style: none;
}

.phone-message {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-2xs);
}

.phone-message-user {
  align-items: flex-end;
}

.phone-bubble {
  max-width: 88%;
  padding: var(--space-xs) var(--space-sm);
  margin: 0;
  border-radius: var(--radius-phone-bubble);
  font-size: var(--text-phone-sm);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.phone-bubble-user {
  color: var(--color-message-user-ink);
  background-color: var(--color-message-user);
  border-end-end-radius: var(--radius-phone-tail);
}

.phone-bubble-kora {
  color: var(--color-phone-ink);
  background-color: var(--color-message-kora);
  border-end-start-radius: var(--radius-phone-tail);
}

.phone-composer {
  display: flex;
  min-height: var(--space-xl);
  align-items: center;
  margin: 0 var(--space-xs) var(--space-sm);
  padding-inline: var(--space-sm);
  color: var(--color-phone-muted);
  background-color: var(--color-phone-header);
  border: var(--rule-hair) solid var(--color-phone-rule);
  border-radius: var(--radius-pill);
  font-size: var(--text-phone-xs);
}

.message-bubble {
  max-width: min(100%, 29ch);
  margin-block-end: 0;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.message-bubble-user {
  color: var(--color-ink);
  background-color: var(--color-peach);
  border-end-end-radius: var(--radius-xs);
}

.message-bubble-kora {
  color: var(--color-ink);
  background-color: var(--color-paper-deep);
  border-end-start-radius: var(--radius-xs);
}

.conversation-figure figcaption {
  max-width: 58ch;
  margin-inline: auto;
  margin-block-start: var(--space-sm);
  margin-block-end: 0;
  text-align: center;
}

.text-link {
  display: inline-flex;
  font-weight: 600;
  min-height: var(--tap-target);
  align-items: center;
  white-space: nowrap;
}

.site-footer {
  padding-block: var(--space-2xl)
    max(var(--space-xl), env(safe-area-inset-bottom));
  border-block-start: var(--rule-strong) solid var(--color-ink);
}

.footer-meta {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-md);
  padding-block-start: var(--space-md);
  border-block-start: var(--rule-hair) solid var(--color-rule);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
}

.footer-links a {
  display: inline-flex;
  min-height: var(--tap-target);
  align-items: center;
  white-space: nowrap;
}

.number-dialog {
  position: fixed;
  inset: 0;
  width: min(38rem, calc(100% - (var(--space-md) * 2)));
  height: fit-content;
  max-height: min(80svh, 42rem);
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  margin: auto;
  overflow: auto;
  color: var(--color-ink);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.number-dialog[open] {
  animation: dialog-in var(--dur-short) var(--ease-out);
}

.number-dialog::backdrop {
  background-color: var(--color-overlay);
  animation: backdrop-in var(--dur-short) var(--ease-out);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dialog-close {
  position: absolute;
  inset-block-start: var(--space-sm);
  inset-inline-end: var(--space-sm);
  display: inline-flex;
  min-width: var(--control-height);
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-sm);
  color: var(--color-ink);
  background-color: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}

.dialog-close:active {
  background-color: var(--color-disabled);
}

.dialog-close:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.number-dialog h2 {
  max-width: 13ch;
  margin-block-end: var(--space-md);
  font-size: var(--text-2xl);
}

.number-dialog [data-number-ready] > p,
.number-dialog [data-number-missing] > p {
  max-width: 48ch;
  margin-block-end: var(--space-xl);
  color: var(--color-ink-soft);
}

.number-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
}

.qr-region {
  display: grid;
  width: 11rem;
  height: 11rem;
  place-items: center;
  color: var(--color-ink);
  background-color: var(--color-paper-deep);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-sm);
}

.qr-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xs);
}

.qr-placeholder {
  max-width: 18ch;
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1.4;
  text-align: center;
}

.number-actions {
  display: flex;
  min-width: 0;
  align-items: stretch;
  flex-direction: column;
  gap: var(--space-sm);
}

.phone-number {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(var(--text-md), 7vw, var(--text-lg));
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.copy-status {
  min-height: 1lh;
  margin-block-end: 0;
}

.clipboard-field {
  position: fixed;
  inset: auto auto 0 0;
  width: var(--rule-hair);
  height: var(--rule-hair);
  opacity: 0;
  pointer-events: none;
}

.legal-main {
  width: min(100%, 48rem);
  padding-block: var(--space-2xl)
    calc(var(--space-2xl) + var(--space-md));
}

.legal-main h1 {
  max-width: 14ch;
}

.legal-updated {
  margin-block-end: var(--space-md);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.legal-lede {
  max-width: 58ch;
  margin-block-end: var(--space-xl);
  color: var(--color-ink-soft);
  font-size: var(--text-md);
}

.legal-section {
  padding-block: var(--space-xl);
  border-block-start: var(--rule-hair) solid var(--color-rule);
}

.legal-section h2 {
  margin-block-end: var(--space-md);
  font-size: var(--text-xl);
}

.legal-section h3 {
  margin-block-start: var(--space-lg);
  font-size: var(--text-md);
}

.legal-section p,
.legal-section li {
  max-width: var(--content-narrow);
  color: var(--color-ink-soft);
}

.legal-section li + li {
  margin-block-start: var(--space-xs);
}

.legal-section code {
  font-family: var(--font-body);
  font-weight: 600;
}

.legal-back {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  margin-block-start: var(--space-xl);
  font-weight: 600;
  white-space: nowrap;
}

.legal-footer {
  padding-block-start: var(--space-xl);
}

@media (max-width: 30rem) {
  :root {
    --text-phone-xs: 0.625rem;
    --text-phone-sm: 0.6875rem;
    --text-phone-base: 0.75rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .button-primary:hover {
    color: var(--color-accent-ink);
    background-color: var(--color-accent-hover);
  }

  .button-secondary:hover {
    color: var(--color-ink);
    background-color: var(--color-paper-deep);
  }

  .dialog-close:hover {
    background-color: var(--color-paper-deep);
  }

  a:hover {
    text-decoration-thickness: var(--rule-strong);
  }

  /* These three set text-decoration: none, so an underline-thickness hover
     is a no-op on them. Give them a real one. */
  .site-nav a:hover,
  .footer-links a:hover,
  .wordmark:hover {
    text-decoration: underline;
    text-decoration-thickness: var(--rule-hair);
    text-underline-offset: var(--space-xs);
  }

  .site-nav a:hover {
    color: var(--color-ink);
  }

  .faq-trigger:hover {
    color: var(--color-ink-soft);
  }

  .button:hover {
    text-decoration: none;
  }
}

@media (min-width: 40rem) {
  .hero-action {
    align-items: center;
    flex-direction: row;
    gap: var(--space-md);
  }

  .message-bubble {
    font-size: var(--text-base);
  }

  .footer-meta {
    align-items: center;
    flex-direction: row;
  }

  .footer-links {
    margin-inline-start: auto;
  }

  .number-dialog {
    padding: var(--space-2xl);
  }

  .number-dialog-grid {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }
}

@media (min-width: 60rem) {
  .site-header {
    min-height: 6rem;
  }

  .site-footer {
    padding-block: var(--space-3xl)
      max(var(--space-xl), env(safe-area-inset-bottom));
  }

  .legal-main {
    padding-block: var(--space-3xl) var(--space-4xl);
  }

  .legal-lede {
    margin-block-end: var(--space-3xl);
  }

  .legal-footer {
    padding-block-start: var(--space-3xl);
  }
}

/* ══════════════════════════════════════════════════════════════════════
 * Motion + hero-story layer.
 * Keeps the warm Kora palette and type exactly as designed; adds one
 * orchestrated motion system (load reveal → scroll reveal-once → thread
 * playback) and the two-scene iPhone hero. All animation is transform/
 * opacity (plus the sanctioned 0fr→1fr grid collapse for the typing
 * indicator), with reduced-motion fallbacks at the foot of this file.
 * ══════════════════════════════════════════════════════════════════════ */

/* ── Soft atmosphere behind the hero ────────────────────────────────── */

/* One accent bloom, scoped to the hero and scrolling with it. A fixed
   two-hue wash behind all ten sections is the aurora-blob tell. */
.hero {
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block-start: calc(var(--space-3xl) * -1);
  inset-inline-end: calc(var(--space-2xl) * -1);
  width: min(20rem, 46vw);
  aspect-ratio: 4 / 3;
  background-image: radial-gradient(
    closest-side,
    var(--color-halo-accent) 0%,
    transparent 72%
  );
  pointer-events: none;
  opacity: 0;
  animation: atmosphere-in 1200ms var(--ease-out) forwards;
}

@keyframes atmosphere-in {
  to {
    opacity: 1;
  }
}

.site-frame {
  position: relative;
  z-index: var(--z-base);
}

/* ── Header: quiet glass once you scroll ────────────────────────────── */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-sticky);
  /* Full-bleed glass: break out of the content frame to the viewport edges,
     then pad back in so the contents stay aligned with the page rail. */
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: max(
    var(--page-gutter),
    calc(50vw - var(--content-max) / 2 + var(--page-gutter))
  );
  transition: background-color var(--dur-short) var(--ease-out);
}

.site-header[data-stuck="true"] {
  background-color: var(--color-glass);
  backdrop-filter: blur(var(--blur-glass)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(130%);
}

/* ── Buttons: hover lift + one sheen sweep ──────────────────────────── */

/* One hover effect per control: the fill shifts. No lift, no sheen sweep. */
.button {
  position: relative;
  transition:
    transform var(--dur-short) var(--ease-out),
    background-color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out);
}

/* ── Second line of the headline, in deep coral ─────────────────────── */

.title-signal {
  /* The headline is two sentences; break between them, never mid-sentence
     after "Kora", which is where the natural wrap landed on desktop. */
  display: block;
  color: var(--color-accent-deep);
}

/* Stagger indices live in data attributes (the CSP forbids inline styles). */
[data-i="0"] {
  --i: 0;
}

[data-i="1"] {
  --i: 1;
}

[data-i="2"] {
  --i: 2;
}

[data-i="3"] {
  --i: 3;
}

[data-i="4"] {
  --i: 4;
}

[data-i="6"] {
  --i: 6;
}

[data-i="5"] {
  --i: 5;
}

[data-m="0"] {
  --m: 0;
}

[data-m="1"] {
  --m: 1;
}

[data-m="2"] {
  --m: 2;
}

[data-m="3"] {
  --m: 3;
}

[data-m="4"] {
  --m: 4;
}

[data-m="5"] {
  --m: 5;
}

[data-m="6"] {
  --m: 6;
}

[data-m="7"] {
  --m: 7;
}

[data-m="8"] {
  --m: 8;
}

.header-sentinel {
  position: absolute;
  inset-block-start: 0;
  width: var(--rule-hair);
  height: var(--rule-hair);
  pointer-events: none;
}

/* ── Reveal system ──────────────────────────────────────────────────── */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
}

[data-reveal].is-revealed {
  animation: reveal-up var(--dur-reveal) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * var(--stagger));
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: none;
  }
}

.hero [data-reveal] {
  animation: reveal-up var(--dur-reveal) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * var(--stagger));
}

/* The notes pop instead of rising. They are small print set beside a large
   object, and repeating the copy's own upward gesture would read as one more
   thing sliding. 0.96 scale-in is the ruleset's entrance recipe, and it is
   the same "lands oversized, settles" language the message bubbles already
   speak. Transform and opacity only, so nothing beside the phone reflows. */
html.js .hero-notes li[data-reveal] {
  opacity: 0;
  transform: translateY(0.5rem) scale(0.96);
}

.hero-notes li[data-reveal] {
  animation: note-pop var(--dur-reveal) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * var(--stagger));
}

@keyframes note-pop {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Section rule that draws itself in as the section reveals. */

/* ── Thread playback ────────────────────────────────────────────────── */

html.js [data-thread] [data-seq] {
  opacity: 0;
  /* Bubbles land a touch oversized and settle to their reading size, so each
     message reads as "popping in" rather than sliding. Transform only, so it
     stays GPU-composited and never reflows the thread. */
  transform: translateY(0.35rem) scale(1.07);
  transform-origin: 0 100%;
}

[data-thread] .phone-message-user {
  transform-origin: 100% 100%;
}

[data-thread].is-played [data-seq] {
  animation: message-in var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--m, 0) * var(--msg-step) + 200ms);
}

@keyframes message-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Typing indicator: appears, dances, collapses via 0fr → 1fr. */
.phone-typing {
  display: none;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-block-start: var(--space-2xs);
}

html.js .phone-typing {
  display: grid;
}

.phone-typing > span {
  display: flex;
  overflow: hidden;
  gap: var(--space-3xs);
  align-items: center;
  align-self: start;
  width: fit-content;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-message-kora);
  border-radius: var(--radius-phone-bubble);
  border-end-start-radius: var(--radius-phone-tail);
}

.phone-typing i {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-phone-muted);
}

[data-thread].is-played .phone-typing {
  animation: typing-slot var(--msg-step) var(--ease-in-out) forwards;
  animation-delay: calc(var(--m, 1) * var(--msg-step) - 700ms);
}

/* Functional loader — the only permitted loop, and only while visible. */
[data-thread].is-played .phone-typing i {
  animation: typing-dot 1000ms var(--ease-in-out) infinite;
}

[data-thread].is-played .phone-typing i:nth-child(2) {
  animation-delay: 140ms;
}

[data-thread].is-played .phone-typing i:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes typing-slot {
  0% {
    grid-template-rows: 0fr;
    opacity: 0;
  }
  22% {
    grid-template-rows: 1fr;
    opacity: 1;
  }
  74% {
    grid-template-rows: 1fr;
    opacity: 1;
  }
  100% {
    grid-template-rows: 0fr;
    opacity: 0;
  }
}

@keyframes typing-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-0.125rem);
  }
}

/* ── Hero phone: iOS-accurate screen, two scenes ────────────────────── */

.phone-stage-solo {
  display: grid;
  min-height: 0;
  place-items: center;
}

.phone-stage.phone-stage-solo {
  min-height: 0;
}

.phone-device-story {
  position: relative;
  inset: auto;
  z-index: var(--z-raised);
  width: min(100%, 22rem);
  container-type: inline-size;
}

.phone-device-story .phone-screen {
  --text-phone-xs: 3.35cqw;
  --text-phone-sm: 3.95cqw;
  --text-phone-base: 4.35cqw;

  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3.4cqw 5.6cqw 1.4cqw;
  color: var(--color-phone-ink);
  font-size: var(--text-phone-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 1.4cqw;
}

.phone-status-icons svg {
  height: 2.9cqw;
  width: auto;
}

.phone-nav {
  display: grid;
  grid-template-columns: 4cqw minmax(0, 1fr) 6cqw;
  align-items: center;
  gap: 2cqw;
  padding: 1.2cqw 4cqw 2.4cqw;
  background-color: var(--color-phone-header);
  border-block-end: var(--rule-hair) solid var(--color-phone-rule);
}

.phone-nav-back {
  display: inline-flex;
  color: var(--color-message-user);
}

.phone-nav-back svg {
  height: 3.6cqw;
  width: auto;
}

.phone-nav-action {
  display: inline-flex;
  justify-content: flex-end;
  color: var(--color-message-user);
}

.phone-nav-action svg {
  height: 3.2cqw;
  width: auto;
}

.phone-nav-identity {
  display: grid;
  justify-items: center;
  gap: 0.8cqw;
  min-width: 0;
}

.phone-nav-identity strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--color-phone-ink);
  font-size: var(--text-phone-xs);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-avatar {
  display: inline-grid;
  width: 7.4cqw;
  aspect-ratio: 1;
  place-items: center;
  color: var(--color-avatar-ink);
  border-radius: var(--radius-pill);
  font-size: 3.4cqw;
  font-weight: 500;
  line-height: 1;
}

.phone-avatar-kora {
  color: var(--color-ink);
  background-image: linear-gradient(
    180deg,
    var(--color-accent-hover),
    var(--color-accent)
  );
}

.phone-scenes {
  display: grid;
  min-height: 0;
}

.phone-scene {
  display: grid;
  grid-area: 1 / 1;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

html.js .phone-scene {
  opacity: 0;
  transform: translateX(9%);
  transition:
    opacity var(--dur-long) var(--ease-out),
    transform var(--dur-long) var(--ease-out);
}

html.js .phone-scene.is-active {
  opacity: 1;
  transform: none;
}

html.js .phone-scene.is-past {
  opacity: 0;
  transform: translateX(-9%);
}

/* Without scripting there is no sequencer: show the payoff scene only. */
html:not(.js) .phone-scene[data-scene="0"] {
  display: none;
}

.phone-thread {
  min-height: 0;
  padding: 3cqw 3.4cqw;
  overflow: hidden;
  align-content: start;
}

/* A thread reads the way a real one does, whatever the section around it
   is doing. The hero centres its copy, and without this the message text
   centres with it, which no messaging app has ever done. Timestamps and
   system notices set their own centre and keep it. */
[data-thread] {
  text-align: start;
}

.phone-thread .phone-date {
  margin-block-end: 3cqw;
}

.phone-date b {
  font-weight: 600;
}

.phone-system {
  margin-block-end: 3cqw;
  color: var(--color-phone-muted);
  font-size: var(--text-phone-xs);
  line-height: 1.3;
  text-align: center;
}

.phone-device-story .phone-message-list {
  gap: 2cqw;
}

.phone-device-story .phone-bubble {
  max-width: 84%;
  padding: 2.2cqw 3.2cqw;
}

.phone-device-story .phone-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 2.4cqw;
  min-height: 0;
  margin: 0 3.4cqw 3.4cqw;
  padding: 2cqw 2.4cqw;
  background-color: transparent;
  border: 0;
}

.phone-composer-plus {
  display: inline-grid;
  width: 6.4cqw;
  aspect-ratio: 1;
  place-items: center;
  color: var(--color-phone-muted);
  background-color: var(--color-message-kora);
  border-radius: var(--radius-pill);
}

.phone-composer-plus svg {
  width: 3cqw;
  height: auto;
}

.phone-composer-field {
  padding: 1.8cqw 3.2cqw;
  color: var(--color-phone-muted);
  border: var(--rule-hair) solid var(--color-phone-rule);
  border-radius: var(--radius-pill);
  font-size: var(--text-phone-xs);
  text-align: start;
}

.phone-composer-send {
  display: inline-grid;
  width: 6.4cqw;
  aspect-ratio: 1;
  place-items: center;
  color: var(--color-message-user-ink);
  background-color: var(--color-message-user);
  border-radius: var(--radius-pill);
}

.phone-composer-send svg {
  width: 3.2cqw;
  height: auto;
}

.phone-device-story .phone-typing > span {
  padding: 2.2cqw 3.2cqw;
}

.phone-device-story .phone-typing i {
  width: 1.5cqw;
  height: 1.5cqw;
}

/* ── Story control: the visitor's handle on a timed sequence ────────── */

/* A hairline pill rather than grey text: the one control under a timed
   demo should look like a control. */
.story-control {
  display: flex;
  width: fit-content;
  min-height: var(--tap-target);
  align-items: center;
  margin-inline: auto;
  padding-inline: var(--space-md);
  margin-block-start: var(--space-xs);
  color: var(--color-ink-soft);
  background: none;
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out);
}

.story-control:active {
  transform: translateY(var(--space-3xs));
}

.story-control:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (hover: hover) and (pointer: fine) {
  .story-control:hover {
    color: var(--color-ink);
    border-color: var(--color-ink);
  }
}

/* A tapback on a group message: the reaction bubble iMessage draws on the
   corner of a message. It rides the thread's own message-in beat, so it
   pops in after the message it answers. */
.phone-device-story .phone-bubble {
  position: relative;
}

.phone-tapback {
  position: absolute;
  inset-block-start: calc(var(--space-sm) * -1);
  inset-inline-end: calc(var(--space-xs) * -1);
  display: inline-grid;
  place-items: center;
  padding: var(--space-3xs) var(--space-2xs);
  background-color: var(--color-phone-header);
  border: var(--rule-strong) solid var(--color-phone-paper);
  border-radius: var(--radius-pill);
  font-size: var(--text-phone-xs);
  line-height: 1;
  transform-origin: 100% 100%;
}

/* The hero story runs a touch quicker than the walkthroughs below it: the
   first screen should have something to read within a second and a half.
   motion.js reads the beat from the story element, so the CSS delays and
   the sequencer stay in step. */
.hero .phone-device-story {
  --msg-step: 800ms;
}

:root:not([lang="en"]) .hero .phone-device-story {
  --msg-step: 880ms;
}

/* Paused: every animation inside the device holds where it is. */
[data-story].is-paused *,
[data-story].is-paused *::before,
[data-story].is-paused *::after {
  animation-play-state: paused;
}

/* ══════════════════════════════════════════════════════════════════════
 * Stage layout — centered spine, wide demo, 3-up, flow, FAQ, closing.
 * Same tokens, same type. Structure borrowed from a demo-first stack:
 * one centered column of copy, then the product at full width.
 * ══════════════════════════════════════════════════════════════════════ */

/* ── Header with section nav ────────────────────────────────────────── */

.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: "mark . theme lang cta";
  align-items: center;
  /* Tight at phone width so wordmark, switch and CTA fit a 288px rail. */
  gap: var(--space-sm);
}

.site-header .wordmark {
  grid-area: mark;
}

/* Below 48rem the sections move to their own scrollable rail under the
   wordmark rather than disappearing: four destinations with no hamburger
   and no sheet is a deleted nav, not a collapsed one. */
.site-nav {
  grid-area: nav;
  display: flex;
  gap: var(--space-md);
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  padding-block-end: var(--space-2xs);
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-header > .button {
  grid-area: cta;
  justify-self: end;
}

.site-nav a {
  display: inline-flex;
  min-height: var(--tap-target);
  align-items: center;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

/* ── Centered hero ──────────────────────────────────────────────────── */

.hero.hero-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: var(--space-xl);
  min-height: 0;
  padding-block: var(--space-lg) var(--space-xl);
  text-align: center;
}

/* Two of the five hero elements come off the centre axis and hang on the
   page rail, so the composition is not one centred stack. */
.hero-stack .eyebrow,
.hero-stack .hero-trust {
  justify-self: start;
  text-align: start;
}

.hero-stack h1 {
  max-width: 15ch;
  margin-block-end: var(--space-lg);
  font-size: clamp(3.2rem, 10.4vw, 5.75rem);
  letter-spacing: -0.04em;
  line-height: 0.94;
  /* Each sentence is its own block; balance keeps "chat." and "one." from
     sitting alone on a line at phone widths. */
  text-wrap: balance;
}

.hero-stack .title-signal {
  text-wrap: balance;
}

.eyebrow {
  display: block;
  max-width: 48ch;
  margin-block-end: var(--space-md);
  padding: 0;
  color: var(--color-muted);
  background: none;
  border: 0;
  font-size: var(--text-xs);
  font-weight: 500;
}

.eyebrow::before {
  content: none;
}

.hero-stack .hero-lede {
  max-width: 45ch;
  margin-inline: auto;
  margin-block-end: var(--space-lg);
  font-size: clamp(1.12rem, 1.02rem + 0.45vw, 1.35rem);
  line-height: 1.5;
}

/* A 117px pill is a small target on a phone. min() against 100% resolves
   against a shrink-to-fit parent, so it collapses to the text width — use a
   flat min-width and let max-width handle the narrow end. */
.hero-stack .hero-action .button {
  min-width: 15rem;
  max-width: 100%;
}

.hero-stack .hero-action {
  align-items: center;
}

.hero-stack .hero-trust {
  max-width: 48ch;
  margin-block: var(--space-md) 0;
  padding-block-start: 0;
  border: 0;
}

/* ── Stage: phone centre, annotations either side ───────────────────── */

/* The hero notes answer the three questions the demo cannot: what you
   install, what the group agrees to, and how you turn it off. They need a
   rail either side of the phone, which only exists from 64rem up, so below
   that the phone stands alone and the answers stay in the FAQ. */
.hero-proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  width: 100%;
}

.hero-notes {
  display: none;
}

@media (min-width: 64rem) {
  /* Columns are sized to the notes and centred as a group rather than each
     rail taking a free 1fr. With 1fr rails the note sat wherever the leftover
     space put it, which on a wide viewport drifted far from the phone; here
     the gap is the actual distance from note to phone, so the notes stay
     attached to the thing they annotate however wide the window gets. */
  .hero-proof {
    /* The centre track is stated, not auto. Under auto it sized to the
       figcaption's max-content (382px against a 272px phone) because the
       figure's own min(100%, 17rem) carries a percentage, which goes
       indefinite during intrinsic sizing and falls back to content width.
       That slack, not the gap, was what pushed the notes away from the
       phone. Stating the track makes the gap the real distance. */
    grid-template-columns: minmax(0, 15rem) 17rem minmax(0, 15rem);
    justify-content: center;
    align-items: start;
    gap: clamp(var(--space-xl), 4vw, var(--space-3xl));
  }

  .hero.hero-stack .hero-conversation {
    width: 100%;
  }

  .hero-notes {
    display: grid;
    gap: var(--space-2xl);
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: start;
  }

  /* Unequal weight, unequal starts. Two notes on one rail and one on the
     other, the single note dropped level with the phone's reply, so the
     stage is not a mirrored pair either side of a centre line. */
  .hero-notes-start {
    padding-block-start: var(--space-2xl);
  }

  .hero-notes-end {
    padding-block-start: var(--space-4xl);
  }

  .hero-note-title {
    margin: 0 0 var(--space-3xs);
    color: var(--color-ink);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
  }

  .hero-notes p:not(.hero-note-title) {
    max-width: 32ch;
    margin: 0;
    color: var(--color-muted);
    font-size: var(--text-2xs);
    line-height: 1.55;
  }
}

/* ── Shared section chrome ──────────────────────────────────────────── */

.section-title {
  max-width: 24ch;
  margin-inline: auto;
  text-align: center;
}

/* Mobile rhythm by role, the desktop tiers one step down. A seam is the sum
   of two paddings, so varying them groups the page into movements: 48px
   holds related sections together, 32px fuses channels and integrations into
   one thought, and 80px opens the approach to the pricing decision. One
   value for all seven read as a template. */
.group-demo {
  padding-block: var(--space-xl) var(--space-lg);
}

.benefits {
  padding-block: var(--space-lg);
}

.flow {
  padding-block: var(--space-lg) var(--space-xl);
}

.channels {
  padding-block: var(--space-lg) var(--space-md);
}

.integrations {
  padding-block: var(--space-md) var(--space-xl);
}

.pricing {
  padding-block: var(--space-xl) var(--space-lg);
}

.faq {
  padding-block: var(--space-lg) var(--space-xl);
}

/* ── Benefits 3-up ──────────────────────────────────────────────────── */

.benefit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  margin-block-start: var(--space-xl);
}

.benefit {
  display: grid;
  gap: var(--space-sm);
  align-content: start;
}

.benefit h3 {
  margin: 0;
  font-size: var(--text-md);
}

.benefit p {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.benefit-snippet {
  display: grid;
  gap: var(--space-xs);
  min-height: 9.5rem;
  align-content: end;
  padding: var(--space-md);
  margin-block-end: var(--space-xs);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
}

.benefit-snippet .message-bubble {
  max-width: 88%;
  margin: 0;
  font-size: var(--text-xs);
}

.benefit-snippet .message-bubble-user {
  justify-self: end;
}

/* Typing dots inside a benefit card: same mechanism as the phone thread,
   wearing the card's bubble colours instead of the iMessage ones. */
.benefit-snippet .phone-typing > span {
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-paper-deep);
  border-radius: var(--radius-md);
  border-end-start-radius: var(--radius-xs);
}

.benefit-snippet .phone-typing i {
  width: var(--space-2xs);
  height: var(--space-2xs);
  background-color: var(--color-muted);
}

/* ── Flow diagram ───────────────────────────────────────────────────── */

.flow-steps {
  position: relative;
  display: grid;
  gap: var(--space-xl);
  padding: 0;
  margin: var(--space-xl) 0 0;
  list-style: none;
}

/* Connector: one dashed segment per gap, vertical while the steps stack
   and horizontal once they sit in a row. */
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-block: var(--control-height) calc(var(--space-xl) * -1);
  inset-inline-start: var(--space-lg);
  width: 0;
  border-inline-start: var(--rule-strong) dashed var(--color-rule-strong);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform var(--dur-reveal) var(--ease-out) 200ms;
}

.flow-steps.is-revealed .flow-step:not(:last-child)::after {
  transform: scaleY(1);
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: var(--control-height) minmax(0, 1fr);
  column-gap: var(--space-md);
  align-items: start;
}

.flow-node {
  position: relative;
  z-index: var(--z-base);
  display: inline-grid;
  place-items: center;
  width: var(--control-height);
  height: var(--control-height);
  color: var(--color-ink);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
}

.flow-node-kora {
  color: var(--color-accent-ink);
  background-color: var(--color-accent);
  border-color: var(--color-ink);
}

.flow-node-you {
  color: var(--color-message-user-ink);
  background-color: var(--color-message-user);
  border-color: transparent;
  font-size: var(--text-xs);
}

.flow-step h3 {
  grid-column: 2;
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-md);
}

.flow-step p {
  grid-column: 2;
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
}

/* ── FAQ accordion ──────────────────────────────────────────────────── */

.faq-list {
  width: min(100%, 48rem);
  margin: var(--space-xl) auto 0;
  border-block-start: var(--rule-hair) solid var(--color-rule);
}

.faq-item {
  border-block-end: var(--rule-hair) solid var(--color-rule);
}

.faq-item h3 {
  margin: 0;
}

.faq-trigger {
  display: flex;
  width: 100%;
  min-height: var(--control-height);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  color: var(--color-ink);
  background: none;
  border: 0;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: start;
  cursor: pointer;
}

.faq-trigger:active {
  transform: translateY(var(--space-3xs));
}

.faq-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.faq-trigger::after {
  content: "";
  flex: 0 0 auto;
  width: var(--space-xs);
  height: var(--space-xs);
  margin-inline-end: var(--space-2xs);
  border-inline-end: var(--rule-strong) solid var(--color-ink);
  border-block-end: var(--rule-strong) solid var(--color-ink);
  transform: translateY(-0.15rem) rotate(45deg);
  transition: transform var(--dur-short) var(--ease-in-out);
}

.faq-trigger[aria-expanded="true"]::after {
  transform: translateY(0.15rem) rotate(-135deg);
}

/* Collapsed only when scripting can expand it again. */
html.js .faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-long) var(--ease-in-out);
}

html.js .faq-panel[data-open="true"] {
  grid-template-rows: 1fr;
}

html.js .faq-panel > div {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s var(--dur-long);
}

/* Matches html.js on the hiding rule above; without it the collapsed rule
   outweighs this one and an open answer stays invisible. */
html.js .faq-panel[data-open="true"] > div {
  visibility: visible;
  transition-delay: 0s;
}

.faq-panel p {
  max-width: 60ch;
  margin: 0 0 var(--space-lg);
  color: var(--color-ink-soft);
  line-height: 1.55;
}

.faq-more {
  width: fit-content;
  margin: var(--space-lg) auto 0;
}

/* ── Shared section lede ────────────────────────────────────────────── */

.section-lede {
  max-width: 52ch;
  margin: var(--space-md) auto 0;
  color: var(--color-ink-soft);
  font-size: var(--text-md);
  line-height: 1.5;
  text-align: center;
}

/* ── Channels: where Kora works ─────────────────────────────────────── */

.channel-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-sm);
  width: min(100%, 34rem);
  margin: var(--space-lg) auto 0;
  padding: 0;
  list-style: none;
}

.channel-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
}

.channel-logo {
  display: inline-flex;
  grid-row: 1 / 3;
}

.channel-logo .brand {
  width: 2.5rem;
  height: 2.5rem;
}

.channel-name {
  align-self: end;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.1;
}

.channel-note {
  align-self: start;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  line-height: 1.35;
}

/* ── Instagram demo: a Reel, then Kora keeps it ─────────────────────── */

.insta-demo {
  width: min(100%, 21rem);
  margin-inline: auto;
  margin-block-start: var(--space-xl);
}

/* The Reel fills the screen below the status bar (Reels have no nav bar). */
.insta-reel {
  grid-template-rows: minmax(0, 1fr);
}

.reel {
  position: relative;
  height: 100%;
  overflow: hidden;
  color: #fff;
}

/* Bottom scrim so the caption stays legible over any frame of the clip. */
.reel::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(20, 12, 18, 0.55), transparent);
  pointer-events: none;
}

.reel-rail,
.reel-caption,
.reel-sheet {
  z-index: 1;
}

.reel-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Warm fallback behind the poster while the clip loads. */
  background: linear-gradient(158deg, #f0a25a 0%, #c8434b 52%, #6c2c5b 100%);
}

.reel-rail {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 3.2cqw;
  transform: translateY(-42%);
  display: grid;
  gap: 5cqw;
}

.reel-act {
  display: inline-flex;
}

.reel-act svg {
  width: 6.4cqw;
  height: 6.4cqw;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.reel-act-share {
  color: #fff;
}

.reel-caption {
  position: absolute;
  inset-block-end: 4cqw;
  inset-inline: 4cqw 16cqw;
  display: grid;
  gap: 1cqw;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.reel-user {
  font-size: 3.8cqw;
  font-weight: 600;
}

.reel-text {
  font-size: 3.5cqw;
  line-height: 1.3;
  opacity: 0.95;
}

/* The iOS-style share sheet that slides up when you send the Reel to Kora. */
.reel-sheet {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: grid;
  justify-items: start;
  gap: 3cqw;
  padding: 2.4cqw 4.4cqw 5cqw;
  color: var(--color-phone-ink);
  background-color: var(--color-phone-paper);
  border-start-start-radius: 5cqw;
  border-start-end-radius: 5cqw;
  box-shadow: 0 -1cqw 6cqw rgba(20, 12, 18, 0.22);
  /* Held below the frame until the send gesture. */
  transform: translateY(112%);
}

.insta-reel.is-active .reel-sheet {
  animation: reel-sheet-up var(--dur-long) var(--ease-out) 1.2s both;
}

@keyframes reel-sheet-up {
  to {
    transform: none;
  }
}

.reel-sheet-grip {
  justify-self: center;
  width: 9cqw;
  height: 1.1cqw;
  background-color: var(--color-phone-rule);
  border-radius: var(--radius-pill);
}

.reel-sheet-title {
  margin: 0;
  font-size: 3.8cqw;
  font-weight: 600;
}

.reel-sheet-people {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.reel-person {
  display: grid;
  justify-items: center;
  gap: 1.4cqw;
}

.reel-person-avatar {
  display: grid;
  place-items: center;
  width: 13cqw;
  height: 13cqw;
  color: #fff;
  background-color: var(--color-phone-muted);
  border-radius: var(--radius-pill);
  font-size: 4.6cqw;
  font-weight: 600;
}

.reel-person-kora {
  background-color: var(--color-accent);
}

.reel-person-m {
  background-color: #8a6d9c;
}

.reel-person-j {
  background-color: #4f7a94;
}

.reel-person-f {
  background-color: #b0743f;
}

.reel-person-name {
  font-size: 3cqw;
  color: var(--color-phone-muted);
}

/* The selected recipient: a ring on the avatar, name in the phone blue. */
.reel-person.is-selected .reel-person-avatar {
  box-shadow: 0 0 0 1cqw var(--color-message-user);
}

.reel-person.is-selected .reel-person-name {
  color: var(--color-message-user);
  font-weight: 600;
}

.reel-sheet-send {
  justify-self: stretch;
  padding: 2.6cqw;
  color: #fff;
  background-color: var(--color-message-user);
  border-radius: var(--radius-pill);
  font-size: 3.6cqw;
  font-weight: 600;
  text-align: center;
}

/* The saved Reel, quoted as a card in Kora's thread. */
.reel-quote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2.6cqw;
  max-width: 84%;
  padding: 2.2cqw;
  background-color: var(--color-message-kora);
  border-radius: var(--radius-phone-bubble);
  border-end-start-radius: var(--radius-phone-tail);
}

.reel-quote-thumb {
  width: 10cqw;
  height: 13cqw;
  background-color: #6c2c5b;
  background-image: url(/assets/kora-reel-poster.jpg);
  background-size: cover;
  background-position: center;
  border-radius: 1.6cqw;
}

.reel-quote-meta {
  display: grid;
  gap: 0.6cqw;
  min-width: 0;
}

.reel-quote-meta b {
  color: var(--color-phone-ink);
  font-size: 3.5cqw;
  font-weight: 600;
}

.reel-quote-meta i {
  overflow: hidden;
  color: var(--color-phone-muted);
  font-size: 3.35cqw;
  font-style: normal;
  line-height: 1.3;
}

/* ── Integrations ───────────────────────────────────────────────────── */

.integration-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: var(--space-xs) var(--space-sm);
  width: min(100%, 46rem);
  padding: 0;
  margin: var(--space-lg) auto 0;
  list-style: none;
}

/* Each service is a chip: brand logo + name. The logo carries the identity
   the plain text was missing; the chip keeps them tidy in a wrapping row. */
.integration {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xs);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 600;
}

.brand-logo {
  display: inline-flex;
  flex: 0 0 auto;
}

.brand {
  width: 1.65rem;
  height: 1.65rem;
}

.integration .integration-name {
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  white-space: nowrap;
}

.integrations-foot,
.pricing-foot {
  max-width: 54ch;
  margin: var(--space-lg) auto 0;
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
  text-align: center;
}

/* ── Pricing ────────────────────────────────────────────────────────── */

.plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
  width: min(100%, 64rem);
  margin: var(--space-xl) auto 0;
}

.plan {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
}

.plan-featured {
  border-color: var(--color-ink);
  box-shadow: var(--shadow-soft);
}

.plan-name {
  margin: 0;
  font-size: var(--text-md);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  margin: 0;
}

.plan-price b {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan-price span {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.plan-note {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.plan-list {
  display: grid;
  gap: var(--space-xs);
  padding: 0;
  margin: var(--space-2xs) 0 var(--space-sm);
  list-style: none;
}

.plan-list li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: var(--space-xs);
  align-items: start;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.plan-list svg {
  margin-block-start: var(--space-3xs);
  color: var(--color-accent);
}

.plan-cta {
  width: 100%;
  margin-block-start: auto;
}

/* ── Group chats: the walkthrough ───────────────────────────────────── */

.group-demo-stage {
  display: grid;
  gap: var(--space-xl);
  width: min(100%, 64rem);
  margin: var(--space-xl) auto 0;
}

.group-demo-phone {
  width: min(100%, 22rem);
  justify-self: center;
}

.group-demo-points {
  display: grid;
  gap: var(--space-lg);
  padding: 0;
  margin: 0;
  list-style: none;
  align-content: center;
}

.group-demo-points h3 {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-md);
}

.group-demo-points p {
  max-width: 48ch;
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* Stacked member avatars, the way a group thread shows its people. */
.phone-avatar-stack {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.phone-avatar-stack .phone-avatar {
  width: 5.6cqw;
  margin-inline-end: -1.6cqw;
  border: 0.5cqw solid var(--color-phone-header);
  font-size: 3.1cqw;
  font-style: normal;
}

.phone-avatar-stack .phone-avatar:last-child {
  margin-inline-end: 0;
}

.phone-avatar-b {
  background-image: linear-gradient(
    180deg,
    var(--color-avatar-b-light),
    var(--color-avatar-b-deep)
  );
}

.phone-avatar-s {
  background-image: linear-gradient(
    180deg,
    var(--color-avatar-s-light),
    var(--color-avatar-s-deep)
  );
}

.phone-avatar-j {
  background-image: linear-gradient(
    180deg,
    var(--color-avatar-j-light),
    var(--color-avatar-j-deep)
  );
}

.phone-avatar-m {
  background-image: linear-gradient(
    180deg,
    var(--color-avatar-m-light),
    var(--color-avatar-m-deep)
  );
}

/* Sender label above a bubble, as a group thread shows it. */
.phone-sender {
  padding-inline-start: 3cqw;
  color: var(--color-phone-muted);
  font-size: var(--text-phone-xs);
  line-height: 1.2;
}

/* ── Closing ────────────────────────────────────────────────────────── */

.closing {
  display: grid;
  justify-items: center;
  gap: var(--space-md);
  padding-block: var(--space-3xl);
  text-align: center;
}

.closing h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
}

.closing p {
  margin: 0 0 var(--space-sm);
  color: var(--color-ink-soft);
  font-size: var(--text-md);
}

/* ── Footer: one statement, one row of links ────────────────────────── */

.footer-statement {
  display: grid;
  gap: var(--space-sm);
  padding-block-end: var(--space-xl);
}

.footer-statement p {
  max-width: 52ch;
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-md);
  line-height: 1.45;
}

.footer-links a {
  color: var(--color-ink);
  font-size: var(--text-sm);
  text-decoration: none;
}

.footer-links a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: var(--rule-strong);
  text-underline-offset: var(--space-xs);
}

.site-footer:not(.legal-footer) .footer-meta {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
}

/* ── Breakpoints ────────────────────────────────────────────────────── */

@media (min-width: 40rem) {
}

@media (min-width: 48rem) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    grid-template-areas: "mark . theme lang cta";
    gap: var(--space-lg);
  }

  .site-nav {
    overflow: visible;
    justify-content: start;
    gap: var(--space-lg);
    padding-block-end: 0;
  }

  /* Mid tier already varies by role so the rhythm is never one value. */
  .group-demo,
  .pricing {
    padding-block: var(--space-2xl) var(--space-xl);
  }

  .benefits,
  .flow {
    padding-block: var(--space-xl);
  }

  /* Channels hands straight into integrations, so it closes tight and keeps
     that seam the narrowest at this tier too. */
  .channels {
    padding-block: var(--space-xl) var(--space-lg);
  }

  .integrations,
  .faq {
    padding-block: var(--space-lg) var(--space-xl);
  }


  .benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xl);
  }

  /* Fixed, not min: an intrinsically taller middle snippet pushed its own
     h3 below its neighbours' and the row lost its baseline. */
  .benefit-snippet {
    min-height: 0;
    height: 12rem;
  }

  .group-demo-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg) var(--space-xl);
  }

  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    align-items: stretch;
    width: min(100%, 52rem);
  }

  .flow-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xl);
  }

  .flow-step {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    /* Steps stretch to the tallest sibling. Without this the slack in a
       shorter column is shared out between its rows and pushes that step's
       heading below the other two. Pack from the top instead. */
    align-content: start;
    row-gap: var(--space-sm);
    text-align: center;
  }

  .flow-step h3,
  .flow-step p {
    grid-column: 1;
  }

  /* Horizontal segment from this node's centre to the next one's, running
     through the gap rather than across the copy. */
  .flow-step:not(:last-child)::after {
    inset-block: calc(var(--control-height) / 2) auto;
    inset-inline: calc(50% + var(--control-height) / 2 + var(--space-xs))
      calc(var(--space-xl) * -1 - 50% + var(--control-height) / 2
        + var(--space-xs));
    width: auto;
    height: 0;
    border-inline-start: 0;
    border-block-start: var(--rule-strong) dashed var(--color-rule-strong);
    transform: scaleX(0);
    transform-origin: 0 50%;
  }

  .flow-steps.is-revealed .flow-step:not(:last-child)::after {
    transform: scaleX(1);
  }

  .flow-step p {
    max-width: 30ch;
    margin-inline: auto;
  }

}

@media (min-width: 60rem) {
  /* Demo-first centered stack, which is the recorded macrostructure: the
     claim reads first, the phone proves it directly underneath. Height is
     content-driven, never a forced viewport fill, so the phone breaks the
     fold and the crop is what invites the scroll. */
  .hero.hero-stack {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: var(--space-2xl);
    /* The hero now ends on the phone's caption rather than a short copy row,
       so its own closing space is half what it was. Paired with the lighter
       top on .group-demo below, the seam lands at 160px, in step with the
       rest of the page instead of 240px of void. */
    padding-block: var(--space-xl) var(--space-2xl);
    text-align: center;
  }

  /* One grid gap owns the spacing inside the copy block; the elements' own
     bottom margins are cleared so the two do not stack into a void. Claim,
     lede and CTA read as one object, then a wider gap hands off to the
     proof. */
  .hero-copy {
    display: grid;
    justify-items: center;
    gap: var(--space-lg);
  }

  .hero-stack h1 {
    max-width: 17ch;
    margin-block-end: 0;
    font-size: clamp(3.5rem, 5.6vw, 5.5rem);
  }

  .hero-stack .hero-lede {
    max-width: 46ch;
    margin-block-end: 0;
    margin-inline: auto;
    text-align: center;
  }

  .hero-stack .hero-action {
    align-items: center;
    margin-block-start: var(--space-xs);
  }

  .hero.hero-stack .hero-conversation {
    justify-self: center;
    width: min(100%, 17rem);
  }

  /* Rhythm by role, not one value for everything. layout-and-space.md:
     equal padding on every section reads as a template. The two product
     proofs and the pricing decision get room; the lists sit tighter. */
  .group-demo {
    padding-block: var(--space-3xl);
  }

  .benefits {
    padding-block: var(--space-3xl) var(--space-2xl);
  }

  .flow {
    padding-block: var(--space-2xl) var(--space-3xl);
  }

  .channels {
    padding-block: var(--space-3xl) var(--space-2xl);
  }

  .channel-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 52rem);
    gap: var(--space-md);
  }

  .channel-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    justify-items: start;
    row-gap: var(--space-2xs);
    padding: var(--space-md);
  }

  .channel-logo {
    grid-row: auto;
    margin-block-end: var(--space-xs);
  }

  .integrations {
    padding-block: var(--space-2xl);
  }

  .pricing {
    padding-block: var(--space-4xl) var(--space-3xl);
  }

  .faq {
    padding-block: var(--space-2xl) var(--space-3xl);
  }

  .group-demo-stage {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    gap: var(--space-3xl);
    align-items: center;
  }

  .group-demo-points {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
  }

  /* Desktop only: the phone sits beside the cards, so the card the phone is
     currently demonstrating is lit and the rest recede. Below this width the
     cards are stacked under the phone, where lighting one you cannot see
     next to it would mean nothing. */
  .group-points-cards > li {
    transition:
      opacity var(--dur-short) var(--ease-out),
      border-color var(--dur-short) var(--ease-out);
  }

  /* Dim the others, not the current one. Written as :not() rather than a
     pair of rules because :has() carries its argument's specificity, so a
     separate "current card" rule loses to it and every card stays dim. */
  html.js .group-points-cards:has(> li.is-current) > li:not(.is-current) {
    opacity: 0.55;
  }

  html.js .group-points-cards > li.is-current {
    border-color: var(--color-accent);
  }

  html.js .group-points-cards > li:not(.is-current):hover {
    opacity: 0.8;
  }

  html.js .group-points-cards > li.point-lead.is-current {
    border-color: transparent;
  }
}

/* The question fits one line inside the 288px rail at this size. */
@media (max-width: 30rem) {
  .faq-trigger {
    font-size: var(--text-base);
    gap: var(--space-sm);
  }
}

/* ── Group promise cards ─────────────────────────────────────────────── */

/* Four reassurances, given surface and a drawn mark so the section reads as
   considered rather than a stack of paragraphs. The mark encodes the point
   (a quiet bubble, a person, a bell, a checkbox); one outline family, no
   emoji, accent-coloured. The lead card is peach-tinted to break the four
   into a deliberate rhythm rather than an even grid. */
.group-points-cards {
  gap: var(--space-sm);
}

.group-points-cards > li {
  position: relative;
  padding: var(--space-lg);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
}

/* Each card plays its own scene on the phone. The control is a button in
   the heading, the same shape the FAQ uses, stretched over the whole card
   so the card is the hit area while the heading stays the accessible name.
   The paragraph keeps its own stacking so text is still selectable. */
.point-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: start;
  background: none;
  border: 0;
  cursor: pointer;
}

.point-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.point-trigger:focus-visible {
  outline: none;
}

.point-trigger:focus-visible::after {
  outline: var(--rule-thick) solid var(--color-focus);
  outline-offset: 3px;
}

.group-points-cards > li.point-lead {
  background-color: var(--color-peach);
  border-color: transparent;
}

.group-points-cards h3 {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-md);
}

.point-mark-wrap {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--color-accent-deep);
  background-color: var(--color-paper);
  border-radius: var(--radius-sm);
}

.point-lead .point-mark-wrap {
  background-color: var(--color-paper-light);
}

.point-mark {
  width: 1.35rem;
  height: 1.35rem;
}

.group-points-cards p {
  margin: 0;
}

/* ── Together: Kora asks, nudges, hands off ─────────────────────────── */

/* Three private exchanges, in the same bubble vocabulary as the benefits
   cards so the page keeps one voice. The lead item is wider than the other
   two, so the row is not the equal 3-up the slop test names. It follows the
   group walkthrough directly, so its top is the tightest seam on the page
   and its bottom opens onto the memory features, a new movement. */
.together {
  padding-block: var(--space-md) var(--space-xl);
}

.together-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  margin-block-start: var(--space-xl);
}

.together-item {
  display: grid;
  gap: var(--space-sm);
  align-content: start;
}

.together-item h3 {
  margin: 0;
  font-size: var(--text-md);
}

.together-item > p {
  max-width: 48ch;
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* The only container in the item: bubbles sit on paper-light, the item
   itself has no border, so nothing nests (gate 4). */
.together-snippet {
  display: grid;
  gap: var(--space-xs);
  align-content: end;
  padding: var(--space-md);
  margin-block-end: var(--space-xs);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
}

.together-lead .together-snippet {
  background-color: var(--color-peach);
  border-color: transparent;
}

.together-snippet .message-bubble {
  max-width: 88%;
  margin: 0;
  font-size: var(--text-xs);
}

.together-snippet .message-bubble-user {
  justify-self: end;
}

.together-snippet .phone-typing > span {
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-paper-deep);
  border-radius: var(--radius-md);
  border-end-start-radius: var(--radius-xs);
}

/* The lead card's own background is peach, which is also what a user
   bubble is painted with everywhere else, so on this one card the
   reader's own message would vanish into the card. Accent on peach is
   the pair the primary button already uses. */
.together-lead .together-snippet .message-bubble-user {
  color: var(--color-accent-ink);
  background-color: var(--color-accent);
}

.together-lead .together-snippet .phone-typing > span {
  background-color: var(--color-paper-light);
}

.together-snippet .phone-typing i {
  width: var(--space-2xs);
  height: var(--space-2xs);
  background-color: var(--color-muted);
}

/* Whose thread this is. Set inside the mock, not as a section eyebrow. */
.together-to {
  margin: 0 0 var(--space-2xs);
  color: var(--color-muted);
  font-size: var(--text-2xs);
  font-weight: 600;
}

.together-foot {
  max-width: 54ch;
  margin: var(--space-lg) auto 0;
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
  text-align: center;
}

/* ── Next: calls, then actions in your accounts ─────────────────────── */

/* A deeper paper band, full bleed, so the roadmap reads as a different
   register from the shipped features above it (gate 9: not every section
   separated by the same whitespace). Two items, the nearer one wider. */
.next {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-block: var(--space-xl) var(--space-lg);
  padding-inline: max(
    var(--page-gutter),
    calc(50vw - var(--content-max) / 2 + var(--page-gutter))
  );
  background-color: var(--color-paper-deep);
}

.next-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
  margin-block-start: var(--space-xl);
}

.next-item {
  display: grid;
  gap: var(--space-sm);
  align-content: start;
}

.next-item h3 {
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.15;
}

.next-item > p:not(.next-status) {
  max-width: 44ch;
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.next-snippet {
  margin-block: var(--space-xs) 0;
}

/* Where each one stands. A dot in the accent for the one being built, in
   the rule colour for the one still being explored. */
.next-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
}

.next-status-dot {
  width: var(--space-xs);
  height: var(--space-xs);
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
}

.next-status-later .next-status-dot {
  background-color: var(--color-rule-strong);
}

@media (min-width: 48rem) {
  .together {
    padding-block: var(--space-lg) var(--space-2xl);
  }

  .together-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xl);
  }

  /* The lead runs the full row, snippet beside its copy. */
  .together-lead {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas:
      "snippet title"
      "snippet body";
    column-gap: var(--space-xl);
    align-items: center;
  }

  .together-lead .together-snippet {
    grid-area: snippet;
    margin: 0;
  }

  .together-lead h3 {
    grid-area: title;
    align-self: end;
  }

  .together-lead > p {
    grid-area: body;
    align-self: start;
  }

  .together-snippet {
    min-height: 11rem;
  }

  .next {
    padding-block: var(--space-2xl) var(--space-xl);
  }

  .next-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: var(--space-2xl);
    align-items: start;
  }
}

@media (min-width: 60rem) {
  .together {
    padding-block: var(--space-2xl) var(--space-3xl);
  }

  /* Wider first column, the lead stacked inside it, the two follow-ups
     beside it. */
  .together-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .together-lead {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "snippet"
      "title"
      "body";
    align-items: start;
  }

  .together-lead .together-snippet {
    margin-block-end: var(--space-xs);
  }

  .next {
    padding-block: var(--space-3xl) var(--space-2xl);
  }
}

/* ── Language switch ─────────────────────────────────────────────────── */

/* Same shape as the language switch beside it. Hidden without scripting,
   where the OS setting is the only thing that can decide the scheme. */
.theme-toggle {
  grid-area: theme;
  display: none;
  min-width: var(--control-height);
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--color-ink);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    color var(--dur-short) var(--ease-out),
    background-color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out);
}

html.js .theme-toggle {
  display: inline-flex;
}

.theme-toggle:focus-visible {
  outline: var(--rule-thick) solid var(--color-focus);
  outline-offset: 2px;
}

.theme-icon-sun,
.theme-toggle[aria-pressed="true"] .theme-icon-moon {
  display: none;
}

.theme-toggle[aria-pressed="true"] .theme-icon-sun {
  display: block;
}

.lang-switch {
  grid-area: lang;
  position: relative;
  display: none;
  justify-self: end;
}

html.js .lang-switch {
  display: inline-flex;
  align-items: center;
}

/* Native select, styled through its wrapper: keyboard, screen reader and
   the OS picker all stay exactly as the platform ships them. */
.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  min-height: var(--control-height);
  padding-block: 0;
  padding-inline: var(--space-sm) 2rem;
  color: var(--color-ink);
  background-color: var(--color-paper-light);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

/* Chevron from borders, so it takes the ink token. Position is logical
   (it moves to the left side under RTL); the strokes are physical on
   purpose, because a "down" glyph must not mirror into a "left" one. */
.lang-switch::after {
  content: "";
  position: absolute;
  inset-inline-end: 0.85rem;
  inset-block-start: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: var(--rule-strong) solid var(--color-ink);
  border-bottom: var(--rule-strong) solid var(--color-ink);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.lang-switch select:focus-visible {
  outline-color: var(--color-focus);
}

.lang-switch select:active {
  transform: translateY(1px);
}

.lang-switch select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (hover: hover) and (pointer: fine) {
  .lang-switch select:hover {
    background-color: var(--color-paper-deep);
  }
}

/* Below 22rem the translated CTA and the switch no longer share a row with
   the wordmark (Pruébalo gratis + Español overran a 288px rail by ~40px).
   The switch takes its own row, start-aligned under the wordmark. */
@media (max-width: 26rem) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "mark cta"
      "theme lang";
    row-gap: var(--space-2xs);
  }

  .lang-switch {
    justify-self: start;
  }
}

/* ── Right-to-left ───────────────────────────────────────────────────── */

/* Every box property on this site is logical, so dir="rtl" mirrors the
   layout on its own. Transforms are not logical; these are the only ones
   with a horizontal direction baked in. */

[dir="rtl"] [data-thread] [data-seq] {
  transform-origin: 100% 100%;
}

[dir="rtl"] [data-thread] .message-row-user,
[dir="rtl"] [data-thread] .phone-message-user {
  transform-origin: 0 100%;
}

html.js[dir="rtl"] .phone-scene {
  transform: translateX(-9%);
}

html.js[dir="rtl"] .phone-scene.is-active {
  transform: none;
}

html.js[dir="rtl"] .phone-scene.is-past {
  transform: translateX(9%);
}

@media (min-width: 48rem) {
  [dir="rtl"] .flow-step:not(:last-child)::after {
    transform-origin: 100% 50%;
  }
}

:root:not([lang="en"]) {
  --msg-step: 1090ms;
}

/* Hebrew: the Latin display and body faces carry no Hebrew glyphs, so the
   whole stack swaps. Rubik at 700 sits where Bricolage did; Heebo is the
   body. Tight display tracking reads cramped in Hebrew, so it relaxes. */
:root[lang="he"] {
  --font-display: "Rubik", "Arial Hebrew", "Noto Sans Hebrew", sans-serif;
  --font-body: "Heebo", "Arial Hebrew", "Noto Sans Hebrew", sans-serif;
}

:root[lang="he"] h1,
:root[lang="he"] h2,
:root[lang="he"] h3,
:root[lang="he"] .wordmark {
  letter-spacing: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: var(--dur-micro) !important;
    animation-iteration-count: 1 !important;
    transition-duration: var(--dur-micro) !important;
  }

  /* Collapse every spatial motion to a plain, settled state. */
  .hero::before {
    animation: none;
    opacity: 1;
  }

  .hero-conversation,
  html.js [data-reveal],
  [data-reveal].is-revealed,
  .hero [data-reveal],
  html.js .hero-notes li[data-reveal],
  .hero-notes li[data-reveal] {
    animation: none;
    opacity: 1;
    transform: none;
  }

  html.js [data-thread] [data-seq],
  [data-thread].is-played [data-seq] {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* The typing indicator is decorative once motion is reduced. */
  .phone-typing,
  html.js .phone-typing,
  [data-thread].is-played .phone-typing {
    display: none;
    animation: none;
  }

  [data-thread].is-played .phone-typing i {
    animation: none;
  }

  html.js .phone-scene {
    transition: none;
    transform: none;
  }

  .story-control:active {
    transform: none;
  }

  .flow-step:not(:last-child)::after,
  .flow-steps.is-revealed .flow-step:not(:last-child)::after {
    transform: none;
    transition: none;
  }

  .button:active {
    transform: none;
  }

  .number-dialog[open],
  .number-dialog::backdrop {
    animation-name: backdrop-in;
  }
}
