/* ============================================================
   RIDEWORD — Landing Page Styles
   Design: light / professional / developer
   ============================================================ */

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  /* Colors — light theme */
  --bg: #FFFFFF;
  --surface: #F7F7F8;
  --surface-raised: #EFEFEF;
  --border: #E4E4E7;
  --border-active: #C9C9D0;
  --text: #09090B;
  --text-muted: #6B6B6B;
  --text-dim: #CBCBCB;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.08);
  --gold: #d97706;
  --gold-hover: #b45309;
  --gold-glow: rgba(217, 119, 6, 0.08);
  --green: #16a34a;
  --red: #dc2626;

  /* Typography scale */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 44px;
  --text-5xl: 64px;
  --text-6xl: 88px;

  /* Font families */
  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
}

/* ============================================================
   Base
   ============================================================ */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-glyph {
  color: var(--accent);
  font-size: var(--text-lg);
  line-height: 1;
}

.nav-logo {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.btn-download-nav {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: var(--gold);
  color: #000000;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: background 0.12s ease;
}

.btn-download-nav:hover {
  background: var(--gold-hover);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 120px 0 80px;
  margin-top: 52px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-16);
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-6);
  text-transform: uppercase;
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-6xl);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: var(--space-6);
}

.hero-heading-accent {
  color: var(--accent);
}

.hero-sub {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  background: var(--gold);
  color: #000000;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: background 0.12s ease;
}

.btn-cta:hover {
  background: var(--gold-hover);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.btn-cta-secondary:hover {
  background: var(--accent-glow);
}

.hero-cta-meta {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.hero-manifesto {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Hero scene — layered IDE + Rideword overlay demo */
.hero-scene {
  position: relative;
  width: 380px;
  height: 340px;
  flex-shrink: 0;
}

.scene-ide {
  position: absolute;
  inset: 0;
  background: #0f0f1a;
  border: 1px solid #1c1c2e;
  overflow: hidden;
  font-family: var(--font-mono);
}

.scene-top-bar {
  display: flex;
  align-items: center;
  height: 32px;
  background: #0a0a14;
  border-bottom: 1px solid #1c1c2e;
  padding: 0 12px;
}

.scene-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #252535;
  margin-right: 5px;
  flex-shrink: 0;
}

.scene-tab {
  padding: 0 14px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: #35354a;
  margin-left: 6px;
  cursor: default;
}

.scene-tab--active {
  color: #b0b0d0;
  border-bottom: 1px solid var(--accent);
  background: rgba(124, 58, 237, 0.06);
}

.scene-ide-code {
  padding: 12px 0 0;
}

.scene-code {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.75;
  white-space: pre;
}

.sc-line {
  display: flex;
  padding: 0 14px;
}

.sc-line--hl {
  background: rgba(124, 58, 237, 0.13);
}

.sc-ln {
  display: inline-block;
  width: 20px;
  color: #2c2c42;
  text-align: right;
  margin-right: 14px;
  flex-shrink: 0;
  user-select: none;
  font-size: 10px;
}

.sc-kw  { color: #c792ea; }
.sc-str { color: #a8cc8c; }
.sc-fn  { color: #7ec8e3; }
.sc-num { color: #f7a860; }
.sc-cmt { color: #3a5060; }
.sc-def { color: #b0b8cc; }

/* Rideword overlay — the product, floating above the IDE */
.scene-rideword {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 190px;
  background: rgba(10, 10, 18, 0.9);
  border: 1px solid var(--accent);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 58, 237, 0.12);
  z-index: 10;
}

.scene-rideword-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: rgba(12, 12, 22, 0.96);
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.scene-rideword-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #252535;
  flex-shrink: 0;
}

.scene-rideword-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #38384e;
  margin-left: 4px;
  letter-spacing: 0.02em;
}

.scene-rideword-body {
  padding: 11px 12px;
}

.scene-overlay-pre {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.85;
  margin: 0;
  white-space: pre;
}

.so-h { color: var(--accent); font-weight: 500; }
.so-t { color: #68688a; }
.so-d { color: #2c2c3e; }

/* ============================================================
   Bento Grid
   ============================================================ */
.bento-section {
  padding: 0 0 80px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "always   always   clickthru"
    "sectnav  autoscrl clickthru"
    "safety   safety   safety"
    "local    opacity  opacity";
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.bento-cell {
  background: var(--surface);
  padding: var(--space-7);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}

.bento-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 0.12s ease;
  z-index: 1;
}

.bento-cell:hover::after {
  border-color: var(--border-active);
}

.bento-always    { grid-area: always; }
.bento-clickthru { grid-area: clickthru; }
.bento-sectnav   { grid-area: sectnav; }
.bento-autoscrl  { grid-area: autoscrl; }
.bento-safety    { grid-area: safety; }
.bento-local     { grid-area: local; }
.bento-opacity   { grid-area: opacity; }

.bento-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.bento-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}

.bento-body {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

/* Click-through diagram */
.bento-clickthru {
  display: flex;
  flex-direction: column;
}

.bento-clickthru-diagram {
  margin-top: auto;
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.layer {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.layer-script {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.layer-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text);
  letter-spacing: 0.03em;
}

.layer-state {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--green);
}

.layer-arrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.04em;
}

/* Safety paths */
.bento-safety {
  border-top: none;
}

.bento-safety-intro {
  margin-bottom: var(--space-6);
  max-width: 680px;
}

.safety-paths {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
}

.safety-paths li {
  display: grid;
  grid-template-columns: auto 160px 1fr;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.safety-paths li:last-child {
  border-bottom: none;
}

.safety-arrow {
  color: var(--green);
  font-size: var(--text-sm);
  font-weight: 500;
}

.safety-shortcut {
  color: var(--text);
  font-weight: 500;
  font-size: var(--text-sm);
  white-space: nowrap;
}

.safety-desc {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.6;
  font-family: var(--font-body);
}

/* Opacity demo */
.bento-opacity {
  display: flex;
  flex-direction: column;
}

.opacity-bar-demo {
  margin-top: auto;
  padding-top: var(--space-6);
}

.opacity-track {
  position: relative;
  height: 4px;
  background: var(--border);
  width: 100%;
  margin-bottom: var(--space-2);
}

.opacity-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 65%;
  background: var(--accent);
}

.opacity-thumb {
  position: absolute;
  top: 50%;
  left: 65%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--text);
  border: 1px solid var(--border-active);
}

.opacity-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.opacity-current {
  color: var(--accent);
}

/* Inline code */
.inline-code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 1px 5px;
  color: var(--accent);
}

/* ============================================================
   Download Section
   ============================================================ */
.download {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 0;
}

.download-inner {
  text-align: center;
}

.download-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.download-sub {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-10);
}

.download-cards {
  display: flex;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-7);
  border: 1px solid var(--border);
  display: inline-flex;
}

.download-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 20px var(--space-6);
  background: var(--bg);
  border: none;
  border-right: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  min-width: 260px;
  transition: background 0.12s ease;
}

.download-card:last-child {
  border-right: none;
}

.download-card:hover {
  background: var(--surface-raised);
}

.download-card-primary {
  border: 1px solid var(--accent) !important;
  background: var(--accent-glow);
  position: relative;
  z-index: 1;
}

.download-card-primary:hover {
  background: rgba(124, 58, 237, 0.22);
}

.platform-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.download-card-primary .platform-icon {
  color: var(--accent);
}

.download-card-text {
  flex: 1;
  text-align: left;
}

.download-card-title {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text);
  margin-bottom: 2px;
}

