/* ============================================================
   BinderBot — "The Vault" design system
   A collector's vault at midnight: slate ink, cream card stock,
   and holographic foil that catches the light when you move.
   Ambient layers (vault gradient, holo-sparkle canvas, drifting
   cards) are injected by js/script.js. All card art is runtime
   pixel art rendered from sprite maps: placeholder stand-ins for
   the real card frames and art (see ASSETS.md).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;900&family=Sora:wght@400;600;700&family=Pixelify+Sans:wght@400;600&family=JetBrains+Mono:wght@400;700&display=swap');

/* lets the conic foil angle animate in browsers that support @property;
   everywhere else the hue-rotate in the same keyframes carries the effect */
@property --foil-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    /* ink */
    --ink: #f4f1fb;
    --ink-dim: rgba(236, 231, 248, 0.82);
    --ink-faint: rgba(206, 200, 226, 0.55);

    /* brand + foil accents */
    --foil-cyan: #4cc9f0;
    --foil-violet: #b16dff;
    --foil-magenta: #ff6bd6;
    --gold: #ffd166;          /* family gold */
    --paper: #f2ead8;
    --ranked: #ff5d73;
    --foil-gradient: linear-gradient(110deg, var(--foil-cyan), var(--foil-violet) 35%, var(--foil-magenta) 70%, var(--gold));

    /* vault gradient stops */
    --vault-a: #0a0a14;
    --vault-b: #12121e;
    --vault-c: #16162a;

    /* surfaces */
    --glass: rgba(18, 18, 32, 0.62);
    --glass-strong: rgba(10, 10, 20, 0.9);
    --line: rgba(177, 109, 255, 0.16);
    --line-bright: rgba(177, 109, 255, 0.34);
    --line-glow: rgba(76, 201, 240, 0.4);
    --panel-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);

    /* type */
    --font-display: 'Unbounded', 'Trebuchet MS', sans-serif;
    --font-body: 'Sora', 'Segoe UI', sans-serif;
    --font-px: 'Pixelify Sans', 'Consolas', monospace;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;

    --page-width: 1180px;
    --reading-width: 860px;
    --header-offset: 118px;
    --radius-large: 26px;
    --radius-medium: 18px;
    --radius-small: 12px;
}

html { scroll-behavior: smooth; }

* { box-sizing: border-box; margin: 0; padding: 0; }

::selection { background: rgba(177, 109, 255, 0.45); color: #ffffff; }

body {
    font-family: var(--font-body);
    background: var(--vault-b);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: var(--header-offset) 20px 32px;
}

a { color: inherit; }
img { max-width: 100%; }
img.px, canvas.px { image-rendering: pixelated; }

/* ---- vault backdrop (injected by JS) ---- */
.vault-base {
    position: fixed;
    inset: 0;
    z-index: -7;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 45% at 50% -8%, #241a44 0%, transparent 62%),
        radial-gradient(ellipse 45% 32% at 92% 100%, rgba(255, 107, 214, 0.08), transparent 65%),
        radial-gradient(ellipse 45% 32% at 6% 96%, rgba(76, 201, 240, 0.08), transparent 65%),
        linear-gradient(180deg, var(--vault-a) 0%, var(--vault-b) 50%, var(--vault-c) 100%);
}
/* faint shelf lines, like card boxes in the dark */
.vault-shelves {
    position: fixed;
    inset: 0;
    z-index: -6;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, transparent 0 138px, rgba(177, 109, 255, 0.04) 138px 140px),
        repeating-linear-gradient(90deg, transparent 0 230px, rgba(76, 201, 240, 0.025) 230px 232px);
    mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, rgba(0,0,0,0.7), transparent 80%);
}

/* canvas for holo sparkles + foil streaks (injected by JS) */
#vault-canvas {
    position: fixed;
    inset: 0;
    z-index: -4;
    pointer-events: none;
}

/* DOM layer for drifting cards */
#card-tank {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}
.floater {
    position: absolute;
    will-change: transform, top;
    opacity: 0.4;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
    animation: floatUp linear forwards;
}
.floater canvas { display: block; image-rendering: pixelated; }
.page-privacy .floater, .page-tos .floater { opacity: 0.14; }
@keyframes floatUp {
    from { top: 105vh; transform: rotate(var(--tilt, -6deg)); }
    to   { top: -180px; transform: rotate(calc(var(--tilt, -6deg) * -1)); }
}

