*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Baloo 2', sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; padding: 0; }

:root {
  --ink: #12151c;
  --panel: #1b202b;
  --paper: #f2f0ea;
  --dim: #8f95a3;
  --yellow: #ffcc33;
  --yellow-deep: #e0ab0f;
  --xp: #4ade80;
  --line: rgba(242,240,234,0.1);
}

.section-title { font-weight: 800; font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.15; color: var(--paper); }
.tag { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--yellow); margin-bottom: 0.9rem; }
.tag--pale { color: rgba(242,240,234,0.85); }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.6rem;
  background: rgba(18,21,28,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__logo { font-weight: 800; font-size: 1.15rem; color: var(--yellow); display: flex; align-items: center; gap: 0.6rem; }
.nav__lvl { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--ink); background: var(--yellow); padding: 0.2rem 0.5rem; border-radius: 4px; }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a { font-size: 0.9rem; color: var(--dim); font-weight: 500; }
.nav__links a:hover { color: var(--paper); }
.nav__burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 20px; height: 2px; background: var(--paper); display: block; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 700; border-radius: 10px; transition: transform 0.15s, box-shadow 0.15s; }
.btn--pill { font-size: 0.82rem; padding: 0.55rem 1.05rem; background: var(--yellow); color: #221a00; border-radius: 999px; }
.btn--big { font-size: 1rem; padding: 0.9rem 1.7rem; }
.btn--solid { background: var(--yellow); color: #221a00; box-shadow: 0 8px 22px rgba(255,204,51,0.3); }
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,204,51,0.45); background: var(--yellow-deep); }
.btn--ghost { border: 2px solid var(--line); color: var(--paper); background: rgba(255,255,255,0.04); }
.btn--ghost:hover { border-color: var(--yellow); color: var(--yellow); }

/* ---------- XP bar ---------- */
.xpbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.8rem; }
.xpbar__track { flex: 1; max-width: 260px; height: 12px; background: var(--panel); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.xpbar__fill { height: 100%; background: linear-gradient(90deg, var(--xp), #22c55e); border-radius: 999px; }
.xpbar__label { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--dim); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: space-between; gap: 3rem; padding: 7rem 1.8rem 3rem; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; }
.hero__text { max-width: 540px; }
.hero__title { font-weight: 800; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; color: var(--paper); margin-bottom: 1.2rem; }
.hero__sub { font-size: 1.1rem; color: var(--dim); max-width: 48ch; margin-bottom: 1.6rem; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__media { flex-shrink: 0; width: min(34vw, 380px); }

/* ---------- Levels track ---------- */
.levels { padding: 6rem 1.8rem; text-align: center; scroll-margin-top: 76px; }
.track { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.6rem; max-width: 1100px; margin: 3rem auto 0; }
.level { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-align: left; }
.level img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.level__badge {
  position: absolute; top: 0.9rem; left: 0.9rem; z-index: 2;
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 700;
  background: var(--yellow); color: #221a00;
  padding: 0.3rem 0.6rem; border-radius: 6px;
}
.level__body { padding: 1.3rem 1.3rem 1.5rem; }
.level__body h3 { font-weight: 800; font-size: 1.15rem; color: var(--paper); margin-bottom: 0.5rem; }
.level__body p { color: var(--dim); font-size: 0.95rem; }

/* ---------- Max level ---------- */
.maxlevel { position: relative; min-height: 90svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6rem 1.8rem; overflow: hidden; scroll-margin-top: 76px; }
.maxlevel__bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.maxlevel__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,21,28,0.35) 0%, rgba(18,21,28,0.9) 75%); }
.maxlevel > * { position: relative; z-index: 2; }
.maxlevel__title { font-weight: 800; font-size: clamp(2rem, 4.6vw, 3rem); color: var(--paper); line-height: 1.1; margin-bottom: 1rem; }
.maxlevel__sub { color: rgba(242,240,234,0.8); font-size: 1.1rem; max-width: 46ch; margin-bottom: 2rem; }

/* ---------- Bonus level ---------- */
.bonus { padding: 5rem 1.8rem; max-width: 900px; margin: 0 auto; }
.level--wide { display: flex; align-items: center; }
.level--wide img { width: 45%; aspect-ratio: auto; flex-shrink: 0; }
.level--wide .level__body { flex: 1; }
.level__badge--bonus { position: static; display: inline-block; margin-bottom: 0.8rem; }

/* ---------- Closer ---------- */
.closer { position: relative; min-height: 80svh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6rem 1.8rem; overflow: hidden; }
.closer__bg { position: absolute; inset: 0; background-size: cover; background-position: center 40%; }
.closer__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,21,28,0.3) 0%, rgba(18,21,28,0.92) 78%); }
.closer__inner { position: relative; z-index: 2; max-width: 560px; }
.closer__title { font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--paper); margin-bottom: 1rem; }
.closer__sub { color: rgba(242,240,234,0.8); font-size: 1.1rem; margin-bottom: 2rem; }
.closer__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 2; padding: 2rem 1.8rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; font-size: 0.85rem; color: var(--dim); background: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .track { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .hero { flex-direction: column; }
  .hero__media { width: min(70vw, 320px); margin: 0 auto; }
  .level--wide { flex-direction: column; }
  .level--wide img { width: 100%; aspect-ratio: 16/9; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--ink); padding: 1.1rem 1.6rem; gap: 0.9rem; border-bottom: 1px solid var(--line); }

  .hero { text-align: center; padding-top: 7.5rem; }
  .hero__text { margin: 0 auto; }
  .hero__cta { justify-content: center; }
  .xpbar { justify-content: center; }
  .track { grid-template-columns: 1fr; }
}