.download-card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.download-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.download-card-primary .download-arrow {
  color: var(--accent);
}

.gatekeeper-note {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.gatekeeper-note strong {
  color: var(--text);
  font-weight: 500;
}

/* ============================================================
   Pricing
   ============================================================ */
.pricing {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.pricing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.pricing-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-3xl);
  color: var(--text);
  letter-spacing: -0.02em;
}

.pricing-sub {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-muted);
  margin-top: -28px;
}

.pricing-card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border-active);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pricing-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.pricing-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pricing-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-4xl);
  color: var(--text);
}

.pricing-price-note {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: left;
}

.pricing-features li {
  padding: 0 4px;
}

.pricing-btn {
  width: 100%;
  justify-content: center;
}

.pricing-trial-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.pricing-trial-link {
  color: var(--accent);
  text-decoration: none;
}

.pricing-trial-link:hover {
  text-decoration: underline;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ============================================================
   Responsive — Tablet (768–1023px)
   ============================================================ */
@media (max-width: 1023px) {
  .hero-heading {
    font-size: var(--text-5xl);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .hero-scene {
    width: 100%;
    max-width: 480px;
    height: 300px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "always    always"
      "clickthru clickthru"
      "sectnav   autoscrl"
      "safety    safety"
      "local     opacity";
  }

  .safety-paths li {
    grid-template-columns: auto 140px 1fr;
  }

  .download-cards {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .download-card {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-width: unset;
    width: 100%;
  }

  .download-card:last-child {
    border-bottom: none;
  }

  .download-card-primary {
    border: 1px solid var(--accent) !important;
  }
}

/* ============================================================
   Responsive — Mobile (<768px)
   ============================================================ */
@media (max-width: 767px) {
  .hero {
    padding: 80px 0 60px;
  }

  .hero-heading {
    font-size: var(--text-4xl);
    letter-spacing: -0.03em;
  }

  .hero-sub {
    font-size: var(--text-base);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero-scene {
    width: 100%;
    max-width: 100%;
    height: 260px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "always"
      "clickthru"
      "sectnav"
      "autoscrl"
      "safety"
      "local"
      "opacity";
  }

  .safety-paths li {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .safety-shortcut {
    grid-column: 2;
    grid-row: 1;
  }

  .safety-desc {
    grid-column: 2;
    grid-row: 2;
  }

  .download-cards {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    width: 100%;
  }

  .download-card {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-width: unset;
    width: 100%;
  }

  .download-card:last-child {
    border-bottom: none;
  }

  .download-card-primary {
    border: 1px solid var(--accent) !important;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .gatekeeper-note {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero-heading {
    font-size: var(--text-3xl);
  }

  .bento-cell {
    padding: var(--space-5);
  }

  .download-heading {
    font-size: var(--text-2xl);
  }
}
