/* TextBridge site — shared styles for the marketing and privacy pages.
   Self-contained: no external fonts, scripts or trackers, which keeps the site
   fast and matches what the app itself promises about data. Motion is pure CSS
   plus a tiny inline IntersectionObserver (see the HTML) — nothing is fetched
   from the network, and every animation is gated on prefers-reduced-motion. */

/* ========================================================================
   Design tokens
   ======================================================================== */

:root {
  --brand: #1e6fd9;
  --brand-strong: #1857ab;
  --accent: #229ed9;          /* Telegram-family cyan */

  /* App logo gradient. These are the resolved ColorScheme.primary and
     .tertiary from the app's seed (#1E6FD9), so the site mark matches the
     splash screen exactly rather than approximately. Light-theme values. */
  --logo-from: #425e91;
  --logo-to: #705574;

  --grad-brand: linear-gradient(135deg, var(--brand), var(--accent));
  --grad-logo:  linear-gradient(135deg, var(--logo-from), var(--logo-to));

  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --bg-card: #ffffff;
  --text: #0c1220;
  --text-muted: #545f78;
  --text-faint: #7a849b;
  --border: #e4e9f2;
  --border-strong: #d5dcea;
  --link: var(--brand);
  --success: #1b873f;
  --warning: #b26a00;

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --pill: 999px;
  --maxw: 1120px;

  --shadow-sm: 0 1px 2px rgba(16, 21, 31, 0.05), 0 4px 12px rgba(16, 21, 31, 0.05);
  --shadow: 0 2px 6px rgba(16, 21, 31, 0.06), 0 18px 40px rgba(16, 21, 31, 0.08);
  --shadow-lg: 0 8px 24px rgba(16, 21, 31, 0.08), 0 40px 80px rgba(16, 21, 31, 0.12);
  --glow: 0 20px 60px color-mix(in srgb, var(--brand) 22%, transparent);
  --ring: color-mix(in srgb, var(--brand) 45%, transparent);

  /* Easing — expo.out (enter) and a gentle overshoot (back.out ~1.4). */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.4, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4a90f0;
    --brand-strong: #6aa9f5;
    --accent: #38b6ee;

    /* Dark-theme ColorScheme.primary / .tertiary, matching the app in dark. */
    --logo-from: #acc7ff;
    --logo-to: #ddbce0;

    --bg: #090d15;
    --bg-soft: #0f1622;
    --bg-card: #131b28;
    --text: #eaeef8;
    --text-muted: #9aa6bd;
    --text-faint: #74809a;
    --border: #212b3c;
    --border-strong: #2c3850;
    --link: #6aa9f5;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 24px 50px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5), 0 50px 90px rgba(0, 0, 0, 0.6);
    --glow: 0 24px 70px color-mix(in srgb, var(--brand) 30%, transparent);
  }
}

/* ========================================================================
   Reset & base
   ======================================================================== */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

a { color: var(--link); text-underline-offset: 2px; }

h1, h2, h3 { line-height: 1.16; letter-spacing: -0.025em; margin: 0 0 14px; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.5rem); font-weight: 780; }
h3 { font-size: 1.14rem; font-weight: 680; letter-spacing: -0.01em; }
p { margin: 0 0 16px; }

::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ========================================================================
   Motion utilities (scroll reveal + ambient)
   The initial hidden state only applies when JS is present (.js on <html>)
   and the visitor has not asked for reduced motion — so no-JS and
   reduced-motion visitors always see fully-rendered, static content.
   ======================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: calc(var(--i, 0) * 75ms);
    will-change: opacity, transform;
  }
  .js [data-reveal].reveal-in {
    opacity: 1;
    transform: none;
  }
}

/* ========================================================================
   Header
   ======================================================================== */

header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
header.site.scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  box-shadow: 0 6px 24px rgba(16, 21, 31, 0.05);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* Mirrors the splash screen: a rounded square with a topLeft->bottomRight
   gradient from ColorScheme.primary to .tertiary, white glyph inside.
   The app uses a 96px tile with a 26px radius, so the radius is kept at that
   same 0.27 ratio and the glyph at the same 0.5 of the tile. */
.brand .mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad-logo);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--logo-to) 45%, transparent);
  transition: transform 0.3s var(--ease-back);
}
.brand:hover .mark { transform: rotate(-6deg) scale(1.06); }
.brand .mark svg { width: 18px; height: 18px; fill: #fff; }

nav.site-nav { display: flex; align-items: center; gap: 8px; }
nav.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 9px;
  transition: color 0.18s ease, background 0.18s ease;
}
nav.site-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
nav.site-nav a.nav-cta {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  font-weight: 640;
}
nav.site-nav a.nav-cta:hover { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }

