/* =========================================================
   Elf Coin — styles
   ========================================================= */
:root {
  --sky: #1f56a8;
  --sky-2: #3a7bd2;
  --sky-3: #9cc7f0;
  --night: #0b1a33;
  --elf: #1f5a2a;
  --elf-2: #2f7a37;
  --elf-deep: #102f17;
  --coral: #e0533b;
  --coral-deep: #a3301f;
  --berry: #b3122e;
  --gold: #e8b04a;
  --gold-2: #f3c867;
  --snow: #fbf6ec;
  --snow-2: #f2eadb;
  --ink: #1d1b16;
  --muted: #6d6658;
  --line: rgba(29, 27, 22, .12);
  --live: #3ddc84;

  --f-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Inter Tight", system-ui, -apple-system, Segoe UI, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius: 22px;
  --shadow: 0 30px 80px -30px rgba(11, 26, 51, .45), 0 8px 24px -12px rgba(11, 26, 51, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--snow);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: -.005em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- snow overlay ---------- */
.snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--elf-deep); color: var(--snow);
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid rgba(232, 176, 74, .5);
  transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); text-align: center; word-break: break-word;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4em; justify-content: center;
  padding: .85em 1.5em; border-radius: 999px; font: 600 1rem/1 var(--f-body);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .ca-pill:focus-visible, a:focus-visible, .chip:focus-visible, .animal:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }
