/*
 * Shared chrome for the marketing/legal pages (landing, how-to-play, terms,
 * privacy). The game itself (/play, /admin) is a separate React app with its
 * own stylesheet — this file is deliberately independent so the two never
 * fight over class names or load unrelated CSS.
 */

:root {
  --site-bg: #071120;
  --site-gold: #f6d770;
  --site-cream: #f3ead3;
  --site-cream-dim: rgba(243, 234, 211, 0.72);
  --site-cream-faint: rgba(243, 234, 211, 0.5);
  --site-panel-bg: rgba(9, 15, 28, 0.88);
  --site-panel-border: rgba(246, 215, 112, 0.24);
  --site-header-bg: rgba(5, 10, 20, 0.92);
}

* , *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--site-bg);
  color: var(--site-cream);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('/lobby/backgrounds/classic-green.webp');
  background-size: cover;
  background-position: center;
  filter: brightness(0.32) saturate(1.05);
}
.site-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(28, 127, 185, 0.16), rgba(5, 12, 24, 0.94) 60%, rgba(2, 8, 16, 0.99));
}

.site-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header — solid fill, no backdrop-filter (kept off deliberately; it's a
   known GPU cost on phones and buys nothing on a mostly-static page). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 3vw, 2.5rem);
  background: var(--site-header-bg);
  border-bottom: 1px solid rgba(246, 215, 112, 0.14);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 900;
  font-size: clamp(0.72rem, 1.3vw, 0.92rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--site-gold);
  text-decoration: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}
.site-brand img { height: 1.6rem; width: auto; display: block; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 1.9rem);
}

.site-nav a {
  position: relative;
  color: var(--site-cream-dim);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 120ms ease;
}
.site-nav a:hover { color: var(--site-gold); }
.site-nav a[aria-current='page'] { color: var(--site-gold); }
.site-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.3rem;
  height: 2px;
  background: var(--site-gold);
  border-radius: 2px;
}

.site-main { flex: 1 1 auto; }

/* Document page layout (Terms / Privacy / How to Play) */
.doc-page {
  padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem);
  display: flex;
  justify-content: center;
}

.doc-panel {
  width: 100%;
  max-width: 52rem;
  background: var(--site-panel-bg);
  border: 1px solid var(--site-panel-border);
  border-radius: 1.1rem;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.doc-panel h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  color: var(--site-gold);
  letter-spacing: 0.01em;
}

.doc-meta {
  margin: 0 0 1.6rem;
  font-size: 0.85rem;
  color: var(--site-cream-faint);
}

.doc-note {
  margin: 0 0 2rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(246, 215, 112, 0.22);
  border-left: 3px solid var(--site-gold);
  border-radius: 0.5rem;
  background: rgba(246, 215, 112, 0.06);
  font-size: 0.86rem;
  font-style: italic;
  color: var(--site-cream-dim);
}

.doc-panel h2 {
  margin: 2.2rem 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(246, 215, 112, 0.18);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--site-gold);
}
.doc-panel h2:first-of-type { margin-top: 0; }

.doc-panel h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1rem;
  color: var(--site-cream);
}

.doc-panel p {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: var(--site-cream-dim);
  font-size: 0.94rem;
}

.doc-panel ul {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  color: var(--site-cream-dim);
  font-size: 0.94rem;
  line-height: 1.7;
}
.doc-panel li { margin-bottom: 0.35rem; }

.doc-panel strong { color: var(--site-cream); font-weight: 750; }

.doc-panel a { color: var(--site-gold); text-decoration: underline; text-decoration-color: rgba(246, 215, 112, 0.4); }
.doc-panel a:hover { text-decoration-color: var(--site-gold); }

.doc-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.86rem;
}
.doc-panel th, .doc-panel td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(246, 215, 112, 0.14);
  color: var(--site-cream-dim);
  vertical-align: top;
}
.doc-panel th { color: var(--site-gold); font-weight: 700; }

.doc-panel hr {
  border: none;
  border-top: 1px solid rgba(246, 215, 112, 0.16);
  margin: 2rem 0;
}

/* How to Play — feature grid + board strip */
.feature-intro {
  max-width: 40rem;
  margin: 0 auto 2.4rem;
  text-align: center;
}
.feature-intro p { font-size: 1.02rem; }

.tutorial-figure {
  max-width: 48rem;
  margin: 0 auto 3rem;
  text-align: center;
}
.tutorial-figure img {
  width: 100%;
  border-radius: 0.85rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.feature-grid {
  max-width: 64rem;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
}

.feature-card {
  background: var(--site-panel-bg);
  border: 1px solid var(--site-panel-border);
  border-radius: 0.9rem;
  padding: 1.4rem 1.3rem;
}
.feature-card img { width: 2.5rem; height: 2.5rem; object-fit: contain; margin-bottom: 0.8rem; }
.feature-card h3 { margin: 0 0 0.4rem; color: var(--site-gold); font-size: 1.02rem; }
.feature-card p { margin: 0; font-size: 0.88rem; line-height: 1.6; color: var(--site-cream-dim); }

.board-strip-wrap {
  max-width: 64rem;
  margin: 0 auto 3rem;
  text-align: center;
}
.board-strip-wrap h2 {
  color: var(--site-gold);
  font-size: 1.15rem;
  margin: 0 0 1.1rem;
}
.board-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}
.board-strip img {
  width: 8.5rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 1px solid rgba(246, 215, 112, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.doc-cta {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.6rem;
  padding: 1.6rem clamp(1rem, 3vw, 2.5rem) 2rem;
  font-size: 0.78rem;
  color: var(--site-cream-faint);
  text-align: center;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--site-gold); }
.site-footer .dot { opacity: 0.5; }

@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; }
  .site-nav { gap: 1rem; }
}
