:root {
  --bg: #eef3f1;
  --bg-deep: #d8e4df;
  --ink: #15221f;
  --muted: #4a5c57;
  --accent: #0f7a6c;
  --accent-hot: #c45c26;
  --panel: #f7faf8;
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --display: "Syne", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --radius: 0;
  --shadow: 0 24px 60px color-mix(in srgb, var(--ink) 10%, transparent);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 85% -5%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(700px 480px at -5% 35%, color-mix(in srgb, var(--accent-hot) 16%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  line-height: 1.6;
}

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

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  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: 68px;
  gap: 1rem;
}

.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}

.logo span { color: var(--accent); }

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

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

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

/* —— Hero: one composition —— */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 3px solid var(--accent);
}

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 42%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 42%),
    radial-gradient(circle at 62% 48%, color-mix(in srgb, var(--accent-hot) 18%, transparent), transparent 36%),
    linear-gradient(115deg, #0f2a26 0%, #1a4039 42%, #2a241c 100%);
}

.hero-rings {
  position: absolute;
  right: max(-8vw, -80px);
  top: 50%;
  translate: 0 -52%;
  width: min(62vw, 560px);
  aspect-ratio: 1;
  animation: drift 14s ease-in-out infinite;
}

.hero-rings i {
  position: absolute;
  inset: var(--inset);
  border: 2px solid color-mix(in srgb, #e8f5f1 55%, transparent);
  border-radius: 50%;
  animation: spin var(--dur) linear infinite;
}

.hero-rings i::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--mark, #3dceb5);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mark) 25%, transparent);
}

.hero-rings i:nth-child(1) { --inset: 8%; --dur: 18s; --mark: #3dceb5; }
.hero-rings i:nth-child(2) { --inset: 22%; --dur: 12s; --mark: #e8a54b; animation-direction: reverse; }
.hero-rings i:nth-child(3) { --inset: 36%; --dur: 9s; --mark: #f2efe8; }
.hero-rings i:nth-child(4) { --inset: 50%; --dur: 15s; --mark: #c45c26; animation-direction: reverse; }

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(5rem, 12vh, 7rem) 0 clamp(2.5rem, 6vh, 3.5rem);
  color: #f4f7f5;
  max-width: 34rem;
}

.brand-mark {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.brand-mark em {
  font-style: normal;
  color: #3dceb5;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #e8f0ed;
}

.lede {
  margin: 0 0 1.35rem;
  max-width: 36ch;
  color: color-mix(in srgb, #f4f7f5 72%, transparent);
  font-size: 1.05rem;
}

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

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

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

.btn-primary {
  background: #3dceb5;
  color: #0f2a26;
  border-color: #3dceb5;
}

.btn-primary:hover { background: #55dbc4; color: #0f2a26; }

.btn-ghost {
  background: transparent;
  color: #f4f7f5;
  border-color: color-mix(in srgb, #f4f7f5 35%, transparent);
}

.btn-ghost:hover { border-color: #f4f7f5; color: #fff; }

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: color-mix(in srgb, #f4f7f5 65%, transparent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.meta-strip li::before {
  content: "·";
  margin-right: 1.25rem;
  opacity: 0.5;
}

.meta-strip li:first-child::before { content: none; margin: 0; }

.section {
  padding: clamp(2.5rem, 6vw, 3.75rem) 0;
}

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

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

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

.score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.score-row strong {
  font-family: var(--display);
  font-size: 2.4rem;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.score-row span { color: var(--muted); font-weight: 600; }

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

.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 3.4rem;
  background: var(--panel);
  border-left: 4px solid var(--accent);
  color: var(--muted);
  animation: rise 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: 0.9rem;
  top: 50%;
  translate: 0 -50%;
  font-family: var(--display);
  font-weight: 800;
  color: var(--accent);
}

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

.notes {
  display: grid;
  gap: 1.5rem;
  max-width: 720px;
}

.notes article h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.notes article p {
  margin: 0;
  color: var(--muted);
}

.cta-band {
  margin-top: 2rem;
  padding: 1.5rem 0 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;
  max-width: 42ch;
  color: var(--muted);
}

.cta-band .btn-primary {
  color: #0f2a26;
}

.disclosure {
  margin-top: 1.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 70ch;
}

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

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

.game-shell {
  margin-top: 1.25rem;
  border: 2px solid var(--line);
  background: #10241f;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 0.85rem 1rem;
  background: #16352e;
  color: #d7ebe5;
  border-bottom: 1px solid #0a1a16;
  font-weight: 600;
  font-size: 0.92rem;
}

.game-hud strong { color: #e8a54b; 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: 48px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: color-mix(in srgb, #10241f 88%, transparent);
  color: #eef5f2;
  text-align: center;
  padding: 1.5rem;
}

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

.overlay-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
}

.overlay-text {
  margin: 0;
  color: #a9c4bc;
  max-width: 34ch;
}

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

.controls-hint {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Legal */
.legal h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  letter-spacing: -0.03em;
}

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

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

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

.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: 650;
}

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

.cookie-bar {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 50;
  max-width: 420px;
  margin-inline: auto;
  left: 0;
  right: 0;
  padding: 1rem 1.1rem;
  background: var(--ink);
  color: #eef5f2;
  display: none;
  gap: 0.85rem;
  align-items: flex-start;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.cookie-bar.is-visible { display: flex; }

.cookie-bar p {
  margin: 0;
  font-size: 0.88rem;
  color: color-mix(in srgb, #eef5f2 82%, transparent);
}

.cookie-bar a { color: #3dceb5; }

.cookie-bar .btn {
  align-self: flex-start;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

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

@keyframes drift {
  0%, 100% { transform: translate(0, -52%) scale(1); }
  50% { transform: translate(-2%, -48%) scale(1.03); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-rings,
  .hero-rings i,
  .steps li { animation: none; }
}

@media (max-width: 720px) {
  .hero { min-height: min(88vh, 720px); }
  .hero-rings {
    width: min(88vw, 420px);
    right: -18vw;
    opacity: 0.85;
  }
  .hero-content { max-width: 100%; }
}
