/* BriskFyr site sheet — v2. Covers index_v4.html / index_v4_light.html (hero:
   two-column top, centered CTA, full-width GUI animation) AND pricing.html
   (centered top bar + gradient hero + pricing cards + FAQ). Reuses the app's
   design tokens (identical values to style_opt.css). All surfaces are token-
   driven, so `body.theme-light` themes the pricing page too. Vanilla CSS. */

@font-face {
  font-family: 'Bryndan Hand';
  src: url('fonts/Bryndan_Hand.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-app: #16171a;
  --bg-panel: #1e1f24;
  --bg-elevated: #2a2b31;
  --border-subtle: #34353c;

  --text-primary: #ececf0;
  --text-muted: #a8a9b4;
  --text-faint: #6e6f7a;

  --brisk-blue: #258fde;
  --fyr-green: #26d980;
  --gradient-brand: linear-gradient(135deg, var(--brisk-blue), var(--fyr-green));

  --font-ui: 'Inter', system-ui, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font-ui);
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brisk { color: var(--brisk-blue); }
.fyr { color: var(--fyr-green); }

/* ===================== Top bar ===================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(22, 23, 26, 0.72);
  backdrop-filter: blur(8px);
}
.brand-mark {
  font-family: 'Bryndan Hand', cursive;
  font-size: 1.55rem;
  line-height: 1;
}
/* Thunder-fire mark pinned top-left; brand wordmark stays centred. */
.brand-logo {
  position: absolute;
  left: clamp(1rem, 5vw, 2.25rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
}
.brand-logo img { height: 32px; width: auto; display: block; }

/* Nav link pinned top-right; brand stays centred via the flex container. */
.topbar-link {
  position: absolute;
  right: clamp(1rem, 5vw, 2.25rem);
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.topbar-link:hover { color: var(--text-primary); }

/* ===================== Hero ===================== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.75rem, 5vh, 3.25rem) clamp(1.25rem, 5vw, 3rem) clamp(2.5rem, 6vh, 4rem);
  overflow: hidden;
}

/* Bright spot, centred. */
.hero-glow {
  position: absolute;
  top: clamp(2rem, 12vh, 6rem);
  left: 50%;
  width: min(1000px, 120vw);
  height: 680px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(37, 143, 222, 0.24), transparent 72%),
    radial-gradient(closest-side, rgba(38, 217, 128, 0.13), transparent 70%);
  background-position: 44% 42%, 60% 54%;
  background-repeat: no-repeat;
  filter: blur(36px);
  z-index: 0;
  pointer-events: none;
}

/* ---------- Top: two columns ---------- */
.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: center;
}

/* Left column: copy (kept as-is / compact). */
.hero-copy { text-align: left; }

.hero-eyebrow-line {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 0.95rem;
}

.lede {
  font-size: clamp(0.9rem, 1.3vw, 1.02rem);
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: 1.35rem;
}

.hero-ticks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hero-ticks li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
}
.tick {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: var(--fyr-green);
}

/* Right column: rotating word animation (fade in and replace). */
.hero-anim {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(4rem, 12vw, 7rem);
}
.word-cycle {
  position: relative;
  width: 100%;
  height: clamp(3rem, 7vw, 4.5rem);
}
/* IMPORTANT: a gradient (`background-clip: text`) element must NOT be a flex
   container — the clip fails to bind to text inside a flex box and the word
   renders invisible. Centre with text-align + line-height instead so the
   gradient text actually shows. */
.word-cycle span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  text-align: center;
  line-height: clamp(3rem, 7vw, 4.5rem);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: 0;
  transition: opacity 0.55s ease;
  /* Solid brand colour base — the word is ALWAYS visible even where
     background-clip:text is unsupported; @supports upgrades to the gradient. */
  color: var(--fyr-green);
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .word-cycle span {
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}
/* A tiny inline script (index_v4.html) toggles `.active` on one word at a time;
   the fade is a CSS *transition*, not a @keyframes animation. Transitions +
   JS-driven class swaps are far more reliable across browsers and are NOT
   frozen by "reduce motion" — which is why the pure-CSS keyframe version
   wasn't cycling. The word still swaps under reduced-motion (just without the
   fade), so it always rotates. */
