/* ============================================
   ScreenPlay — Design tokens
   ============================================ */
:root {
  --ink: #0B0E1C;
  --ink-2: #0E1224;
  --panel: #151933;
  --panel-2: #1B2040;
  --border: #2A2F52;
  --violet: #7C6CFF;
  --violet-dim: #5B4DDB;
  --gold: #F0B429;
  --mint: #3DD9A8;
  --coral: #FF6B7A;
  --paper: #F5F4FB;
  --fog: #9A97B8;
  --fog-dim: #6D6A8E;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

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

  --container: 1120px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle ambient texture behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(124,108,255,0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 10%, rgba(240,180,41,0.08), transparent 55%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

p { color: var(--fog); margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11,14,28,0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  color: var(--fog);
}
.nav-links a:hover { color: var(--paper); }
.nav-cta {
  background: var(--violet);
  color: var(--paper) !important;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
}
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: block;
    background: none; border: 1px solid var(--border);
    color: var(--paper); border-radius: 8px; padding: 8px 10px;
  }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--border);
    padding: 16px 24px; gap: 16px;
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--violet);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 8px 24px -8px rgba(124,108,255,0.6);
}
.btn-primary:hover { background: #8a7bff; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--paper) !important;
  text-decoration: none !important;
}
.btn-ghost:hover { border-color: var(--fog-dim); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #d99a1e);
  color: #241a03;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 96px 0 64px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--violet); }
.hero-sub {
  font-size: 18px;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-note { font-size: 13.5px; color: var(--fog-dim); }

/* Signature: the animated ledger card */
.ledger {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.ledger-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.ledger-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.ledger-total {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--mint);
}
.ledger-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(6px);
}
.ledger-row.show {
  animation: rowIn 0.5s ease forwards;
}
@keyframes rowIn {
  to { opacity: 1; transform: translateY(0); }
}
.ledger-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.ledger-row-body { flex: 1; min-width: 0; }
.ledger-row-title { font-size: 14px; font-weight: 600; color: var(--paper); }
.ledger-row-meta { font-size: 12px; color: var(--fog-dim); font-family: var(--font-mono); }
.ledger-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.ledger-badge.pts { background: rgba(61,217,168,0.15); color: var(--mint); }
.ledger-badge.required { background: rgba(240,180,41,0.15); color: var(--gold); }
.ledger-bar-track {
  height: 8px; border-radius: var(--radius-pill);
  background: var(--ink-2); overflow: hidden; margin-top: 4px;
}
.ledger-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--violet), var(--violet-dim));
  width: 100%;
}
.ledger-bar-fill.drain { animation: drain 2.4s ease-in-out forwards; animation-delay: 2.6s; }
@keyframes drain { to { width: 18%; } }

/* ============================================
   Loop strip (Earn / Approve / Redeem)
   ============================================ */
.loop {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.loop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 760px) {
  .loop-grid { grid-template-columns: 1fr; }
}
.loop-item .loop-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 10px;
}
.loop-item h3 { font-size: 20px; margin-bottom: 8px; }
.loop-item p { font-size: 14.5px; margin: 0; }

/* ============================================
   Feature tiles
   ============================================ */
.section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .tile-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .tile-grid { grid-template-columns: 1fr; }
}
.tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.tile-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(124,108,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; margin-bottom: 16px;
}
.tile h3 { font-size: 16.5px; margin-bottom: 6px; }
.tile p { font-size: 14px; margin: 0; }

/* ============================================
   Stories / testimonials
   ============================================ */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; }
}
.story-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}
.story-card::before {
  content: '“';
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--violet);
  opacity: 0.5;
  display: block;
  margin-bottom: 8px;
}
.story-quote {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--paper);
  margin-bottom: 16px;
}
.story-who {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fog);
}
.story-founder-note {
  max-width: 640px;
  margin: 40px auto 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--gold);
}

/* ============================================
   Pricing teaser strip
   ============================================ */
.price-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) { .price-strip { grid-template-columns: 1fr; } }
.price-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.price-card.highlight {
  border-color: var(--gold);
  background: linear-gradient(160deg, var(--panel), #201a33);
  position: relative;
}
.price-card h3 { font-size: 18px; margin-bottom: 4px; }
.price-amount {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--paper);
  margin: 10px 0 4px;
}
.price-amount span { font-size: 14px; color: var(--fog); font-weight: 400; }
.price-list { list-style: none; padding: 0; margin: 18px 0 0; font-size: 14px; }
.price-list li { padding: 6px 0; color: var(--fog); display: flex; gap: 10px; }
.price-list li::before { content: '—'; color: var(--fog-dim); }

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-links { display: flex; gap: 24px; font-size: 14px; color: var(--fog); }
.footer-links a:hover { color: var(--paper); }
.footer-copy { font-size: 13px; color: var(--fog-dim); }

/* ============================================
   Doc pages (Quick Start / Feature Reference / Pricing)
   ============================================ */
.doc-header {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--border);
}
.doc-header .eyebrow { margin-bottom: 16px; }
.doc-header h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.doc-header .doc-sub { font-size: 16px; max-width: 60ch; }

.doc-body {
  max-width: 760px;
  padding: 56px 24px 96px;
  margin: 0 auto;
}
.doc-body h2 {
  font-size: 24px;
  margin-top: 2.4em;
  padding-top: 0.6em;
  border-top: 1px solid var(--border);
}
.doc-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.doc-body h3 {
  font-size: 17px;
  color: var(--paper);
  margin-top: 1.8em;
}
.doc-body p { font-size: 15.5px; color: #C7C4DE; }
.doc-body ul, .doc-body ol { color: #C7C4DE; font-size: 15.5px; padding-left: 22px; }
.doc-body li { margin-bottom: 8px; }
.doc-body li::marker { color: var(--violet); }
.doc-body strong { color: var(--paper); }
.doc-body a { color: var(--violet); text-decoration: underline; text-decoration-color: rgba(124,108,255,0.4); }
.doc-body code {
  font-family: var(--font-mono);
  background: var(--panel-2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--gold);
}
.doc-body blockquote {
  margin: 1.6em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--violet);
  background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px;
}
.doc-body hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 14.5px;
}
.doc-table th, .doc-table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.doc-table th {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fog);
  background: var(--panel);
}
.doc-table td { color: #C7C4DE; }
.doc-table tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

/* FAQ styling for pricing page */
.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { margin-bottom: 6px; font-size: 15.5px; }
.faq-item p { font-size: 14.5px; margin: 0; }

/* Doc nav (side links on doc pages) */
.doc-toc {
  font-size: 13.5px;
  color: var(--fog-dim);
  margin-bottom: 8px;
}
.doc-toc a { color: var(--fog); }
.doc-toc a:hover { color: var(--paper); }

/* ============================================
   Splash — recreates the app's own launch screen
   as a one-time "boot" moment on the homepage.
   ============================================ */
:root {
  --splash-green: #0A9403;
  --splash-yellow: #FFD400;
}
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--splash-green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.65s cubic-bezier(.7,0,.3,1), opacity 0.5s ease 0.15s;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.splash-logo {
  width: min(320px, 70vw);
  height: auto;
}

.splash.hide {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.splash[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
}
/* Responsive video embed — drop into styles.css */
.video-embed {
  margin: 20px 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--panel);
}
.video-embed__frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-embed__frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-embed__caption {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--fog);
  border-top: 1px solid var(--border);
}

/* Optional: small grid of videos, e.g. for a support.html "How-to Videos" section */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.video-grid .video-embed { margin: 0; }