/* GenOffice landing — Genspark DS v4.1 tokens + GenOffice v5 layout
   (v4 hero/sections + Speakly-style fixed blurred topbar, logo image,
   hero highlight blocks, footnote below CTAs, GenTeam alpha card). */

:root {
  /* Brand */
  --color-brand-primary: #232425;
  --color-brand-hover: #393a3b;
  --color-brand-active: #1a1b1c;
  --color-brand-secondary: #0f7fff;

  /* Button primary — pure black per the v5 design, theme-invariant */
  --color-btn-primary: #000000;
  --color-btn-primary-hover: #393a3b;
  --color-btn-primary-active: #1a1b1c;
  --color-btn-primary-text: #ffffff;

  /* Text — secondary lightened to #86868c per the v5 design */
  --color-text-primary: #232425;
  --color-text-secondary: #86868c;
  --color-text-tertiary: #909499;
  --color-text-disabled: #cccccc;
  --color-text-link: #0f7fff;
  --color-text-on-brand: #ffffff;

  /* Background */
  --color-bg-page: #ffffff;
  --color-bg-surface: #fafafa;
  --color-bg-subtle: #f5f5f5;

  /* Border */
  --color-border-default: #eaeaea;
  --color-border-strong: #d0d3d8;
  --color-border-subtle: #f2f2f2;

  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-16);
  --navbar-height: 64px;

  /* Radius */
  --radius-8: 8px;
  --radius-12: 12px;
  --radius-16: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-shot: 0 4px 15px 0 rgba(0, 0, 0, 0.08);
  --shadow-btn-hover: 0 2px 8px rgba(35, 36, 37, 0.15);

  /* Focus ring — dark ink halo is invisible on dark surfaces, so it flips */
  --color-focus-ring: rgba(35, 36, 37, 0.2);

  /* Topbar — white/90 + blur in light, page-bg/90 in dark */
  --color-topbar-bg: rgba(255, 255, 255, 0.9);

  /* Alpha reward card — white in light, card surface in dark */
  --color-alpha-card-bg: #ffffff;

  /* Spacing */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;

  /* Sizing */
  --size-md-height: 40px;
  --size-lg-height: 48px;

  /* Typography */
  --gs-font-sans:
    'Arial', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', sans-serif;
  --gs-font-cjk:
    'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Source Han Sans JP',
    system-ui, sans-serif;
  --gs-font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  --text-h1: 36px;
  --text-h2: 28px;
  --text-h3: 22px;
  --text-h4: 18px;
  --text-body-lg: 18px;
  --text-body: 16px;
  --text-small: 14px;
  --text-caption: 12px;

  /* Motion */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-enter: cubic-bezier(0, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* --color-btn-primary intentionally NOT overridden — stays black */
    --color-brand-primary: #e8e9ea;
    --color-brand-secondary: #3f99ff;
    --color-text-primary: #ffffff;
    --color-text-secondary: #b8bbbf;
    --color-text-tertiary: #868b92;
    --color-text-disabled: #5a5f66;
    --color-text-link: #5ba5ff;
    --color-text-on-brand: #1a1b1c;
    --color-bg-page: #1a1b1c;
    --color-bg-surface: #232425;
    --color-bg-subtle: #2a2b2c;
    --color-border-default: #3a3b3c;
    --color-border-strong: #4a4b4c;
    --color-border-subtle: #2e2f30;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --shadow-shot: 0 4px 15px 0 rgba(0, 0, 0, 0.45);
    --color-focus-ring: rgba(255, 255, 255, 0.35);
    --color-topbar-bg: rgba(26, 27, 28, 0.9);
    --color-alpha-card-bg: #232425;
  }
}