/* fine film grain */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}
.scanlines::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 60%, rgba(3, 3, 8, 0.5));
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    padding: 12px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #0d0d18;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
    z-index: 1400;
}
.skip-link:focus { transform: translateY(0); }

body.nav-open { overflow: hidden; }

/* ============================== NAV ============================== */
.site-header {
    position: fixed;
    top: 18px;
    left: 20px;
    right: 20px;
    z-index: 110;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.site-header.nav-hidden { transform: translateY(-130%); opacity: 0; }

.site-nav {
    width: min(var(--page-width), 100%);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(180deg, rgba(16, 16, 30, 0.92), rgba(10, 10, 20, 0.78));
    border: 1px solid var(--line);
    border-bottom-color: var(--line-bright);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(216, 200, 255, 0.08);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    flex-shrink: 0;
}
/* the brand dot: a tiny foil card */
.brand-mark::before {
    content: '';
    width: 9px;
    height: 13px;
    border-radius: 2px;
    background: var(--foil-gradient);
    background-size: 300% 300%;
    box-shadow: 0 0 14px rgba(177, 109, 255, 0.7);
    animation: foilShift 3.2s linear infinite;
}
@keyframes foilShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--ink-dim);
    text-decoration: none;
    padding: 9px 13px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    position: relative;
    transition: color 0.25s ease, background 0.25s ease;
}
.site-nav a::after {
    content: '';
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 5px;
    height: 2px;
    border-radius: 2px;
    background: var(--foil-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a.active,
.site-nav a[aria-current='page'] {
    color: #120a1e;
    background: linear-gradient(135deg, var(--foil-cyan), var(--foil-violet));
    box-shadow: 0 8px 26px rgba(177, 109, 255, 0.32);
    font-weight: 700;
}
.site-nav a.active::after { display: none; }

.site-nav a:focus-visible, .btn:focus-visible, .nav-toggle:focus-visible,
.guide-toc a:focus-visible, .text-content a:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.nav-toggle {
    display: none;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}
.nav-toggle span {
    width: 21px;
    height: 2px;
    background: var(--ink);
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================ LAYOUT ============================ */
.container {
    width: min(var(--page-width), 100%);
    margin: 0 auto;
    padding: 52px;
    background: linear-gradient(180deg, rgba(216, 200, 255, 0.05), rgba(216, 200, 255, 0.015));
    backdrop-filter: blur(14px);
    border-radius: var(--radius-large);
    border: 1px solid var(--line);
    box-shadow: var(--panel-shadow);
    position: relative;
    overflow: hidden;
}
.container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(76, 201, 240, 0.05), transparent 40%, rgba(255, 107, 214, 0.04) 90%);
    pointer-events: none;
}
.container > * { position: relative; z-index: 1; }

.page-intro, .hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
}
.hero-home { min-height: 58vh; padding: 24px 0 30px; }
.hero-compact, .page-intro-compact { min-height: 0; margin-bottom: 18px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--foil-cyan);
    text-shadow: 0 0 14px rgba(76, 201, 240, 0.4);
}
.eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }

h1 {
    font-size: clamp(2.5rem, 6.4vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    text-wrap: balance;
    text-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}
.title-glow {
    background: var(--foil-gradient);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(177, 109, 255, 0.35));
    animation: foilShift 6s linear infinite;
}

.tagline {
    max-width: 700px;
    font-size: clamp(1.02rem, 1.9vw, 1.32rem);
    line-height: 1.75;
    color: var(--ink-dim);
    margin-bottom: 10px;
    text-wrap: pretty;
}

.content-section { margin-top: 64px; }
.content-section-tight { margin-top: 22px; }

