/* ==========================================================================
   Janaḥ — public website
   Design tokens mirror the live janah.in legal pages (web/*.html in the
   mobile app) for a single consistent identity: Outfit (Noto Sans for Telugu and Hindi),
   accent #307BE1. Fire orange is added as the contrasting secondary accent,
   taken from the app's own "Fire" reaction color.
   ========================================================================== */

:root {
  --ground: #FBFAF9;
  --surface: #FFFFFF;
  --panel: #F2ECF8;
  --panel-strong: #E9E0F4;
  --border: #E3DCEA;
  --ink: #1A0A24;
  --ink-soft: #6B5B76;
  --ink-faint: #9B8FAA;
  --accent: #307BE1;
  --accent-ink: #1D4E93;
  --accent-soft: #EBF3FD;
  --fire: #F97316;
  --fire-ink: #9A3412;
  --resolved: #15803D;

  --serif: "Outfit", "Noto Sans Telugu", "Noto Sans Devanagari", -apple-system, "Segoe UI", sans-serif;
  --sans: "Outfit", "Noto Sans Telugu", "Noto Sans Devanagari", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Outfit", "Noto Sans Telugu", "Noto Sans Devanagari", -apple-system, sans-serif;

  --container: 1180px;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 28px;
  --shadow-card: 0 1px 2px rgba(26, 10, 36, 0.04), 0 12px 32px -16px rgba(26, 10, 36, 0.16);

  --dur-fast: 150ms;
  --dur-med: 320ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #17121F;
    --surface: #1F1929;
    --panel: #221B2E;
    --panel-strong: #2B2238;
    --border: #362B44;
    --ink: #EFE8F7;
    --ink-soft: #A79AB5;
    --ink-faint: #736482;
    --accent: #7FADEE;
    --accent-ink: #BFD6F7;
    --accent-soft: #24304A;
    --fire: #FB923C;
    --fire-ink: #FDBA74;
    --resolved: #4ADE80;
    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  /* Mobile browsers flash a default gray/blue overlay on tap; it fights with
     our own :active/press animations on the interactive demo controls below,
     so it's turned off site-wide and replaced by our own feedback states. */
  -webkit-tap-highlight-color: transparent;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul, ol { margin: 0; }
a { color: inherit; }
button { font: inherit; }

/* "Janaḥ" in running text: the precomposed ḥ (h + dot-below) isn't in
   Fraunces/IBM Plex's web subsets, so browsers silently fell back to a
   different installed font for just that one letter — rendering it at a
   different size/weight than the "Jana" next to it. Using a plain "h" (always
   in the current font) plus a drawn dot keeps every instance the same
   typeface and size as its surrounding text, everywhere it appears. */
.h-dot {
  position: relative;
  display: inline-block;
  line-height: 1;
  vertical-align: baseline;
}
.h-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.16em;
  width: 0.11em;
  height: 0.11em;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--ground);
  padding: 12px 18px;
  border-radius: var(--radius-s);
  font-family: var(--sans);
  font-weight: 600;
  z-index: 200;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 88px 0; }
