/* ═══════════════════════════════════════════════════════════════
   BEANGAME — Legendary Item Randomizer
   Landing site stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  /* surfaces — warm near-blacks pulled from the arena screenshot */
  --ink-900: #0a0908;
  --ink-850: #100e0c;
  --ink-800: #16130f;
  --ink-750: #1c1814;
  --ink-700: #241f19;

  --line:        rgba(255, 236, 214, 0.10);
  --line-strong: rgba(255, 236, 214, 0.20);

  /* brand — sampled off the logo */
  --orange:        #f26522;
  --orange-bright: #ff7e36;
  --orange-soft:   #ffa46b;
  --orange-deep:   #c9430d;

  /* the island green, used sparingly as a second accent */
  --grass:      #7fb93c;
  --grass-soft: #a8d96a;

  --text:  #f6efe7;
  --muted: #a89b8d;
  --dim:   #786c60;

  /* type — Fredoka keeps the logo's rounded character but has open
     counters and real weight options, so headings stay legible.
     Figtree carries the same rounded-humanist DNA at body sizes, so
     the page reads as one type system rather than display + default. */
  --font-display: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body:    "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-pixel:   "Silkscreen", "Courier New", monospace;

  /* display weights: heavier only where the type is large */
  --w-display: 600;
  --w-display-lg: 700;

  /* metrics */
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 40px);
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 10px 40px -8px rgba(242, 101, 34, 0.55);
}

/* ── Reset & base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }

/* Nothing should ever be able to push the page sideways on a phone. */
h1, h2, h3, p, li, figcaption { overflow-wrap: break-word; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--orange); color: #fff; }

:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 999;
  background: var(--orange);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 16px; }

/* ── Layout helpers ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding: clamp(72px, 11vw, 128px) 0; position: relative; }
.section--alt { background: var(--ink-850); border-block: 1px solid var(--line); }

.section__head {
  max-width: 760px;
  margin: 0 auto clamp(44px, 6vw, 68px);
  text-align: center;
}

/* ── Type scale ──────────────────────────────────────────────── */
.h2 {
  font-family: var(--font-display);
  font-weight: var(--w-display);
  font-size: clamp(1.85rem, 4.3vw, 3rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin-bottom: 0.5em;
}

.eyebrow {
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--orange-soft);
  margin-bottom: 1.15em;
}

.eyebrow--badge {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid rgba(255, 164, 107, 0.34);
  border-radius: 999px;
  background: rgba(242, 101, 34, 0.11);
  backdrop-filter: blur(6px);
  margin-bottom: 26px;
}

.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  color: #ddd2c6;
}
.lead--center { max-width: 62ch; margin-inline: auto; }

.section p:not(.lead):not(.eyebrow) { color: var(--muted); }

strong { color: var(--text); font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease,
              border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(180deg, var(--orange-bright), var(--orange));
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(6px);
}

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn--primary:hover {
    background: linear-gradient(180deg, #ff8f4d, var(--orange-bright));
    box-shadow: 0 16px 50px -8px rgba(242, 101, 34, 0.7);
  }
  .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 164, 107, 0.45);
  }
}

.btn--sm  { padding: 9px 17px;  font-size: 0.87rem; }
.btn--lg  { padding: 15px 30px; font-size: 1.02rem; }
.btn--xl  { padding: 18px 38px; font-size: 1.08rem; }

.icon-discord { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.28s ease, border-color 0.28s ease, backdrop-filter 0.28s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(10, 9, 8, 0.86);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: var(--w-display);
  font-size: 1.24rem;
  letter-spacing: -0.005em;
}
.nav__brand img {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__links a:not(.btn) {
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.18s ease;
}
.nav__links a:not(.btn):hover { color: var(--text); }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(100vh, 940px);   /* fallback for engines without svh */
  min-height: min(100svh, 940px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 0 90px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }

/* Oversized by 30% and pulled up 15%, so the parallax translate below
   (capped at ±15% of hero height in main.js) can never expose an edge. */
.hero__bg img {
  position: absolute;
  top: -15%;
  left: 0;
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.15) contrast(1.05);
  will-change: transform;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10, 9, 8, 0.80) 0%,
      rgba(10, 9, 8, 0.62) 30%,
      rgba(10, 9, 8, 0.86) 72%,
      var(--ink-900) 100%),
    radial-gradient(120% 78% at 50% 42%, transparent 0%, rgba(10, 9, 8, 0.72) 100%);
}