.section-heading { max-width: 760px; margin-bottom: 30px; }
.section-heading h2 {
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.section-heading p { color: var(--ink-dim); line-height: 1.7; text-wrap: pretty; }

/* numbered vault tag above section headings */
.vault-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--foil-violet);
    margin-bottom: 10px;
}
.vault-tag::before {
    content: '';
    width: 8px;
    height: 11px;
    border-radius: 2px;
    border: 1px solid currentColor;
    box-shadow: 0 0 0 0 rgba(177, 109, 255, 0.55);
    animation: cardPing 2.6s ease-out infinite;
}
@keyframes cardPing {
    0%   { box-shadow: 0 0 0 0 rgba(177, 109, 255, 0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(177, 109, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(177, 109, 255, 0); }
}

/* ============================ BUTTONS ============================ */
.btn-group { display: flex; gap: 14px; justify-content: flex-start; flex-wrap: wrap; }

.btn {
    padding: 15px 26px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 54px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--foil-cyan), var(--foil-violet) 90%);
    color: #0d0a18;
    box-shadow: 0 14px 36px rgba(177, 109, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    transition: left 0.45s ease;
}
.btn-primary:hover::after { left: 130%; }

.btn-secondary {
    background: rgba(216, 200, 255, 0.05);
    border-color: var(--line-bright);
    color: var(--ink);
}
.btn-secondary:hover { border-color: var(--line-glow); background: rgba(76, 201, 240, 0.07); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #ffe9a8);
    color: #2b1c02;
    box-shadow: 0 14px 36px rgba(255, 209, 102, 0.28);
}

.btn[aria-disabled='true'] {
    background: rgba(216, 200, 255, 0.07);
    border: 1px dashed var(--line-bright);
    color: var(--ink-faint);
    cursor: not-allowed;
    box-shadow: none;
}
.btn[aria-disabled='true']:hover { transform: none; }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ====================== STATUS BAR (WIP) ====================== */
.status-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 13px 18px;
    border-radius: 14px;
    background: linear-gradient(100deg, rgba(255, 107, 214, 0.1), rgba(10, 10, 20, 0.6) 45%, rgba(76, 201, 240, 0.08));
    border: 1px solid rgba(255, 107, 214, 0.35);
    box-shadow: 0 0 34px rgba(255, 107, 214, 0.08), inset 0 1px 0 rgba(255, 220, 245, 0.08);
}
.status-bar .sb-sigil { font-size: 1.35rem; line-height: 1; filter: drop-shadow(0 0 10px rgba(255, 107, 214, 0.5)); }
.status-bar .sb-text { color: var(--ink-dim); font-size: 0.92rem; line-height: 1.4; }
.status-bar .sb-text strong { color: var(--foil-magenta); font-family: var(--font-display); font-size: 0.85em; letter-spacing: 0.04em; }
.status-bar .sb-steps {
    display: flex;
    gap: 6px;
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-wrap: wrap;
}
.status-bar .sb-step {
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink-faint);
    white-space: nowrap;
}
.status-bar .sb-step.done {
    border-color: rgba(76, 201, 240, 0.55);
    color: var(--foil-cyan);
    background: rgba(76, 201, 240, 0.08);
}
.status-bar .sb-step.now {
    border-color: rgba(255, 107, 214, 0.65);
    color: var(--foil-magenta);
    background: rgba(255, 107, 214, 0.1);
    animation: stepBlink 2.4s ease-in-out infinite;
}
@keyframes stepBlink {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 214, 0.35); }
    50%      { box-shadow: 0 0 14px 2px rgba(255, 107, 214, 0.25); }
}

/* ====================== HERO EXTRAS ====================== */
.hero-vault { position: relative; }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.hud-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(14, 14, 26, 0.66);
    border: 1px solid var(--line);
    border-left: 2px solid var(--foil-violet);
    backdrop-filter: blur(8px);
}
.hud-chip .hud-num {
    font-family: var(--font-px);
    font-weight: 600;
    font-size: 1.16rem;
    color: var(--ink);
    letter-spacing: 0.02em;
}
.hud-chip .hud-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink-faint);
}

