:root {
    --bg: #000000;
    --surface: #0A0A0A;
    --surface2: #121212;
    --border: #1A1A1A;
    --hover: #151515;
    --text: #FFFFFF;
    --text2: #B8B8B8;
    --text3: #7A7A7A;
    --accent: #950606;
    --accent2: #5C0D0D;
    --accent3: #3A0A0A;
    --radius: 8px;
    --radius-lg: 14px;
    --maxw: 1140px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background .25s var(--ease), color .25s var(--ease);
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent3); color: var(--text); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: 64px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    transition: transform .3s var(--ease);
}

.nav__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 36px;
}

.brand {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.brand__mark {
    width: 22px;
    height: 22px;
    position: relative;
    flex-shrink: 0;
}

.brand__mark::before,
.brand__mark::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--accent);
    border-radius: 3px;
}

.brand__mark::after {
    transform: rotate(45deg) scale(0.62);
    border-color: var(--text);
    opacity: 0.55;
}

.brand em { font-style: normal; color: var(--accent); }

.nav__links {
    display: flex;
    gap: 28px;
    list-style: none;
    flex: 1;
}

.nav__links a {
    font-size: 14px;
    color: var(--text2);
    transition: color .18s var(--ease);
    position: relative;
    padding: 4px 0;
}

.nav__links a:hover { color: var(--text); }

.nav__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-family: var(--mono);
    color: var(--text3);
    margin-left: auto;
}

.nav__dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: var(--text3);
    box-shadow: 0 0 0 0 transparent;
}

.nav__dot--on {
    background: #2ecc71;
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46,204,113,0.4); }
    70% { box-shadow: 0 0 0 6px rgba(46,204,113,0); }
    100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .18s var(--ease);
    white-space: nowrap;
}

.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent2); border-color: var(--accent2); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text2); border-color: var(--border); }
.btn--ghost:hover { background: var(--hover); color: var(--text); border-color: var(--text3); }
.btn--sm { padding: 7px 14px; font-size: 13px; }

.main { padding-top: 64px; }

.hero {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 80px;
    overflow: hidden;
}

.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    opacity: 0.5;
    pointer-events: none;
}

.hero__glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(149,6,6,0.18), transparent 65%);
    pointer-events: none;
}

.hero__content { position: relative; z-index: 1; max-width: 820px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent3) 60%, transparent);
    border: 1px solid var(--accent2);
    padding: 5px 14px;
    border-radius: 99px;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(38px, 6.5vw, 72px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.04;
    margin-bottom: 22px;
}

.hero h1 em { font-style: normal; color: var(--accent); }

.hero__lead {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text2);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero__stats {
    display: flex;
    gap: 56px;
    margin-top: 72px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.stat__num {
    font-family: var(--mono);
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat__label {
    font-size: 13px;
    color: var(--text3);
    margin-top: 6px;
}

.section { padding: 90px 0; }
.section + .section { border-top: 1px solid var(--border); }

.section__head { max-width: 620px; margin-bottom: 52px; }

.label {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section h2 {
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.12;
    margin-bottom: 14px;
}

.section__lead { font-size: 16px; color: var(--text2); line-height: 1.65; }

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease);
}

.card:hover { border-color: var(--accent2); transform: translateY(-3px); background: var(--surface2); }

.card__ix {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent3) 55%, transparent);
    border: 1px solid var(--accent2);
    font-size: 21px;
    margin-bottom: 22px;
}

.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 9px; letter-spacing: -0.01em; }
.card p { font-size: 14px; color: var(--text2); line-height: 1.6; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-family: var(--mono);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.chip--beginner { background: rgba(46,204,113,0.1); color: #5fd68f; border: 1px solid rgba(46,204,113,0.22); }
.chip--intermediate { background: rgba(230,180,40,0.1); color: #e6b428; border: 1px solid rgba(230,180,40,0.22); }
.chip--advanced { background: rgba(149,6,6,0.14); color: #d14545; border: 1px solid rgba(149,6,6,0.3); }
.chip--expert { background: rgba(149,6,6,0.2); color: #ef5959; border: 1px solid var(--accent); }
.chip--accent { background: var(--accent3); color: #d14545; border: 1px solid var(--accent2); }

.labrow {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color .18s var(--ease), background .18s var(--ease);
}

.labrow:hover { border-color: var(--accent2); background: var(--surface2); }

.labrow__ix {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent3) 55%, transparent);
    border: 1px solid var(--accent2);
    font-size: 19px;
    flex-shrink: 0;
}

.labrow__body { flex: 1; min-width: 0; }
.labrow__title { font-size: 15px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.labrow__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.labrow__cat { font-size: 12px; color: var(--text3); font-family: var(--mono); }
.labrow__xp {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin-left: auto;
    white-space: nowrap;
}

.stack { display: flex; flex-direction: column; gap: 12px; }

.rank-track { display: flex; flex-direction: column; gap: 2px; }

.rank-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    transition: background .16s var(--ease);
}

.rank-row:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.rank-row:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.rank-row:hover { background: var(--surface2); }

.rank-row__dot { width: 10px; height: 10px; border-radius: 99px; flex-shrink: 0; }
.rank-row__name { font-weight: 600; font-size: 15px; }
.rank-row__es { font-size: 13px; color: var(--text3); }
.rank-row__xp { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--text2); }

.theme-showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.theme-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .18s var(--ease), transform .18s var(--ease);
}

.theme-card:hover { border-color: var(--text3); transform: translateY(-2px); }
.theme-card.active { border-color: var(--accent); }

.theme-card__preview { height: 88px; display: flex; }
.theme-card__swatch { flex: 1; }
.theme-card__info { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.theme-card__name { font-size: 14px; font-weight: 600; }
.theme-card__badge { font-size: 10px; font-family: var(--mono); color: var(--accent); text-transform: uppercase; }

.cta-band { text-align: center; padding: 96px 24px; position: relative; }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 16px; }
.cta-band p { color: var(--text2); font-size: 17px; max-width: 480px; margin: 0 auto 32px; }

.notice {
    background: color-mix(in srgb, var(--accent3) 40%, transparent);
    border: 1px solid var(--accent2);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text2);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    color: var(--text3);
    font-size: 13px;
}

.footer__inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.footer a { color: var(--text3); transition: color .16s var(--ease); }
.footer a:hover { color: var(--text2); }
.footer__links { display: flex; gap: 20px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.theme-switch {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 90;
    display: flex;
    gap: 6px;
    padding: 8px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 99px;
}

.theme-switch__dot {
    width: 22px;
    height: 22px;
    border-radius: 99px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .16s var(--ease), border-color .16s var(--ease);
}

.theme-switch__dot:hover, .theme-switch__dot.active { transform: scale(1.15); border-color: var(--text); }

@media (max-width: 768px) {
    .nav__links { display: none; }
    .hero__stats { gap: 36px; }
    .footer__inner { flex-direction: column; text-align: center; }
    .theme-switch { bottom: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .reveal { opacity: 1; transform: none; }
}