.hero__glow {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(900px, 110vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(242, 101, 34, 0.30) 0%, transparent 62%);
  filter: blur(20px);
  pointer-events: none;
}

/* drifting embers */
.hero__embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ember {
  position: absolute;
  bottom: -12px;
  width: 3px;
  height: 3px;
  background: var(--orange-soft);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 6px 1px rgba(255, 164, 107, 0.65);
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
  12%  { opacity: 0.85; }
  80%  { opacity: 0.5; }
  100% { transform: translate(var(--dx, 20px), -105vh) scale(1); opacity: 0; }
}

.hero__inner { position: relative; }

.hero__logo { margin: 0 0 6px; }
.hero__logo img {
  width: clamp(230px, 34vw, 400px);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.75));
  animation: bob 6.5s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50%      { transform: translateY(-13px) rotate(0.6deg); }
}

.hero__tagline {
  font-family: var(--font-display);
  font-weight: var(--w-display-lg);
  font-size: clamp(1.4rem, 3.6vw, 2.3rem);
  letter-spacing: -0.01em;
  color: var(--orange-bright);
  text-shadow: 0 3px 22px rgba(242, 101, 34, 0.5);
  margin-bottom: 0.6em;
}

.hero__sub {
  max-width: 58ch;
  margin: 0 auto 34px;
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  color: #e2d8cd;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 62px;
}

/* stat strip */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 5vw, 58px);
}
.stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  min-width: 96px;
}
.stats b {
  font-family: var(--font-display);
  font-weight: var(--w-display-lg);
  font-size: clamp(1.7rem, 3.6vw, 2.45rem);
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.7);
}
.stats b i {
  font-style: normal;
  font-size: 0.42em;
  color: var(--orange-soft);
  margin-left: 2px;
}
.stats span {
  font-family: var(--font-pixel);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Split sections ──────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 74px);
  align-items: center;
}
.split--reverse .split__text   { order: 2; }
.split--reverse .split__visual { order: 1; }

.pill-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.pill {
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-pixel);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticks { margin-top: 22px; display: grid; gap: 11px; }
.ticks li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 0.97rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 11px;
  height: 11px;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.16);
}

/* screenshot frame */
.mc-frame {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-800);
  box-shadow: var(--shadow-md);
}
.mc-frame__label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.mc-frame__label::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 14px 0 0 rgba(255, 255, 255, 0.14), 28px 0 0 rgba(255, 255, 255, 0.14);
  margin-right: 26px;
}
.mc-frame img {
  width: 100%;
  image-rendering: pixelated;
}
.mc-frame figcaption {
  padding: 15px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.87rem;
  color: var(--dim);
}

/* ── Roll UI mockup ──────────────────────────────────────────── */
.roll-ui {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--ink-750), var(--ink-800));
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow-md);
}
.roll-ui__title {
  font-family: var(--font-pixel);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.roll-ui__grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 5px;
}
.slot {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #2b2620;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.42),
              inset -2px -2px 0 rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
}
.slot--glass { background: #211d18; opacity: 0.75; }

.slot--item {
  background: linear-gradient(155deg, #3a2e22, #2b2620);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.4),
              inset -2px -2px 0 rgba(255, 255, 255, 0.08),
              0 0 0 1px rgba(255, 164, 107, 0.22);
  transition: box-shadow 0.3s ease;
}
.slot--item.is-locked {
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.4),
              inset -2px -2px 0 rgba(255, 255, 255, 0.08),
              0 0 0 2px var(--orange), 0 0 16px rgba(242, 101, 34, 0.5);
}
.slot--item.is-fresh .sprite,
.slot--item.is-fresh .rune { animation: pop 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pop {
  0%   { transform: scale(0.2) rotate(-25deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg);     opacity: 1; }
}

/* Real in-game item textures — 16px art, so never smooth-scale them. */
.sprite {
  display: block;
  image-rendering: crisp-edges;
  image-rendering: pixelated;   /* widest support — keep last */
}
.slot--item .sprite {
  width: 78%;
  height: 78%;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.65));
}

