/* Quadrille Studio — the whole design system.
   Light mode is the game's Minimal Studio palette; dark is Midnight Neon. */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --border: #e5e8ee;
  --ink: #111827;
  --subtext: #6b7280;
  --accent: #2563eb;
  --p1: #2563eb;
  --p2: #f59e0b;
  --dot: #c2c9d4;
  --edge: #1f2937;
  --radius: 16px;
  --maxw: 940px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --panel: #161d3a;
    --border: #28315c;
    --ink: #e8ecff;
    --subtext: #7d87b8;
    --accent: #22d3ee;
    --p1: #22d3ee;
    --p2: #f472b6;
    --dot: #3d466e;
    --edge: #aab3dc;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin-bottom: .6em; }
h3 { font-size: 1.05rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.muted { color: var(--subtext); }

/* --- header / footer --- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark svg { display: block; }

.site-foot {
  border-top: 1px solid var(--border);
  margin-top: 88px;
  padding: 32px 0 56px;
  color: var(--subtext);
  font-size: .92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

/* --- sections --- */

section { margin-top: 72px; }

.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--subtext);
  max-width: 46ch;
}

/* --- cards --- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

a.card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,.06), 0 16px 40px rgba(0,0,0,.10); }

.card--ghost {
  border-style: dashed;
  box-shadow: none;
  background: none;
  color: var(--subtext);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
}

.card__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  display: block;
}

/* --- chips --- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .85rem;
  color: var(--subtext);
  background: var(--panel);
}

.chip--soon { opacity: .6; }

.chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--p2); }

/* --- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 13px 26px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }

.btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .btn--primary { color: #0b1020; }
}

.btn[aria-disabled="true"] {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* --- hero --- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 24px;
}

@media (min-width: 820px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 56px; }
}

#hero-board {
  width: 100%;
  height: auto;
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* --- rules / features --- */

.rules { max-width: 60ch; }
.rules li { margin-bottom: .5em; }
.rules ol { padding-left: 1.3em; }

.features { list-style: none; }
.features li { margin-bottom: 0; }
.features h3 { margin-bottom: .25em; }
.features p { color: var(--subtext); font-size: .95rem; }

/* --- theme shots --- */

.shots { display: grid; gap: 20px; grid-template-columns: 1fr; }

@media (min-width: 720px) {
  .shots { grid-template-columns: repeat(3, 1fr); }
}

.shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.shot figcaption {
  margin-top: 10px;
  font-size: .9rem;
  color: var(--subtext);
}

.shot b { color: var(--ink); font-weight: 600; display: block; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
