/* ==========================================================================
   Badger — marketing site styles
   Dark, spare theme lifted from the app's DARK mode
   (lib/.../theme/theme_bloc.dart + badger_colors.dart):
   near-black surfaces, lavender primary #BB86FC, brand violet #5A40C8,
   deep-purple #673AB7, teal accent #03DAC6, dark chat surfaces #1F2C33/#2A3942.
   ========================================================================== */

:root {
  /* Brand accents */
  --lavender: #BB86FC;      /* app dark-mode primary */
  --violet: #7C5CFF;
  --violet-deep: #5A40C8;   /* brand violet */
  --deep-purple: #673AB7;
  --teal: #03DAC6;          /* app dark-mode secondary — used sparingly */

  /* Surfaces (deep purple-black, layered) */
  --bg: #0B0714;            /* base */
  --bg-2: #0F0A1B;          /* alternate section */
  --surface: #150F26;       /* cards / panels */
  --surface-2: #1B1432;     /* elevated */
  --surface-3: #241B40;     /* hover */

  /* Lines */
  --line: rgba(187, 134, 252, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(187, 134, 252, 0.28);

  /* Text */
  --text: #ECE8F6;          /* headings / near-white */
  --text-soft: #A79FC4;     /* body */
  --text-dim: #6F6790;      /* muted / captions */

  /* Misc */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --maxw: 1120px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-soft);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.02em;
  color: var(--text);
  font-weight: 700;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; }
p { margin: 0 0 1rem; }
a { color: var(--lavender); text-decoration: none; }
img, svg { max-width: 100%; display: block; }
::selection { background: rgba(187, 134, 252, 0.28); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(72px, 11vw, 132px) 0; position: relative; }
.section--tight { padding: clamp(48px, 7vw, 80px) 0; }
.section--alt { background: var(--bg-2); }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--lavender); margin-bottom: 16px;
}
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--text-soft); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.hr { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  padding: 13px 24px; border-radius: var(--radius-pill); border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--lavender); color: #17102A; }
.btn--primary:hover { background: #c9a5ff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(187, 134, 252, 0.08); transform: translateY(-2px); }
.btn--light { background: var(--lavender); color: #17102A; }
.btn--light:hover { background: #c9a5ff; transform: translateY(-2px); }
.btn--lg { padding: 15px 30px; font-size: 1.04rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(11, 7, 20, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--text); letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a:not(.btn) {
  color: var(--text-soft); font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 9px;
  transition: color .2s, background .2s;
}
.nav__links a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(72px, 12vw, 132px) 0 clamp(64px, 10vw, 116px);
}
/* one restrained radial glow, no animation */
.hero::before {
  content: ""; position: absolute; inset: -20% 0 auto 0; height: 620px;
  background: radial-gradient(60% 80% at 72% 8%, rgba(124, 92, 255, 0.22), transparent 60%),
              radial-gradient(50% 60% at 20% 0%, rgba(103, 58, 183, 0.16), transparent 62%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 800px; margin: 0 auto; text-align: center; }
.hero__lead { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--text-soft); max-width: 54ch; margin: 0 auto 32px; }
.hero .grad { color: var(--lavender); }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero__note { margin-top: 26px; font-size: .88rem; color: var(--text-dim); display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Mood chips row */
.moodstrip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 34px; justify-content: center; }
.moodchip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 7px 15px; font-size: .88rem; display: flex; align-items: center; gap: 7px; color: var(--text-soft);
}

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
}
.stats > div { padding: 26px 22px; text-align: center; border-right: 1px solid var(--line-soft); }
.stats > div:last-child { border-right: 0; }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--text); letter-spacing: -0.02em; }
.stat__label { color: var(--text-dim); font-size: .9rem; margin-top: 4px; }

/* ---------- Feature rows (heading | copy) ---------- */
.feature { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 40px 64px; align-items: start; max-width: 980px; margin: 0 auto; }
.feature + .feature { margin-top: clamp(52px, 7vw, 84px); padding-top: clamp(52px, 7vw, 84px); border-top: 1px solid var(--line-soft); }
.feature__head h2 { margin: 0; }
.feature__body { padding-top: 4px; }
.feature__body .lead { max-width: 56ch; }
.feature__icon { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 22px; margin-bottom: 20px; }
.tick { list-style: none; padding: 0; margin: 22px 0 0; }
.tick li { position: relative; padding-left: 28px; margin-bottom: 11px; color: var(--text-soft); }
.tick li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--lavender); box-shadow: 0 0 0 4px rgba(187, 134, 252, 0.14);
}