@media (max-width: 640px) {
  nav.site-nav a.hide-sm { display: none; }
}

/* ========================================================================
   Buttons
   ======================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 13px;
  font-weight: 660;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s var(--ease-back), box-shadow 0.25s ease,
    background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--glow);
}
.btn-primary:hover { box-shadow: 0 26px 70px color-mix(in srgb, var(--brand) 34%, transparent); transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  background: color-mix(in srgb, var(--bg-card) 60%, transparent);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--brand); color: var(--brand); }

/* ========================================================================
   Hero
   ======================================================================== */

.hero {
  position: relative;
  padding: clamp(64px, 10vw, 128px) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

/* Ambient light field — decorative only, drifts slowly behind the content. */
.hero-aura {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  z-index: -1;
  pointer-events: none;
}
.hero-aura span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.6;
}
.hero-aura .a1 {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  left: -6%; top: -14%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 60%, transparent), transparent 70%);
}
.hero-aura .a2 {
  width: 40vw; height: 40vw; max-width: 540px; max-height: 540px;
  right: -4%; top: -8%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 52%, transparent), transparent 70%);
}
.hero-aura .a3 {
  width: 34vw; height: 34vw; max-width: 460px; max-height: 460px;
  left: 34%; top: 30%;
  background: radial-gradient(circle, color-mix(in srgb, var(--logo-to) 42%, transparent), transparent 70%);
  opacity: 0.4;
}
/* Subtle dotted grid for depth. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 8%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 22%, #000 30%, transparent 72%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 22%, #000 30%, transparent 72%);
  opacity: 0.5;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-aura .a1 { animation: drift1 22s ease-in-out infinite alternate; }
  .hero-aura .a2 { animation: drift2 26s ease-in-out infinite alternate; }
  .hero-aura .a3 { animation: drift1 30s ease-in-out infinite alternate; }
}
@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4%, 5%, 0) scale(1.12); }
}
@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(-5%, 4%, 0) scale(0.95); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: flex; justify-content: center; margin-top: 8px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 70%, transparent);
  flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .eyebrow .dot { animation: pulse 2.4s ease-out infinite; }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--success) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 0%, transparent); }
}

.hero h1 { margin-bottom: 20px; }

.lede {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  color: var(--text-muted);
  max-width: 48ch;
  margin-bottom: 30px;
  line-height: 1.6;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.cta-note { font-size: 0.88rem; color: var(--text-faint); margin: 0; }

/* Trust chips under the hero CTA. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 560;
  color: var(--text-muted);
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg-card);
}
.chips svg { width: 15px; height: 15px; stroke: var(--brand); fill: none; stroke-width: 2; flex-shrink: 0; }

/* ---------- hero visual / phone stage ---------- */

.hero-visual { position: relative; }

.stage {
  position: relative;
  width: 300px;
  max-width: 100%;
}
.stage-glow {
  position: absolute;
  inset: 8% 4%;
  z-index: -1;
  background: var(--grad-brand);
  filter: blur(48px);
  opacity: 0.35;
  border-radius: 50%;
}

