/* ============================================================
   MixedSolver — landing page styles (Light variant)
   Palette: clean white base, solver action accents
   raise = red, call = green, fold = blue
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --surface: #ffffff;
  --border: #e6eaf0;
  --text: #10192b;
  --text-muted: #5b6575;
  --raise: #d9453d;
  --call: #189d58;
  --fold: #3672c8;
  --accent: var(--call);
  --chip: #f2f5f9;
  --header-bg: rgba(255, 255, 255, 0.85);
  --card-hover-border: #d5dbe5;
  --glow: rgba(24, 157, 88, 0.06);
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #128a4c;
  --radius: 12px;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-heading: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark theme tokens. Applied two ways: system preference (unless the user
   explicitly chose light), or an explicit data-theme="dark" choice.
   Keep both blocks in sync. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0e14;
    --bg-alt: #0f1420;
    --surface: #131926;
    --border: #1f2938;
    --text: #e8ecf4;
    --text-muted: #a6b0c3;
    --raise: #e8544d;
    --call: #34bd76;
    --fold: #4d8fe0;
    --chip: #0d111b;
    --header-bg: rgba(11, 14, 20, 0.85);
    --card-hover-border: #2c3a52;
    --glow: rgba(52, 189, 118, 0.07);
    --btn-primary-text: #06130c;
    --btn-primary-hover: #4ecc8a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e14;
  --bg-alt: #0f1420;
  --surface: #131926;
  --border: #1f2938;
  --text: #e8ecf4;
  --text-muted: #a6b0c3;
  --raise: #e8544d;
  --call: #34bd76;
  --fold: #4d8fe0;
  --chip: #0d111b;
  --header-bg: rgba(11, 14, 20, 0.85);
  --card-hover-border: #2c3a52;
  --glow: rgba(52, 189, 118, 0.07);
  --btn-primary-text: #06130c;
  --btn-primary-hover: #4ecc8a;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; letter-spacing: -0.02em; }

h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }

a { color: inherit; }

/* Gradient text used for brand moments */
.grad {
  background: linear-gradient(90deg, var(--raise), var(--call) 55%, var(--fold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: var(--call);
  color: var(--btn-primary-text);
  box-shadow: 0 1px 2px rgba(16, 25, 43, 0.08), 0 4px 16px rgba(24, 157, 88, 0.22);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--btn-primary-hover); box-shadow: 0 1px 2px rgba(16,25,43,.10), 0 6px 20px rgba(24,157,88,.28); }

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: transparent;
}
.btn-ghost:hover { background: var(--bg-alt); }

/* ---------------- Brand ---------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand-name em { font-style: normal; color: var(--call); }

/* The mark: three currents weaving past each other */
.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.seg-raise { background: var(--raise); }
.seg-call  { background: var(--call); }
.seg-fold  { background: var(--fold); }

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* 1fr | auto | 1fr keeps the nav centered on the page regardless of how
   wide the brand and theme toggle are. */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  gap: 24px;
}
.header-inner .brand { justify-self: start; }
.header-inner .theme-toggle { justify-self: end; }

.site-nav { display: flex; gap: 28px; justify-self: center; }
.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.12s ease;
}
.site-nav a:hover { color: var(--text); }

/* ---------------- Theme toggle ---------------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--card-hover-border); }

.theme-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.theme-opt svg { width: 15px; height: 15px; display: block; }

/* The active option is raised on a surface pill — sun by default (light),
   flipped by the same two-way logic as the theme tokens. */
.opt-light {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .opt-light { background: transparent; color: var(--text-muted); box-shadow: none; }
  :root:not([data-theme="light"]) .opt-dark { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
}
:root[data-theme="dark"] .opt-light { background: transparent; color: var(--text-muted); box-shadow: none; }
:root[data-theme="dark"] .opt-dark { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 110px;
}

/* Subtle single-tint glow behind the hero */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 130%;
  background: radial-gradient(700px 350px at 75% 20%, var(--glow), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--call);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 20px;
}

.lede {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------------- Solver panel mockup ---------------- */

.solver-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(16, 25, 43, 0.06), 0 16px 40px rgba(16, 25, 43, 0.10);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title { font-weight: 700; font-size: 0.95rem; }

.panel-tags { display: flex; gap: 6px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.panel-rows { display: flex; flex-direction: column; gap: 10px; }

.strat-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.hand { display: inline-flex; gap: 3px; }
.hand b {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  width: 20px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.hand .lo { color: var(--text); }
.hand .hi { color: var(--text-muted); }

.bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--chip);
}
.bar .seg { height: 100%; }

.freq {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 42px;
  text-align: right;
}

.panel-legend {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.panel-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-raise { background: var(--raise); }
.dot-call  { background: var(--call); }
.dot-fold  { background: var(--fold); }

/* ---------------- Sections ---------------- */

.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section h2 { margin-bottom: 14px; }

.section-lede {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 58ch;
  margin-bottom: 44px;
}

/* ---------------- Games grid ---------------- */

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: 0 1px 2px rgba(16, 25, 43, 0.05);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.game-card:hover { transform: translateY(-3px); border-color: var(--card-hover-border); box-shadow: 0 6px 20px rgba(16, 25, 43, 0.10); }

.game-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.game-icon svg { width: 30px; height: 30px; display: block; }

.game-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.game-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

.game-card-more { border-style: dashed; background: transparent; box-shadow: none; }

/* ---------------- Features ---------------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(16, 25, 43, 0.05);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  height: 32px;
}
.feature-icon .brand-mark { width: 30px; height: 30px; }

.feature h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature p { font-size: 0.9rem; color: var(--text-muted); }

/* ---------------- Why mixed ---------------- */

.why-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.why-copy p { color: var(--text-muted); margin-top: 16px; max-width: 52ch; }

.why-pun {
  text-align: center;
  padding: 40px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 25, 43, 0.05);
}

.pun-line {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.pun-sub {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer-note { font-size: 0.85rem; color: var(--text-muted); }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 64px 0 72px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .why-inner { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 560px) {
  .site-nav { display: none; }
  .games-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