/* ---------- Feature grid cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 26px;
  border: 1px solid var(--line-soft); transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-2); }
.card__ico { width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line); background: rgba(187, 134, 252, 0.06); display: grid; place-items: center; font-size: 21px; margin-bottom: 16px; }
.card h3 { margin-bottom: 7px; color: var(--text); }
.card p { color: var(--text-soft); margin: 0; font-size: .95rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { padding: 26px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.step__num { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--lavender); border: 1px solid var(--line); margin-bottom: 16px; }
.step h3 { color: var(--text); }
.step p { color: var(--text-soft); margin: 0; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 20px; justify-content: center; }
.plan { background: var(--surface); border-radius: var(--radius); padding: 32px; border: 1px solid var(--line-soft); }
.plan--featured { border-color: var(--line-strong); background: linear-gradient(180deg, var(--surface-2), var(--surface)); position: relative; }
.plan h3 { color: var(--text); }
.plan__tag { position: absolute; top: 20px; right: 20px; color: var(--lavender); border: 1px solid var(--line-strong); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; }
.plan__price { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; margin: 10px 0 2px; color: var(--text); }
.plan__price span { font-size: 1rem; font-weight: 500; color: var(--text-dim); }
.plan > p { color: var(--text-dim); margin-top: 0; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; }
.plan li { padding-left: 26px; position: relative; margin-bottom: 11px; color: var(--text-soft); }
.plan li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--lavender); }

/* ---------- CTA band ---------- */
.cta-band { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(40px, 6vw, 68px); text-align: center; position: relative; overflow: hidden; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.cta-band h2 { color: var(--text); }
.cta-band p { color: var(--text-soft); max-width: 50ch; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line-soft); color: var(--text-dim); padding: 66px 0 34px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer h4 { color: var(--text); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.footer a { color: var(--text-dim); display: block; padding: 5px 0; font-size: .93rem; }
.footer a:hover { color: var(--text); }
.footer__brand p { max-width: 34ch; margin-top: 14px; }
.footer__brand .brand { color: var(--text); }
.footer__bottom { margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .84rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Doc pages (Using Badger / Help / Privacy) — inherit the dark theme
   ========================================================================== */
.doc-hero { padding: clamp(60px, 9vw, 96px) 0 clamp(40px, 6vw, 68px); position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.doc-hero::before { content: ""; position: absolute; inset: -30% 0 auto 0; height: 400px; background: radial-gradient(50% 70% at 78% 0%, rgba(124, 92, 255, 0.18), transparent 60%); pointer-events: none; }
.doc-hero .container { position: relative; }
.doc-hero .lead { color: var(--text-soft); }
.doc-layout { display: grid; grid-template-columns: 236px 1fr; gap: 52px; align-items: start; }
.toc { position: sticky; top: 88px; font-size: .93rem; }
.toc h4 { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); }
.toc a { display: block; color: var(--text-soft); padding: 7px 12px; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; }
.toc a:hover, .toc a.active { color: var(--text); background: rgba(187, 134, 252, 0.08); border-left-color: var(--lavender); }
.prose { max-width: 740px; }
.prose h2 { margin-top: 56px; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 30px; color: var(--text); }
.prose p, .prose li { color: var(--text-soft); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.prose code { background: rgba(187, 134, 252, 0.12); padding: 2px 7px; border-radius: 6px; font-size: .9em; color: var(--lavender); }
.callout { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line-soft); border-left: 3px solid var(--lavender); border-radius: 12px; padding: 16px 18px; margin: 22px 0; }
.callout .ico { font-size: 22px; }
.callout p { margin: 0; color: var(--text-soft); }
.step-card { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 20px 22px; margin-bottom: 14px; }
.step-card .n { flex: 0 0 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); color: var(--lavender); font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; }
.step-card h3 { margin: 2px 0 6px; color: var(--text); }
.step-card p { margin: 0; }

/* FAQ accordion */
.faq { max-width: 800px; }
.faq__item { border-bottom: 1px solid var(--line-soft); scroll-margin-top: 90px; }
.faq__q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.faq__q::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--lavender); transition: transform .25s; }
.faq__item.open .faq__q::after { content: "−"; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a-inner { padding: 0 0 22px; color: var(--text-soft); }
/* Rich FAQ answers (generated from the Notion FAQ cards by tools/build_faq_page.py):
   multi-paragraph bodies, bullet lists, and an alpha-tester footnote. */
.faq__a-inner p { margin: 0 0 12px; }
.faq__a-inner p:last-child { margin-bottom: 0; }
.faq__a-inner ul { margin: 0 0 12px; padding-left: 20px; }
.faq__a-inner li { margin-bottom: 8px; }
.faq__a-inner strong { color: var(--text); }
.faq__a-inner a { color: var(--lavender); text-decoration: underline; text-underline-offset: 3px; }
.faq__q .faq__ico { margin-right: 10px; }
.faq__note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: .92em; opacity: .8; }
.faq__figure { margin: 16px 0; text-align: center; }
.faq__figure img { max-width: min(100%, 420px); height: auto; border-radius: 10px; border: 1px solid var(--line); }
.faq__figure figcaption { margin-top: 8px; font-size: .85rem; color: var(--text-dim); }