@media (max-width: 768px) {
  :root {
    --text-h1: 32px;
    --text-h2: 25px;
    --text-h3: 20px;
    --text-h4: 16px;
    --text-body-lg: 16px;
    --text-body: 14px;
    --text-small: 13px;
  }
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--gs-font-sans);
  font-size: var(--text-body);
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Body-level only: bare :lang() would out-specify descendant rules and
   strip intended fonts in CJK locales. */
body:lang(zh-CN),
body:lang(zh-TW),
body:lang(ja-JP),
body:lang(ko-KR) {
  font-family: var(--gs-font-cjk);
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22.5px;
  border: 2px solid transparent;
  border-radius: var(--radius-12);
  font: 600 17.5px / 1 var(--gs-font-sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-btn-primary);
  color: var(--color-btn-primary-text);
}

.btn-primary:hover {
  background: var(--color-btn-primary-hover);
  box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active {
  background: var(--color-btn-primary-active);
}

/* Declared after :hover so the focus ring survives a hovered focused button
   (equal specificity — source order decides). */
.btn-primary:focus-visible {
  box-shadow:
    var(--shadow-btn-hover),
    0 0 0 3px var(--color-focus-ring);
}

/* Dark mode: the theme-invariant black button matches the card surface
   (#232425), so a subtle border keeps its shape distinguishable. */
@media (prefers-color-scheme: dark) {
  .btn-primary {
    border-color: var(--color-border-strong);
  }
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

.btn-ghost:hover {
  background: var(--color-bg-subtle);
}

.btn-ghost:active {
  background: var(--color-bg-surface);
}

.is-hidden,
[hidden] {
  /* .btn's display would otherwise override the UA hidden style */
  display: none !important;
}

/* ---------- container recipe ---------- */

/* Shared container recipe — the topbar inner and hero inner must carry the
   same max-width AND the same inline padding, or their content edges
   drift apart by one padding width on wide screens (border-box sizing). */
.topbar-inner,
.hero-inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ---------- topbar — fixed, page-bg/90 + blur, hairline border ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--color-topbar-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-default);
}

