/* ============================================================
   Journal Ninja — Website styles
   Mirrors the app design system (docs/05-DESIGN-SYSTEM.md):
   dark-mode-first, premium gold (#D4AF37) on near-black (#0B0B0B).
   No hard-coded values that drift from the app tokens.
   ============================================================ */

:root {
  /* Color tokens — identical to src/shared/theme/tokens.ts */
  --bg: #0B0B0B;
  --surface: #161616;
  --surface-elevated: #1E1E1E;
  --accent: #D4AF37;
  --accent-muted: #8C7320;
  --text: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-tertiary: #6E6E6E;
  --border: #262626;
  --success: #4ADE80;
  --warning: #FBBF24;
  --danger: #F87171;

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Layout */
  --max-width: 1080px;
  --gutter: 20px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

a { color: var(--accent); text-decoration: none; transition: opacity .2s ease; }
a:hover { opacity: .8; }

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Wordmark / logo ---------- */
.wordmark {
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.wordmark .jn-journal { color: var(--accent); }
.wordmark .jn-ninja { color: var(--text); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,11,11,.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 0; font-size: 22px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-cta {
  background: var(--accent); color: #0B0B0B !important;
  padding: 9px 18px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 14px;
}
.nav-cta:hover { opacity: .9; }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 16px; cursor: pointer;
  padding: 14px 26px; border-radius: var(--radius-pill);
  border: 1px solid transparent; transition: transform .15s ease, opacity .2s ease;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent); color: #0B0B0B; }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 76px 0 84px;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% -5%, rgba(212,175,55,.20), transparent 70%),
    radial-gradient(ellipse 38% 30% at 50% 6%, rgba(255,255,255,.05), transparent 70%),
    radial-gradient(ellipse 70% 55% at 50% 115%, rgba(212,175,55,.05), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(720px, 82%); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,.35), transparent);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero h1 {
  font-size: clamp(42px, 7.5vw, 84px);
  font-weight: 800; letter-spacing: -2.2px; line-height: 1.03;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #FFFFFF 30%, rgba(255,255,255,.72) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .grow {
  background: linear-gradient(115deg, #F5DB8B 0%, #D4AF37 35%, #B8912D 60%, #F5DB8B 90%);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(212,175,55,.30));
  animation: goldSheen 8s ease-in-out infinite;
}
@keyframes goldSheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-sub {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text-secondary);
  max-width: 620px; margin: 0 auto 40px; line-height: 1.55;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-cta .store-badge {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 34px rgba(0,0,0,.4);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.hero-cta .store-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(212,175,55,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 18px 44px rgba(212,175,55,.16);
}
.hero-cta .btn-ghost { border-radius: 14px; min-width: 200px; }
.hero-note { margin-top: 22px; color: var(--text-tertiary); font-size: 14px; letter-spacing: .1px; }
.hero-cta + .hero-note { color: var(--text-secondary); }

/* Hero entrance motion (CSS only) */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
  .hero { padding: 40px 0 60px; }
  .hero h1 { font-size: clamp(30px, 8.4vw, 44px); letter-spacing: -1px; line-height: 1.08; margin-bottom: 16px; }
  .hero-sub { font-size: 16px; margin-bottom: 28px; max-width: 320px; }
  .hero-cta { gap: 12px; }
  .hero-cta .store-badge, .hero-cta .btn-ghost { width: 230px; min-width: 0; justify-content: center; }
  .hero-note { font-size: 13px; margin-top: 18px; padding: 0 12px; }
}
@media (max-width: 380px) {
  .hero-note { font-size: 12px; }
}

.hero h1 { animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) .08s backwards; }
.hero-sub { animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) .18s backwards; }
.hero-cta { animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) .28s backwards; }
.hero .hero-note { animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) .38s backwards; }
@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-sub, .hero-cta, .hero .hero-note { animation: none; }
  .hero h1 .grow { animation: none; }
  .hero-cta .store-badge:hover { transform: none; }
}

/* ---------- Store badges ---------- */
.store-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 11px 20px; min-width: 200px;
}
.store-badge:hover { border-color: var(--accent); opacity: 1; }
.store-badge svg { width: 28px; height: 28px; flex-shrink: 0; }
.store-badge .sb-text { text-align: left; line-height: 1.2; }
.store-badge .sb-small { font-size: 11px; color: var(--text-secondary); }
.store-badge .sb-big { font-size: 17px; font-weight: 700; color: var(--text); }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-block; color: var(--accent); font-weight: 700;
  font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.8px; line-height: 1.1; }