.phone {
  position: relative;
  border-radius: 38px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 100%, transparent), var(--bg-card));
  box-shadow: var(--shadow-lg);
  padding: 18px 15px 22px;
  z-index: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .phone { animation: float 7s ease-in-out infinite; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.phone-notch {
  width: 96px; height: 6px;
  border-radius: var(--pill);
  background: var(--border-strong);
  margin: 2px auto 18px;
}

.tg-app {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 640;
  color: var(--text-muted);
}
.tg-app .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad-brand);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tg-app .avatar svg { width: 16px; height: 16px; fill: #fff; }
.tg-app b { color: var(--text); font-weight: 680; display: block; letter-spacing: -0.01em; }
.tg-app .status { display: block; color: var(--success); font-weight: 560; font-size: 0.76rem; }

.tg-msg {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  border-top-left-radius: 5px;
  padding: 15px 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  position: relative;
}
.tg-msg .head { font-weight: 720; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.tg-msg .label {
  color: var(--text-faint);
  font-size: 0.7rem;
  font-weight: 640;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tg-msg .val { margin-bottom: 11px; word-break: break-word; }
.tg-msg .val:last-child { margin-bottom: 0; }
.tg-msg .time {
  display: block;
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.sim-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 660;
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  color: var(--brand);
}

/* Floating source card — the incoming SMS that gets bridged. */
.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  backdrop-filter: blur(8px);
}
.float-card .ic {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center; flex-shrink: 0;
}
.float-card .ic svg { width: 17px; height: 17px; }
.float-card b { display: block; font-weight: 680; color: var(--text); letter-spacing: -0.01em; }
.float-card small { color: var(--text-faint); font-size: 0.74rem; }

.float-sms {
  top: -4%;
  left: -13%;
}
.float-sms .ic { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.float-sms .ic svg { fill: none; stroke: var(--accent); stroke-width: 2; }

.float-ok {
  bottom: 9%;
  right: -13%;
}
.float-ok .ic { background: color-mix(in srgb, var(--success) 16%, transparent); }
.float-ok .ic svg { fill: none; stroke: var(--success); stroke-width: 2.4; }

@media (prefers-reduced-motion: no-preference) {
  .float-sms { animation: float 7s ease-in-out infinite; animation-delay: 0.6s; }
  .float-ok  { animation: float 7s ease-in-out infinite; animation-delay: 1.2s; }
}
@media (max-width: 420px) {
  .float-sms { left: -6%; }
  .float-ok { right: -4%; }
}

/* ========================================================================
   Logo / marquee band
   ======================================================================== */

.band {
  border-block: 1px solid var(--border);
  background: var(--bg-soft);
}
.band .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-block: 30px;
}
.stat { text-align: center; }
.stat .num {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.stat .lab { font-size: 0.84rem; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 620px) {
  .band .wrap { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
}

/* ========================================================================
   Sections
   ======================================================================== */

section { padding: clamp(64px, 9vw, 108px) 0; position: relative; }
section.soft { background: var(--bg-soft); border-block: 1px solid var(--border); }

.sec-head { max-width: 60ch; margin-bottom: 48px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head .kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.sec-head p { color: var(--text-muted); margin: 0; font-size: 1.06rem; }

/* ---------- features grid (bento) ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 50%, transparent), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card:hover::after { opacity: 1; }

.card .ico {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  transition: transform 0.3s var(--ease-back);
}
.card:hover .ico { transform: scale(1.08) rotate(-4deg); }
.card .ico svg { width: 24px; height: 24px; stroke: var(--brand); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.card h3 { margin-bottom: 9px; }
.card p { color: var(--text-muted); font-size: 0.96rem; margin: 0; }

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

.steps {
  counter-reset: step;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 20px; } }

.step {
  position: relative;
  padding: 30px 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  background: var(--grad-logo);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--logo-to) 40%, transparent);
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.96rem; margin: 0; }

/* ---------- callout ---------- */

.callout {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.callout::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}
.callout .callout-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warning);
  margin-bottom: 12px;
}
.callout .callout-tag svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.callout h3 { margin-bottom: 10px; font-size: 1.25rem; }
.callout p { color: var(--text-muted); font-size: 0.98rem; margin: 0; }
.callout p + p { margin-top: 12px; }
.callout .more { display: inline-block; margin-top: 14px; font-weight: 640; text-decoration: none; }
.callout .more:hover { text-decoration: underline; }

/* ---------- faq ---------- */

.faq { max-width: 780px; margin: 0 auto; }
details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 4px 22px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
details:hover { border-color: var(--border-strong); }
details[open] { background: var(--bg-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); box-shadow: var(--shadow-sm); }
summary {
  cursor: pointer;
  font-weight: 640;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 7px;
  background:
    linear-gradient(currentColor, currentColor) center/11px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center/2px 11px no-repeat,
    color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  transition: transform 0.25s var(--ease);
}
details[open] summary::after {
  transform: rotate(135deg);
}
details p { margin: 0 0 16px; color: var(--text-muted); font-size: 0.97rem; }

/* ---------- final CTA band ---------- */

.cta-band { position: relative; overflow: hidden; }
.cta-inner {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(44px, 6vw, 68px) 32px;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  background:
    radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
    var(--bg-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cta-inner::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 70%;
  background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  filter: blur(50px);
  z-index: 0;
  pointer-events: none;
}
.cta-inner > * { position: relative; z-index: 1; }
.cta-inner h2 { margin-bottom: 12px; }
.cta-inner p { color: var(--text-muted); max-width: 46ch; margin: 0 auto 26px; }
.cta-inner .cta-row { justify-content: center; margin-bottom: 0; }

/* ========================================================================
   Footer
   ======================================================================== */

footer.site {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  background: var(--bg-soft);
}
footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
}
.foot-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: var(--text); }
.foot-brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad-logo);
  display: grid; place-items: center;
}
.foot-brand .mark svg { width: 15px; height: 15px; fill: #fff; }
.foot-brand span { font-weight: 400; color: var(--text-muted); font-size: 0.86rem; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--text-muted); text-decoration: none; margin-left: 22px; transition: color 0.18s ease; }
footer.site .foot-links a:first-child { margin-left: 0; }
footer.site a:hover { color: var(--text); }

