/* === Design tokens (matches Claudictive brand) === */
:root {
  --bg: #0a0a12;
  --bg-elev: #14141f;
  --bg-card: #1c1d33;
  --accent: #D97757;
  --accent-hover: #e8956f;
  --accent-glow: rgba(217, 119, 87, 0.25);
  --text: #e4e4e8;
  --text-muted: #8a8a9a;
  --text-dim: #5a5a6a;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1400px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Accessibility: skip-to-content link, only visible when keyboard-focused */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  padding: 8px 14px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Respect users who prefer reduced motion: no hero animations, no smooth scroll */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === Nav (sticky top bar) ===
 * Outer .nav is full-width and carries the background/blur/border.
 * Inner .nav-inner is constrained to max-width and holds the flex layout.
 * This way the sticky background extends edge-to-edge instead of stopping
 * at the content gutter. */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 18, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
/* Fallback for browsers without backdrop-filter (older Firefox before 103) */
@supports not (backdrop-filter: blur(1px)) {
  .nav { background: rgba(10, 10, 18, 0.96); }
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  min-width: 0; /* allow shrinking inside flex */
}
.logo span { color: var(--text); }
.nav-beta-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent) !important;
  background: rgba(217, 119, 87, 0.08);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 16px !important;
  font-size: 14px !important;
  color: white !important;
  font-weight: 600;
  white-space: nowrap;
}
.nav-links a.nav-cta:hover { color: white; }
/* Adaptive CTA text: long label on desktop, short on phones */
.nav-cta-short { display: none; }
@media (max-width: 640px) {
  .nav-cta-long { display: none; }
  .nav-cta-short { display: inline; }
}

/* === Hero - STATIC layout (no animation) ===
 * Two-column grid. Text on the left, game frame with overlay on the right.
 * Both at their natural sizes, no transitions, no keyframes. Predictable and
 * smooth on every device. */
.hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.5fr);
  gap: 48px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.hero-text {
  z-index: 2;
}

/* Tighten the gap between the hero and the next section. */
#features {
  padding-top: 56px;
}
.badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}
.hero h1 {
  font-size: 56px;
  font-weight: 800;
  /* line-height >= 1.15 so descenders (q, y, g) aren't clipped, especially
   * when combined with background-clip: text which renders tightly. */
  line-height: 1.18;
  letter-spacing: -1.5px;
  margin-bottom: 36px;
  /* Tiny bottom padding as a safety net for the gradient text-clip rendering
   * to avoid sub-pixel descender clipping in some browsers. */
  padding-bottom: 4px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lede {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
}
.cta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.trust {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.trust .dot {
  width: 6px;
  height: 6px;
  background: #2ed573;
  border-radius: 50%;
  display: inline-block;
}
.sys-req {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}
.sys-req strong {
  color: var(--text-muted);
  font-weight: 600;
}

/* === Buttons === */
.btn-primary, .btn-ghost {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); }
.btn-large { padding: 14px 28px; font-size: 16px; }

/* === Hero art - static game frame with chat overlay === */
.hero-art {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 1;
}

.game-frame {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 10;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px var(--accent-glow);
  border: 1px solid var(--border);
  z-index: 2;
}
/* Video background - falls back to the gradient if no video is present */
.game-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.game-bg {
  position: absolute;
  inset: 0;
  /* Fallback gradient - covered by .game-video when present */
  background:
    radial-gradient(ellipse at 30% 40%, rgba(60, 80, 140, 0.45) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(140, 60, 80, 0.4) 0%, transparent 50%),
    linear-gradient(135deg, #1a2845 0%, #0d1228 50%, #1f0f1f 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  z-index: 1;
}

/* When using a real screenshot/video, hide the fake HUD overlays */
.real-screenshot .game-bg {
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.4) 100%);
}
.real-screenshot .game-hud-top,
.real-screenshot .game-loading,
.real-screenshot .game-hud-bottom {
  display: none;
}
.game-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}
.hud-tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
}
.hud-timer {
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--accent);
  font-weight: 700;
}
.game-loading {
  align-self: center;
  text-align: center;
  width: 60%;
}
.loading-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.loading-fill {
  height: 100%;
  background: var(--accent);
  width: 30%;
  animation: loading-pulse 3s ease-in-out infinite;
}
@keyframes loading-pulse {
  0%, 100% { width: 30%; }
  50% { width: 75%; }
}
.loading-text {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}
.game-hud-bottom {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hud-icon {
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
}

/* === Static overlay panel - sits on top of the game video, always visible === */
.anim-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 300px;
  background: rgba(10, 10, 18, 0.97);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 32px var(--accent-glow);
  font-family: 'Cascadia Code', monospace;
  font-size: 11px;
}

.mock-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.pill-logo { color: var(--accent); display: flex; }
.pill-status {
  margin-left: auto;
  font-size: 10px;
  color: var(--accent);
}

.mock-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mock-msg {
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 92%;
  font-size: 11px;
  line-height: 1.4;
}
.mock-msg.user {
  background: rgba(217, 119, 87, 0.18);
  align-self: flex-end;
}
.mock-msg.assistant {
  background: var(--bg-card);
  align-self: flex-start;
}
.mock-msg code {
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--accent);
  font-size: 10px;
}
/* === Sections === */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}
.section-alt {
  background: var(--bg-elev);
  max-width: none;
  padding-left: 24px;
  padding-right: 24px;
}
.section-alt > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}
.section-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  text-align: center;
}
.section-lede {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 16px;
}