.topbar-inner {
  height: var(--navbar-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wordmark {
  display: inline-flex;
  align-items: center;
}

.wordmark-logo {
  display: block;
  height: 32px;
  width: auto;
}

/* The logo artwork is pure black-and-white, so a straight invert produces
   the correct dark-mode lockup. */
@media (prefers-color-scheme: dark) {
  .wordmark-logo {
    filter: invert(1);
  }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.lang-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.lang-wrap:hover {
  color: var(--color-text-primary);
}

.lang-icon,
.lang-chevron {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.lang-icon {
  inset-inline-start: var(--space-12);
}

.lang-chevron {
  inset-inline-end: var(--space-8);
  color: var(--color-text-tertiary);
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: var(--size-md-height);
  font: 500 var(--text-small) var(--gs-font-sans);
  color: inherit;
  background: transparent;
  border: none;
  border-radius: var(--radius-8);
  padding-block: 0;
  padding-inline-start: calc(var(--space-12) + 16px + var(--space-8));
  padding-inline-end: calc(var(--space-8) + 16px + var(--space-4));
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lang-select:hover {
  background: var(--color-bg-subtle);
}

.lang-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* Chrome marks a select :focus-visible even for pointer interaction, so the
   focus ring lingers after a mouse pick. app.js tags pointer-initiated focus
   with this class; the ring stays for keyboard users only. */
.lang-select.pointer-focus:focus-visible {
  box-shadow: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  /* Clears the fixed topbar, then the usual hero breathing room. */
  padding: calc(var(--navbar-height) + var(--space-32)) 0 var(--space-32);
  background: var(--color-bg-page);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: var(--space-32);
}

/* Hero eyebrow — wide-tracked uppercase label above the title */
.hero-eyebrow {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 18px;
  text-wrap: balance;
  max-width: 44em;
}

/* Hero title: focal point, but with breathing room */
.hero-title {
  font-family: var(--gs-font-sans);
  color: var(--color-text-primary);
  margin: 5px 0 0;
  /* Fixed 171px on desktop, shrinks only on narrow screens. */
  font-size: min(171px, 21vw);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* Format row: icons + names — first/last item flush with the download
   buttons' outer edges (both live in .hero-cta-block). */
.hero-tagline {
  margin-top: 32px;
  width: 100%;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-12) 24px;
}

@media (max-width: 767px) {
  .hero-tagline {
    justify-content: center;
    gap: var(--space-12) 28px;
  }
}

.hero-format {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.hero-format img {
  width: 1.1em;
  height: 1.1em;
  display: block;
  flex-shrink: 0;
}

/* Format row + download buttons share one centered column: the wrapper
   shrink-wraps to the widest child (the button row) and the format row
   stretches to match it. */
.hero-cta-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

/* Buttons size to their label (Speakly style). */
.hero-actions .btn {
  min-width: 0;
}

/* Footnote below the buttons — also reused by the #hero-cta-note dynamic
   mobile message, which app.js can fill with a raw download URL on
   clipboard failure; overflow-wrap keeps that unbroken string from
   overflowing the hero. */
.hero-footnote {
  margin-top: var(--space-12);
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 40em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero-footnote sup {
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-right: 1px;
}

/* ---------- hero highlights — 3 blocks: free / ad-free / open-source ---------- */

/* Same width recipe as .hero-app so edges align with the shot. */
.hero-highlights {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 56px auto 0;
  padding: 0 var(--container-padding);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
}

@media (min-width: 640px) {
  .hero-highlights {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* No white-space: nowrap — long locale labels (e.g. de-DE "Kostenlos für
   alle") must wrap inside the card instead of clipping when the grid goes
   three-across at 640px. */
.hero-highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 24px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-16);
  background: var(--color-bg-page);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--color-text-primary);
  text-decoration: none;
  text-align: center;
}

.hero-highlight svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* AD ban icon: 1px larger, optically centered with the label. */
.hero-highlight svg.hero-highlight-ad {
  width: 23px;
  height: 23px;
  align-self: center;
}

/* Brand-colored icons: gift blue, AD ban green (Sheets green). */
.hero-highlights .hero-highlight:nth-child(1) svg {
  color: var(--color-brand-secondary);
}

.hero-highlights .hero-highlight:nth-child(2) svg {
  color: #4fa16b;
}

a.hero-highlight {
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
}

a.hero-highlight:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-border-strong);
}

/* Arrow always visible; nudges toward the reading direction on hover. */
.hero-highlight-arrow {
  width: 18px !important;
  height: 18px !important;
  color: var(--color-brand-secondary);
  transition: transform var(--transition-fast);
}

a.hero-highlight:hover .hero-highlight-arrow {
  transform: translateX(3px);
}

[dir='rtl'] .hero-highlight-arrow {
  transform: scaleX(-1);
}

[dir='rtl'] a.hero-highlight:hover .hero-highlight-arrow {
  transform: scaleX(-1) translateX(3px);
}

/* ---------- hero screenshot ---------- */

.hero-app {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  /* Gap below the highlight blocks. */
  margin: 64px auto 0;
  padding: 0 var(--container-padding);
}

/* Screenshot artwork — clipped to the shared 16px radius (covers its
   smaller baked-in corners), soft shadow, no frame. */
.hero-shot-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  border-radius: var(--radius-16);
  box-shadow: var(--shadow-shot);
}

/* ---------- sections ---------- */

/* main is full-bleed so banded sections span the viewport;
   each section constrains its own content via .section-wrap */
main {
  width: 100%;
}

.section-title {
  font-size: clamp(var(--text-h2), 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 96px 0 var(--space-12);
  text-align: center;
  text-wrap: balance;
}

.section-lede {
  max-width: 40em;
  margin: 0 auto var(--space-48);
  text-align: center;
  font-size: var(--text-body-lg);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  text-wrap: balance;
}

/* ---------- benefits (four pillars) — surface band, page-bg cards ---------- */

.benefits-band {
  background: var(--color-bg-surface);
  padding: 96px 0;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.benefits-band .section-wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-padding);
}

@media (min-width: 768px) {
  .benefits-band .section-wrap {
    padding-inline: var(--space-24);
  }
}

@media (min-width: 1280px) {
  .benefits-band .section-wrap {
    padding-inline: var(--space-32);
  }
}

/* Scoped to the band (like .vignettes-band .section-title below) so the
   mobile `.section-title { margin-top: 72px }` override can't out-cascade
   the flush-top intent — the band's own 96px padding already spaces it. */
.benefits-band .section-title {
  margin-top: 0;
  margin-bottom: var(--space-48);
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
}

.benefit-card {
  position: relative;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-16);
  padding: var(--space-32);
  background: var(--color-bg-page);
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.benefit-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius-12);
  background: var(--color-brand-primary);
  color: var(--color-text-on-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-24);
  flex-shrink: 0;
}

.benefit-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}

.benefit-card h3 {
  font-size: clamp(20px, 1.8vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-12);
  text-wrap: balance;
  color: var(--color-text-primary);
}

.benefit-card p {
  color: var(--color-text-secondary);
  font-size: var(--text-body);
  line-height: 1.55;
}

.benefit-link {
  display: inline-flex;
  align-items: center;
  margin-top: var(--space-16);
  /* Same size as the gray body copy above. */
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.benefit-link:hover {
  color: var(--color-text-secondary);
}

.benefit-link-arrow {
  width: 16px;
  height: 16px;
  margin-inline-start: 6px;
  flex-shrink: 0;
  color: var(--color-brand-secondary);
  transition: transform var(--transition-fast);
}

.benefit-link:hover .benefit-link-arrow {
  transform: translateX(2px);
}

[dir='rtl'] .benefit-link-arrow {
  transform: scaleX(-1);
}

[dir='rtl'] .benefit-link:hover .benefit-link-arrow {
  transform: scaleX(-1) translateX(2px);
}

/* ---------- vignettes (alternating rows) — wide banded section ---------- */

.vignettes-band {
  background: var(--color-bg-page);
  padding: 96px 0;
}

.vignettes-band .section-wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-padding);
}

