/* =============================================================================
   SFSocial site styles

   Design tokens are lifted directly from the Flutter app so the site and the
   product read as one thing:

     app/sfdating/lib/app/theme/app_colors.dart      colour tokens
     app/sfdating/lib/app/theme/app_gradients.dart   brand / hero / glow
     app/sfdating/lib/app/theme/app_text_styles.dart Plus Jakarta Sans + scale
     app/sfdating/lib/app/theme/app_theme.dart       radius 18 / 16, elevation 0
     app/sfdating/lib/app/theme/app_glass.dart       blur sigma 14

   Two deliberate deviations from the app, both for contrast. Documented at the
   token so nobody "fixes" them back:
     - CTA gradient is deepened in light mode. The app's #F03E3E carries white
       text at 3.81:1, under the 4.5:1 floor for the button's label size.
     - CTA ink flips to near-black in dark mode, where the light red gradient
       cannot carry white text at all (2.80:1).
============================================================================= */

/* ---------------------------------------------------------------- tokens -- */

:root {
  /* Brand, straight from AppColors */
  --brand-red: #f03e3e;
  --brand-red-light: #ff6b6b;
  --brand-red-dark: #c92a2a;
  --brand-coral: #ff8787;
  --brand-peach: #ffc4a3;
  --brand-blush: #ffa8b4;

  /* Light neutrals */
  --bg: #faf7f6;
  --surface: #ffffff;
  --surface-alt: #f5eeed;
  --outline: #eee4e2;
  --text: #211a1a;
  --text-2: #756b6b;
  --text-3: #a39897;

  /* Semantic */
  --success: #36b37e;
  --warning: #f5a623;
  --danger: #e5484d;

  /* Brand-as-text. NOT --brand-red: that is 3.81:1 on white and fails AA for
     body text. This is 5.37:1. */
  --accent-ink: #c92a2a;

  /* CTA. Deepened so white passes AA across the whole sweep: 5.37:1 -> 4.50:1 */
  --cta-from: #c92a2a;
  --cta-to: #dd3535;
  --cta-ink: #ffffff;

  /* Decorative brand gradient, matches AppGradients.brand exactly. Only ever
     used behind large display type or as a non-text surface. */
  --grad-brand: linear-gradient(135deg, #f03e3e, #ff6b6b);

  /* Same brand read, but safe AS TEXT. The real brand gradient tops out at
     #ff6b6b, which is 2.64:1 on the hero background and fails even the 3:1
     large-text floor. This one is 5.37:1 -> 4.23:1. */
  --grad-headline: linear-gradient(120deg, #c92a2a, #e8443f);
  --grad-hero: linear-gradient(180deg, #fff6f5, #fff0ee, #fff7f3);
  --grad-glow: linear-gradient(135deg, #ff8787, #ffc4a3);

  /* Glass, from AppGlass */
  --glass-fill: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: 14px;
  --shadow-sm: 0 1px 2px rgba(33, 26, 26, 0.04), 0 2px 8px rgba(33, 26, 26, 0.04);
  --shadow-md: 0 2px 4px rgba(33, 26, 26, 0.04), 0 12px 32px rgba(33, 26, 26, 0.07);
  --shadow-lg: 0 4px 8px rgba(33, 26, 26, 0.05), 0 24px 64px rgba(33, 26, 26, 0.1);

  /* Shape, from app_theme.dart */
  --r-lg: 18px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* Spacing. Marketing pages want air, so this is the spacious end. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  --maxw: 1140px;
  --maxw-prose: 74ch;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;
}

:root[data-theme="dark"],
html:not([data-theme="light"]) {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #121013;
    --surface: #1c181a;
    --surface-alt: #272123;
    --outline: #38302f;
    --text: #f7f2f1;
    --text-2: #b8aead;
    --text-3: #7c7170;

    --accent-ink: #ff8787;

    /* Dark mode inverts the CTA: the app's light-red gradient carries dark ink,
       not white. White on #ff6b6b is 2.80:1. */
    --cta-from: #ff6b6b;
    --cta-to: #ff8787;
    --cta-ink: #1a1214;

    --grad-brand: linear-gradient(135deg, #ff6b6b, #ff8787);
    --grad-headline: linear-gradient(120deg, #ff8787, #ffc4a3);
    --grad-hero: linear-gradient(180deg, #131012, #181315, #1c1618);
    --grad-glow: linear-gradient(135deg, #f03e3e, #ffa8b4);

    --glass-fill: rgba(39, 33, 35, 0.66);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.36);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.32), 0 24px 64px rgba(0, 0, 0, 0.46);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #121013;
  --surface: #1c181a;
  --surface-alt: #272123;
  --outline: #38302f;
  --text: #f7f2f1;
  --text-2: #b8aead;
  --text-3: #7c7170;

  --accent-ink: #ff8787;
  --cta-from: #ff6b6b;
  --cta-to: #ff8787;
  --cta-ink: #1a1214;

  --grad-brand: linear-gradient(135deg, #ff6b6b, #ff8787);
    --grad-headline: linear-gradient(120deg, #ff8787, #ffc4a3);
  --grad-hero: linear-gradient(180deg, #131012, #181315, #1c1618);
  --grad-glow: linear-gradient(135deg, #f03e3e, #ffa8b4);

  --glass-fill: rgba(39, 33, 35, 0.66);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.32), 0 24px 64px rgba(0, 0, 0, 0.46);
}

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

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--brand-coral);
  color: #211a1a;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--surface);
  color: var(--text);
  border-radius: 0 0 var(--r-md) 0;
  box-shadow: var(--shadow-md);
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

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

/* --------------------------------------------------------------- type ----- */

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

/* Fluid, but anchored to the app's scale at the endpoints:
   displayLarge 44 / displayMedium 36 / displaySmall 30 / headlineSmall 22 */
h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h2 {
  font-size: clamp(1.75rem, 1.25rem + 2.1vw, 2.5rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.25;
}

p {
  text-wrap: pretty;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* ------------------------------------------------------------- layout ----- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

@media (min-width: 768px) {
  .wrap {
    padding-inline: var(--s-6);
  }
}

.section {
  padding-block: var(--s-9);
}

@media (min-width: 1024px) {
  .section {
    padding-block: var(--s-10);
  }
}

.section-head {
  max-width: 62ch;
  margin-bottom: var(--s-8);
}

.section-head .lede {
  margin-top: var(--s-4);
}

.section--alt {
  background: var(--surface-alt);
  border-block: 1px solid var(--outline);
}

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

.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: var(--s-3) var(--s-6);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  font: inherit;
  font-size: 0.96875rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background-image: linear-gradient(135deg, var(--cta-from), var(--cta-to));
  color: var(--cta-ink);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--outline);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  border-color: var(--text-3);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  padding-inline: var(--s-4);
}

.btn--ghost:hover {
  background: var(--surface-alt);
}

.btn--lg {
  min-height: 56px;
  font-size: 1.0625rem;
  padding-inline: var(--s-7);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* --------------------------------------------------------------- cards ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.card h3 {
  margin-bottom: var(--s-3);
}

.card p {
  color: var(--text-2);
  font-size: 0.96875rem;
}

.card--hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand-red) 28%, var(--outline));
}

.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
}

.grid {
  display: grid;
  gap: var(--s-5);
}

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

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

@media (min-width: 640px) and (max-width: 899px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------------------------------------------------------- icon ---- */

.icon-tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--s-5);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--brand-red) 12%, transparent);
  color: var(--accent-ink);
}

.icon-tile svg {
  width: 24px;
  height: 24px;
}

/* --------------------------------------------------------------- badge ---- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px var(--s-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

.badge svg {
  width: 14px;
  height: 14px;
}

.badge--dev {
  border-color: color-mix(in srgb, var(--warning) 42%, transparent);
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  color: var(--text);
}

.badge--dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
}

/* ----------------------------------------------------------------- nav ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.nav[data-scrolled="true"] {
  border-bottom-color: var(--outline);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-image: var(--grad-brand);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.brand__mark svg {
  width: 19px;
  height: 19px;
  color: #fff;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--s-2);
  margin-inline-start: auto;
}

.nav__links a {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav__links a:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-inline-start: auto;
}

@media (min-width: 900px) {
  .nav__links {
    display: flex;
  }
  .nav__actions {
    margin-inline-start: 0;
  }
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--outline);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.icon-btn:hover {
  background: var(--surface-alt);
  border-color: var(--text-3);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.nav__cta {
  display: none;
}

@media (min-width: 560px) {
  .nav__cta {
    display: inline-flex;
  }
}

.nav__burger {
  display: grid;
}

@media (min-width: 900px) {
  .nav__burger {
    display: none;
  }
}

.theme-toggle [data-theme-icon="dark"] {
  display: none;
}

:root[data-theme="dark"] .theme-toggle [data-theme-icon="dark"] {
  display: block;
}

:root[data-theme="dark"] .theme-toggle [data-theme-icon="light"] {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle [data-theme-icon="dark"] {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle [data-theme-icon="light"] {
    display: none;
  }
}

/* Mobile drawer */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--outline);
  background: var(--bg);
  padding: var(--s-4) 0 var(--s-6);
}

