/* ==========================================================================
   Poker Range Calculator — landing
   Card-room classy: deep felt, restrained gold, Monte Carlo not Vegas.
   ========================================================================== */

:root {
  /* Felt night (default / dark) */
  --bg: #0b2119;
  --bg-deep: #071711;
  --surface: #10291f;
  --surface-2: #0e2419;
  --card-border: rgba(201, 163, 90, 0.28);
  --line: rgba(201, 163, 90, 0.16);
  --text: #ece5d0;
  --muted: #a4b5a7;
  --faint: #7c9184;
  --gold: #c9a35a;
  --gold-bright: #ddbe7d;
  --gold-ink: #1a1305;
  --red-suit: #b4553f;

  --cell-raise: #c9a35a;
  --cell-raise-text: #241a08;
  --cell-fold: #163426;
  --cell-fold-text: #6d8a79;
  --cell-border: rgba(201, 163, 90, 0.10);

  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: light) {
  :root {
    /* Printed range card: ivory stock, felt-green ink */
    --bg: #f3eddd;
    --bg-deep: #ece4d0;
    --surface: #faf6ea;
    --surface-2: #f6f0e0;
    --card-border: rgba(139, 108, 46, 0.35);
    --line: rgba(101, 82, 38, 0.18);
    --text: #1e2b23;
    --muted: #58685c;
    --faint: #7d8b7f;
    --gold: #a07f35;
    --gold-bright: #8a6c2a;
    --gold-ink: #f7f2e2;
    --red-suit: #a34632;

    --cell-raise: #1f5c40;
    --cell-raise-text: #f1ecd9;
    --cell-fold: #efe8d3;
    --cell-fold-text: #9aa393;
    --cell-border: rgba(101, 82, 38, 0.14);

    --shadow: 0 20px 50px rgba(66, 52, 22, 0.16), 0 3px 10px rgba(66, 52, 22, 0.1);
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Archivo", -apple-system, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(120% 90% at 50% 0%, var(--bg) 40%, var(--bg-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .readout-pct, .meta-num {
  font-family: "Cormorant Garamond", Georgia, serif;
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

em { font-style: italic; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.wordmark:hover { text-decoration: none; }

.wordmark-spade {
  color: var(--gold);
  font-size: 1.15rem;
  line-height: 1;
  transform: translateY(-1px);
}

.wordmark-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  color: var(--gold-bright) !important;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
}
.nav-cta:hover { border-color: var(--gold); }

@media (max-width: 700px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

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

.hero { padding: 5.5rem 1.5rem 5rem; }

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: 4rem;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

.eyebrow-rule {
  display: inline-block;
  width: 2.4rem;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}

.hero h1 em, .how h2 em, .features h2 em { color: var(--gold-bright); }

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 2.2rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}

.meta-item { display: flex; flex-direction: column; }

.meta-num {
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}

.meta-label {
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0.03em;
}

.meta-div {
  color: var(--red-suit);
  font-size: 0.7rem;
  opacity: 0.8;
}

.hero-cta {
  font-size: 1rem;
  color: var(--muted);
}
.hero-cta a { font-weight: 500; }

.store-badges {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  line-height: 1.15;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.store-badge:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.store-badge svg {
  width: 21px;
  height: 21px;
  fill: var(--gold);
  flex: none;
}
.store-badge small {
  display: block;
  font-family: "Archivo", sans-serif;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.store-badge b {
  display: block;
  font-family: "Archivo", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Chart card ---------- */

.chart-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.4rem 1.4rem 1.1rem;
  box-shadow: var(--shadow);
  position: relative;
}

/* gold corner accents, restrained */
.chart-card::before,
.chart-card::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.55;
}
.chart-card::before {
  top: -1px; left: -1px;
  border-width: 1px 0 0 1px;
  border-top-left-radius: 14px;
}
.chart-card::after {
  bottom: -1px; right: -1px;
  border-width: 0 1px 1px 0;
  border-bottom-right-radius: 14px;
}

.chart-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.chart-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.chart-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.position-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.pos-chip {
  font-family: "Archivo", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-chip:hover { border-color: var(--gold); color: var(--text); }

.pos-chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}

.matrix {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 2px;
  aspect-ratio: 1;
  user-select: none;
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: clamp(0.42rem, 1.05vw, 0.6rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--cell-border);
  background: var(--cell-fold);
  color: var(--cell-fold-text);
  transition: background 0.18s ease, color 0.18s ease;
}

.cell.raise {
  background: var(--cell-raise);
  color: var(--cell-raise-text);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.1rem;
}

.readout {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 5.2rem;
  line-height: 1.15;
}

.readout-pct {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gold-bright);
  font-variant-numeric: lining-nums;
}

.readout-hands {
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.05em;
}

.chart-note {
  margin-top: 0.7rem;
  font-size: 0.74rem;
  color: var(--faint);
  text-align: center;
  font-style: italic;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.9rem;
}

/* range input, chip-styled thumb */
input[type="range"] {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--fill, 40%), var(--line) var(--fill, 40%), var(--line) 100%);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--gold-bright) 0 34%, var(--gold) 36% 100%);
  border: 2px solid color-mix(in srgb, var(--gold-ink) 55%, var(--gold));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--gold-bright) 0 34%, var(--gold) 36% 100%);
  border: 2px solid color-mix(in srgb, var(--gold-ink) 55%, var(--gold));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

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

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.how, .features { padding: 5rem 0; }

.how { border-top: 1px solid var(--line); }

.how h2, .features h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 2.8rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.step-suit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.step-suit-red { color: var(--red-suit); }

.step h3, .feature h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p, .feature p {
  font-size: 0.93rem;
  color: var(--muted);
}

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

.features { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-deep) 55%, transparent); }

.features-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.features-head h2 { margin-bottom: 2.8rem; }

.chipstack {
  width: 120px;
  flex-shrink: 0;
  margin-bottom: 2.2rem;
  opacity: 0.9;
}

.chipstack svg { width: 100%; height: auto; display: block; }

.chip ellipse { fill: var(--surface); stroke: var(--gold); stroke-width: 1.4; }
.chip .chip-edge { fill: color-mix(in srgb, var(--gold) 22%, var(--surface)); stroke: var(--gold); stroke-width: 1.2; }
.chip .chip-inner { fill: none; stroke: var(--gold); stroke-width: 1; stroke-dasharray: 5 6; opacity: 0.8; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.5rem 1.4rem;
}

.fine-print {
  margin-top: 3rem;
  font-size: 0.82rem;
  color: var(--faint);
  max-width: 46rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

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

.footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}

.footer-suits {
  color: var(--gold);
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 1.2rem;
}

.footer-cta {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  margin-bottom: 0.8rem;
}

.footer-small {
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0.05em;
}
.footer-small a {
  color: var(--faint);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.footer-small a:hover { color: var(--muted); }

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

@media (max-width: 960px) {
  .hero { padding-top: 3.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-chart { max-width: 540px; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .features-head { align-items: flex-start; }
  .cell { font-size: clamp(0.42rem, 2.2vw, 0.62rem); }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .chipstack { display: none; }
  .hero-meta { gap: 1rem; }
  .chart-card { padding: 1rem 0.9rem 0.9rem; }
}