/* ========================================================================
   Privacy / policy document
   ======================================================================== */

.doc { padding: clamp(48px, 7vw, 80px) 0 90px; position: relative; }
.doc::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 340px;
  z-index: -1;
  background: radial-gradient(700px 300px at 15% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%);
  pointer-events: none;
}

.doc-head { max-width: 820px; margin: 0 auto 8px; }
.doc-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.doc-head .lede { max-width: 62ch; margin-bottom: 22px; }
.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.updated .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.doc-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  max-width: 980px;
  margin: 40px auto 0;
}
/* min-width:0 lets the content column shrink below its min-content (the wide
   permissions table) so the table scrolls inside its own box instead of
   stretching the whole page — the cause of the mobile right-edge clipping. */
.doc-grid > * { min-width: 0; }
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

.doc-toc {
  position: sticky;
  top: 92px;
}
@media (max-width: 900px) {
  .doc-toc {
    position: static;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
  }
}
.doc-toc h2 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
  font-weight: 700;
}
.doc-toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}
.doc-toc li { counter-increment: toc; margin: 0; }
.doc-toc a {
  display: block;
  padding: 7px 0 7px 18px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.doc-toc a::before { content: counter(toc) ". "; color: var(--text-faint); }
.doc-toc a:hover { color: var(--brand); border-left-color: color-mix(in srgb, var(--brand) 40%, transparent); }
@media (max-width: 900px) {
  .doc-toc h2 { margin-bottom: 6px; }
  .doc-toc ol { border-left: none; }
  .doc-toc a {
    padding: 12px 2px;
    margin-left: 0;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }
  .doc-toc li:last-child a { border-bottom: none; }
  .doc-toc a:hover { border-left-color: transparent; }
}

.doc-body { max-width: 720px; min-width: 0; }
.doc-body > p:first-of-type { font-size: 1.08rem; }
.doc-body h2 {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 92px;
  font-size: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.doc-body h2:first-of-type { margin-top: 8px; border-top: none; padding-top: 0; }
.doc-body h2 .n {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-radius: 8px;
  padding: 2px 9px;
  flex-shrink: 0;
}
.doc-body h3 { margin-top: 28px; color: var(--text); }
.doc-body ul { padding-left: 4px; margin: 0 0 18px; list-style: none; }
.doc-body li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 11px;
}
.doc-body li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.doc-body code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.86em;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

/* highlight panel for the "short version" */
.doc-lead {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent),
    var(--bg-card);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin: 0 0 8px;
  box-shadow: var(--shadow-sm);
}
.doc-lead p { margin: 0; }
.doc-lead p + p { margin-top: 12px; }

.table-scroll {
  overflow-x: auto;
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 460px;
}
th, td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
th { font-weight: 680; background: var(--bg-soft); font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }
td:first-child { white-space: nowrap; font-weight: 600; color: var(--text); }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }

.doc-contact {
  margin-top: 40px;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.doc-contact p { margin: 0; }

/* ========================================================================
   Mode comparison — Simple vs Advanced
   ========================================================================
   Two cards that have to read as a choice rather than as two more features,
   so they get a header strip, a tinted accent per mode, and a tick list.
   Everything else is inherited from .card. */

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 820px) { .modes { grid-template-columns: 1fr; } }

.mode { display: flex; flex-direction: column; }
.mode-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.mode-head .ico { margin: 0; flex: none; }

.mode h3 { margin: 0; }
.mode .tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--pill);
  margin-bottom: 14px;
}
.mode-simple .tag { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.mode-advanced .tag { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

.mode ul { list-style: none; margin: 16px 0 0; padding: 0; }
.mode li {
  position: relative;
  padding: 0 0 0 28px;
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 0.96rem;
}
.mode li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.52em;
  width: 11px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.85;
}
.mode-simple li::before { color: var(--brand); }
.mode-advanced li::before { color: var(--accent); }

.mode .foot {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* A quiet, full-width note under a grid — used for the "switch any time"
   reassurance, which applies to both cards rather than either one. */
.note-strip {
  margin-top: 22px;
  padding: 16px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}
.note-strip strong { color: var(--text); }