.mobile-menu[data-open="true"] {
  display: block;
}

@media (min-width: 900px) {
  .mobile-menu[data-open="true"] {
    display: none;
  }
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.mobile-menu a {
  padding: var(--s-4) var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.mobile-menu a:hover {
  background: var(--surface-alt);
}

.mobile-menu .btn {
  margin-top: var(--s-4);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--s-8) var(--s-9);
  background-image: var(--grad-hero);
}

@media (min-width: 1024px) {
  .hero {
    padding-block: var(--s-9) var(--s-10);
  }
}

/* The blurred aurora blobs, same idea as AppBackdrop in the app */
.hero__glow {
  position: absolute;
  border-radius: 50%;
  background-image: var(--grad-glow);
  filter: blur(90px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.hero__glow--a {
  width: 520px;
  height: 520px;
  top: -220px;
  right: -140px;
}

.hero__glow--b {
  width: 420px;
  height: 420px;
  bottom: -240px;
  left: -160px;
  opacity: 0.28;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__glow {
    opacity: 0.22;
  }
  :root:not([data-theme="light"]) .hero__glow--b {
    opacity: 0.16;
  }
}

:root[data-theme="dark"] .hero__glow {
  opacity: 0.22;
}

:root[data-theme="dark"] .hero__glow--b {
  opacity: 0.16;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--s-8);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--s-8);
  }
}