/* Width matches the v5 reference, where this band sits inside the
   1280px main container (1216px at a 1440px viewport). */
.vignettes-band .section-wrap-wide {
  max-width: calc(var(--container-max) - 2 * var(--space-32));
  padding-inline: var(--space-24);
}

@media (min-width: 1024px) {
  .vignettes-band .section-wrap-wide {
    padding-inline: var(--space-32);
  }
}

.vignettes {
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.vignettes-band .section-title {
  margin-top: 0;
  margin-bottom: var(--space-48);
}

.vignette {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-32);
  align-items: center;
}

/* Chip eyebrow — icon left, big label right, no box, start-aligned */
.vignette-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 13px;
  margin-bottom: 14px;
}

.vignette-chip img {
  width: 31px;
  height: 31px;
  display: block;
}

.vignette-chip-label {
  font-size: 33px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -0.005em;
}

/* No headline — body copy carries the message, darkened highlights */
.vignette-body {
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--color-text-secondary);
  max-width: 24em;
  text-wrap: balance;
}

/* Highlights are darkened only, not bolded. */
.vignette-body strong {
  font-weight: inherit;
  color: var(--color-text-primary);
}

/* Screenshot artwork with its own rounded window — 16px clip, soft shadow,
   no border, natural image ratio. */
.vignette-shot {
  width: 100%;
  border-radius: var(--radius-16);
  overflow: hidden;
  box-shadow: var(--shadow-shot);
}

.vignette-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Symmetric wide vignettes: copy narrow, image large — same size regardless
   of side */
