:root {
  --bg: #0e1a14;
  --bg-card: #1a2820;
  --bg-card-2: #243528;
  --border: #2d4032;
  --accent: #d4a843;
  --accent-soft: #e8c878;
  --text: #f0e9d6;
  --text-dim: #a8b0a0;
  --text-muted: #6a7568;
  --tile-empty: #ebe1c2;
  --purple: #6b4ea3;
  --green: #7fb56a;
  --teal: #6fa8a2;
  --shadow: 0 4px 16px rgba(0,0,0,0.35);
  --radius: 16px;
  --radius-sm: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(212, 168, 67, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(127, 181, 106, 0.05) 0%, transparent 50%);
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 26, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--accent);
}

.brand-mark {
  width: 36px;
  height: 36px;
}

.logo-banner {
  display: block;
  height: 72px;
  width: auto;
  max-width: 380px;
}

.hero-screenshot {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  display: block;
}

@media (max-width: 520px) {
  .logo-banner { height: 56px; max-width: 280px; }
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 520px;
}

.store-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #333;
  transition: transform 0.2s, border-color 0.2s;
  min-width: 180px;
}

.store-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.store-badge svg { flex-shrink: 0; }

.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge-text small { font-size: 10px; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.5px; }
.store-badge-text strong { font-size: 17px; font-weight: 600; }

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

/* Phone mockup */
.phone {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 19;
  background: var(--bg-card);
  border: 8px solid #1a1a1a;
  border-radius: 38px;
  padding: 18px 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  position: relative;
}

.phone::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 6px;
  background: #000;
  border-radius: 4px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 24px;
  padding: 22px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.mini-title { color: var(--accent); font-weight: 700; font-size: 14px; }

.mini-score {
  display: flex;
  justify-content: space-around;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  font-size: 10px;
}
.mini-score span { color: var(--text-muted); display: block; }
.mini-score b { color: var(--text); font-size: 14px; }
.mini-score b.gold { color: var(--accent); }

.mini-board {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  background: var(--bg-card-2);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 6px;
}

.mini-cell {
  background: var(--tile-empty);
  border-radius: 4px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.mini-cell.grape { background: var(--purple); }
.mini-cell.clover { background: var(--green); }
.mini-cell.ghost { background: #4d4470; }
.mini-cell.sprout { background: #6fa55a; }
.mini-cell.ruin { background: #8a8a8a; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 12px;
  color: var(--text);
}

.section-head p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- How to play ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 18px;
  transition: border-color 0.2s, transform 0.2s;
}

.step:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.step-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.step h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 700;
}

.step p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ---------- Pieces ---------- */
.pieces-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.chain {
  margin-bottom: 36px;
}

.chain:last-child { margin-bottom: 0; }

.chain-title {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.piece-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.piece-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
}

.piece-tile {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.piece-arrow { color: var(--text-muted); font-size: 12px; }

.piece-name {
  flex: 1;
  color: var(--text);
  font-weight: 500;
}

.piece-pts {
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Tile colors */
.t-purple { background: var(--purple); }
.t-green { background: var(--green); }
.t-teal { background: var(--teal); }
.t-amber { background: #c89556; }
.t-orange { background: #d97842; }
.t-gold { background: #d4a843; }
.t-blue { background: #5a7db8; }
.t-deep { background: #4a3d8a; }
.t-stone { background: #8a8a8a; }
.t-shadow { background: #4d4470; }
.t-crystal { background: #5fa8c8; }
.t-rock { background: #7a7a7a; }

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 60px 32px;
  margin: 40px 0 80px;
}

.cta h2 {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--accent);
}

.cta p {
  color: var(--text-dim);
  margin-bottom: 28px;
  font-size: 17px;
}

.cta .store-badges { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0a1310;
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 12px;
  max-width: 320px;
}

.footer-col h4 {
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- FAQ details ---------- */
details.step { cursor: pointer; }
details.step summary::after {
  content: '+';
  float: right;
  color: var(--accent);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s;
}
details.step[open] summary::after { content: '−'; }
details.step summary::-webkit-details-marker { display: none; }

/* ---------- Legal pages ---------- */
.legal {
  padding: 60px 0 80px;
}

.legal-wrap {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
}

.legal-wrap h1 {
  font-size: 36px;
  margin-bottom: 8px;
  color: var(--accent);
}

.legal-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-wrap h2 {
  font-size: 20px;
  margin: 32px 0 12px;
  color: var(--text);
}

.legal-wrap p, .legal-wrap li {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 12px;
}

.legal-wrap ul {
  padding-left: 22px;
  margin-bottom: 12px;
}

.legal-wrap a { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 50px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; }
  .phone { max-width: 260px; }
  .nav { gap: 18px; }
  .nav a { font-size: 13px; }
  section { padding: 56px 0; }
  .pieces-wrap { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .legal-wrap { padding: 28px; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .brand-sub { display: none; }
  .nav { gap: 14px; }
  .store-badge { min-width: 0; flex: 1; padding: 10px 14px; }
  .store-badge-text strong { font-size: 14px; }
}
