:root {
  --bg: #f6efe4;
  --surface: #fffaf2;
  --text: #2b2118;
  --muted: #6e5d4c;
  --accent: #c2410c;
  --accent-text: #ffffff;
  --border: #e4d6c1;
  --wood: #d9a066;
  --wood-dark: #8a5a2b;
  --wall: #5b3a1e;
  --ball: #e5e7eb;
  --ball-shade: #9ca3af;
  --hole: #1c140d;
  --shadow: 0 20px 50px rgba(60, 35, 10, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120d;
    --surface: #211a13;
    --text: #f3ebe0;
    --muted: #b9a892;
    --accent: #fb923c;
    --accent-text: #1a1009;
    --border: #3a2e22;
    --wood: #b27a45;
    --wood-dark: #6b4421;
    --wall: #3b2410;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-weight: 600; }
nav a:hover { color: var(--text); }

.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  padding: 48px 0 72px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; max-width: 32ch; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 700;
}
.badge small { display: block; font-weight: 600; color: var(--muted); font-size: 0.75rem; line-height: 1.1; }

.board-stage { perspective: 900px; display: flex; justify-content: center; }
.board {
  width: min(100%, 380px); aspect-ratio: 1; border-radius: 24px; box-shadow: var(--shadow);
  animation: tilt 8s ease-in-out infinite;
  transform-style: preserve-3d;
}
.board svg { width: 100%; height: 100%; display: block; border-radius: 24px; }

@keyframes tilt {
  0%, 100% { transform: rotateX(0deg) rotateY(0deg); }
  15% { transform: rotateX(0deg) rotateY(9deg); }
  33% { transform: rotateX(-9deg) rotateY(2deg); }
  52% { transform: rotateX(-2deg) rotateY(-9deg); }
  66% { transform: rotateX(-9deg) rotateY(-2deg); }
  82% { transform: rotateX(-2deg) rotateY(9deg); }
}

@media (prefers-reduced-motion: reduce) {
  .board { animation: none; }
}

section.features { padding: 24px 0 72px; }
section h2 { font-size: 1.8rem; margin: 0 0 24px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
}
.card .icon { font-size: 1.6rem; }
.card h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.materials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; border: 1px solid var(--border); background: var(--surface); }

footer.site {
  border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 0.9rem;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}
footer.site a { color: var(--muted); }

/* Long-form pages (privacy policy) */
article.doc { max-width: 720px; padding: 24px 0 64px; }
article.doc h1 { font-size: 2.2rem; margin-bottom: 4px; }
article.doc .meta { color: var(--muted); margin-top: 0; }
article.doc h2 { font-size: 1.3rem; margin: 32px 0 8px; }
article.doc table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
article.doc th, article.doc td { text-align: left; border-bottom: 1px solid var(--border); padding: 8px 8px 8px 0; vertical-align: top; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 24px 0 48px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  nav a { margin-left: 14px; }
}