.hero h1 {
  margin-block: var(--s-5) var(--s-5);
}

.hero .lede {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
}

.hero__cta {
  margin-top: var(--s-7);
}

.hero__note {
  margin-top: var(--s-4);
  font-size: 0.875rem;
  color: var(--text-3);
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid var(--outline);
  list-style: none;
  padding-inline: 0;
}

.hero__points li {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.90625rem;
  font-weight: 600;
  color: var(--text-2);
}

.hero__points svg {
  width: 17px;
  height: 17px;
  color: var(--success);
  flex-shrink: 0;
}

/* Hero visual: a stylised chat preview, built from real product concepts */
.preview {
  position: relative;
  padding: var(--s-5);
  border-radius: 24px;
}

.preview__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--outline);
}

.preview__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background-image: var(--grad-brand);
  flex-shrink: 0;
}

.preview__avatar--alt {
  background-image: linear-gradient(135deg, #6b8ff0, #87b6ff);
}

.preview__title {
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.preview__sub {
  font-size: 0.8125rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview__sub::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.msg {
  display: flex;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.msg__body {
  min-width: 0;
}

.msg__name {
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.msg__text {
  font-size: 0.90625rem;
  color: var(--text-2);
  line-height: 1.5;
}

.msg__bubble {
  display: inline-block;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  border: 1px solid var(--outline);
}

.preview__request {
  margin-top: var(--s-5);
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px dashed color-mix(in srgb, var(--brand-red) 40%, var(--outline));
  background: color-mix(in srgb, var(--brand-red) 6%, transparent);
}

.preview__request p {
  font-size: 0.84375rem;
  color: var(--text-2);
  margin-bottom: var(--s-3);
}

.preview__request strong {
  color: var(--text);
}

.preview__request-actions {
  display: flex;
  gap: var(--s-2);
}

.pill-btn {
  flex: 1;
  min-height: 38px;
  padding: 0 var(--s-4);
  border-radius: var(--r-sm);
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.84375rem;
  font-weight: 600;
  cursor: default;
}

.pill-btn--accept {
  background-image: linear-gradient(135deg, var(--cta-from), var(--cta-to));
  color: var(--cta-ink);
  border-color: transparent;
}

/* -------------------------------------------------------------- steps ----- */

.steps {
  display: grid;
  gap: var(--s-5);
  counter-reset: step;
}

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

.step {
  position: relative;
  padding: var(--s-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-sm);
}

.step__num {
  counter-increment: step;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: var(--s-5);
  border-radius: 50%;
  background-image: var(--grad-brand);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
}

.step__num::before {
  content: counter(step);
}

/* ------------------------------------------------------------- safety ----- */

.safety {
  display: grid;
  gap: var(--s-8);
  align-items: start;
}

@media (min-width: 1024px) {
  .safety {
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--s-9);
  }
}

.safety-list {
  display: grid;
  gap: var(--s-4);
  list-style: none;
  padding: 0;
}

.safety-list li {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--outline);
}

.safety-list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--accent-ink);
  margin-top: 2px;
}

.safety-list h3 {
  font-size: 1rem;
  margin-bottom: var(--s-1);
}

.safety-list p {
  font-size: 0.90625rem;
  color: var(--text-2);
}

/* --------------------------------------------------------- comparison ----- */

.compare {
  display: grid;
  gap: var(--s-5);
}

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

.compare__col {
  padding: var(--s-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--outline);
}

.compare__col--them {
  background: var(--surface-alt);
}

.compare__col--us {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--brand-red) 34%, var(--outline));
  box-shadow: var(--shadow-md);
}