.section--tight { padding: 64px 0; }
.section--panel { background: var(--panel); }
.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; text-wrap: balance; }
h3 { font-size: 20px; line-height: 1.25; }
.swipe-hint {
  display: none;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 10px;
}
.swipe-hint svg { width: 13px; height: 13px; }
.section-head p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 16px 0 0;
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15.5px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--fire); color: #ffffff; }
.btn-primary:hover { background: var(--fire-ink); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost-inverse { background: var(--surface); color: var(--ink); }
.btn:active { transform: translateY(1px); }

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-faint);
  font-size: 13.5px;
  cursor: default;
  text-decoration: none;
}
.btn-store svg { flex-shrink: 0; }
.btn-store .store-label { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; align-items: flex-start; }
.btn-store .store-label small { display: block; width: 100%; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-store .store-label strong { display: block; width: 100%; font-family: var(--sans); font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-store .store-badge {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
/* Blur lives on a pseudo-element rather than .site-header itself: backdrop-filter on an
   ancestor creates a new containing block for fixed-position descendants, which broke the
   mobile nav's full-viewport positioning. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { height: 30px; width: auto; }
.brand-wordmark { height: 19px; width: auto; display: block; }
.site-header .brand-mark { height: 40px; }
.site-header .brand-wordmark { height: 26px; }
.brand-wordmark-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-wordmark-light { display: none; }
  :root:not([data-theme="light"]) .brand-wordmark-dark { display: block; }
}
:root[data-theme="dark"] .brand-wordmark-light { display: none; }
:root[data-theme="dark"] .brand-wordmark-dark { display: block; }

.primary-nav { display: flex; }
.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}
.primary-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-soft);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.primary-nav a:hover { background: var(--panel); color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 96px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 60px);
  line-height: 1.06;
  text-wrap: balance;
}
.hero .lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 22px 0 32px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13.5px;
  color: var(--ink-faint);
  font-family: var(--mono);
  letter-spacing: 0.01em;
}
.hero-trust li { display: flex; align-items: center; gap: 7px; list-style: none; }
.hero-trust svg { width: 15px; height: 15px; color: var(--resolved); flex-shrink: 0; }

.hero-visual {
  display: grid;
  place-items: center;
}
.phone-wrap {
  position: relative;
  display: inline-block;
}
.phone-frame {
  width: min(300px, 78vw);
  aspect-ratio: 9 / 18.5;
  border-radius: 42px;
  background: var(--ink);
  padding: 12px;
  box-shadow: var(--shadow-card);
  position: relative;
}
/* Volume rocker (left) and power button (right) — small bezel details that
   read as "a real phone" rather than a rounded rectangle. Purely decorative
   (phone-frame is aria-hidden), so pseudo-elements cover the left side and a
   single extra span covers the right, rather than adding more inert markup. */
.phone-frame::before,
.phone-frame::after,
.phone-btn {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0e0815, #241a30);
}
.phone-frame::before { left: -3px; top: 16%; height: 7%; border-radius: 2px 0 0 2px; }
.phone-frame::after { left: -3px; top: 25%; height: 11%; border-radius: 2px 0 0 2px; }
.phone-btn-power { right: -3px; top: 19%; height: 9%; border-radius: 0 2px 2px 0; background: linear-gradient(270deg, #0e0815, #241a30); }
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  /* Lets .mock-app below size its type off the phone's own rendered width
     (cqi units), instead of needing separate hand-tuned values at every
     breakpoint — the old screenshot-overlay approach broke every time a new
     phone size exposed a spot nobody had retuned. */
  container-type: inline-size;
}

/* ---------- Hero phone mockup (live HTML, not a screenshot) ----------
   This recreates the app's feed card as real markup so the interactive bits
   (Open badge/popover, boost count) live in normal document flow instead of
   being absolutely-positioned overlays hand-matched to a flat PNG. Colors are
   fixed hex values (not the site's theme tokens) because this is meant to
   look like an always-light phone screenshot regardless of site dark mode. */
.mock-app {
  font-size: 4.1cqi;
  font-family: var(--sans);
  color: #1A0A24;
  height: 100%;
  overflow: hidden;
  background: #F8F7F9;
}
.mock-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* More inset than a typical toolbar so "9:41" and the signal/battery icons
     clear the phone screen's own rounded corners and read as balanced/centered
     within the notch's safe area, instead of hugging the curve. */
  padding: 1em 1.3em 0.4em;
  font-weight: 600;
  font-size: 0.85em;
  background: #fff;
}
.mock-status-icons { display: flex; align-items: center; gap: 0.35em; }
.mock-status-icons svg:first-child { width: 1.35em; height: auto; }
.mock-status-icons svg:last-child { width: 1.6em; height: auto; }
.mock-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3em 0.8em 0.6em;
  background: #fff;
  border-bottom: 1px solid #F0EDF3;
}
.mock-logo { height: 1.9em; width: auto; display: block; }
.mock-topbar-right { display: flex; align-items: center; gap: 0.4em; }
.mock-scope-toggle {
  display: flex;
  align-items: center;
  background: #EBF3FD;
  border-radius: 999px;
  padding: 0.16em;
}
.mock-scope-tab {
  display: flex;
  align-items: center;
  gap: 0.2em;
  padding: 0.3em 0.6em;
  border-radius: 999px;
  font-size: 0.78em;
  font-weight: 700;
  color: #307BE1;
}
.mock-scope-tab svg { width: 0.95em; height: 0.95em; flex-shrink: 0; }
.mock-scope-tab.is-active { background: #fff; }
.mock-scope-tab:not(.is-active) { opacity: 0.55; }
.mock-icon-btn {
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  background: #EBF3FD;
  color: #307BE1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mock-icon-btn svg { width: 0.95em; height: 0.95em; }
.mock-locality {
  margin: 0.55em 0.55em 0.5em;
  background: #fff;
  border-radius: 0.9em;
  padding: 0.55em 0.65em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  box-shadow: 0 1px 2px rgba(26, 10, 36, 0.05);
}
.mock-pin-badge {
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: #EBF3FD;
  color: #307BE1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mock-pin-badge svg { width: 0.9em; height: 0.9em; }
.mock-locality-text { flex: 1; min-width: 0; }
.mock-locality-text strong { display: block; font-size: 0.85em; font-weight: 700; }
.mock-locality-text small { display: block; font-size: 0.72em; color: #6B5B76; margin-top: 0.15em; }
.mock-chevron { width: 0.9em; height: 0.9em; color: #9B8FAA; flex-shrink: 0; }
.mock-post {
  margin: 0 0.55em;
  background: #fff;
  border-radius: 0.9em;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(26, 10, 36, 0.05);
}
.mock-post-head {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.65em 0.65em 0.55em;
}
.mock-avatar {
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: #EBF3FD;
  color: #307BE1;
  font-weight: 700;
  font-size: 0.75em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mock-avatar-amber { background: #FEF3C7; color: #B45309; margin-left: auto; }
.mock-post-user { flex: 1; min-width: 0; }
.mock-post-user strong { display: flex; align-items: center; gap: 0.3em; font-size: 0.85em; font-weight: 700; }
.mock-post-user small { display: flex; align-items: center; gap: 0.25em; font-size: 0.72em; color: #6B5B76; margin-top: 0.15em; }
.mock-post-user small svg { width: 0.85em; height: 0.85em; flex-shrink: 0; }
.mock-verified { width: 0.9em; height: 0.9em; flex-shrink: 0; }
.mock-illustration {
  aspect-ratio: 1.85 / 1;
  background: linear-gradient(135deg, #E4EFFE, #FCF3CA);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-illustration-icon { width: 22%; height: auto; }
.mock-post-body { padding: 0.75em 0.65em 0.2em; }
.mock-post-title-row { display: flex; align-items: flex-start; gap: 0.4em; justify-content: space-between; }
.mock-post-title { font-family: var(--sans); font-size: 0.92em; font-weight: 700; letter-spacing: normal; line-height: 1.25; margin: 0; flex: 1; min-width: 0; }
.mock-post-desc { font-size: 0.82em; color: #6B5B76; line-height: 1.4; margin: 0.5em 0 0; }
.mock-post-tags { font-size: 0.82em; color: #307BE1; font-weight: 600; margin: 0.35em 0 0; }
.mock-post-time { font-size: 0.72em; color: #9B8FAA; margin: 0.35em 0 0; }
.mock-post-footer {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 0.65em;
  margin-top: 0.5em;
  border-top: 1px solid #F0EDF3;
}
.mock-flame-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  background: #FFF1E8;
  color: #C2410C;
  font-weight: 700;
  font-size: 0.78em;
  font-variant-numeric: tabular-nums;
  padding: 0.32em 0.65em;
  border-radius: 999px;
}
.mock-flame-icon { width: 0.9em; height: 0.9em; object-fit: contain; display: block; }
.mock-avatar-stack { display: flex; margin-left: 0.1em; }
.mock-avatar-stack span {
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: #EBF3FD;
  color: #307BE1;
  font-size: 0.62em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  margin-left: -0.4em;
}
.mock-avatar-stack span:first-child { margin-left: 0; }
.mock-stat { display: flex; align-items: center; gap: 0.2em; font-size: 0.78em; color: #6B5B76; font-weight: 600; }
.mock-stat svg { width: 0.9em; height: 0.9em; }
.mock-share { width: 0.9em; height: 0.9em; color: #6B5B76; margin-left: auto; }
.mock-more { color: #9B8FAA; font-weight: 700; letter-spacing: 0.05em; font-size: 0.78em; }
.mock-comment { font-size: 0.78em; line-height: 1.4; padding: 0.5em 0.65em 0.9em; margin: 0; }
.mock-comment strong { font-weight: 700; }
.hero-badge-float {
  position: absolute;
  bottom: 18px;
  left: -8px;
  touch-action: manipulation;
  background: var(--surface);
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-m);
  box-shadow: 0 12px 28px -8px rgba(48, 123, 225, 0.35), var(--shadow-card);
  padding: 12px 18px 12px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.hero-badge-float .badge-emoji {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent-soft);
}
.hero-badge-float .flame-icon { width: 22px; height: 22px; object-fit: contain; }
.hero-badge-float strong { display: block; font-family: var(--sans); font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 3px; }
.hero-badge-float small { display: block; color: var(--ink-soft); font-family: var(--sans); font-size: 12.5px; line-height: 1.4; }
.hero-badge-float .boost-tagline { font-size: 11px; opacity: 0.8; margin-top: 1px; }
.hero-badge-float .boost-title-row { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; flex-wrap: wrap; }
.hero-badge-float .boost-title-row strong { margin-bottom: 0; }
.visibility-tier {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 999px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.visibility-tier.is-escalated { background: var(--accent); color: #fff; }
.hero-badge-float {
  appearance: none;
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.hero-badge-float:hover { transform: translateY(-2px); }
.hero-badge-float:active { transform: translateY(0) scale(0.98); }
.hero-badge-float:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hero-badge-float.is-boosted { border-left-width: 5px; box-shadow: 0 12px 28px -8px rgba(48, 123, 225, 0.55), var(--shadow-card); }
.hero-badge-float.is-boosted .badge-emoji { background: var(--accent); }
.hero-badge-float .boost-count { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.badge-emoji.is-bumping { animation: boostBump 420ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.badge-emoji.is-inviting { animation: boostInvite 2.4s ease-in-out infinite; }
.boost-pop {
  position: absolute;
  top: -6px;
  left: 50%;
  white-space: nowrap;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11px;
  color: var(--accent);
  background: var(--surface);
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  pointer-events: none;
  animation: boostFloat 1900ms linear forwards;
}
@keyframes boostBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.32); }
  60% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
@keyframes boostInvite {
  0%, 100% { box-shadow: 0 0 0 0 rgba(48, 123, 225, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(48, 123, 225, 0); }
}
@keyframes boostFloat {
  0% { transform: translate(-50%, 6px); opacity: 0; }
  12% { opacity: 1; transform: translate(-50%, 0); }
  60% { opacity: 1; transform: translate(-50%, -12px); }
  100% { transform: translate(-50%, -30px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-badge-float, .hero-badge-float:hover, .hero-badge-float:active { transform: none; transition: none; }
  .badge-emoji.is-bumping, .badge-emoji.is-inviting, .boost-pop { animation: none; }
}

/* Open badge + popover: now a normal inline element in the title row (sized in
   em, off .mock-app's cqi-based root font-size), not an absolutely-positioned
   box hand-matched to a screenshot's pixel coordinates. The popover/hint still
   float above it via position:absolute, but relative to this small anchor —
   not the whole phone screen — so there's no percentage math to get wrong. */
.hero-status-anchor { position: relative; flex-shrink: 0; }
.status-trigger {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  position: relative;
  cursor: pointer;
  /* Without this, rapid taps while cycling Open -> In review -> Resolved/Reopened
     get read as a double-tap by mobile browsers and zoom the page. */
  touch-action: manipulation;
}
.mock-status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.78em;
  font-weight: 700;
  color: #B42318;
  background: #FEE2E2;
  padding: 0.32em 0.7em;
  border-radius: 999px;
  white-space: nowrap;
}
.status-trigger-ring {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(48, 123, 225, 0.45);
  animation: statusInvite 2.2s ease-in-out infinite;
}
.status-trigger[aria-expanded="true"] .status-trigger-ring { animation: none; box-shadow: none; }
.status-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@keyframes statusInvite {
  0%, 100% { box-shadow: 0 0 0 0 rgba(48, 123, 225, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(48, 123, 225, 0); }
}
.status-popover {
  display: none;
  position: absolute;
  /* Opens upward into the decorative illustration above the "Open" tag, rather
     than downward over the post's title/description text below it. */
  bottom: calc(100% + 0.7em);
  right: 0;
  width: 12.5em;
  background: #fff;
  border: 1px solid #F0EDF3;
  border-radius: 0.9em;
  box-shadow: 0 8px 20px -8px rgba(26, 10, 36, 0.25);
  padding: 0.7em 0.8em;
  z-index: 2;
  font-size: 1em;
}
.status-popover.is-open { display: block; }
/* Always-visible nudge so people know the "Open" tag is tappable and leads
   somewhere — without it, the pulsing ring alone is easy to miss. Hidden for
   good the first time the popover is opened (see script.js). */
.status-hint {
  position: absolute;
  bottom: calc(100% + 0.5em);
  right: 0;
  width: max-content;
  white-space: nowrap;
  background: #1A0A24;
  color: #fff;
  font-size: 0.72em;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.55em 0.9em;
  border-radius: 999px;
  box-shadow: 0 8px 20px -8px rgba(26, 10, 36, 0.35);
  pointer-events: none;
  animation: statusHintBob 1.8s ease-in-out infinite;
}
.status-hint.is-hidden { display: none; }
@keyframes statusHintBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .status-trigger-ring { animation: none; }
  .status-hint { animation: none; }
}
.status-main[hidden] { display: none; }
.status-main {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font: inherit;
  touch-action: manipulation;
}
.status-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.status-dot {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.3em;
  background: #DC2626;
  transition: background var(--dur-fast) var(--ease);
}
.status-copy strong { display: block; font-weight: 700; font-size: 1em; color: #1A0A24; }
.status-copy small { display: block; color: #6B5B76; font-size: 0.85em; line-height: 1.35; margin-top: 0.1em; }
.status-popover.state-review .status-dot { background: #307BE1; }
.status-popover.state-resolved .status-dot { background: #16A34A; }
.status-popover.state-reopened .status-dot { background: #DC2626; }
.status-actions[hidden] { display: none; }
.status-actions { display: flex; gap: 0.5em; margin-top: 0.7em; }
.status-action {
  appearance: none;
  border: 1px solid #E3DCEA;
  background: #fff;
  border-radius: 999px;
  padding: 0.4em 0.8em;
  font-size: 0.88em;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  touch-action: manipulation;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.status-action:hover { transform: translateY(-1px); }
.status-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status-action.is-confirm { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.status-action.is-dispute { background: #F8F7F9; color: #6B5B76; }
@media (prefers-reduced-motion: reduce) {
  .status-action:hover { transform: none; }
}

/* ---------- Problem ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px;
}
.problem-card svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 14px; }
.problem-card h3 { margin-bottom: 8px; }
.problem-card p { color: var(--ink-soft); margin: 0; font-size: 15px; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 28px 22px 24px;
}
.step .step-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}
/* Desktop: these wrappers stay invisible to layout — .step-num and h3/p behave
   as if they were direct children of the card, same as before. They only
   become real flex boxes at mobile width (see the connected-timeline rules
   in the ≤760px media query below). */
.step-num-wrap, .step-body { display: contents; }
.step-connector { display: none; }
.step h3 { margin-bottom: 8px; font-size: 18px; }
.step p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px;
  transition: border-color var(--dur-fast) var(--ease);
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin-bottom: 8px; font-size: 17.5px; }
.feature-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* ---------- Preview ---------- */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.preview-frame {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.preview-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top center;
}
.preview-frame figcaption {
  font-family: var(--serif);
  font-size: 15px;
  text-align: center;
  padding: 14px 12px;
  border-top: 1px solid var(--border);
}

/* ---------- Trust ---------- */
.trust-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.trust-list li { display: flex; gap: 14px; }
.trust-list svg { width: 20px; height: 20px; color: var(--resolved); flex-shrink: 0; margin-top: 2px; }
.trust-list p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.trust-list strong { color: var(--ink); display: block; margin-bottom: 3px; font-family: var(--sans); }

.trust-note {
  background: var(--panel);
  border-left: 3px solid var(--fire);
  border-radius: 4px 16px 16px 4px;
  padding: 24px 26px;
}
.trust-note h3 { margin-bottom: 10px; font-family: var(--sans); letter-spacing: 0; }
.trust-note p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 12px; }
.trust-note a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; }
.trust-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px; }
.trust-links a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-ink);
}
.trust-links a:hover { text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev {
  width: 18px; height: 18px;
  color: var(--ink-faint);
  transition: transform var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-body {
  padding: 0 24px 22px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 68ch;
}

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--ink);
  color: var(--ground);
  border-radius: var(--radius-l);
  padding: 64px 48px;
  text-align: center;
  margin: 0 24px;
}
.final-cta h2 { color: var(--ground); }
.final-cta p { color: color-mix(in srgb, var(--ground) 70%, transparent); max-width: 52ch; margin: 16px auto 32px; font-size: 17px; }
.final-cta .hero-ctas { justify-content: center; }
.final-cta .btn-store { background: transparent; border-color: color-mix(in srgb, var(--ground) 25%, transparent); color: color-mix(in srgb, var(--ground) 60%, transparent); }
.final-cta .btn-store strong { color: color-mix(in srgb, var(--ground) 85%, transparent); }
.final-cta .btn-secondary { border-color: color-mix(in srgb, var(--ground) 30%, transparent); color: var(--ground); }
.final-cta .btn-secondary:hover { border-color: var(--ground); color: var(--ground); }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 40px; border-top: 1px solid var(--border); }
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--ink-soft); font-size: 14px; max-width: 30ch; margin: 0; }
.footer-col h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.footer-col a:hover { color: var(--accent-ink); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--ink-faint);
  font-family: var(--mono);
}
.footer-bottom .todo { color: var(--fire-ink); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  /* Promotes the layer ahead of time (while idle) instead of at the moment the
     scroll-triggered transition starts, which is what caused the visible
     stutter — especially when several grid cards crossed the threshold in the
     same frame and all got promoted at once. Cleared by script.js once the
     transition finishes so long pages don't keep dozens of layers alive. */
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
}
/* Grid cards enter the viewport together, so without a stagger every card in
   the row would start compositing on the exact same frame. A small cascading
   delay spreads that cost out and reads as an intentional sequence rather
   than a simultaneous pop. Capped at 5 steps so long grids don't feel slow. */
.problem-grid .reveal:nth-child(2),
.features-grid .reveal:nth-child(2) { transition-delay: 60ms; }
.problem-grid .reveal:nth-child(3),
.features-grid .reveal:nth-child(3) { transition-delay: 120ms; }
.problem-grid .reveal:nth-child(4),
.features-grid .reveal:nth-child(4) { transition-delay: 180ms; }
.features-grid .reveal:nth-child(5) { transition-delay: 240ms; }
.features-grid .reveal:nth-child(n+6) { transition-delay: 300ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1040px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1.2fr 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 8px; }
  .phone-frame { width: min(220px, 60vw); }
  .trust-layout { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }

  /* The phone mockup itself shrinks above, but the Boost/Open demo cards had
     fixed desktop-sized text and padding, so on a small phone they ballooned
     to cover most of the screenshot underneath. Scale them down to match. */
  .hero-badge-float { left: -4px; bottom: 10px; padding: 8px 12px 8px 9px; gap: 8px; font-size: 11px; }
  .hero-badge-float .badge-emoji { width: 30px; height: 30px; }
  .hero-badge-float .flame-icon { width: 16px; height: 16px; }
  .hero-badge-float strong { font-size: 12px; }
  .hero-badge-float small { font-size: 10.5px; }
  .hero-badge-float .boost-tagline { font-size: 9.5px; }
  .visibility-tier { font-size: 7.5px; padding: 1px 5px; }

  /* The mock phone UI itself (.mock-app) sizes its type off .phone-screen's
     own rendered width via cqi units, so it rescales automatically here —
     no per-breakpoint overrides needed for the Open badge, popover, hint or
     boost count. */
}

@media (max-width: 760px) {
  .primary-nav { position: fixed; inset: 76px 0 0 0; background: var(--ground); border-top: 1px solid var(--border); padding: 12px 24px 32px; overflow-y: auto; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
  .primary-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .primary-nav a { padding: 14px 16px; font-size: 17px; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-primary.desktop-only { display: none; }

  .section { padding: 56px 0; }

  /* Preview stays a swipeable horizontal carousel — only 3 items, a natural
     gallery-style flick-through. */
  .preview-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding-bottom: 6px;
    margin-bottom: -6px;
    scrollbar-width: none;
  }
  .preview-grid::-webkit-scrollbar { display: none; }

  .preview-frame {
    scroll-snap-align: start;
    flex: 0 0 62%;
    max-width: 240px;
  }

  .swipe-hint { display: inline-flex; }

  /* Problem and Features: compact 2-column grids instead of one-per-row or
     swiping — short cards fit comfortably, and it avoids the "endless swipe"
     feeling a long horizontal carousel gives with this many items. */
  .problem-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .problem-card { padding: 20px; }
  .feature-card { padding: 18px; }
  .feature-icon { width: 36px; height: 36px; margin-bottom: 12px; }
  .feature-icon svg { width: 18px; height: 18px; }
  .feature-card h3 { font-size: 16px; }
  .feature-card p { font-size: 13.5px; }

  /* How it works: a connected vertical timeline instead of a carousel — this
     content is a sequence, so a stepper reads more naturally than swiping. */
  .steps { display: flex; flex-direction: column; gap: 0; }
  .step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 28px;
    max-width: none;
  }
  .step-num-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
  .step-num-wrap .step-num { margin-bottom: 0; }
  /* Positioned against .step (not .step-num-wrap, which is only as tall as the
     circle) so the line always reaches from the bottom of this circle to the
     top of the next one — regardless of how many lines the step's text wraps to. */
  .step-connector {
    display: block;
    position: absolute;
    top: 36px;
    bottom: 0;
    left: 15px;
    width: 2px;
    transform: translateX(-50%);
    background: var(--border);
  }
  .step:last-child .step-connector { display: none; }
  .step:last-child { padding-bottom: 0; }
  .step-body { display: block; flex: 1; min-width: 0; padding-top: 2px; }
  .step-body h3 { margin-bottom: 6px; }

  .final-cta { padding: 48px 24px; margin: 0 16px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero { padding: 40px 0 64px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .hero-ctas .btn-store { width: 100%; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
