/* ==========================================================
   Dog GIMMI
   Change the palette in :root and the whole site follows.
   ========================================================== */

@font-face { font-family: "Bowlby One"; src: url("../fonts/bowlby-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rammetto One"; src: url("../fonts/rammetto-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gochi Hand"; src: url("../fonts/gochi-hand-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../fonts/dm-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --field: #12a150;              /* the big background colour */
    --ray: rgba(0, 0, 0, .1);      /* sunburst stripes on the field */
    --panel: #10131f;              /* dark boxes that sit on the field */
    --gold: #f6b63c;
    --gold-deep: #b97a14;
    --ink: #10131f;
    --ink-2: #1a1f33;
    --cream: #fff4dc;
    --cream-deep: #d9c7a0;
    --lime: #d4ff5a;
    --sky: #8cf3ff;
    --up: #2fd16f;
    --down: #ff5a52;
    --alarm: #e23b30;              /* the stick-up banner */

    /* System CJK fonts, used for Chinese / Japanese / Korean text. Set per language below. */
    --cjk: "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", "Malgun Gothic", "Noto Sans CJK SC", sans-serif;
    --display: "Bowlby One", "Arial Black", Impact, var(--cjk);
    --slab: "Rammetto One", "Bowlby One", "Arial Black", var(--cjk);
    --body: "DM Sans", system-ui, -apple-system, "Segoe UI", var(--cjk);
    --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --hand: "Gochi Hand", "Comic Sans MS", var(--cjk);

    --radius: 18px;
    --wrap: 1180px;
}

/* Alternative palettes. Use one with <html lang="en" data-theme="night"> in index.html. */
html[data-theme="night"] { --field: #181c33; --ray: rgba(255, 255, 255, .035); --panel: #2a3157; }
html[data-theme="blue"] { --field: #2545e6; --ray: rgba(0, 0, 40, .14); }

/* ---------- Chinese, Japanese, Korean ---------- */
html:lang(zh-Hant) { --cjk: "PingFang TC", "Hiragino Sans TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", sans-serif; }
html:lang(zh-Hans) { --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }
html:lang(ja) { --cjk: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }
html:lang(ko) { --cjk: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif; }
html:lang(zh) body, html:lang(ja) body, html:lang(ko) body { line-height: 1.75; }
html:lang(ko) body { word-break: keep-all; } /* don't split Korean words across lines */
/* The Latin display fonts only come in one weight. CJK text falls back to system fonts, so ask for their
   heaviest weight, and turn off faux-bold so the Latin letters ("GIMMI", "$", digits) stay as designed. */
html:is(:lang(zh), :lang(ja), :lang(ko)) :is(.h2, .alert, .band__track, .token__v, .crew__line, .scribble, .tape__title) { font-weight: 900; font-synthesis: none; }
html:is(:lang(zh), :lang(ja), :lang(ko)) :is(.token__k, .ca__label, .stats small) { letter-spacing: .06em; }

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--ink);
    color: var(--cream);
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.55;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--gold); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* ---------- 3D type ---------- */
/* Stacked hard shadows build the extruded block; the last one is the soft drop. */
.wordmark, .h2, .brand__word {
    font-family: var(--display);
    font-weight: 400;
    color: var(--gold);
    --ex: var(--gold-deep);
    text-shadow:
        .006em .006em 0 var(--ex), .012em .012em 0 var(--ex), .018em .018em 0 var(--ex),
        .024em .024em 0 var(--ex), .030em .030em 0 var(--ex), .036em .036em 0 var(--ex),
        .042em .042em 0 var(--ex), .048em .048em 0 var(--ex), .054em .054em 0 var(--ex),
        .060em .060em 0 var(--ex), .066em .066em 0 var(--ex), .072em .072em 0 var(--ex),
        .09em .13em .12em rgba(0, 0, 0, .32);
}

/* ---------- Buttons & pills ---------- */
/* Chunky buttons. On hover they sink into their own edge, on click they bottom out. */
.btn {
    --face: var(--gold);
    --edge: var(--gold-deep);
    --text: var(--ink);
    --d: 6px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 26px;
    border: 0; border-radius: var(--radius);
    background: var(--face); color: var(--text);
    font-family: var(--body); font-weight: 700; font-size: 19px; line-height: 1; text-decoration: none; white-space: nowrap;
    box-shadow: 0 var(--d) 0 var(--edge), 0 calc(var(--d) + 8px) 16px rgba(0, 0, 0, .22);
    cursor: pointer;
    transition: transform .09s ease, box-shadow .09s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(calc(var(--d) - 2px)); box-shadow: 0 2px 0 var(--edge), 0 4px 6px rgba(0, 0, 0, .2); }
.btn:active { transform: translateY(var(--d)); box-shadow: 0 0 0 var(--edge), 0 1px 2px rgba(0, 0, 0, .2); }
.btn--cream { --face: var(--cream); --edge: var(--cream-deep); }
.btn--ink { --face: var(--panel); --edge: #000; --text: var(--cream); }
.btn--sm { --d: 4px; padding: 12px 18px; font-size: 16px; border-radius: 14px; }
.btn--big { padding: 20px 30px; font-size: 21px; }
.btn.is-soon { cursor: not-allowed; filter: saturate(.4) brightness(.9); transform: none; box-shadow: 0 var(--d) 0 var(--edge); }
.btn.is-soon::after { content: "soon"; font-family: var(--hand); font-size: .9em; color: var(--gold); margin-left: 2px; transform: rotate(-6deg); }

/* ---------- DEXTools link: their logo in the site's gold, on the same dark key as the language button ---------- */
.dex {
    display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 15px 0 12px;
    background: var(--panel); color: var(--cream); border-radius: 14px; box-shadow: 0 4px 0 #000; text-decoration: none;
    font: 700 16px/1 var(--body); white-space: nowrap; transition: transform .09s ease, box-shadow .09s ease, background-color .6s;
}
.dex svg { width: 20px; height: 23px; flex: none; fill: var(--gold); }
.dex:hover, .dex:focus-visible { transform: translateY(3px); box-shadow: 0 1px 0 #000; color: var(--gold); }
.dex:active { transform: translateY(4px); box-shadow: none; }

/* ---------- Language dropdown ---------- */
.lang { position: relative; }
.lang__btn {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
    background: var(--panel); color: var(--cream); border: 0; border-radius: 14px; box-shadow: 0 4px 0 #000;
    font: 700 16px/1 var(--body); white-space: nowrap; cursor: pointer; transition: transform .09s ease, box-shadow .09s ease, background-color .6s;
}
.lang__btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lang__btn:hover, .lang__btn:focus-visible, .lang__btn[aria-expanded="true"] { transform: translateY(3px); box-shadow: 0 1px 0 #000; color: var(--gold); }
.lang__btn[aria-expanded="true"] .lang__chev { rotate: 180deg; }
.lang__chev { transition: rotate .2s ease; }
.lang__menu {
    position: absolute; z-index: 30; right: 0; top: calc(100% + 12px); min-width: 230px; margin: 0; padding: 10px; list-style: none;
    background: linear-gradient(180deg, #262c4a, #171b2e); border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.lang__menu[hidden] { display: none; }
.lang__menu button {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; padding: 15px 18px;
    background: none; border: 0; border-radius: 14px; color: rgba(255, 255, 255, .45);
    font: 800 20px/1.1 var(--body); text-align: left; cursor: pointer; transition: color .15s, background-color .15s;
}
.lang__menu button:hover, .lang__menu button:focus-visible { color: #fff; background: rgba(255, 255, 255, .06); outline: none; }
.lang__menu button[aria-checked="true"] { color: #fff; }
.lang__check { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.lang__menu button[aria-checked="true"] .lang__check { visibility: visible; }

/* The palette rotates automatically (see js/design.js); these fade with it. */
.hero, .section--green, .ca, .stats, .loot, .btn--ink { transition-property: background-color, transform, box-shadow; transition-duration: .6s, .09s, .09s; }

/* Lettering on the banknotes */
.bag__mark { font-family: var(--display); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--field); overflow: hidden; isolation: isolate; }
.rays {
    position: absolute; z-index: -1;
    width: 260vmax; height: 260vmax;
    left: 74%; top: 56%;
    translate: -50% -50%;
    background: repeating-conic-gradient(from 0deg, transparent 0 7.5deg, var(--ray) 7.5deg 15deg);
    -webkit-mask: radial-gradient(circle, #000 0, #000 18%, transparent 46%);
            mask: radial-gradient(circle, #000 0, #000 18%, transparent 46%);
    animation: spin 160s linear infinite;
    pointer-events: none;
}
.rays--center { left: 50%; top: 50%; }
@keyframes spin { to { rotate: 360deg; } }

.nav {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    width: min(1380px, 100% - 40px); margin-inline: auto; padding: 20px 0 8px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__dog { height: 62px; width: auto; flex: none; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .22)); }
.brand__word { font-size: 32px; line-height: 1; letter-spacing: .01em; }
.nav__actions { display: flex; align-items: center; gap: 12px; }

.hero__grid {
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 20px;
    width: min(1380px, 100% - 40px); margin-inline: auto;
    padding: clamp(16px, 3vw, 40px) 0 clamp(70px, 8vw, 110px);
}
.hero__copy { position: relative; z-index: 2; }

/* Caution label above the wordmark */
.alert {
    position: relative; display: inline-block;
    padding: 0 34px; rotate: -3deg;
    background: repeating-linear-gradient(-45deg, var(--ink) 0 9px, #fff 9px 18px);
    border: 3px solid var(--ink); border-radius: 6px;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .28);
    font-family: var(--display); font-size: clamp(14px, 1.3vw, 18px); line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: #fff;
}
.alert span { display: block; padding: 10px 16px 9px; background: var(--alarm); }

.wordmark {
    font-size: clamp(84px, 11.4vw, 204px);
    line-height: .86; letter-spacing: -.01em;
    margin: 18px 0 0 -.03em;
    padding-bottom: .1em;
    white-space: nowrap;
}

.typed { display: flex; align-items: center; gap: 16px; margin-top: 6px; min-height: 1.25em; font-family: var(--slab); font-size: clamp(34px, 5vw, 68px); line-height: 1.1; color: #fff; }
.typed__text { text-shadow: .03em .03em 0 var(--ink), .06em .06em 0 var(--ink), .08em .11em .1em rgba(0, 0, 0, .25); }
#typing::after { content: ""; display: inline-block; width: .09em; height: .82em; margin-left: .08em; background: currentColor; vertical-align: -.06em; box-shadow: .04em .04em 0 var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* The candle from the old site, now an actual candle. Green on good words, red on bad ones. */
.candle { position: relative; flex: none; width: .34em; height: .72em; border-radius: .06em; background: var(--up); border: .05em solid var(--ink); box-shadow: .05em .05em 0 var(--ink); transition: background .2s, height .25s, translate .25s; }
.candle::before { content: ""; position: absolute; left: 50%; top: -.22em; bottom: -.22em; width: .06em; translate: -50% 0; background: var(--ink); z-index: -1; }
.candle.is-down { background: var(--down); height: .5em; translate: 0 .14em; }

.hero__line { margin-top: 14px; max-width: 46ch; font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; color: #fff; }
.hero__line b { color: var(--gold); }

.ca {
    display: flex; align-items: center; gap: 16px;
    margin-top: 26px; padding: 16px 16px 16px 22px; max-width: 640px;
    background: var(--panel); border-radius: 22px; box-shadow: 0 6px 0 #000, 0 16px 24px rgba(0, 0, 0, .22);
}
.ca__body { flex: 1; min-width: 0; }
.ca__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.ca__value { display: block; margin-top: 4px; font-family: var(--mono); font-size: clamp(13px, 1.25vw, 17px); color: #fff; overflow-wrap: anywhere; user-select: all; }
.btn--copy { --d: 4px; min-width: 104px; padding: 14px 18px; font-size: 17px; border-radius: 14px; }
/* Before the address is live the copy button is shown but switched off. */
.btn--copy:disabled { --face: #3a4064; --edge: #23263a; --text: rgba(255, 244, 220, .45); cursor: not-allowed; transform: none; box-shadow: 0 var(--d) 0 var(--edge); }
.btn--copy.is-done { --face: var(--up); --edge: #17813f; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 26px; }

.stats { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 24px; padding: 12px 20px; background: var(--panel); border-radius: 16px; box-shadow: 0 4px 0 #000; font-variant-numeric: tabular-nums; }
.stats[hidden] { display: none; }
.stats small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.stats b { font-family: var(--mono); font-weight: 500; font-size: 17px; color: #fff; }
.stats b.up { color: var(--up); } .stats b.down { color: var(--down); }
.stats a { color: var(--gold); font-weight: 700; font-size: 16px; }
.stats__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--up); animation: blink 1.6s steps(1) infinite; }

/* ---------- Hero art ---------- */
.hero__art { position: relative; align-self: center; min-height: 480px; display: grid; place-items: center; }
.mascot { position: relative; z-index: 1; display: block; padding: 0; border: 0; background: none; cursor: pointer; width: min(100%, 410px, 40vh + 60px); -webkit-tap-highlight-color: transparent; }
.mascot img { width: 100%; filter: drop-shadow(0 26px 0 rgba(0, 0, 0, .16)) drop-shadow(0 30px 30px rgba(0, 0, 0, .3)); animation: bob 5s ease-in-out infinite alternate; transform-origin: 50% 90%; }
.mascot:hover img { animation-duration: 1.6s; }
.mascot.is-hit img { animation: hit .28s ease; }
@keyframes bob { from { transform: translateY(0) rotate(-1.2deg); } to { transform: translateY(-16px) rotate(1.2deg); } }
@keyframes hit { 0% { transform: scale(1); } 40% { transform: scale(.94, 1.05) rotate(-3deg); } 100% { transform: scale(1); } }

/* Handwritten notes around the mascot. Only one shows at a time, picked at random (see js/design.js). */
.scribble {
    position: absolute; z-index: 2; font-family: var(--hand); font-size: clamp(30px, 3.4vw, 54px); line-height: 1; white-space: nowrap; text-shadow: .05em .06em 0 var(--ink);
    opacity: 0; scale: .6; transition: opacity .3s ease, scale .4s cubic-bezier(.3, 1.7, .5, 1);
    animation: wiggle 3.2s ease-in-out infinite alternate;
}
.scribble.is-on { opacity: 1; scale: 1; }
.scribble--1 { top: 0; left: 2%; color: var(--sky); --r: -9deg; }
.scribble--2 { top: 14%; right: 0; color: var(--lime); --r: 8deg; animation-delay: -1s; }
.scribble--3 { bottom: 9%; left: -4%; color: #fff; --r: -6deg; animation-delay: -2s; }
@keyframes wiggle { from { rotate: calc(var(--r) - 2deg); } to { rotate: calc(var(--r) + 2deg); } }


.loot { position: absolute; z-index: 3; left: 50%; bottom: -6px; translate: -50% 0; padding: 8px 16px; background: var(--panel); border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--cream); white-space: nowrap; box-shadow: 0 4px 0 #000; }
.loot[hidden] { display: none; }
.loot b { color: var(--gold); font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* coins thrown when you poke him (made in JS) */
.fling { position: fixed; z-index: 40; width: 34px; height: 34px; border-radius: 50%; pointer-events: none; background: var(--gold); border: 4px solid var(--gold-deep); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); animation: fling .9s cubic-bezier(.2, .7, .4, 1) forwards; }
.fling::after { content: "G"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 15px; color: var(--gold-deep); }
@keyframes fling {
    0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; }
    60% { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); opacity: 0; }
}

/* ---------- Tape ---------- */
.tape { position: relative; z-index: 3; background: var(--gold); color: var(--ink); border-block: 5px solid var(--ink); rotate: -1.4deg; margin: -34px -3% -28px; overflow: hidden; box-shadow: 0 10px 0 rgba(0, 0, 0, .28); }
.tape__track { display: flex; width: max-content; padding: 13px 0; font-family: var(--display); font-size: clamp(18px, 2.2vw, 28px); line-height: 1; text-transform: uppercase; white-space: nowrap; animation: tape 44s linear infinite; }
.tape__track span { padding: 0 .55em; }
.tape__track span.bad { color: #a11a14; }
.tape__track i { font-style: normal; opacity: .55; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(90px, 11vw, 150px) 0 clamp(80px, 9vw, 120px); overflow: hidden; isolation: isolate; }
.section--ink { background: var(--ink); background-image: radial-gradient(rgba(255, 255, 255, .045) 1.5px, transparent 1.5px); background-size: 26px 26px; }
.section--gold { background: var(--gold); color: var(--ink); }
.section--green { background: var(--field); }

/* Headings are white; the name GIMMI is always the same gold as the hero wordmark. */
.h2 { color: #fff; font-size: clamp(44px, 7vw, 92px); line-height: .95; letter-spacing: -.005em; padding-bottom: .12em; }
.h2 span { color: var(--gold); }
/* Small lead-in line above the big name */
.h2--stack small { display: block; font-size: .3em; line-height: 1.1; letter-spacing: .02em; margin-bottom: .35em; text-shadow: .012em .012em 0 var(--gold-deep), .024em .024em 0 var(--gold-deep), .036em .036em 0 var(--gold-deep), .048em .048em 0 var(--gold-deep); }
.h2--stack span { display: block; font-size: 1.15em; }
.h2--center { text-align: center; }
/* Heading on the gold section: ink letters with a dark-gold block */
.h2--ink { color: var(--ink); text-shadow: .008em .008em 0 var(--gold-deep), .016em .016em 0 var(--gold-deep), .024em .024em 0 var(--gold-deep), .032em .032em 0 var(--gold-deep), .040em .040em 0 var(--gold-deep), .048em .048em 0 var(--gold-deep), .056em .056em 0 var(--gold-deep), .064em .064em 0 var(--gold-deep); }
/* Gold name on the gold section: an ink outline and ink block keep it readable. */
.h2--ink span { -webkit-text-stroke: .09em var(--ink); paint-order: stroke fill; text-shadow: .008em .008em 0 var(--ink), .016em .016em 0 var(--ink), .024em .024em 0 var(--ink), .032em .032em 0 var(--ink), .040em .040em 0 var(--ink), .048em .048em 0 var(--ink), .056em .056em 0 var(--ink), .064em .064em 0 var(--ink); }

/* Lore */
.lore { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: clamp(36px, 6vw, 90px); align-items: center; }
.lore__text p { margin-top: 22px; font-size: clamp(18px, 1.6vw, 21px); color: #e9e2d0; max-width: 58ch; }
.lore__text b { color: var(--gold); font-weight: 700; }

/* --- GIMMI plotting, with money raining around him --- */
.plot { position: relative; isolation: isolate; }
.plot__glow {
    position: absolute; z-index: -1; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
    background:
        radial-gradient(circle, rgba(246, 182, 60, .3), rgba(246, 182, 60, .08) 45%, transparent 68%),
        repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .05) 0 9deg, transparent 9deg 18deg);
    -webkit-mask: radial-gradient(circle, #000 30%, transparent 68%); mask: radial-gradient(circle, #000 30%, transparent 68%);
    animation: spin 90s linear infinite;
}
.plot__dog { position: relative; width: 100%; filter: drop-shadow(0 22px 18px rgba(0, 0, 0, .5)); animation: scheme 4.5s ease-in-out infinite alternate; transform-origin: 50% 90%; }
@keyframes scheme { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-10px) rotate(1deg); } }
/* Making it rain: notes fall the full height of the figure, some behind him and some in front, fading in and out at the ends */
.rainfall { position: absolute; inset: -8% -2% -8% -14%; /* hangs out to the left only, so notes stay clear of the text on the right */ container-type: size; pointer-events: none; }
.rainfall--back { z-index: -1; }
.rain { position: absolute; top: 0; width: 22%; opacity: 0; animation: rain 10s linear infinite; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .4)); }
.rainfall--back .rain { width: 16%; }
.rain--a { left: 0%; animation-duration: 10.6s; animation-delay: -1.1s; } .rain--b { left: 18%; animation-duration: 12.9s; animation-delay: -5.9s; }
.rain--c { left: 38%; animation-duration: 9.9s; animation-delay: -3.6s; } .rain--d { left: 56%; animation-duration: 11.8s; animation-delay: -8.4s; }
.rain--e { left: 72%; animation-duration: 11.2s; animation-delay: -4.8s; }
.rain--f { left: -2%; animation-duration: 8.9s; animation-delay: -5.3s; } .rain--g { left: 14%; animation-duration: 11.0s; animation-delay: -2.3s; }
.rain--h { left: 50%; animation-duration: 9.7s; animation-delay: -7.4s; } .rain--i { left: 68%; animation-duration: 9.3s; animation-delay: -0.6s; }
.rain--j { left: 32%; animation-duration: 12.2s; animation-delay: -9.5s; }
@keyframes rain {
    0% { transform: translateY(-4cqh) rotate(-25deg) rotateX(0deg); opacity: 0; }
    10% { opacity: 1; }
    25% { transform: translateY(24cqh) translateX(30%) rotate(20deg) rotateX(60deg); }
    50% { transform: translateY(50cqh) translateX(-25%) rotate(-30deg) rotateX(0deg); }
    75% { transform: translateY(76cqh) translateX(28%) rotate(25deg) rotateX(-60deg); }
    88% { opacity: 1; }
    100% { transform: translateY(100cqh) rotate(-20deg) rotateX(0deg); opacity: 0; }
}

/* Token info: static values for now, filled from CONFIG.token in js/design.js */
#token { margin-top: clamp(80px, 10vw, 130px); scroll-margin-top: 30px; }
.token { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.token li { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 170px; padding: 26px 14px 24px; text-align: center; background: var(--ink-2); border: 3px solid #2a3150; border-radius: 26px; box-shadow: 0 8px 0 #06080f; }
.token__k { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.token__v { font-family: var(--slab); font-size: clamp(32px, 3.2vw, 46px); line-height: 1.05; color: #fff; text-shadow: .04em .05em 0 #000; font-variant-numeric: tabular-nums; }
.token__n { font-size: 15px; color: #b9bdcc; }
.token__n:empty { display: none; }

/* The rap sheet: one thick gold band, straight across, with the charges scrolling through it in big type. */
.band { position: relative; overflow: hidden; background: var(--gold); color: var(--ink); padding: clamp(28px, 3.75vw, 54px) 0 clamp(26px, 3.55vw, 51px); scroll-margin-top: 0; }
.band__track { display: flex; width: max-content; font-family: var(--display); font-size: clamp(20px, 3vw, 46px); line-height: 1; text-transform: uppercase; white-space: nowrap; text-shadow: .008em .008em 0 var(--gold-deep), .016em .016em 0 var(--gold-deep), .024em .024em 0 var(--gold-deep), .032em .032em 0 var(--gold-deep), .040em .040em 0 var(--gold-deep), .048em .048em 0 var(--gold-deep), .056em .056em 0 var(--gold-deep); animation: tape 60s linear infinite; }
.band__track span { padding: 0 .3em; }
.band__track b { font-weight: inherit; color: #a11a14; } /* "none" and "zero" are always red */
.band__track i { font-style: normal; opacity: .5; text-shadow: none; }

/* Zigzag edges of the gold band. They sit in the sections above and below it. */
.zig { position: absolute; z-index: 1; left: 0; right: 0; height: 24px; background-repeat: repeat-x; background-size: 48px 48px; }
.zig--up { bottom: -1px; background-image: linear-gradient(45deg, var(--gold) 25%, transparent 25.5%), linear-gradient(315deg, var(--gold) 25%, transparent 25.5%); background-position: 0 100%; }
.zig--down { top: -1px; background-image: linear-gradient(135deg, var(--gold) 25%, transparent 25.5%), linear-gradient(225deg, var(--gold) 25%, transparent 25.5%); background-position: 0 0; }

/* Crew */
.crew { text-align: center; }
.crew__line { margin-top: 10px; font-family: var(--hand); font-size: clamp(26px, 3vw, 38px); color: #fff; text-shadow: .05em .06em 0 var(--ink); rotate: -1.5deg; }
.crew__fine { margin-top: 30px; font-weight: 700; font-size: 16px; color: #fff; opacity: .9; }
.crew__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 40px; }

/* Footer */
.footer { background: var(--ink); padding: 44px 0 50px; border-top: 5px solid #000; }
.footer__in { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 36px; align-items: center; }
.footer__fine { font-size: 14px; color: #9aa0b4; max-width: 70ch; }
.footer__copy { font-size: 14px; font-weight: 700; color: var(--cream); white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .token { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; gap: 0; padding-top: 10px; }
    .hero__copy { display: contents; }
    .alert { order: 1; justify-self: start; }
    .wordmark { order: 2; font-size: clamp(64px, 20.5vw, 200px); }
    .typed { order: 3; }
    .hero__line { order: 4; }
    .hero__art { order: 5; min-height: 0; margin: 26px auto 6px; width: min(100%, 400px); }
    .ca { order: 6; margin-top: 30px; }
    .hero__cta { order: 7; }
    .stats { order: 8; justify-self: start; }
    .rays { left: 50%; top: 58%; }
    .mascot { width: 72%; }
    .scribble--1 { left: 0; top: 0; } .scribble--2 { right: 0; top: 20%; } .scribble--3 { left: 0; bottom: 14%; }
    .lore { grid-template-columns: 1fr; }
    .plot { width: min(300px, 74%); margin-inline: auto; }
    .footer__in { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    body { font-size: 17px; }
    .wrap, .nav, .hero__grid { width: calc(100% - 32px); }
    .brand__word { font-size: 25px; }
    .brand__dog { height: 50px; }
    .nav { gap: 8px; }
    .nav .brand { gap: 8px; }
    .nav__actions { gap: 8px; }
    .nav .brand__word { display: none; } /* the mascot logo stays; frees room for the language button */
    .lang__btn { padding: 0 11px; gap: 6px; }
    .dex { width: 44px; padding: 0; justify-content: center; } /* logo only on phones */
    .dex span { display: none; }
    .lang__menu { min-width: 210px; }
    .nav .btn--sm { padding: 12px 12px; font-size: 15px; }
    .ca { flex-direction: column; align-items: stretch; padding: 16px; }
    .hero__cta .btn { flex: 1 1 100%; }
    .token { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .token li { min-height: 0; }
    .crew__links .btn { flex: 1 1 100%; }
    .tape { margin-inline: -8%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .plot__glow, .plot__dog { animation: none; }
    .rain { animation: none; opacity: 1; } .rain--a { top: 6%; } .rain--b { top: 72%; } .rain--c { top: 2%; } .rain--d { top: 58%; } .rain--e { top: 30%; } .rain--f { top: 44%; } .rain--g { top: 88%; } .rain--h { top: 90%; } .rain--i { top: 12%; } .rain--j { top: 96%; }
    .rays, .mascot img, .scribble, .tape__track, .band__track, .stats__dot, #typing::after { animation: none; }
    .fling { display: none; }
}