.btn-gold { background: var(--gold); color: var(--elf-deep); box-shadow: 0 10px 30px -10px rgba(232, 176, 74, .8); }
.btn-gold:hover { background: var(--gold-2); }
.btn-red { background: var(--coral); color: #fff; box-shadow: 0 10px 30px -12px rgba(224, 83, 59, .9); }
.btn-red:hover { background: #ea644b; }
.btn-ghost { border-color: rgba(251, 246, 236, .7); color: var(--snow); }
.btn-ghost:hover { background: rgba(251, 246, 236, .12); }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost-dark:hover { background: var(--ink); color: var(--snow); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(16px, calc((100% - 1160px) / 2));
  color: var(--snow);
  transition: background .3s, padding .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(16, 47, 23, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-top: 10px; padding-bottom: 10px; box-shadow: 0 1px 0 rgba(232, 176, 74, .25); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.35rem/1 var(--f-display); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .9; }
.nav-links a:hover { opacity: 1; color: var(--gold-2); }
.ca-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: 500 .85rem/1 var(--f-mono); color: var(--snow);
  background: rgba(251, 246, 236, .12); border: 1px solid rgba(251, 246, 236, .35);
}
.ca-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.ca-pill.has-ca .dot { background: var(--live); box-shadow: 0 0 10px var(--live); }

/* ---------- hero: bright blue sky, like the elf photos ---------- */
.hero {
  position: relative; color: var(--snow);
  background:
    radial-gradient(900px 500px at 80% 20%, rgba(255, 255, 255, .16), transparent 60%),
    linear-gradient(180deg, #17468f 0%, var(--sky) 40%, var(--sky-2) 100%);
  padding: 130px 0 140px;
  overflow: hidden;
}
.hero-clouds { position: absolute; inset: 0; pointer-events: none; }
.hero-clouds i { position: absolute; display: block; border-radius: 999px; background: #fff; filter: blur(22px); opacity: .22; animation: drift 40s linear infinite alternate; }
.hero-clouds i:nth-child(1) { width: 420px; height: 90px; top: 14%; left: -6%; }
.hero-clouds i:nth-child(2) { width: 300px; height: 70px; top: 8%; right: 6%; animation-duration: 55s; }
.hero-clouds i:nth-child(3) { width: 520px; height: 120px; bottom: 16%; right: -10%; opacity: .3; animation-duration: 60s; }
.hero-clouds i:nth-child(4) { width: 360px; height: 90px; bottom: 26%; left: 18%; opacity: .14; animation-duration: 48s; }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(40px); } }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.eyebrow { font: 500 .8rem/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.9rem, 7vw, 5.8rem); font-weight: 700; text-shadow: 0 4px 30px rgba(10, 30, 70, .35); }
.hero h1 em { font-style: normal; color: var(--gold-2); }
.lede { font-size: 1.15rem; max-width: 34em; margin: 26px 0 32px; color: rgba(255, 255, 255, .92); }
.lede strong { color: #fff; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-art { position: relative; max-width: 440px; justify-self: center; width: 100%; aspect-ratio: 1 / 1.05; }
.elf-stack { position: absolute; inset: 0; }
.elf-card {
  position: absolute; left: 50%; top: 50%; width: 68%; aspect-ratio: 1;
  border-radius: 26px; overflow: hidden; background: #8db9ea;
  border: 6px solid #fff; box-shadow: 0 30px 60px -20px rgba(6, 20, 50, .55);
  transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .8s;
}
.elf-card:nth-child(1) { transform: translate(-50%, -50%) translate(-34%, 8%) rotate(-10deg) scale(.86); z-index: 1; }
.elf-card:nth-child(2) { transform: translate(-50%, -50%) translate(34%, 8%) rotate(10deg) scale(.86); z-index: 1; }
.elf-card:nth-child(3) { transform: translate(-50%, -50%) translate(0, -4%) rotate(-1deg); z-index: 2; }
.elf-card .tile-art { width: 100%; height: 100%; }
.elf-card figcaption {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  background: rgba(16, 47, 23, .85); color: #fff; font: 600 .85rem/1 var(--f-display);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em;
}
.elf-card.swap { opacity: 0; }
.elf-card .stand-in { font-size: clamp(5rem, 13vw, 8.5rem); padding-top: 16%; }

/* shared animal tile: the photo, or an emoji stand-in until the photo exists */
.tile-art { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: linear-gradient(180deg, #4d8fdf, #a9cff3); }
.tile-art img { width: 100%; height: 100%; object-fit: cover; }
.tile-art .stand-in { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; line-height: 1; }
.tile-art .stand-in::before { content: ""; position: absolute; width: 58%; height: 30%; top: 4%; left: 22%;
  background: url("assets/logo-hat.svg") center / contain no-repeat; }

.countdown { position: relative; margin-top: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.countdown-label { margin: 0; font: 500 .8rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.countdown-units { display: flex; gap: 10px; }
.countdown-units div { min-width: 76px; padding: 12px 10px; border-radius: 14px; text-align: center;
  background: rgba(8, 28, 64, .28); border: 1px solid rgba(255, 255, 255, .25); }
.countdown-units b { display: block; font: 700 2rem/1 var(--f-mono); color: #fff; font-variant-numeric: tabular-nums; }
.countdown-units span { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .78); }
.hero-hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; }

/* ---------- meter ---------- */
.meter { padding: 30px 0 90px; position: relative; z-index: 2; margin-top: -60px; }
.meter-card {
  background: #fff; border-radius: 28px; box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 44px); border-top: 6px solid var(--coral);
}
.meter-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 20px; }
.meter-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); flex: 1 1 auto; }
.live { display: inline-flex; align-items: center; gap: 8px; font: 600 .78rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em;
  padding: 7px 12px; border-radius: 999px; background: rgba(61, 220, 132, .12); color: #137a43; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: pulse 1.8s infinite; }
.live.is-idle { background: rgba(109, 102, 88, .12); color: var(--muted); }
.live.is-idle i { background: #a59e8f; animation: none; }
.live.is-error { background: rgba(232, 176, 74, .18); color: #8a5a12; }
.live.is-error i { background: var(--gold); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); } 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.tag { font: 500 .75rem/1 var(--f-mono); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

.meter-main { position: relative; padding: 26px 0 30px; border-bottom: 1px dashed var(--line); }
.meter-kicker { font: 500 .8rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--coral-deep); margin-bottom: 10px; }
.meter-big { font: 700 clamp(3.4rem, 10vw, 7rem)/1 var(--f-display); margin: 0; color: var(--elf); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.meter-sub { margin: 12px 0 0; color: var(--muted); font-family: var(--f-mono); font-size: .95rem; }
.meter-note { margin: 10px 0 0; color: var(--muted); font-size: .92rem; max-width: 46em; }
.meter-note b { color: var(--ink); font-family: var(--f-mono); font-weight: 600; }
.meter-lock { margin: 14px 0 0; display: inline-block; font: 600 .85rem/1.3 var(--f-mono); color: var(--elf); background: rgba(31, 90, 42, .08); padding: 8px 12px; border-radius: 10px; }
.meter-lock[hidden] { display: none; }
.meter-pop { position: absolute; right: 0; top: 20px; font: 600 1.2rem/1 var(--f-display); color: var(--coral-deep);
  background: #fff3f0; border: 1px solid rgba(224, 83, 59, .3); padding: 8px 14px; border-radius: 999px; animation: pop 2.6s ease forwards; }
@keyframes pop { 0% { opacity: 0; transform: translateY(20px) scale(.7); } 15% { opacity: 1; transform: translateY(0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px); } }

.meter-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.tile { background: var(--snow); border-radius: 16px; padding: 16px 18px; }
.tile > span { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.tile b { font: 700 1.35rem/1.3 var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; }

.trail-title { font: 600 .8rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 12px; }
.trail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trail li { display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); }
.trail-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 .9rem/1 var(--f-mono); background: var(--elf); color: var(--gold-2); }
.trail li b { display: block; font-weight: 600; }
.trail li small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.trail-v { font: 600 .95rem/1 var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trail-link { font-size: .85rem; font-weight: 600; color: var(--coral-deep); text-decoration: none; white-space: nowrap; }
.trail-link:hover { text-decoration: underline; }
.trail-link.off { color: #b8b1a3; pointer-events: none; }

.market { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 22px; background: var(--line); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.market[hidden] { display: none; }
.market div { background: #fff; padding: 14px 16px; }
.market span { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.market b { font: 600 1.05rem/1.3 var(--f-mono); font-variant-numeric: tabular-nums; }
.market .up { color: #137a43; } .market .down { color: var(--berry); }
.meter-foot { margin: 18px 0 0; font: 400 .8rem/1.4 var(--f-mono); color: var(--muted); }

/* ---------- marquee ---------- */
.marquee { background: var(--coral); color: #fff; overflow: hidden; padding: 18px 0; border-block: 3px solid var(--gold); }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: marquee 40s linear infinite; font: 600 1.35rem/1 var(--f-display); white-space: nowrap; }
.marquee-track i { font-style: normal; color: var(--gold-2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- shared section bits ---------- */
.num { font: 500 .85rem/1 var(--f-mono); color: var(--coral-deep); letter-spacing: .1em; margin: 0 0 14px; }
.section-head { margin-bottom: 44px; }
.section-head.light .num { color: var(--gold-2); }
.section-sub { font-size: 1.15rem; color: var(--muted); max-width: 38em; margin: 16px 0 0; }

/* ---------- elf maker ---------- */
.maker { padding: 110px 0; background:
  radial-gradient(700px 400px at 0% 0%, rgba(58, 123, 210, .12), transparent 70%),
  radial-gradient(700px 400px at 100% 100%, rgba(31, 90, 42, .1), transparent 70%), var(--snow); }
.maker-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.maker-stage { position: sticky; top: 84px; }
.stage-frame { position: relative; border-radius: 28px; overflow: hidden; background: #fff; padding: 12px; box-shadow: var(--shadow); }
.stage-frame canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 18px; touch-action: none; cursor: grab; background: #8db9ea; }
.stage-frame canvas.dragging { cursor: grabbing; }
.stage-name { position: absolute; left: 26px; top: 26px; margin: 0; background: rgba(16, 47, 23, .85); color: #fff; font: 600 .95rem/1 var(--f-display);
  padding: 8px 14px; border-radius: 999px; pointer-events: none; }
.stage-tools { margin-top: 14px; background: #fff; border-radius: 18px; padding: 14px 16px; border: 1px solid var(--line); }
.stage-tools[hidden] { display: none; }
.tools-title { margin: 0 0 8px; font-size: .9rem; color: var(--muted); }
.tools-title b { color: var(--ink); }
.tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.tools-row label { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9rem; }
.tools-row input[type="range"] { width: 130px; accent-color: var(--coral); }
.stage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.stage-actions .btn { flex: 1 1 auto; }

.maker-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.panel-block { background: #fff; border-radius: 22px; padding: 20px; border: 1px solid var(--line); }
.panel-block h3 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-block h3 span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--elf); color: var(--gold-2); font: 700 .85rem/1 var(--f-mono); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--snow);
  font: 600 .88rem/1 var(--f-body); color: var(--ink); white-space: nowrap; transition: border-color .15s, background .15s, transform .15s;
}
.chip:hover { border-color: var(--elf-2); }
.chip[aria-pressed="true"] { background: var(--elf); border-color: var(--elf); color: #fff; }
.chip img { width: 34px; height: 16px; object-fit: contain; }
.chip-sm { padding: 6px 12px; font-size: .82rem; }

.search { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); font: 500 .95rem var(--f-body); background: var(--snow); margin-bottom: 12px; }
.search:focus { outline: 3px solid var(--gold-2); outline-offset: 1px; }
.animal-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.animal { display: block; padding: 0; border: 3px solid transparent; border-radius: 16px; background: none; cursor: pointer; overflow: hidden; text-align: center; transition: transform .15s, border-color .15s; }
.animal:hover { transform: translateY(-2px); }
.animal[aria-pressed="true"] { border-color: var(--coral); }
.animal .tile-art { border-radius: 12px; }
.animal .stand-in { font-size: 2.2rem; padding-top: 18%; }
.animal span.label { display: block; font: 600 .74rem/1.2 var(--f-body); color: var(--ink); padding: 5px 2px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.animal-empty { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; margin: 6px 0; }

/* ---------- story ---------- */
.story { padding: 120px 0; }
.story-grid { display: grid; grid-template-columns: 120px 1fr; gap: 20px; }
.story-grid > div { max-width: 760px; }
.story h2 { margin-bottom: 26px; }
.story .big { font: 500 clamp(1.4rem, 2.6vw, 1.85rem)/1.35 var(--f-display); color: var(--elf); }
.story .aside { font-size: .92rem; color: var(--muted); border-left: 3px solid var(--gold); padding-left: 14px; }

/* ---------- how ---------- */
.how { padding: 110px 0; background: linear-gradient(180deg, var(--elf) 0%, var(--elf-deep) 100%); color: var(--snow); }
.how .num { color: var(--gold-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { padding: 28px 24px; border-radius: var(--radius); background: rgba(251, 246, 236, .06); border: 1px solid rgba(251, 246, 236, .14); position: relative; }
.step::before { counter-increment: s; content: "0" counter(s); position: absolute; top: 22px; right: 22px; font: 500 .8rem/1 var(--f-mono); color: rgba(251, 246, 236, .45); }
.step-icon { font-size: 2rem; display: block; margin-bottom: 18px; }
.step h3 { font-size: 1.6rem; margin-bottom: 10px; color: var(--gold-2); }
.step p { margin: 0; color: rgba(251, 246, 236, .82); }

/* ---------- sleigh ---------- */
.sleigh-sec { padding: 110px 0; color: var(--snow);
  background: radial-gradient(800px 500px at 70% 55%, rgba(232, 176, 74, .14), transparent 70%), linear-gradient(180deg, #0b1a33, #10284a); }
.sleigh-sec .num { color: var(--gold-2); }
.sleigh-grid { display: grid; grid-template-columns: .75fr 1.25fr; align-items: center; gap: 40px; }
.sleigh-copy h2 { margin-bottom: 20px; }
.sleigh-copy p { color: rgba(251, 246, 236, .85); font-size: 1.1rem; }
.sleigh-copy b { color: var(--gold-2); }
.sleigh-stats { display: flex; gap: 14px; margin: 28px 0 18px; }
.sleigh-stats div { padding: 16px 20px; border-radius: 16px; background: rgba(251, 246, 236, .06); border: 1px solid rgba(251, 246, 236, .14); min-width: 140px; }
.sleigh-stats b { display: block; font: 700 1.9rem/1.05 var(--f-mono); color: var(--snow); }
.sleigh-stats span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(251, 246, 236, .6); }
.sleigh-hint { font: 400 .85rem/1.4 var(--f-mono) !important; color: rgba(251, 246, 236, .55) !important; }
.sleigh-art { max-width: 640px; justify-self: center; width: 100%; }
.sleigh-svg { width: 100%; height: auto; overflow: visible; }
.sleigh-halo { opacity: 0; transition: opacity 1s; }
.sleigh-trail { opacity: 0; transition: opacity 1s; }
.sleigh-svg.go .sleigh-halo { opacity: 1; animation: halo 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sleigh-svg.go .sleigh-trail { opacity: 1; animation: twinkle 1.4s ease-in-out infinite alternate; }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
.gift { transform-box: fill-box; transform-origin: 50% 100%; }
.gift .box { fill: rgba(251, 246, 236, .04); stroke: rgba(251, 246, 236, .3); stroke-width: 1.5; stroke-dasharray: 5 5; }
.gift .rib, .gift .bow { display: none; }
.gift.on .box { stroke: rgba(0, 0, 0, .25); stroke-dasharray: none; }
.gift.on .rib, .gift.on .bow { display: inline; }
.gift.on.c0 .box { fill: #e0533b; } .gift.on.c1 .box { fill: #2f9a4a; } .gift.on.c2 .box { fill: #3a7bd2; }
.gift.on.c3 .box { fill: #f3c867; } .gift.on.c4 .box { fill: #f5f1e6; } .gift.on.c5 .box { fill: #8e44ad; }
.gift.just-on { animation: drop .7s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes drop { 0% { transform: translateY(-40px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- token ---------- */
.token { padding: 120px 0; background: var(--snow); }
.token-intro { font: 500 clamp(1.3rem, 2.4vw, 1.7rem)/1.4 var(--f-display); max-width: 800px; color: var(--elf); }
.token-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 40px 0; }
.token-grid div { background: #fff; border-radius: 18px; padding: 20px; border: 1px solid var(--line); }
.token-grid dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.token-grid dd { margin: 6px 0 0; font: 600 1.2rem/1.3 var(--f-display); }
.ca-box { background: var(--elf-deep); color: var(--snow); border-radius: 26px; padding: clamp(24px, 4vw, 40px); position: relative; overflow: hidden; }
.ca-box::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 176, 74, .35), transparent 70%); }
.ca-label { font: 500 .8rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--gold-2); }
.ca-value { display: block; font: 700 clamp(1.1rem, 3vw, 2rem)/1.3 var(--f-mono); word-break: break-all; margin: 8px 0 24px; position: relative; z-index: 1; }
.ca-value.is-address { font-size: clamp(.85rem, 2vw, 1.3rem); }
.ca-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.ca-box .btn-ghost-dark { border-color: rgba(251, 246, 236, .55); color: var(--snow); }
.ca-box .btn-ghost-dark:hover { background: rgba(251, 246, 236, .1); }
.ca-warn { margin: 22px 0 0; font-size: .9rem; color: rgba(251, 246, 236, .7); position: relative; z-index: 1; }

/* ---------- roadmap ---------- */
.roadmap { padding: 120px 0; color: var(--snow);
  background: radial-gradient(900px 500px at 20% 0%, rgba(232, 176, 74, .2), transparent 60%), linear-gradient(180deg, var(--coral) 0%, var(--coral-deep) 100%); }
.road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.road li { padding: 28px 24px; border-radius: var(--radius); background: rgba(0, 0, 0, .14); border: 1px solid rgba(251, 246, 236, .22); }
.roman { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: var(--coral-deep); font: 700 1.1rem/1 var(--f-display); margin-bottom: 18px; }
.road h3 { font-size: 1.5rem; margin-bottom: 10px; }
.road p { margin: 0; color: rgba(255, 255, 255, .9); }
.road-close { font: 500 clamp(1.3rem, 2.6vw, 1.8rem)/1.3 var(--f-display); margin: 50px 0 26px; }
.road-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- fine print ---------- */
.fine { padding: 80px 0; background: var(--snow-2); }
.fine-title { font-size: 1.6rem; margin-bottom: 18px; }
.sources { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.sources a { display: inline-block; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--elf); }
.sources a:hover { border-color: var(--elf); }
.disclaimer { font-size: .88rem; color: var(--muted); max-width: 900px; }

/* ---------- footer ---------- */
.footer { background: var(--elf-deep); color: rgba(251, 246, 236, .75); padding: 26px 0; font-size: .9rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.footer a { text-decoration: none; color: var(--gold-2); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero { padding: 110px 0 120px; }
  .hero-grid, .sleigh-grid { grid-template-columns: 1fr; }
  .maker-grid { grid-template-columns: minmax(0, 1fr); } /* minmax, so the 1024px canvas can't stretch the column */
  .hero-art { max-width: 340px; order: -1; }
  .maker-stage { position: static; }
  .steps, .road, .token-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand span { font-size: 1.15rem; }
  .countdown-units div { min-width: 0; flex: 1; padding: 10px 6px; }
  .countdown-units { width: 100%; }
  .countdown-units b { font-size: 1.6rem; }
  .meter-tiles { grid-template-columns: 1fr; }
  .market { grid-template-columns: repeat(2, 1fr); }
  .trail li { grid-template-columns: 32px 1fr; }
  .trail-v { grid-column: 2; }
  .trail-link { grid-column: 2; }
  .steps, .road, .token-grid { grid-template-columns: 1fr; }
  .sleigh-stats div { min-width: 0; flex: 1; }
  .story, .how, .sleigh-sec, .token, .roadmap, .maker { padding: 80px 0; }
  .panel-block { padding: 16px; }
  .animal-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); max-height: 340px; }
  .tools-row input[type="range"] { width: 100px; }
}

/* Devices that ask for reduced motion (for example Windows with "Animation effects"
   off) get a calmer page, not a frozen one: no slide-ins or bouncing, a slower
   banner, and the hero cards fade instead of sliding. The snow is slowed in main.js. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation-duration: 90s; }
  .hero-clouds i { animation: none; }
  .js .reveal { transform: none; transition: opacity .6s ease; }
  .gift.just-on { animation: none; }
  .elf-card { transition: opacity .8s; }
}

/* ---------- 404 page ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.lost img { margin: 0 auto 24px; }
.lost .lede { margin-inline: auto; }
