:root {
  --bg: #10160f;
  --bg-deep: #0a0e09;
  --ink: #f2efe6;
  --muted: #a8b0a0;
  --accent: #e4a035;
  --accent-deep: #c47d18;
  --sage: #6f8f6a;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --panel: #182016;
  --danger: #d65a4a;
  --display: "Syne", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --radius: 2px;
  --wrap: min(1080px, calc(100% - 2rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  color: color-mix(in srgb, var(--accent) 80%, white);
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe0a0, var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  animation: pulse-logo 2.4s ease-in-out infinite;
}

@keyframes pulse-logo {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--ink);
}

/* —— Hero —— */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 760px);
  display: flex;
  align-items: flex-end;
  padding: 5rem 0 3.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 70% at 75% 35%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, color-mix(in srgb, var(--sage) 22%, transparent), transparent 50%),
    linear-gradient(165deg, #141c12 0%, var(--bg-deep) 48%, #152018 100%);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  animation: grid-drift 28s linear infinite;
}

.hero-visual::after {
  content: "";
  position: absolute;
  width: min(52vw, 420px);
  aspect-ratio: 1;
  right: 8%;
  top: 12%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 18%, transparent) 0 18%, transparent 19% 100%),
    conic-gradient(from 120deg, transparent 0 70%, color-mix(in srgb, var(--accent) 40%, transparent) 72% 74%, transparent 76%);
  animation: ring-spin 18s linear infinite;
}

@keyframes grid-drift {
  to {
    background-position: 48px 48px, 48px 48px;
  }
}

@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-copy {
  max-width: 36rem;
  animation: rise-in 0.9s ease both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand-lockup {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0 0 1rem;
}

.brand-lockup span {
  display: block;
  color: var(--accent);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  max-width: 22ch;
}

.lede {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, white);
  color: #1a1408;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--ink) 40%, transparent);
  color: var(--ink);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.meta-row li {
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* —— Sections —— */
.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}

.section-lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 54ch;
}

.prose p {
  max-width: 62ch;
  color: var(--muted);
}

.prose p + p {
  margin-top: 0.9rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  max-width: 640px;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 3.4rem;
  background: var(--panel);
  border-left: 3px solid var(--accent);
  color: var(--muted);
  animation: rise-in 0.7s ease both;
}

.steps li:nth-child(2) {
  animation-delay: 0.08s;
}

.steps li:nth-child(3) {
  animation-delay: 0.16s;
}

.steps li:nth-child(4) {
  animation-delay: 0.24s;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-weight: 700;
  color: var(--accent);
}

.steps strong {
  color: var(--ink);
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.note h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}

.note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.cta-band {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cta-band p {
  margin: 0;
  color: var(--muted);
  max-width: 40ch;
}

.score-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--display);
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.score-inline strong {
  color: var(--accent);
  font-size: 1.5rem;
}

/* —— Play —— */
.play-page {
  padding: 2.25rem 0 3rem;
}

.play-page h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.game-shell {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  padding: 0.85rem 1rem;
  background: #1a2418;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.game-hud strong {
  color: var(--accent);
  font-family: var(--display);
}

#game {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  margin: 0 auto;
  touch-action: manipulation;
  cursor: pointer;
}

.game-overlay {
  position: absolute;
  inset: 49px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  text-align: center;
  padding: 1.5rem;
}

.game-overlay[hidden] {
  display: none !important;
}

.overlay-title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0;
}

.overlay-text {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
}

.play-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* —— Legal / About —— */
.legal h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.legal .updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.legal h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.6rem;
}

.legal ul {
  color: var(--muted);
  max-width: 62ch;
  padding-left: 1.2rem;
}

.legal li + li {
  margin-top: 0.35rem;
}

.contact-block {
  margin-top: 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-block p {
  margin: 0.35rem 0;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 2rem;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-inner a:hover {
  color: var(--ink);
}

.footer-disclaimer {
  width: 100%;
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--muted) 80%, transparent);
  max-width: 70ch;
}

/* —— Cookie notice —— */
.cookie-bar {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 50;
  max-width: 420px;
  margin-inline: auto;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 12px 40px color-mix(in srgb, black 45%, transparent);
}

.cookie-bar[hidden] {
  display: none !important;
}

.cookie-bar p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
}

/* —— Utilities —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .notes {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 4rem 0 2.75rem;
    align-items: flex-start;
  }

  .hero-visual::after {
    width: min(70vw, 280px);
    top: 8%;
    right: -8%;
    opacity: 0.7;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
