:root {
  --bg: #dfece7;
  --bg-deep: #c5dbd2;
  --ink: #12231c;
  --muted: #4a6358;
  --accent: #0f7a56;
  --accent-ink: #063d2b;
  --highlight: #f0b429;
  --panel: rgba(255, 255, 255, 0.55);
  --line: rgba(18, 35, 28, 0.14);
  --display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --body: "Figtree", "Avenir Next", sans-serif;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(18, 35, 28, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  line-height: 1.55;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(240, 180, 41, 0.28), transparent 58%),
    radial-gradient(780px 480px at -5% 35%, rgba(15, 122, 86, 0.18), transparent 55%),
    linear-gradient(165deg, #eaf4ef 0%, var(--bg) 42%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(18, 35, 28, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 35, 28, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
  z-index: 0;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, #eaf4ef 82%, 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: 700;
  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: 600;
  font-size: 0.95rem;
}

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

.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  padding: 2rem 0 3.5rem;
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.flow-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.55;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw-flow 2.8s ease forwards 0.2s;
}

.flow-path.alt {
  stroke: var(--highlight);
  opacity: 0.45;
  animation-delay: 0.55s;
}

.flow-node {
  fill: var(--ink);
  opacity: 0;
  animation: pop-node 0.45s ease forwards 1.4s;
}

.flow-node.late { animation-delay: 1.75s; }

@keyframes draw-flow {
  to { stroke-dashoffset: 0; }
}

@keyframes pop-node {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 0.85; transform: scale(1); }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  animation: rise 0.7s ease both;
}

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

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.lede {
  margin: 1rem 0 0;
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 32ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-ink);
  color: #fff;
}

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

.btn-ghost:hover { background: var(--panel); }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.section {
  padding: 3.5rem 0;
  position: relative;
  z-index: 1;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

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

.steps {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps .n {
  font-family: var(--display);
  font-weight: 800;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.2;
}

.notes {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

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

.note h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

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

.cta-band {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background: color-mix(in srgb, white 70%, var(--bg));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-band p {
  margin: 0;
  font-weight: 600;
  max-width: 40ch;
}

.play-page { padding: 2rem 0 3rem; position: relative; z-index: 1; }

.play-page h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.035em;
}

.game-shell {
  position: relative;
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: color-mix(in srgb, white 78%, var(--bg));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

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

#game {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: pointer;
  background: #f7fbf9;
}

.game-overlay {
  position: absolute;
  inset: 48px 0 0;
  display: grid;
  place-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.5rem;
  background: color-mix(in srgb, #eaf4ef 88%, transparent);
  backdrop-filter: blur(4px);
}

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

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

.overlay-text {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.play-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

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

.legal { padding-bottom: 4rem; }

.legal h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.03em;
}

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

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

.legal p,
.legal li { color: var(--muted); max-width: 70ch; }

.legal ul { padding-left: 1.2rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

.consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: 520px;
  margin-inline: auto;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  display: none;
}

.consent.is-open { display: block; }

.consent p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .hero { min-height: 78vh; align-items: end; }
  .nav { gap: 0.75rem; }
}