.compare__col h3 {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  font-size: 1.0625rem;
}

.compare__col ul {
  display: grid;
  gap: var(--s-4);
  list-style: none;
  padding: 0;
}

.compare__col li {
  display: flex;
  gap: var(--s-3);
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.5;
}

.compare__col li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
}

.compare__col--them li svg {
  color: var(--text-3);
}

.compare__col--us li svg {
  color: var(--success);
}

/* --------------------------------------------------------- dev status ----- */

.status {
  border-radius: 24px;
  padding: var(--s-7);
  border: 1px solid var(--outline);
  background: var(--surface);
}

@media (min-width: 768px) {
  .status {
    padding: var(--s-8);
  }
}

.status__grid {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-6);
}

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

.status__item {
  display: flex;
  gap: var(--s-3);
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.55;
}

.status__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-ink);
}

.status__item strong {
  color: var(--text);
  font-weight: 700;
}

/* ------------------------------------------------------------ cta band ---- */

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: var(--s-8) var(--s-6);
  text-align: center;
  background-image: var(--grad-brand);
  isolation: isolate;
}

@media (min-width: 768px) {
  .cta-band {
    padding: var(--s-9) var(--s-8);
  }
}

/* On the brand gradient, ink is fixed near-black in BOTH themes: white is
   3.81:1 on #f03e3e and 2.80:1 on #ff6b6b. Neither passes. */
.cta-band,
.cta-band h2 {
  color: #24090b;
}

.cta-band p {
  color: #47181a;
  margin-inline: auto;
  margin-top: var(--s-4);
  max-width: 52ch;
  font-size: 1.0625rem;
}

.cta-band .btn--primary {
  background-image: none;
  background-color: #24090b;
  color: #fff;
  margin-top: var(--s-7);
}

.cta-band .btn--primary:hover {
  background-color: #3a1013;
}

/* --------------------------------------------------------------- FAQ ------ */

.faq {
  display: grid;
  gap: var(--s-3);
  max-width: var(--maxw-prose);
}

.faq details {
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5);
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur) var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.faq summary:hover {
  background: var(--surface-alt);
}

.faq p {
  padding: 0 var(--s-5) var(--s-5);
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------- footer ----- */

.footer {
  border-top: 1px solid var(--outline);
  background: var(--surface-alt);
  padding-block: var(--s-8) var(--s-6);
}

.footer__top {
  display: grid;
  gap: var(--s-7);
}

@media (min-width: 768px) {
  .footer__top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer__blurb {
  margin-top: var(--s-4);
  font-size: 0.9375rem;
  color: var(--text-2);
  max-width: 40ch;
}

.footer h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--s-4);
}

.footer ul {
  display: grid;
  gap: var(--s-3);
  list-style: none;
  padding: 0;
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--outline);
  font-size: 0.875rem;
  color: var(--text-3);
}

/* ================================ DOCS ==================================== */

.doc-layout {
  display: grid;
  gap: var(--s-7);
  padding-block: var(--s-7) var(--s-9);
  align-items: start;
}