/* === Feature grid === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}
.feature h3 {
  font-size: 17px;
  margin-bottom: 8px;
  font-weight: 600;
}
.feature p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* === Games list === */
.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  list-style: none;
  margin-bottom: 24px;
}
.game-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text);
}
.game-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* === Compare table (vs alt-tab) === */
.compare-table {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.compare-row {
  display: grid;
  grid-template-columns: 160px 1fr 1fr;
  gap: 0;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  align-items: center;
}
.compare-row:last-child { border-bottom: none; }
.compare-row.compare-head {
  background: rgba(217, 119, 87, 0.08);
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.compare-label {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}
.compare-good {
  color: var(--text);
  position: relative;
  padding-left: 22px;
}
.compare-good::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 720px) {
  .compare-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 18px;
  }
  .compare-row.compare-head { display: none; }
  .compare-label::after {
    content: "";
    display: block;
    height: 1px;
    background: var(--border);
    margin-top: 8px;
  }
}

/* === How it works === */
.how-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}
.how-list li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.how-num {
  background: var(--accent);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.how-list h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.how-list p {
  color: var(--text-muted);
  font-size: 14px;
}
.how-list kbd {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Cascadia Code', monospace;
  font-size: 12px;
  color: var(--accent);
}

/* === FAQ === */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-list details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 0;
  color: var(--accent);
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.2s;
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}
.faq-list code {
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Cascadia Code', monospace;
  font-size: 12px;
  color: var(--accent);
}

/* === Waitlist === */
.section-cta {
  text-align: center;
}
.waitlist-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.waitlist-form input {
  flex: 1;
  min-width: 240px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
.waitlist-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.waitlist-thanks {
  color: #2ed573;
  font-size: 16px;
  margin-top: 16px;
}
.waitlist-note {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 12px;
}

/* === Footer === */
.footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 60px 24px 32px;
  margin-top: 80px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-cols h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-cols a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.footer-cols a:hover { color: var(--accent); }
.footer-tagline {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 8px;
}
.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.footer-disclaimer {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.7;
}

/* === Responsive === */
@media (max-width: 860px) {
  /* Stack the two hero columns vertically on narrow screens. */
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 20px 48px;
  }
  .hero-art { order: 2; }
  .game-frame { max-width: 100%; }
  .anim-overlay { width: 240px; padding: 10px; }
  .hero h1 { font-size: 40px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 28px; }
}

@media (max-width: 640px) {
  /* === Phone-class layout === */

  /* Nav: tighter padding, smaller logo, pill stays inline but smaller */
  .nav-inner {
    padding: 10px 14px;
    gap: 10px;
  }
  .logo {
    font-size: 15px;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .logo span:first-of-type {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .logo svg { width: 18px; height: 18px; flex-shrink: 0; }
  .nav-beta-pill {
    font-size: 8.5px;
    padding: 1px 6px;
    letter-spacing: 0.06em;
  }
  .nav-cta {
    padding: 7px 12px !important;
    font-size: 13px !important;
  }

  /* Hero text: scale fluidly so it never overflows */
  .hero {
    padding: 24px 16px 40px;
    gap: 24px;
  }
  .hero h1 {
    font-size: clamp(28px, 8.5vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
  }
  .badge {
    font-size: 10.5px;
    padding: 5px 10px;
    margin-bottom: 16px;
    line-height: 1.3;
  }
  .lede {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
  }
  .cta-row {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }
  .cta-row a { width: 100%; text-align: center; }
  .btn-large { padding: 12px 20px !important; font-size: 14px !important; }
  .trust { font-size: 12px; flex-wrap: wrap; }
  .sys-req { font-size: 11px; line-height: 1.5; }

  /* Hero carousel: shrink + dont let dots/captions overflow */
  .hero-art { order: 2; }
  .game-frame { border-radius: 8px; }
  .hero-caption {
    font-size: 11px;
    padding: 0 8px;
    line-height: 1.4;
  }
  .hero-dots { gap: 6px; }
  .hero-dot { width: 6px; height: 6px; }

  /* Inline mock chat over LoL: shrink so it doesn't overflow narrow screens */
  .anim-overlay {
    width: clamp(180px, 70%, 240px);
    padding: 8px;
    font-size: 10px;
  }
  .mock-pill { font-size: 10px; padding: 4px 8px; }
  .mock-msg { font-size: 10.5px; padding: 6px 8px; line-height: 1.35; }

  /* Sections: tighter padding */
  .section { padding: 40px 16px; }
  .section-title { font-size: 24px; line-height: 1.25; }
  .section-lede { font-size: 14px; }

  /* Feature grid stays single-col, cards get tighter */
  .feature { padding: 20px; }
  .feature h3 { font-size: 16px; }
  .feature p { font-size: 14px; }

  /* How-it-works: numbers shrink, less indent */
  .how-list li { padding: 18px; gap: 14px; }
  .how-num { width: 30px; height: 30px; font-size: 14px; }
  .how-list h3 { font-size: 16px; }
  .how-list p { font-size: 13px; }

  /* FAQ */
  .faq-list details { padding: 14px 16px; }
  .faq-list summary { font-size: 14px; padding-right: 20px; }

  /* Compare table - already stacks at 720px, just tighten font */
  .compare-row { padding: 14px 14px; }

  /* Waitlist form */
  #waitlist input,
  #waitlist button {
    font-size: 14px;
  }

  /* Footer: single column, tighter */
  .footer { padding: 32px 16px; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom p { font-size: 12px; line-height: 1.6; }
  .footer-bottom .nav-beta-pill {
    display: inline-block;
    margin-top: 4px;
  }
}

@media (max-width: 380px) {
  /* Tiny phones (older iPhones, Android XS): one more squeeze */
  .hero h1 { font-size: 26px; letter-spacing: -0.3px; }
  .badge { font-size: 10px; }
  .nav-links { gap: 6px; }
  .logo span { font-size: 14px; }
  .anim-overlay { display: none; } /* mock chat too cramped to read */
}