/* hero card fan */
.hero-fan {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: clamp(240px, 30vw, 400px);
    aspect-ratio: 1;
    pointer-events: none;
    z-index: 0;
    perspective: 900px;
}
.hero-fan .fan-slot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    animation: fanHover 6s ease-in-out infinite;
}
.hero-fan .fan-slot:nth-child(1) { transform: translate(-92%, -48%) rotate(-14deg); animation-delay: -1s; }
.hero-fan .fan-slot:nth-child(2) { transform: translate(-50%, -54%) rotate(0deg); z-index: 2; animation-delay: -3s; }
.hero-fan .fan-slot:nth-child(3) { transform: translate(-8%, -48%) rotate(14deg); animation-delay: -5s; }
@keyframes fanHover {
    0%, 100% { margin-top: 0; }
    50%      { margin-top: -10px; }
}
.hero > *:not(.hero-fan) { position: relative; z-index: 1; }

/* ====================== PIXEL CARDS ====================== */
.pix-card {
    --frame: #2a2440;
    --tier-c: #b8c0cc;
    position: relative;
    width: var(--card-w, 120px);
    border-radius: 10px;
    background: linear-gradient(180deg, #efe6d2, #ddd2ba);
    border: 3px solid var(--frame);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #241c30;
    overflow: hidden;
}
.pix-card .pc-name {
    font-family: var(--font-px);
    font-size: 0.72rem;
    line-height: 1.15;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    min-height: 1.6em;
}
.pix-card .pc-gem {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    background: var(--tier-c);
    box-shadow: 0 0 8px var(--tier-c);
}
.pix-card .pc-art {
    position: relative;
    aspect-ratio: 5 / 4;
    border-radius: 5px;
    border: 2px solid var(--frame);
    background:
        radial-gradient(ellipse 80% 60% at 50% 80%, rgba(177, 109, 255, 0.18), transparent 70%),
        linear-gradient(180deg, #1c1733, #2a2052);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.pix-card .pc-art canvas { image-rendering: pixelated; }
.pix-card .pc-type {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #4d4066;
}
.pix-card .pc-stats {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-px);
    font-size: 0.74rem;
    font-weight: 600;
}
.pix-card .pc-stats .atk { color: #b3303f; }
.pix-card .pc-stats .def { color: #2a5fa8; }
/* foil overlay: only on foil+ variants */
.pix-card .pc-foil {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(from var(--foil-angle, 0deg) at 50% 50%,
        rgba(76, 201, 240, 0.0), rgba(76, 201, 240, 0.28), rgba(255, 107, 214, 0.26),
        rgba(255, 209, 102, 0.24), rgba(177, 109, 255, 0.28), rgba(76, 201, 240, 0.0));
    mix-blend-mode: color-dodge;
    pointer-events: none;
    animation: foilSpin 5.5s linear infinite;
    border-radius: 7px;
}
@keyframes foilSpin {
    from { --foil-angle: 0deg; filter: hue-rotate(0deg); }
    to   { --foil-angle: 360deg; filter: hue-rotate(360deg); }
}
.pix-card.full-art { background: linear-gradient(180deg, #2a2052, #16122e); color: var(--paper); }
.pix-card.full-art .pc-type { color: rgba(242, 234, 216, 0.6); }
.pix-card.serialized { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 26px rgba(255, 209, 102, 0.45); border-color: var(--gold); }
.pix-card .pc-serial {
    position: absolute;
    bottom: 4px;
    right: 7px;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--gold);
    text-shadow: 0 0 6px rgba(255, 209, 102, 0.8);
}

/* ====================== PACK RIPPER ====================== */
.pack-ripper {
    border: 1px solid var(--line);
    border-radius: var(--radius-medium);
    background: linear-gradient(180deg, rgba(20, 18, 36, 0.8), rgba(10, 10, 20, 0.9));
    padding: 26px;
}
.pack-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 200px;
    align-items: center;
}
.pack-row .pc-slot {
    transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.5s ease;
}
.pack-row .pc-slot.dealing { transform: translateY(26px) rotateY(90deg); opacity: 0; }
.pack-actions { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.pack-note { font-size: 0.82rem; color: var(--ink-faint); font-family: var(--font-mono); }

/* ====================== VARIANT STRIP ====================== */
.variant-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}
.variant-cell {
    border: 1px solid var(--line);
    border-radius: var(--radius-medium);
    background: rgba(14, 14, 26, 0.6);
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.variant-cell h3 { font-size: 0.92rem; font-family: var(--font-px); letter-spacing: 0.04em; }
.variant-cell p { font-size: 0.78rem; color: var(--ink-faint); line-height: 1.5; }

/* ====================== RANK LADDER ====================== */
.rank-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.rank-chip {
    --rank-c: #8b93a7;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--rank-c) 55%, transparent);
    background: color-mix(in srgb, var(--rank-c) 10%, transparent);
    color: var(--rank-c);
    font-family: var(--font-px);
    font-size: 0.95rem;
}
.rank-arrow { color: var(--ink-faint); font-family: var(--font-mono); }

/* ====================== RARITY LADDER ====================== */
.ladder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}
.ladder-rung {
    --tier: var(--foil-violet);
    border-radius: var(--radius-small);
    border-top: 3px solid var(--tier);
    padding: 14px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ladder-rung:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4); }
.ladder-rung .lr-emoji { font-size: 1.4rem; display: block; margin-bottom: 8px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.ladder-rung .lr-name { font-family: var(--font-px); font-size: 1rem; color: var(--tier); display: block; }
.ladder-rung .lr-odds {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
    text-transform: uppercase;
    display: block;
    margin-top: 4px;
}

/* ====================== FEATURE CARDS ====================== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.feature-card, .guide-card, .guide-toc, .eco-card, .road-step, .ladder-rung {
    background: linear-gradient(180deg, rgba(24, 22, 42, 0.66), rgba(12, 12, 24, 0.78));
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(216, 200, 255, 0.06);
}

.feature-card {
    padding: 26px;
    border-radius: var(--radius-medium);
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature-card::before, .feature-card::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 1px solid var(--line-bright);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.feature-card::before { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.feature-card::after { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }
.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-glow);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(177, 109, 255, 0.12), inset 0 1px 0 rgba(216, 200, 255, 0.06);
}
.feature-card:hover::before, .feature-card:hover::after { opacity: 1; }

.feature-card .fc-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    border-radius: 13px;
    background: rgba(177, 109, 255, 0.08);
    border: 1px solid rgba(177, 109, 255, 0.22);
    margin-bottom: 16px;
    box-shadow: 0 0 22px rgba(177, 109, 255, 0.12);
}
.feature-card h3 { color: var(--ink); margin-bottom: 10px; font-size: 1.14rem; font-weight: 700; }
.feature-card p { color: var(--ink-dim); line-height: 1.7; font-size: 0.95rem; }
.feature-card .fc-cmd {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--foil-cyan);
    letter-spacing: 0.04em;
}
.feature-card .fc-wip {
    position: absolute;
    top: 14px;
    right: 14px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--foil-magenta);
    border: 1px dashed rgba(255, 107, 214, 0.45);
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(255, 107, 214, 0.06);
}

/* ====================== ECOSYSTEM CARDS ====================== */
.eco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.eco-card {
    border-radius: var(--radius-medium);
    padding: 22px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}
.eco-card:hover { transform: translateY(-4px); border-color: var(--line-glow); }
.eco-card .ec-emoji { font-size: 1.7rem; }
.eco-card h3 { font-size: 1.04rem; }
.eco-card p { font-size: 0.86rem; color: var(--ink-dim); line-height: 1.6; }
.eco-card .ec-status {
    margin-top: auto;
    padding-top: 10px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.eco-card.live .ec-status { color: #4ade80; }
.eco-card.wip .ec-status { color: var(--foil-magenta); }

/* ====================== ROADMAP ====================== */
.roadmap { display: flex; flex-direction: column; gap: 12px; }
.road-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    border-radius: var(--radius-medium);
    padding: 18px 20px;
    border-left: 3px solid var(--line-bright);
}
.road-step.done { border-left-color: var(--foil-cyan); }
.road-step.now { border-left-color: var(--foil-magenta); background: linear-gradient(100deg, rgba(255, 107, 214, 0.08), rgba(12, 12, 24, 0.78)); }
.road-step .rs-mark {
    font-family: var(--font-px);
    font-size: 1.05rem;
    width: 38px;
    flex-shrink: 0;
    text-align: center;
    color: var(--ink-faint);
}
.road-step.done .rs-mark { color: var(--foil-cyan); }
.road-step.now .rs-mark { color: var(--foil-magenta); }
.road-step h3 { font-size: 1rem; margin-bottom: 4px; }
.road-step p { font-size: 0.88rem; color: var(--ink-dim); line-height: 1.6; }
.road-step .rs-eta {
    margin-left: auto;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ====================== VAULT DOOR CTA ====================== */
.vault-door {
    margin: 70px -52px -52px;
    padding: 80px 52px 90px;
    text-align: center;
    background:
        radial-gradient(ellipse 55% 42% at 50% 16%, rgba(177, 109, 255, 0.12), transparent 60%),
        linear-gradient(180deg, transparent, rgba(8, 8, 16, 0.5) 70%, #080810 96%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.vault-door .foil-dot {
    width: 12px;
    height: 17px;
    border-radius: 3px;
    background: var(--foil-gradient);
    background-size: 300% 300%;
    box-shadow: 0 0 18px rgba(177, 109, 255, 0.7), 0 0 50px rgba(255, 107, 214, 0.4);
    animation: foilShift 3s linear infinite;
    margin-bottom: 6px;
}
.vault-door h2 { font-size: clamp(1.8rem, 4.2vw, 3rem); letter-spacing: -0.01em; }
.vault-door p { color: var(--ink-dim); max-width: 540px; line-height: 1.7; }
.vault-door .btn-group { justify-content: center; }
.vault-door .vd-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.34em;
    color: var(--ink-faint);
    text-transform: uppercase;
}

/* ====================== TEXT / LEGAL PAGES ====================== */
.text-content { text-align: left; line-height: 1.75; }
.legal-page {
    width: min(var(--reading-width), 100%);
    background: linear-gradient(180deg, rgba(16, 16, 30, 0.92), rgba(18, 18, 32, 0.85));
}
.legal-header { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.text-content h2 {
    color: var(--foil-violet);
    margin-top: 34px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 700;
}
.text-content h3 { color: #ddd0f5; margin-top: 20px; margin-bottom: 10px; font-size: 1.05rem; }
.text-content p, .text-content ul { margin-bottom: 16px; color: var(--ink-dim); }
.text-content ul { padding-left: 20px; }
.text-content li { margin-bottom: 10px; }
.text-content a { color: var(--foil-cyan); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }

code {
    background: rgba(177, 109, 255, 0.08);
    border: 1px solid rgba(177, 109, 255, 0.14);
    padding: 0.18em 0.5em;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: #ddc8ff;
}

/* ====================== GUIDE ====================== */
.guide-toc { padding: 26px; border-radius: var(--radius-medium); margin-bottom: 28px; text-align: left; }
.guide-toc h2 {
    color: var(--foil-violet);
    margin-bottom: 16px;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}
.guide-toc ul {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    padding: 0;
}
.guide-toc a {
    color: var(--ink);
    text-decoration: none;
    display: block;
    padding: 12px 14px;
    background: rgba(216, 200, 255, 0.04);
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}
.guide-toc a:hover {
    background: rgba(177, 109, 255, 0.08);
    border-color: var(--line-glow);
    transform: translateX(4px);
}

.guide-card {
    padding: 28px;
    border-radius: var(--radius-medium);
    margin-bottom: 20px;
    text-align: left;
    scroll-margin-top: 120px;
}
.guide-card h2 {
    color: var(--foil-violet);
    margin-bottom: 18px;
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}
.guide-card h3 { color: var(--foil-cyan); margin-top: 22px; margin-bottom: 10px; font-size: 1.16rem; font-weight: 700; }
.guide-card ul, .guide-card ol { margin-left: 20px; margin-bottom: 15px; }
.guide-card li { margin-bottom: 8px; color: var(--ink-dim); }
.guide-card p { margin-bottom: 15px; line-height: 1.8; color: var(--ink-dim); }

.wip-chip {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--foil-magenta);
    border: 1px dashed rgba(255, 107, 214, 0.45);
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(255, 107, 214, 0.06);
    vertical-align: middle;
    margin-left: 8px;
}

/* ====================== DEV / WIP DISCLAIMER ====================== */
.dev-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 214, 0.35);
    background: rgba(255, 107, 214, 0.06);
    color: var(--ink-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}
.dev-note .dn-icon { font-size: 1.15rem; line-height: 1.4; }
.dev-note strong { color: var(--foil-magenta); }

/* ====================== FOOTER & RIBBON ====================== */
.site-footer {
    width: min(var(--page-width), 100%);
    margin: 20px auto 0;
    text-align: center;
    padding: 24px 10px 8px;
    font-size: 0.88rem;
    color: var(--ink-faint);
}
.site-footer .foot-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-bottom: 12px;
}
.site-footer .foot-links a { color: var(--ink-dim); text-decoration: none; font-size: 0.86rem; }
.site-footer .foot-links a:hover { color: var(--foil-cyan); }

.foot-disclaimer {
    max-width: 760px;
    margin: 0 auto 10px;
    font-size: 0.78rem;
    color: var(--ink-faint);
    line-height: 1.55;
}

.corner-ribbon {
    position: fixed;
    top: 58px;
    left: -86px;
    width: 300px;
    transform: rotate(-45deg);
    z-index: 200;
    display: block;
    text-align: center;
    padding: 10px 0;
    text-decoration: none;
    color: #120a1e;
    background: linear-gradient(135deg, var(--foil-cyan), var(--foil-violet));
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
    font-family: var(--font-display);
    line-height: 1.2;
}
.corner-ribbon .cr-top { display: block; font-size: 0.64rem; font-weight: 700; opacity: 0.8; }
.corner-ribbon .cr-main { display: block; font-size: 0.86rem; font-weight: 700; letter-spacing: 0.02em; }
.corner-ribbon:hover { filter: brightness(1.08); }
.corner-ribbon:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 1280px) { .corner-ribbon { display: none; } }
@media (min-width: 1281px) and (max-width: 1600px) { .site-nav { padding-left: 185px; } }

/* ====================== SCROLLBAR ====================== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #08080f; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--foil-cyan), var(--foil-violet));
    border-radius: 999px;
    border: 2px solid #08080f;
}

/* ====================== REVEAL ON SCROLL ====================== */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.8, 0.3, 1);
    transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal-stagger.in > * { opacity: 1; transform: none; }

/* ====================== RESPONSIVE ====================== */
@media (max-width: 1100px) {
    .hero-fan { display: none; }
}

@media (max-width: 960px) {
    .site-nav { padding: 13px 16px; }
    .container { padding: 40px 32px; }
    .vault-door { margin-inline: -32px; margin-bottom: -40px; padding-inline: 32px; }
}

@media (max-width: 820px) {
    :root { --header-offset: 96px; }
    body { padding-inline: 14px; }
    .site-header { top: 12px; left: 14px; right: 14px; }
    .site-nav { position: relative; padding: 12px 14px; gap: 12px; }
    .nav-toggle { display: inline-flex; }
    .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 16px;
        background: var(--glass-strong);
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
    body.nav-open .nav-links { display: flex; }
    .site-nav a { width: 100%; text-align: left; }
    .site-nav a::after { display: none; }
    .container { padding: 34px 22px; border-radius: 22px; }
    .hero-home { min-height: 0; padding-top: 10px; }
    h1 { font-size: clamp(2.1rem, 9vw, 3.2rem); }
    .tagline { font-size: 1.02rem; margin-bottom: 12px; }
    .btn-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    .features, .guide-toc ul, .eco-grid { grid-template-columns: 1fr; }
    .guide-card { scroll-margin-top: 110px; }
    .vault-door { margin-inline: -22px; margin-bottom: -34px; padding-inline: 22px; }
    .status-bar .sb-steps { margin-left: 0; }
    .road-step { flex-wrap: wrap; }
    .road-step .rs-eta { margin-left: 38px; }
    .pack-row { gap: 10px; }
    .pack-row .pix-card { --card-w: 96px; }
}

@media (max-width: 560px) {
    body { padding-bottom: 20px; }
    .container { padding: 28px 18px; }
    .brand-mark { font-size: 0.8rem; letter-spacing: 0.1em; }
    .eyebrow { font-size: 0.66rem; letter-spacing: 0.2em; }
    .feature-card, .guide-card, .guide-toc { padding: 20px; }
    .ladder { grid-template-columns: repeat(2, 1fr); }
    .hud-chip { padding: 8px 12px; }
    .pack-row .pix-card { --card-w: 88px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
    .pix-card .pc-foil { animation: none; }
}