.word-cycle span.active { opacity: 1; }

/* ---------- Centered CTA (above the GUI animation) ---------- */
.cta-row {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  margin: clamp(1.9rem, 4.5vh, 2.75rem) auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 0.55rem;
}
/* The email field + its consent line share a left-aligned column, so the
   consent sits directly below the field and starts at the field's left edge. */
.cta-lead { flex: 0 1 230px; display: flex; flex-direction: column; }
.cta-row input {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 0.64rem 0.85rem;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.95rem;
}
.cta-row input::placeholder { color: var(--text-faint); }
.cta-row input:focus { outline: none; border-color: var(--brisk-blue); }

.btn-primary {
  background: var(--gradient-brand);
  color: #0b0c0e;
  border: none;
  border-radius: 9px;
  padding: 0.64rem 1.1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease;
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 0.64rem 1.05rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease;
}
.btn-ghost:hover { border-color: var(--text-muted); }

/* ---------- Full-width GUI app animation (bottom, SimScale-style) ---------- */
.gui-showcase {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  margin: clamp(2.25rem, 5.5vh, 3.5rem) auto 0;
}
.gui-window {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 40px 90px -28px rgba(37, 143, 222, 0.32),
    0 30px 80px -36px rgba(38, 217, 128, 0.24);
}
.gui-window .mock-bar {
  display: flex;
  gap: 0.42rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.gui-window .mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-subtle);
}
.gui-window video,
.gui-window img {
  display: block;
  width: 100%;
  height: auto;
}

/* ===================== Responsive ===================== */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-anim { min-height: clamp(3rem, 14vw, 5rem); }
  .hero-glow { top: 8vh; }
}

/* ===================== Pricing page ===================== */
.pricing-hero {
  position: relative;
  text-align: center;
  padding: clamp(2.5rem, 7vh, 4.5rem) clamp(1.25rem, 5vw, 3rem) clamp(1.5rem, 4vh, 2.5rem);
  overflow: hidden;
}
.pricing-hero .hero-glow { top: clamp(-2rem, 2vh, 2rem); height: 480px; }

.badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  margin-bottom: 1.25rem;
}

.pricing-title {
  position: relative;
  z-index: 1;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.pricing-sub {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
}

/* ---------- Cards ---------- */
.pricing-cards-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2rem) clamp(1.25rem, 5vw, 3rem) clamp(2rem, 5vh, 3rem);
  text-align: center;
}
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  text-align: left;
}
.price-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
}
/* Featured (Free) card: brand-gradient edge + soft glow, echoing the GUI window. */
.price-card.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
    var(--gradient-brand) border-box;
  box-shadow:
    0 30px 70px -34px rgba(37, 143, 222, 0.30),
    0 24px 60px -40px rgba(38, 217, 128, 0.22);
}
.price-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.price-name { font-size: 1.15rem; font-weight: 700; }
.price-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
}
.price-badge.live {
  color: var(--fyr-green);
  border-color: color-mix(in srgb, var(--fyr-green) 45%, transparent);
}
.price-amount {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0.35rem 0 0.15rem;
}
.price-amount.muted { font-size: 1.2rem; font-weight: 600; color: var(--text-muted); }
.price-tagline { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1.1rem; }

.price-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}
.price-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-primary);
}
.price-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gradient-brand);
}
.price-list li em { color: var(--text-faint); font-style: normal; }

.price-card .btn-primary { margin-top: auto; text-align: center; }
.price-note { margin-top: auto; color: var(--text-faint); font-size: 0.85rem; }

.pricing-fine { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.5rem; }
.pricing-fine.faint { color: var(--text-faint); }

