/* TurboCribbage — cribbage table aesthetic
   Palette: felt green table, cream maple board, brass pegs, ink, a single hot-card red */
:root {
  --felt:      #0d3327;   /* deep table felt */
  --felt-2:    #0a2820;   /* darker felt */
  --felt-edge: #082019;
  --maple:     #f3e8d2;   /* cream board */
  --maple-2:   #e7d6b6;
  --ink:       #14241d;   /* dark text on cream */
  --cream:     #f6efe0;   /* light text on felt */
  --muted:     #b9cbbf;   /* muted on felt */
  --muted-ink: #5d6f64;   /* muted on cream */
  --brass:     #d9a441;   /* peg brass / gold accent */
  --brass-2:   #b9842c;
  --card-red:  #c8412e;   /* single hot accent — a red suit */
  --line:      rgba(246, 239, 224, 0.14);
  --line-ink:  rgba(20, 36, 29, 0.12);
  --shadow:    0 22px 60px rgba(0, 0, 0, 0.40);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
  --radius:    18px;
  --radius-lg: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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 {
  margin: 0;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(217, 164, 65, 0.10), transparent 55%),
    radial-gradient(90% 70% at 10% 0%, rgba(200, 65, 46, 0.08), transparent 50%),
    linear-gradient(180deg, var(--felt) 0%, var(--felt-2) 60%, var(--felt-edge) 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { width: min(1140px, calc(100% - 40px)); margin: 0 auto; }
.narrow { max-width: 760px; text-align: center; }
.section { padding: clamp(56px, 9vw, 104px) 0; position: relative; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 50;
  background: var(--brass); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 800;
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }

/* ---------- Type ---------- */
.eyebrow {
  margin: 0 0 14px;
  color: var(--brass);
  font-family: "Spline Sans Mono", monospace;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
}
h1, h2, h3 { margin: 0; font-family: "Fraunces", Georgia, serif; line-height: 1.02; letter-spacing: -0.02em; }
h1 {
  font-size: clamp(3rem, 8.5vw, 6rem);
  font-weight: 700;
}
h1 .hl { color: var(--card-red); font-style: italic; }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 700; }
h3 { font-size: 1.28rem; font-weight: 600; font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -0.01em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px min(5vw, 56px);
  background: rgba(8, 32, 25, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand img { width: 184px; }
nav { display: flex; align-items: center; gap: 26px; font-weight: 600; }
nav a { color: var(--cream); opacity: 0.88; transition: color 0.18s ease, opacity 0.18s ease; }
nav a:hover { opacity: 1; color: var(--brass); }
.nav-cta {
  padding: 9px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--card-red), #a9341f);
  color: #fff !important; opacity: 1 !important;
  box-shadow: 0 6px 18px rgba(200, 65, 46, 0.34);
}
.nav-cta:hover { color: #fff !important; transform: translateY(-1px); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--cream); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 110px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.hero-text { font-size: clamp(1.08rem, 1.6vw, 1.26rem); color: var(--muted); max-width: 540px; margin: 24px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.small-note {
  color: var(--muted); font-size: 0.86rem; margin-top: 16px;
  font-family: "Spline Sans Mono", monospace; letter-spacing: 0.01em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 14px; font-weight: 700; font-size: 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-ico { width: 20px; height: 20px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--card-red), #a9341f);
  color: #fff; box-shadow: 0 14px 30px rgba(200, 65, 46, 0.34);
}
.btn-primary:hover { box-shadow: 0 18px 38px rgba(200, 65, 46, 0.46); }
.btn-secondary {
  background: rgba(246, 239, 224, 0.07); color: var(--cream);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: rgba(246, 239, 224, 0.13); }

/* ---------- Signature: the cribbage board ---------- */
.board-card { position: relative; }
.board {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  min-height: 420px;
  background:
    repeating-linear-gradient(92deg, rgba(0,0,0,0.035) 0 2px, transparent 2px 16px),
    linear-gradient(160deg, var(--maple) 0%, var(--maple-2) 100%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(20,36,29,0.06), inset 0 2px 0 rgba(255,255,255,0.5);
  overflow: hidden;
}
.board::before {
  content: "4 HANDS";
  position: absolute; right: 22px; top: 16px;
  font-family: "Fraunces", serif; font-style: italic; font-weight: 700;
  font-size: 2.4rem; color: rgba(20, 36, 29, 0.10);
}
/* Each track is a row of peg holes drawn with radial dots */
.track {
  height: 18px; margin: 26px 4px;
  border-radius: 999px;
  background-image: radial-gradient(circle, rgba(20,36,29,0.34) 0 2.4px, transparent 3px);
  background-size: 26px 18px; background-position: center;
  background-repeat: repeat-x;
}
.track-a { margin-top: 64px; }
.track-c { margin-bottom: 8px; }

.peg {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f0c873, var(--brass) 55%, var(--brass-2));
  box-shadow: 0 3px 5px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.6);
}
.peg::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: rgba(255,255,255,0.25); }
.peg-1 { left: 30px;  top: 90px;  animation: pegPop 0.5s ease both 0.2s; }
.peg-2 { left: 134px; top: 90px;  animation: pegPop 0.5s ease both 0.35s; }
.peg-3 { left: 264px; top: 90px;  background: radial-gradient(circle at 35% 30%, #e88f7c, var(--card-red) 55%, #9c2f1d); animation: pegPop 0.5s ease both 0.5s; }
@keyframes pegPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lobby-chip {
  position: absolute; left: 22px; right: 22px; bottom: 22px;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(13, 51, 39, 0.94); color: var(--cream);
  box-shadow: 0 10px 26px rgba(0,0,0,0.4);
}
.lobby-chip .dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #57d98a; box-shadow: 0 0 0 4px rgba(87, 217, 138, 0.22); flex: none; }
.chip-label { margin: 0; font-family: "Spline Sans Mono", monospace; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); }
.chip-line { margin: 3px 0 0; font-size: 0.92rem; color: var(--muted); }
.chip-line strong { color: var(--cream); }

.count-chip {
  position: absolute; top: -16px; right: 18px;
  display: flex; align-items: baseline; gap: 4px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  box-shadow: var(--shadow-sm);
  font-family: "Spline Sans Mono", monospace;
}
.count-chip span { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); margin-right: 4px; }
.count-chip b { font-family: "Fraunces", serif; font-size: 1.5rem; }
.count-chip i { font-style: normal; color: var(--muted); font-size: 0.9rem; }