@media (min-width: 1024px) {
  .doc-layout {
    grid-template-columns: 268px minmax(0, 1fr);
    gap: var(--s-9);
  }
}

/* Table of contents */
.toc {
  display: none;
}

@media (min-width: 1024px) {
  .toc {
    display: block;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    padding-right: var(--s-3);
  }
}

.toc h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--s-4);
}

.toc ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2px;
  counter-reset: toc;
}

.toc a {
  display: block;
  padding: 7px var(--s-3);
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.toc a:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.toc a[aria-current="true"] {
  color: var(--accent-ink);
  border-left-color: var(--accent-ink);
  background: color-mix(in srgb, var(--brand-red) 8%, transparent);
  font-weight: 600;
}

/* Mobile TOC */
.toc-mobile {
  margin-bottom: var(--s-6);
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .toc-mobile {
    display: none;
  }
}

.toc-mobile summary {
  padding: var(--s-4) var(--s-5);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.toc-mobile summary::-webkit-details-marker {
  display: none;
}

.toc-mobile ol {
  list-style: none;
  margin: 0;
  padding: 0 var(--s-3) var(--s-3);
  display: grid;
  gap: 2px;
}

.toc-mobile a {
  display: block;
  padding: var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
}

.toc-mobile a:hover {
  background: var(--surface-alt);
  color: var(--text);
}

/* Document header */
.doc-head {
  padding-bottom: var(--s-6);
  margin-bottom: var(--s-7);
  border-bottom: 1px solid var(--outline);
}

.doc-head h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  margin-bottom: var(--s-4);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-3);
}

.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-7);
}

.doc-tabs a {
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--dur) var(--ease);
}

.doc-tabs a:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.doc-tabs a[aria-current="page"] {
  background-image: linear-gradient(135deg, var(--cta-from), var(--cta-to));
  color: var(--cta-ink);
  border-color: transparent;
}

/* Prose: the rendered legal markdown */
.prose {
  max-width: var(--maxw-prose);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-2);
}

.prose > * + * {
  margin-top: var(--s-5);
}

.prose h2 {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--outline);
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.625rem);
  color: var(--text);
  scroll-margin-top: 96px;
}

.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: var(--s-7);
  font-size: 1.125rem;
  color: var(--text);
  scroll-margin-top: 96px;
}

.prose h4 {
  margin-top: var(--s-6);
  font-size: 1rem;
  color: var(--text);
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.prose a {
  color: var(--accent-ink);
  font-weight: 500;
}

.prose ul,
.prose ol {
  padding-left: var(--s-5);
  display: grid;
  gap: var(--s-3);
}

.prose li {
  padding-left: var(--s-1);
}

.prose li::marker {
  color: var(--text-3);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--outline);
  margin-block: var(--s-7);
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--outline);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  color: var(--text);
}

.prose pre {
  padding: var(--s-5);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  border: 1px solid var(--outline);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

.prose blockquote {
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--accent-ink);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--surface-alt);
}

.prose blockquote > * + * {
  margin-top: var(--s-3);
}

/* Tables scroll inside their own container, never the page */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 460px;
}

.prose th,
.prose td {
  padding: var(--s-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--outline);
}

.prose th {
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 700;
  font-size: 0.875rem;
  white-space: nowrap;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose td strong {
  color: var(--text);
}

.doc-foot {
  max-width: var(--maxw-prose);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--outline);
  font-size: 0.9375rem;
  color: var(--text-3);
}

/* --------------------------------------------------------- motion --------- */

/* Scoped to .js (set by the boot script) so content is never left invisible
   when scripting is blocked or site.js fails to load. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .nav,
  .toc,
  .toc-mobile,
  .doc-tabs,
  .footer,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .prose {
    max-width: none;
  }
}

/* Gradient headline text. Uses --grad-headline (contrast-safe), never
   --grad-brand. Falls back to a solid accent where background-clip is
   unsupported, so the text is never invisible. */
.grad-text {
  color: var(--accent-ink);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .grad-text {
    background-image: var(--grad-headline);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* A `| | |` markdown table is a key/value list, not tabular data. It gets no
   column headers, so the first cell becomes the row header instead. */
.prose th[scope="row"] {
  width: 1%;
  white-space: nowrap;
  background: var(--surface-alt);
  border-right: 1px solid var(--outline);
}

.table-scroll--plain table {
  min-width: 0;
}