/* ---------- FAQ ---------- */
.faq-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2rem) clamp(1.25rem, 5vw, 3rem) clamp(3rem, 7vh, 5rem);
}
.faq-title {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.faq { display: flex; flex-direction: column; gap: 0.7rem; }
.faq details {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 0.9rem 1.1rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--text-faint);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.6rem; }

/* ---------- Waitlist consent line (one-line, under the email field) ---------- */
.cta-consent {
  margin: 0.5rem 0 0;
  padding-left: 0.2rem;            /* start slightly after the field's left edge */
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--text-faint);
  text-align: left;
}
.cta-consent a { color: var(--text-muted); text-decoration: underline; }
.cta-consent a:hover { color: var(--text-primary); }

/* ---------- Legal pages (terms.html / privacy.html) ----------
   Single-file, dark-default long-form text pages — the only pages on this
   site that react to the OS colour-scheme preference (index/pricing use
   twin files instead; low-traffic legal text doesn't warrant a duplicate
   file). Scoped under `.legal-page` / `body.legal` so it can't leak into
   the twin-file pages below. */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 3.5rem) clamp(1.25rem, 5vw, 2rem) clamp(3rem, 6vh, 4rem);
}
.legal-page h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.legal-meta { color: var(--text-faint); font-size: 0.85rem; margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.legal-page p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.9rem; }
.legal-page p strong, .legal-page li strong { color: var(--text-primary); }
.legal-page ul {
  list-style: disc;
  padding-left: 1.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.legal-page a { color: var(--brisk-blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-page .callout {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  color: var(--text-primary);
}
@media (prefers-color-scheme: light) {
  body.legal {
    --bg-app: #ffffff;
    --bg-panel: #f5f6f8;
    --bg-elevated: #eceef1;
    --border-subtle: #e0e2e7;
    --text-primary: #1a1b1e;
    --text-muted: #565761;
    --text-faint: #8a8b95;
    --brisk-blue: #1f7ec4;
    --fyr-green: #17a862;
  }
  body.legal .topbar { background: rgba(255, 255, 255, 0.82); }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  padding: clamp(1.75rem, 4vh, 2.75rem) 1.25rem;
}
.footer-tag { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.footer-fine { color: var(--text-faint); font-size: 0.85rem; }
.footer-fine a { text-decoration: underline; text-underline-offset: 2px; }
.footer-fine a:hover { color: var(--text-primary); }
.footer-todo { color: var(--text-faint); cursor: help; }
.bf { font-weight: 600; }

@media (max-width: 720px) {
  .pricing-cards { grid-template-columns: 1fr; }
}

/* ===================== Light theme variant (A/B) =====================
   Same layout; only the token values + a few surface treatments flip. Applied
   via `<body class="theme-light">` (index_v4_light.html) so a Worker/JS can
   later serve either theme by toggling the class. Brand blue/green nudged
   slightly darker for legibility on white (esp. the green in the gradient). */
body.theme-light {
  --bg-app: #ffffff;
  --bg-panel: #f5f6f8;
  --bg-elevated: #eceef1;
  --border-subtle: #e0e2e7;

  --text-primary: #1a1b1e;
  --text-muted: #565761;
  --text-faint: #8a8b95;

  --brisk-blue: #1f7ec4;
  --fyr-green: #17a862;
  --gradient-brand: linear-gradient(135deg, var(--brisk-blue), var(--fyr-green));
}
body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.82);
}
body.theme-light .hero-glow {
  background:
    radial-gradient(closest-side, rgba(37, 143, 222, 0.10), transparent 72%),
    radial-gradient(closest-side, rgba(38, 217, 128, 0.09), transparent 70%);
}
body.theme-light .btn-primary { color: #ffffff; }
body.theme-light .gui-window {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 30px 70px -30px rgba(37, 143, 222, 0.22),
    0 24px 60px -36px rgba(38, 217, 128, 0.16);
}