/* abstract loot token — fallback when the sprite manifest is absent */
.rune {
  width: 56%;
  height: 56%;
  display: block;
  background: linear-gradient(150deg,
              hsl(var(--h, 22) 92% 66%),
              hsl(var(--h, 22) 84% 44%));
  box-shadow: 0 0 12px hsl(var(--h, 22) 90% 55% / 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.rune--s0 { border-radius: 3px; }
.rune--s1 { border-radius: 50%; }
.rune--s2 { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.rune--s3 { clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%); }

/* Padlock drawn in CSS — both halves absolutely placed so the shackle
   always sits exactly on the body regardless of slot size.
   Body occupies 30%–58% from the bottom; shackle starts at 58%.       */
.slot--lock {
  position: relative;
  background: #241f19;
  transition: background 0.25s ease;
}
.slot--lock::after {            /* body */
  content: "";
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 30%;
  height: 28%;
  border-radius: 2px;
  background: var(--dim);
  transition: background 0.25s ease;
}
.slot--lock::before {           /* shackle */
  content: "";
  position: absolute;
  left: 34%;
  right: 34%;
  bottom: 58%;
  height: 20%;
  border: 2px solid var(--dim);
  border-bottom: 0;
  border-radius: 99px 99px 0 0;
  transform-origin: right bottom;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.slot--lock.is-on { background: rgba(242, 101, 34, 0.22); }
.slot--lock.is-on::after  { background: var(--orange-soft); }
.slot--lock.is-on::before { border-color: var(--orange-soft); }

/* Unlocked: swing the shackle open off its right-hand pivot. */
.slot--lock:not(.is-on)::before { transform: rotate(26deg) translateX(6%); }

.roll-ui__hint {
  margin-top: 14px;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── Feature cards ───────────────────────────────────────────── */
/* min() guard: without it a 272px track overflows a ~280px phone. */
.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(272px, 100%), 1fr));
  gap: 18px;
}

.card {
  position: relative;
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 164, 107, 0.36);
    background: linear-gradient(180deg, rgba(242, 101, 34, 0.09), rgba(255, 255, 255, 0.015));
  }
}
.card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 11px;
  background: rgba(242, 101, 34, 0.14);
  border: 1px solid rgba(242, 101, 34, 0.28);
  color: var(--orange-bright);
}
.card__icon svg { width: 23px; height: 23px; }
.card h3 {
  font-family: var(--font-display);
  font-weight: var(--w-display);
  font-size: 1.18rem;
  line-height: 1.3;
  margin-bottom: 0.5em;
}
.card p { font-size: 0.94rem; color: var(--muted); }

/* ── Ambient loot wall ───────────────────────────────────────── */
/* Single-axis mask only — multi-layer mask-composite is inconsistent
   across engines, so the vertical fade is done with overlays below. */
.lootwall {
  position: relative;
  margin: clamp(6px, 2vw, 18px) 0 clamp(50px, 7vw, 74px);
  padding-block: 4px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.lootwall::before,
.lootwall::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  pointer-events: none;
  z-index: 1;
}
.lootwall::before { top: 0;    background: linear-gradient(180deg, var(--ink-850), transparent); }
.lootwall::after  { bottom: 0; background: linear-gradient(0deg,   var(--ink-850), transparent); }

.lootwall__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 26), minmax(0, 1fr));
  gap: 6px;
  width: 108%;
  margin-left: -4%;
}