/* Pills / category chips */
.pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 8px; }
.pill { background: rgba(187, 134, 252, 0.08); color: var(--lavender); border: 1px solid var(--line); border-radius: 999px; padding: 6px 15px; font-weight: 600; font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 18px; }
  .cards, .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(1), .stats > div:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .pricing { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; display: none; }
  .nav__links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); padding: 14px 18px 22px; box-shadow: var(--shadow); border-bottom: 1px solid var(--line-soft);
    transform: translateY(-130%); transition: transform .3s ease;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links .btn { margin-top: 8px; justify-content: center; }
  .nav__toggle { display: block; }
}
@media (max-width: 560px) {
  .cards, .steps, .footer__grid, .stats { grid-template-columns: 1fr; }
  .stats > div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .stats > div:last-child { border-bottom: 0; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
  .container { padding: 0 18px; }
  .footer__bottom { flex-direction: column; }
}
/* Platform choice cards — the "which device are you on?" row, shared by
   invite.html (iPhone vs Android) and companion.html (web vs Mac). They are <a>
   elements, not buttons: each is simply a link, so the page works with JS off.
   `.is-on` only HIGHLIGHTS a likely match from the user-agent — it never picks
   for you, because a device can be wrong about itself and every route must stay
   one tap away.
   🛑 Lived inline in invite.html until 2026-07-28. Defined ONCE here now that a
   second page uses it — two copies of a card style is exactly how the two drift. */
.platforms { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

.platforms .platform-card {
  flex: 1 1 200px;
  padding: 16px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  text-align: left;
  text-decoration: none;
}

.platforms .platform-card:hover { border-color: var(--lavender); }
.platforms .platform-card.is-on { border-color: var(--lavender); background: var(--surface-2); }
.platforms .platform-card span { display: block; font-weight: 400; font-size: .9rem; color: var(--text-soft); margin-top: 3px; }

/* `--split`: two routes that are genuinely ALTERNATIVES, not a menu. At the base
   12px gap two hairline-bordered cards read as one wide block with a line down
   the middle, so this widens the gap and puts a literal "or" between them.
   ⚠️ CURRENTLY UNUSED. Its one caller was companion.html's "web companion or
   download the Mac app" pair, and the macOS DMG was parked on 2026-07-29, so
   that page now offers a single route. Kept because the pattern is sound and
   cheap, but do not trust a comment that names a live caller — this one no longer
   has any. Delete it if nothing has claimed it by the store launch. */
.platforms--split { gap: 22px; align-items: stretch; }
.platforms--split .platforms__or {
  align-self: center;
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: .95rem;
  padding: 2px 0;
}

@media (max-width: 560px) {
  /* 🛑 Must be an explicit COLUMN, not left to wrap. The cards are `flex:1 1 200px`
     so they wrap to full width, but the "or" is only ~20px wide and happily sits
     BESIDE the first card on the same line — which reads as a stray word in the
     margin rather than a separator. Stacking forces card / or / card. */
  .platforms--split { flex-direction: column; gap: 14px; }
  .platforms--split .platforms__or { align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