/* ---------- Strip ---------- */
.strip { border-block: 1px solid var(--line); background: rgba(0,0,0,0.16); }
.strip-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px;
  padding: 20px 0; text-align: center; color: var(--muted); font-size: 1rem;
}
.strip-row b { color: var(--cream); font-weight: 700; }
.strip-row .sep { color: var(--brass); }

/* ---------- Features ---------- */
.features .feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 38px;
}
.feature-card {
  padding: 28px 24px; min-height: 232px;
  border-radius: var(--radius);
  background: rgba(246, 239, 224, 0.05);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(217,164,65,0.5); background: rgba(246,239,224,0.08); }
.icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 20px;
  border-radius: 14px; font-size: 1.7rem;
  background: linear-gradient(135deg, rgba(217,164,65,0.22), rgba(200,65,46,0.16));
  border: 1px solid var(--line);
}
.feature-card p { color: var(--muted); margin: 10px 0 0; }

/* ---------- How it works ---------- */
.steps {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  counter-reset: step;
}
.step {
  position: relative; padding: 30px 26px;
  border-radius: var(--radius);
  background: rgba(246, 239, 224, 0.05);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.step-peg {
  display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px;
  border-radius: 50%; font-family: "Fraunces", serif; font-weight: 700; font-size: 1.3rem; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #f0c873, var(--brass) 60%, var(--brass-2));
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.6), 0 4px 8px rgba(0,0,0,0.3);
}
.step p { color: var(--muted); margin: 10px 0 0; }

/* ---------- SEO block ---------- */
.seo-block { background: radial-gradient(circle at center, rgba(217,164,65,0.08), transparent 60%); }
.seo-block p { color: var(--muted); font-size: 1.14rem; margin: 16px 0 0; }

/* ---------- FAQ ---------- */
.faq details {
  text-align: left; margin-top: 14px; padding: 18px 22px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: rgba(246, 239, 224, 0.05);
}
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 1.08rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brass); font-size: 1.5rem; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] { background: rgba(246,239,224,0.08); border-color: rgba(217,164,65,0.4); }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* ---------- Final CTA ---------- */
.cta-box {
  text-align: center; padding: clamp(40px, 7vw, 80px) clamp(24px, 5vw, 60px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(217,164,65,0.3);
  background:
    radial-gradient(circle at 70% 0%, rgba(217,164,65,0.14), transparent 55%),
    linear-gradient(135deg, rgba(200,65,46,0.18), rgba(10,40,32,0.6));
  box-shadow: var(--shadow);
}
.cta-box p { color: var(--muted); margin: 16px auto 0; max-width: 520px; }
.cta-box .hero-actions { justify-content: center; margin-top: 30px; }
.cta-box .small-note { margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); background: rgba(0,0,0,0.22); }
.footer-grid { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.92rem; }
.footer-grid p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: 14px min(5vw, 56px) 22px;
    background: rgba(8, 32, 25, 0.98); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height 0.28s ease, visibility 0.28s;
  }
  nav.open { max-height: 360px; visibility: visible; }
  nav a { padding: 10px 4px; }
  .nav-cta { text-align: center; margin-top: 6px; }
  .hero-grid { grid-template-columns: 1fr; }
  .board-card { order: 2; max-width: 460px; }
  .features .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .features .feature-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .strip-row .sep { display: none; }
  .strip-row { flex-direction: column; gap: 8px; }
  .board { min-height: 360px; }
  .footer-grid { justify-content: center; text-align: center; }
}
