:root {
  --felt: #6e1423;
  --felt-deep: #3a0910;
  --felt-dark: #250509;
  --cream: #f7eedc;
  --cream-deep: #eadcc0;
  --gold: #d9a944;
  --gold-light: #f2d58c;
  --ink: #1e1414;
  --card-red: #b3121d;
  --text: #f7eedc;
  --muted: rgba(247, 238, 220, 0.74);
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --radius-card: 12px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--felt-deep);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(150, 30, 48, 0.55), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--felt) 0%, var(--felt-deep) 55%, var(--felt-dark) 100%);
  background-attachment: fixed, scroll, fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.7rem, 6vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(37, 5, 9, 0.62);
  border-bottom: 1px solid rgba(217, 169, 68, 0.18);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span { font-family: var(--display); font-size: 1.45rem; }
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 1rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cream); }
@media (max-width: 760px) { .site-nav .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  font-family: var(--body); font-weight: 700; font-size: 1.05rem;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.btn-gold:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.42); }
.btn-ghost { background: rgba(255,255,255,.07); color: var(--cream); border: 1px solid rgba(217,169,68,.5); }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.12); }
.btn svg { width: 22px; height: 22px; }

/* Playing cards (shared by hero, demo, legal accents) */
.pcard {
  position: absolute;
  width: var(--w, 96px); aspect-ratio: 5 / 7;
  border-radius: calc(var(--w, 96px) * .11);
  background: linear-gradient(180deg, var(--cream), var(--cream-deep));
  box-shadow: 0 10px 22px rgba(0,0,0,.38), inset 0 0 0 1px rgba(0,0,0,.12);
  color: var(--ink);
  font-family: var(--display);
  user-select: none;
}
.pcard.red { color: var(--card-red); }
.pcard .corner { position: absolute; left: 9%; top: 6%; line-height: .95; text-align: center; font-size: calc(var(--w, 96px) * .3); }
.pcard .corner small { display: block; font-size: .8em; font-family: var(--body); }
.pcard .pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--w, 96px) * .55); padding-top: 18%; padding-left: 12%; }
.pcard.wild::after {
  content: "✦"; position: absolute; right: 9%; bottom: 6%;
  color: var(--gold); font-size: calc(var(--w, 96px) * .2);
}
.pcard.joker .pip { font-size: calc(var(--w, 96px) * .5); color: var(--card-red); padding: 0; }
.pcard.joker .corner { color: var(--gold); font-size: calc(var(--w, 96px) * .16); letter-spacing: .04em; }
.pcard.back {
  background:
    repeating-linear-gradient(45deg, rgba(217,169,68,.55) 0 1px, transparent 1px 11px),
    repeating-linear-gradient(-45deg, rgba(217,169,68,.55) 0 1px, transparent 1px 11px),
    linear-gradient(135deg, #9b1a28, #5a0b15);
  box-shadow: 0 10px 22px rgba(0,0,0,.42), inset 0 0 0 calc(var(--w,96px)*.06) #7a1220, inset 0 0 0 calc(var(--w,96px)*.07) var(--gold);
}

/* Footer */
.site-footer { border-top: 1px solid rgba(217,169,68,.2); padding: 44px 0 60px; margin-top: 40px; color: var(--muted); font-size: 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer nav a { color: var(--cream); font-weight: 700; text-decoration: none; }
.site-footer nav a:hover { color: var(--gold-light); }

/* Legal / support pages */
.doc { padding: 64px 0 40px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.doc h2 { font-size: 1.6rem; margin-top: 1.8em; color: var(--gold-light); }
.doc p, .doc li { color: rgba(247,238,220,.9); max-width: 68ch; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .45em; }
.doc .updated { color: var(--muted); font-size: 1rem; }
.sheet {
  background: rgba(20, 3, 6, .38);
  border: 1px solid rgba(217,169,68,.22);
  border-radius: 22px;
  padding: clamp(22px, 4vw, 44px);
}
details { border-bottom: 1px solid rgba(217,169,68,.2); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-family: var(--display); color: var(--gold); font-size: 1.5rem; line-height: 1; transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
