/* ============================================================================
   Genius - marketing site stylesheet
   Design system built on the Genius desktop app's exact brand palette
   (neutral OKLCH dark theme, hue ~286, near-zero chroma - see
   src/renderer/index.css). Premium-minimal aesthetic: near-black canvas,
   hairline white-alpha borders, white primary CTAs. No external requests,
   no web fonts, no trackers.
   ========================================================================== */

:root {
  /* ── Brand palette (from src/renderer/index.css `.dark`) ─────────────── */
  --bg:            oklch(0.141 0.005 285.823);
  --bg-elevated:   oklch(0.175 0.005 285.85);
  --fg:            oklch(0.985 0 0);
  --card:          oklch(0.21 0.006 285.885);
  --card-2:        oklch(0.246 0.006 285.9);
  --muted-fg:      oklch(0.705 0.015 286.067);
  --primary:       oklch(0.985 0 0);
  --primary-fg:    oklch(0.21 0.006 285.885);
  --border:        oklch(1 0 0 / 0.10);
  --border-strong: oklch(1 0 0 / 0.16);
  --destructive:   oklch(0.704 0.191 22.216);
  --success:       oklch(0.74 0.16 150);

  /* ── Scale ───────────────────────────────────────────────────────────── */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --container: 1140px;
  --header-h: 68px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "Segoe UI Mono",
    Menlo, Consolas, monospace;

  --shadow: 0 1px 0 0 oklch(1 0 0 / 0.04) inset,
            0 24px 60px -24px oklch(0 0 0 / 0.6);
  --shadow-lg: 0 40px 120px -30px oklch(0 0 0 / 0.75);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 4px; }

/* ── Layout helpers ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section-sm { padding-block: clamp(48px, 6vw, 80px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted-fg);
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 999px; background: oklch(1 0 0 / 0.03);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 3px oklch(0.74 0.16 150 / 0.18);
}

.section-head { max-width: 680px; margin-inline: auto; text-align: center; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--muted-fg); font-size: clamp(16px, 2vw, 18px); }

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(38px, 6.2vw, 68px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(18px, 2vw, 22px); letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted-fg); }
.muted { color: var(--muted-fg); }
.gradient-text {
  background: linear-gradient(180deg, var(--fg) 30%, oklch(0.705 0.015 286.067));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px; border-radius: 12px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; transition: transform .12s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: oklch(0.92 0 0); }
.btn-ghost { border-color: var(--border-strong); background: oklch(1 0 0 / 0.02); color: var(--fg); }
.btn-ghost:hover { background: oklch(1 0 0 / 0.06); border-color: oklch(1 0 0 / 0.24); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  background: oklch(0.141 0.005 285.823 / 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header .container { display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; filter: brightness(0) invert(1); }
.header .brand-mark { width: 38px; height: 38px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 14px; }
.nav a { padding: 8px 12px; border-radius: 8px; font-size: 14.5px; color: var(--muted-fg); transition: color .15s, background .15s; }
.nav a:hover { color: var(--fg); background: oklch(1 0 0 / 0.05); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* language toggle */
.lang {
  display: inline-flex; padding: 3px; border: 1px solid var(--border);
  border-radius: 10px; background: oklch(1 0 0 / 0.03); gap: 2px;
}
.lang button {
  font-size: 12.5px; font-weight: 600; padding: 5px 9px; border-radius: 7px;
  color: var(--muted-fg); transition: color .15s, background .15s;
}
.lang button[aria-pressed="true"] { color: var(--primary-fg); background: var(--primary); }

.login-link { font-size: 14.5px; font-weight: 600; padding: 8px 12px; border-radius: 9px; color: var(--fg); }
.login-link:hover { background: oklch(1 0 0 / 0.06); }

.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 10px; align-items: center; justify-content: center; }
.menu-toggle svg { width: 20px; height: 20px; }

/* ── Background glow ────────────────────────────────────────────────────── */
.glow {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.glow::before {
  content: ""; position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px; border-radius: 50%;
  background: radial-gradient(closest-side, oklch(1 0 0 / 0.10), transparent 70%);
  filter: blur(20px);
}
.grid-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(oklch(1 0 0 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(48px, 6vw, 80px); text-align: center; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { margin: 22px auto 20px; max-width: 16ch; }
.hero .lead { max-width: 60ch; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { font-size: 13.5px; color: var(--muted-fg); display: inline-flex; align-items: center; gap: 8px; }
.hero-note svg { width: 16px; height: 16px; color: var(--success); }

/* App mockup */
.mockup {
  position: relative; z-index: 1; margin: clamp(40px, 6vw, 72px) auto 0; max-width: 980px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--card), var(--bg-elevated));
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.mockup-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.mockup-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: oklch(1 0 0 / 0.16); }
.mockup-bar .url { margin-left: 10px; font-size: 12.5px; color: var(--muted-fg); font-family: var(--mono); }
.mockup-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1px; background: var(--border); min-height: 320px; }
.mockup-pane { background: var(--bg-elevated); padding: 20px; }
.mockup-pane h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-fg); margin-bottom: 14px; font-weight: 600; }
.bubble { border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; margin-bottom: 10px; font-size: 14px; }
.bubble.them { background: oklch(1 0 0 / 0.03); }
.bubble.you { background: var(--card-2); }
.bubble .who { font-size: 11px; color: var(--muted-fg); margin-bottom: 4px; font-weight: 600; }
.answer { border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px; background: oklch(1 0 0 / 0.04); font-size: 14px; }
.answer .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--success); margin-bottom: 8px; }
.answer .tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.answer ul { display: grid; gap: 7px; margin-top: 8px; }
.answer li { position: relative; padding-left: 18px; color: var(--muted-fg); }
.answer li::before { content: "→"; position: absolute; left: 0; color: var(--fg); }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: oklch(1 0 0 / 0.04); }