.loottile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #221d18;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5),
              inset -1px -1px 0 rgba(255, 255, 255, 0.045);
  transition: background 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
}
/* Resting state: the real item texture, dimmed back to near-texture. */
.loottile .sprite {
  width: 74%;
  height: 74%;
  opacity: 0.34;
  filter: grayscale(0.55) brightness(0.85);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
}
/* Lit: full colour, warm glow, slight lift. */
.loottile.is-lit {
  background: #33291f;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.14),
              inset -1px -1px 0 rgba(0, 0, 0, 0.4),
              0 0 20px rgba(242, 101, 34, 0.5);
  transform: scale(1.1);
}
.loottile.is-lit .sprite {
  opacity: 1;
  filter: none;
  transform: scale(1.06);
}

/* ── Item class cards ────────────────────────────────────────────
   Each card carries its own --mc (the authentic Minecraft colour
   code the class is printed in) and --mc-lite (the same hue lifted
   enough to stay readable as body-adjacent text on a dark card).   */
.class-intro {
  max-width: 60ch;
  margin: 0 auto clamp(30px, 4vw, 44px);
  text-align: center;
  font-size: 0.96rem;
}

.grid-classes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}

.class-card {
  position: relative;
  padding: 24px 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.class-card__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 0.7em;
}

/* the class's in-game colour, as a beveled Minecraft-ish chip */
.class-card__swatch {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--mc, var(--orange));
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.4),
              inset -1px -1px 0 rgba(0, 0, 0, 0.35),
              0 0 12px -2px var(--mc, var(--orange));
}

.class-card__name {
  font-family: var(--font-display);
  font-weight: var(--w-display);
  font-size: 1.22rem;
  line-height: 1.25;
  margin: 0;
  color: var(--mc-lite, var(--mc));
}
.class-card p { font-size: 0.92rem; color: var(--muted); }

@media (hover: hover) {
  .class-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 164, 107, 0.4);
    border-color: color-mix(in srgb, var(--mc) 50%, transparent);
  }
  .timeline li:hover { background: var(--ink-800); }
}

/* ── "roster lives in-game" note ─────────────────────────────── */
.items-note {
  margin-top: 34px;
  text-align: center;
  font-size: 0.93rem;
}
.items-note code {
  font-family: var(--font-pixel);
  font-size: 0.82em;
  padding: 4px 10px;
  margin-inline: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--orange-soft);
  white-space: nowrap;
}

/* ── Timeline ────────────────────────────────────────────────── */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.timeline li {
  padding: 32px 28px 34px;
  background: var(--ink-850);
  transition: background 0.22s ease;
}

.timeline__num {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--w-display-lg);
  font-size: 1.9rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 164, 107, 0.55);
  margin-bottom: 16px;
}
.timeline h3 {
  font-family: var(--font-display);
  font-weight: var(--w-display);
  font-size: 1.16rem;
  line-height: 1.3;
  margin-bottom: 0.5em;
}
.timeline p { font-size: 0.93rem; color: var(--muted); }

/* ── Join ────────────────────────────────────────────────────── */
.join { padding: clamp(72px, 10vw, 120px) 0; }

.join__panel {
  position: relative;
  text-align: center;
  padding: clamp(46px, 7vw, 78px) clamp(26px, 5vw, 60px);
  border: 1px solid rgba(255, 164, 107, 0.26);
  border-radius: clamp(20px, 3vw, 30px);
  background:
    radial-gradient(120% 130% at 50% 0%, rgba(242, 101, 34, 0.20), transparent 62%),
    linear-gradient(180deg, var(--ink-800), var(--ink-850));
  overflow: hidden;
}
.join__glow {
  position: absolute;
  left: 50%;
  top: -120px;
  width: 620px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(242, 101, 34, 0.38), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}
.join__mark {
  position: relative;
  width: 58px;
  height: auto;
  margin: 0 auto 22px;
  fill: var(--orange-bright);
  filter: drop-shadow(0 6px 24px rgba(242, 101, 34, 0.55));
}
.join__panel .eyebrow,
.join__panel .h2,
.join__panel .lead,
.join__panel .btn,
.join__panel .join__note { position: relative; }

