:root {
  --bg: #d5ddd6;
  --bg-deep: #b7c2ba;
  --ink: #16211c;
  --muted: #3b4942;
  --accent: #c24e1d;
  --accent-ink: #f4ece3;
  --paper: #e8eee9;
  --line: color-mix(in srgb, var(--ink) 16%, transparent);
  --display: "Syne", sans-serif;
  --body: "Instrument Sans", sans-serif;
  --hero-type: #f3efe6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 520px at 100% -10%, #c9b48a 0%, transparent 55%),
    radial-gradient(900px 480px at -10% 80%, #9eb3a8 0%, transparent 50%),
    linear-gradient(180deg, #cfd8d2 0%, #dfe6e1 48%, #c3cdc6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
}

.page .site-header {
  position: sticky;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--hero-type);
  font-size: 1.05rem;
}

.page .logo { color: var(--ink); }

.nav { display: flex; gap: 1.15rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none;
  color: color-mix(in srgb, var(--hero-type) 78%, transparent);
  font-weight: 600;
  font-size: 0.95rem;
}
.page .nav a { color: var(--muted); }
.nav a[aria-current="page"],
.nav a:hover { color: var(--hero-type); }
.page .nav a[aria-current="page"],
.page .nav a:hover { color: var(--ink); }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
  z-index: 0;
  transform: scale(1.08);
  animation: ken 22s ease-out forwards;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(14, 20, 17, 0.55) 0%, rgba(14, 20, 17, 0.12) 42%, transparent 68%),
    linear-gradient(180deg, rgba(14, 20, 17, 0.2) 0%, transparent 28%, rgba(14, 20, 17, 0.72) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 0 4.2rem;
  color: var(--hero-type);
  animation: rise 1s ease 0.15s both;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.1rem, 11vw, 8rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0 0 1.1rem;
  max-width: 11ch;
}

.headline {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.55rem;
  max-width: 22ch;
}

.lede {
  margin: 0 0 1.4rem;
  max-width: 34ch;
  color: color-mix(in srgb, var(--hero-type) 82%, transparent);
  font-size: 1.05rem;
}

.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-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: var(--body);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 38%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, #fff 35%, transparent), transparent);
  transform: translateX(-120%);
}

.btn-primary:hover::after { animation: sweep 0.7s ease; }

.btn-ghost {
  background: transparent;
  color: var(--hero-type);
  border-color: color-mix(in srgb, var(--hero-type) 45%, transparent);
}

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

.section {
  padding: 4.2rem 0;
}

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

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

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

.steps li {
  padding: 0;
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  font-size: 0.85rem;
}

.steps strong { font-family: var(--display); font-size: 1.15rem; }

.notes {
  display: grid;
  gap: 2rem;
  max-width: 62ch;
}

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

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

.cta-line {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

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

.play-page { padding: 2.2rem 0 3.5rem; }

.play-page h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
  line-height: 0.95;
}

.play-page .lede { color: var(--muted); max-width: 42ch; }

.game-shell {
  position: relative;
  background: #121a16;
  overflow: hidden;
  margin-top: 1.2rem;
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  padding: 0.75rem 1rem;
  color: #e7ece8;
  font-size: 0.92rem;
  border-bottom: 1px solid color-mix(in srgb, #e7ece8 12%, transparent);
  font-variant-numeric: tabular-nums;
}

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

#game {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  margin: 0 auto;
  touch-action: none;
  cursor: crosshair;
}

.game-overlay {
  position: absolute;
  inset: 44px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: color-mix(in srgb, #121a16 78%, transparent);
  color: #f3efe6;
  text-align: center;
  padding: 1.5rem;
}

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

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

.overlay-text {
  margin: 0 0 0.4rem;
  color: color-mix(in srgb, #f3efe6 72%, transparent);
  max-width: 32ch;
}

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

.legal h1,
.page-title {
  font-family: var(--display);
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 0.8rem;
  line-height: 0.95;
}

.legal h2 {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  letter-spacing: -0.02em;
  margin: 1.7rem 0 0.45rem;
}

.legal .meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.3rem 0 2.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; gap: 1rem; }
.footer-inner a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.footer-inner a:hover { color: var(--ink); }

.rise { opacity: 0; transform: translateY(18px); }
.rise.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@keyframes ken {
  to { transform: scale(1); }
}

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

@keyframes sweep {
  to { transform: translateX(380%); }
}

@media (max-width: 720px) {
  .brand { max-width: 8ch; }
  .hero-copy { padding-bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-visual,
  .hero-copy,
  .rise,
  .btn-primary::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