/* ── Trust strip ────────────────────────────────────────────────────────── */
.trust { border-block: 1px solid var(--border); }
.trust p { text-align: center; font-size: 13px; color: var(--muted-fg); margin-bottom: 18px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.trust-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 40px; align-items: center; opacity: 0.7; }
.trust-logos span { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--muted-fg); }

/* ── Feature grid ───────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  position: relative; z-index: 1; padding: 26px; border: 1px solid var(--border);
  border-radius: var(--radius); background: linear-gradient(180deg, var(--card), oklch(0.18 0.006 285.9));
  transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.feature .ic { width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; background: oklch(1 0 0 / 0.03); }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted-fg); font-size: 15px; }
.feature.wide { grid-column: span 2; }

/* ── How it works ───────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step {
  position: relative; padding: 28px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card);
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--muted-fg);
  display: inline-block; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted-fg); font-size: 15px; }
.steps.connected .step:not(:last-child)::after {
  content: ""; position: absolute; top: 44px; right: -9px; width: 18px; height: 1px; background: var(--border-strong); z-index: 2;
}

/* ── Pricing ────────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.plan {
  display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--card); height: 100%;
}
.plan.featured { border-color: var(--border-strong); background: linear-gradient(180deg, var(--card-2), var(--card)); box-shadow: var(--shadow); position: relative; }
.plan.featured::after {
  content: attr(data-badge); position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  background: var(--primary); color: var(--primary-fg); padding: 4px 12px; border-radius: 999px;
}
.plan .plan-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.plan .plan-desc { font-size: 13.5px; color: var(--muted-fg); min-height: 38px; }
.plan .price { display: flex; align-items: baseline; gap: 4px; margin: 16px 0 4px; }
.plan .price .cur { font-size: 20px; font-weight: 700; }
.plan .price .amt { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.plan .price .per { font-size: 14px; color: var(--muted-fg); }
.plan .price-note { font-size: 12.5px; color: var(--muted-fg); min-height: 18px; }
.plan .btn { margin: 22px 0; }
.plan ul { display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; color: var(--muted-fg); }
.plan li svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 2px; }
.plan li.off { opacity: 0.45; }
.plan li.off svg { color: var(--muted-fg); }

/* ── Testimonials ───────────────────────────────────────────────────────── */
.tgrid { columns: 3; column-gap: 16px; }
.tcard {
  break-inside: avoid; margin-bottom: 16px; padding: 24px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card);
}
.tcard .stars { display: flex; gap: 2px; margin-bottom: 12px; color: var(--fg); }
.tcard .stars svg { width: 16px; height: 16px; }
.tcard p { font-size: 15px; margin-bottom: 18px; }
.tcard .who { display: flex; align-items: center; gap: 11px; }
.tcard .avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--card-2), oklch(0.34 0.01 286)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; border: 1px solid var(--border); }
.tcard .who b { font-size: 14px; font-weight: 600; display: block; }
/* Scope to the role text inside the inner <div> — NOT the avatar <span>, which
   is also a direct child of .who and must keep its own flex-centered styles. */
.tcard .who div span { font-size: 12.5px; color: var(--muted-fg); display: block; }
.tcard .avatar { color: var(--fg); text-transform: uppercase; line-height: 1; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin-inline: auto; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--card); margin-bottom: 12px; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { width: 18px; height: 18px; color: var(--muted-fg); transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq-body { padding: 0 20px 18px; color: var(--muted-fg); font-size: 15px; }

/* ── CTA band ───────────────────────────────────────────────────────────── */
.cta-band { position: relative; z-index: 1; text-align: center; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px) 24px; background: linear-gradient(180deg, var(--card-2), var(--card)); overflow: hidden; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--muted-fg); max-width: 52ch; margin: 0 auto 28px; font-size: 17px; }
.cta-band .hero-cta { margin-bottom: 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding-block: 56px 32px; }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.footer .brand { margin-bottom: 14px; }
.footer-about p { color: var(--muted-fg); font-size: 14px; max-width: 34ch; }
.footer-col h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-fg); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; padding: 5px 0; font-size: 14.5px; color: var(--muted-fg); transition: color .15s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted-fg); }
.footer-bottom .socials { display: flex; gap: 8px; }
.footer-bottom .socials a { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.footer-bottom .socials a:hover { background: oklch(1 0 0 / 0.06); border-color: var(--border-strong); }
.footer-bottom .socials svg { width: 17px; height: 17px; }

/* ── Mobile nav drawer ──────────────────────────────────────────────────── */
.mobile-nav { display: none; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .features-grid, .steps, .pricing-grid { grid-template-columns: 1fr 1fr; }
  .feature.wide { grid-column: span 2; }
  .tgrid { columns: 2; }
  .steps.connected .step::after { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav, .header-actions .login-link, .header-actions .btn-download-header { display: none; }
  .menu-toggle { display: flex; }
  .mockup-body { grid-template-columns: 1fr; }
  .features-grid, .steps, .pricing-grid { grid-template-columns: 1fr; }
  .feature.wide { grid-column: span 1; }
  .tgrid { columns: 1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .plan.featured { order: -1; }

  .mobile-nav.open { display: block; position: fixed; inset: var(--header-h) 0 0; z-index: 49; background: var(--bg); padding: 20px 24px; overflow-y: auto; }
  .mobile-nav a { display: block; padding: 14px 4px; font-size: 18px; font-weight: 600; border-bottom: 1px solid var(--border); }
  .mobile-nav .btn { margin-top: 20px; }
}
@media (max-width: 460px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Reveal-on-scroll (progressive enhancement; visible by default if no JS) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