@media (min-width: 900px) {
  .vignette {
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 96px;
    align-items: center;
  }

  .vignette.reverse {
    grid-template-columns: 1fr minmax(260px, 340px);
  }

  .vignette.reverse .vignette-copy {
    order: 2;
  }

  .vignette.reverse .vignette-shot {
    order: 1;
  }
}

/* ---------- alpha note — GenTeam feedback loop ---------- */

.alpha-note {
  text-align: center;
  padding: 0 var(--container-padding);
  margin-bottom: 96px;
}

.alpha-note .alpha-title {
  margin: 0 0 var(--space-12);
}

.alpha-note .alpha-lede {
  margin-bottom: 0;
}

/* Contributor reward card — white card, light shadow, copy + QR. */
.alpha-card {
  max-width: 880px;
  margin: 48px auto 0;
  background: var(--color-alpha-card-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-16);
  padding: 44px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  text-align: start;
}

.alpha-card-eyebrow {
  font-size: 19px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.alpha-card-credits {
  margin-top: 6px;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--color-brand-secondary);
}

.alpha-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  padding: 13px 26px;
  border: 2px solid var(--color-brand-secondary);
  border-radius: var(--radius-12);
  background: transparent;
  color: var(--color-brand-secondary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.alpha-card-cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.alpha-card-cta:hover {
  background: var(--color-brand-secondary);
  color: #ffffff;
}

[dir='rtl'] .alpha-card-cta svg {
  transform: scaleX(-1);
}

/* QR stays on white in both themes — scanners need the contrast. */
.alpha-card-qr {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-12);
  padding: 12px;
}

.alpha-card-qr img {
  display: block;
  width: 168px;
  height: 168px;
  /* Keep QR modules crisp when scaled. */
  image-rendering: pixelated;
}

@media (max-width: 720px) {
  .alpha-card {
    flex-direction: column;
    text-align: center;
    padding: 36px 28px;
  }

  .alpha-card-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* ---------- download ---------- */

.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: var(--container-padding);
}

/* Symmetric spacing: 96px band above / 96px footer gap below. */
.download .download-title {
  margin-top: 0;
  margin-bottom: var(--space-12);
}

.download-actions {
  margin-top: var(--space-24);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-12);
}

/* ---------- footer — copyright start, links end ---------- */

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-bg-page);
  padding: var(--space-48) var(--space-24);
}

.footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}

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

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
  }
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 400ms var(--easing-enter) forwards;
}

/* Stagger covers every hero-inner reveal child (eyebrow → title →
   cta block → footnote), then the highlights and the shot. */
.reveal:nth-child(1) {
  animation-delay: 0ms;
}

.reveal:nth-child(2) {
  animation-delay: 60ms;
}

.reveal:nth-child(3) {
  animation-delay: 120ms;
}

.reveal:nth-child(4) {
  animation-delay: 180ms;
}

.reveal:nth-child(5) {
  animation-delay: 220ms;
}

.reveal:nth-child(6) {
  animation-delay: 260ms;
}

/* .hero-highlights and .hero-app sit outside .hero-inner, so their
   header-level nth-child delays would fire alongside the title; explicit
   delays keep them at the end of the sequence instead. */
.hero-highlights.reveal {
  animation-delay: 260ms;
}

.hero-app.reveal {
  animation-delay: 320ms;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 767px) {
  .footer-links {
    gap: var(--space-16);
  }

  .hero-cta-block {
    width: 100%;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section-title {
    margin-top: 72px;
  }

  .vignettes {
    gap: 72px;
  }
}

@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: calc(var(--navbar-height) + var(--space-32)) 0 64px;
  }

  .topbar-inner,
  .hero-inner,
  .hero-app,
  .hero-highlights {
    padding-inline: var(--space-24);
  }
}

@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .topbar-inner,
  .hero-inner,
  .hero-app,
  .hero-highlights {
    padding-inline: var(--space-32);
  }
}