.section-head p { color: var(--text-secondary); font-size: 18px; margin-top: 16px; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 880px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.feature-card:hover { border-color: rgba(212,175,55,.4); transform: translateY(-3px); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: rgba(212,175,55,.10); border: 1px solid rgba(212,175,55,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 18px;
}
.feature-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 15px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { text-align: center; }
.step-num {
  width: 48px; height: 48px; border-radius: var(--radius-pill);
  background: var(--accent); color: #0B0B0B; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 15px; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 820px; margin: 0 auto; }
@media (max-width: 720px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 34px; position: relative;
}
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 18px 50px rgba(212,175,55,.10); }
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #0B0B0B; font-weight: 800; font-size: 12px;
  letter-spacing: .5px; padding: 5px 14px; border-radius: var(--radius-pill);
}
.price-card h3 { font-size: 22px; margin-bottom: 6px; }
.price-tag { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin: 14px 0 4px; }
.price-tag span { font-size: 16px; font-weight: 500; color: var(--text-secondary); }
.price-sub { color: var(--accent); font-size: 14px; font-weight: 600; margin-bottom: 22px; }
.price-free-sub { color: var(--text-tertiary); font-size: 14px; margin-bottom: 22px; }

/* Pro tier options (monthly / yearly / lifetime) */
.plan-options { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 22px; }
.plan-opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--surface-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 13px 16px;
}
.plan-opt.best { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(212,175,55,.35); }
.plan-opt-name { font-weight: 700; font-size: 15px; color: var(--text); }
.plan-opt-price { font-weight: 800; font-size: 22px; letter-spacing: -.5px; color: var(--text); }
.plan-opt-price span { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.plan-opt-sub { width: 100%; color: var(--accent); font-size: 13px; font-weight: 600; margin-top: 2px; }
.plan-opt .tag {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px;
  padding: 2px 8px; border-radius: var(--radius-pill); margin-left: 8px; vertical-align: middle;
  background: rgba(212,175,55,.15); color: var(--accent);
}
.price-list { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.price-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--text-secondary); font-size: 15px; }
.price-list li::before { content: '✓'; color: var(--accent); font-weight: 800; flex-shrink: 0; }
.price-foot { margin-top: 24px; }
.lifetime-note {
  text-align: center; color: var(--text-tertiary); font-size: 14px; margin-top: 28px;
}
.lifetime-note strong { color: var(--accent); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 4px 22px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--text-secondary); font-size: 15px; padding: 0 0 20px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-inner {
  background: linear-gradient(160deg, var(--surface), #0e0e0e);
  border: 1px solid rgba(212,175,55,.28);
  border-radius: var(--radius-lg); padding: 64px 28px;
}
.cta-inner h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.8px; margin-bottom: 14px; }
.cta-inner p { color: var(--text-secondary); font-size: 18px; max-width: 480px; margin: 0 auto 30px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  background: var(--bg);
}
.footer-grid {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand { max-width: 280px; }
.footer-brand .wordmark { font-size: 22px; margin-bottom: 14px; }
.footer-brand p { color: var(--text-secondary); font-size: 14px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-tertiary); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: var(--text-secondary); font-size: 14px; }
.footer-col a:hover { color: var(--text); opacity: 1; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 26px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-tertiary); font-size: 13px;
}

/* ---------- Legal / content pages ---------- */
.page-hero { padding: 64px 0 32px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -1px; }
.page-hero .effective { color: var(--text-tertiary); font-size: 15px; margin-top: 12px; }
.prose { max-width: 760px; margin: 48px auto 80px; }
.prose h2 { font-size: 24px; font-weight: 700; margin: 40px 0 14px; letter-spacing: -.4px; }
.prose h3 { font-size: 19px; font-weight: 700; margin: 28px 0 10px; }
.prose p { color: var(--text-secondary); margin-bottom: 16px; font-size: 16px; }
.prose ul, .prose ol { color: var(--text-secondary); margin: 0 0 18px 22px; font-size: 16px; }
.prose li { margin-bottom: 9px; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; }
.callout {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md); padding: 18px 22px; margin: 24px 0;
}
.callout.danger { border-left-color: var(--danger); }
.callout p { margin-bottom: 0; }

/* Helpline cards (support page) */
.helplines { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
@media (max-width: 560px) { .helplines { grid-template-columns: 1fr; } }
.helpline {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px;
}
.helpline h3 { font-size: 17px; margin-bottom: 4px; color: var(--text); }
.helpline .num { color: var(--accent); font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.helpline p { color: var(--text-secondary); font-size: 14px; margin: 6px 0 0; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 14px; margin-top: 8px; }