.join__panel .lead { margin-bottom: 34px; }

.join__note {
  margin-top: 20px;
  font-family: var(--font-pixel);
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  background: var(--ink-850);
  padding: 52px 0 34px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.footer__brand { display: flex; align-items: center; gap: 15px; }
.footer__brand img { width: 50px; height: 50px; }
.footer__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--w-display);
  font-size: 1.18rem;
}
.footer__desc { margin: 2px 0 0; font-size: 0.88rem; color: var(--dim); }

.footer__links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer__links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.18s ease;
}
.footer__links a:hover { color: var(--orange-soft); }

.footer__legal {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
.footer__legal p { margin: 0; font-size: 0.79rem; color: var(--dim); }

/* ── Scroll reveal ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   Breakpoints:  ≤1024 tablet-landscape · ≤900 stack + burger nav
                 ≤620 phone · ≤380 small phone · landscape-phone
   ═══════════════════════════════════════════════════════════════ */

/* ── Tablet landscape ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .split { gap: clamp(30px, 5vw, 52px); }
  .timeline li { padding: 28px 24px 30px; }
}

/* ── Stack the splits, switch to the burger nav ──────────────── */
@media (max-width: 900px) {
  html { scroll-padding-top: 76px; }

  .split { grid-template-columns: 1fr; }
  /* Keep visual-after-text on every stacked split, including reversed ones. */
  .split--reverse .split__text   { order: 1; }
  .split--reverse .split__visual { order: 2; }
  /* A stacked split shouldn't stretch its visual across the full width. */
  .split__visual { max-width: 620px; width: 100%; margin-inline: auto; }

  .nav__toggle { display: flex; }

  .nav__links {
    position: absolute;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--pad) 24px;
    background: rgba(10, 9, 8, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    max-height: calc(100svh - 72px);
    overflow-y: auto;
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a:not(.btn) {
    padding: 16px 4px;              /* ≥44px touch target */
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__links .btn { justify-content: center; margin-top: 18px; }
  .nav.is-open { background: rgba(10, 9, 8, 0.98); }
}

/* ── Phone ───────────────────────────────────────────────────── */
@media (max-width: 620px) {
  body { font-size: 16px; }

  .hero { padding: 112px 0 78px; }
  .hero__cta { margin-bottom: 46px; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }

  /* 2×2 stat grid instead of a cramped single row */
  .stats { gap: 24px 30px; }
  .stats li { flex: 0 1 calc(50% - 15px); min-width: 0; }

  .section__head { margin-bottom: 38px; }

  .card { padding: 24px 22px 26px; }
  .item-card { padding: 22px 20px; }
  .timeline li { padding: 26px 22px 28px; }

  .roll-ui__grid { gap: 3px; }
  .lootwall__grid { gap: 4px; }

  .mc-frame__label::before { margin-right: 22px; }

  .footer__inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .footer__links { gap: 14px 20px; }
  .footer__legal { flex-direction: column; gap: 6px; }
}

/* ── Small phone ─────────────────────────────────────────────── */
@media (max-width: 380px) {
  .hero__logo img { width: min(215px, 82vw); }
  .stats { gap: 20px 18px; }
  .stats b { font-size: 1.55rem; }
  .roll-ui { padding: 14px; }
  .roll-ui__grid { gap: 2px; }
  .pill { font-size: 0.58rem; padding: 5px 11px; }
}

/* ── Phone held sideways: reclaim the vertical space ─────────── */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: 0; padding: 104px 0 64px; }
  .hero__logo img { width: min(220px, 26vw); animation: none; }
  .hero__cta { margin-bottom: 32px; }
}

/* ── Motion preferences ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__logo img { animation: none; }
  .ember { display: none; }
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {
  .nav, .hero__embers, .lootwall { display: none; }
  body { background: #fff; color: #000; }
}
