* { box-sizing: border-box; }

:root {
    color-scheme: dark;
    --ink: #08050d;
    --ink-soft: #100919;
    --panel: #171020;
    --panel-light: #21152d;
    --purple: #8f3ce8;
    --purple-light: #c277ff;
    --gold: #f0c65a;
    --gold-dark: #aa7922;
    --cream: #fff8e8;
    --text: #f5effa;
    --muted: #ada2b8;
    --line: rgba(255, 255, 255, .1);
    --shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--text);
    background: var(--ink);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

a { color: inherit; }
img { max-width: 100%; }

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    padding: .7rem 1rem;
    color: #130b18;
    background: var(--gold);
    border-radius: 6px;
    transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-nav {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: .55rem clamp(1.25rem, 5vw, 5rem);
    border-bottom: 1px solid var(--line);
    background: rgba(8, 5, 13, .92);
    backdrop-filter: blur(14px);
}

.nav-brand {
    display: block;
    width: 150px;
    height: 60px;
    overflow: hidden;
}

.nav-brand img {
    width: 132%;
    max-width: none;
    height: auto;
    transform: translate(-12%, -26%);
}

.site-nav nav {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.site-nav nav > a,
.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .6rem .9rem;
    border: 0;
    border-radius: 8px;
    color: #d8cede;
    background: transparent;
    font: inherit;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.site-nav nav > a:hover,
.site-nav nav > a:focus-visible,
.nav-link:hover,
.nav-link:focus-visible { color: white; background: rgba(255,255,255,.07); }

.site-nav .nav-cta {
    margin-left: .4rem;
    padding-inline: 1.1rem;
    color: #211208;
    background: linear-gradient(135deg, #ffe190, #d49a30);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible { color: #211208; background: linear-gradient(135deg, #ffebad, #e6ae42); }
.logout-form { margin: 0; }

.home-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    align-items: center;
    min-height: min(780px, calc(100vh - 82px));
    padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 7vw, 7rem);
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(8,5,13,.98) 0%, rgba(8,5,13,.93) 48%, rgba(17,7,28,.68) 100%),
        radial-gradient(circle at 78% 40%, #521077, transparent 40%);
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .18;
    background-image:
        linear-gradient(30deg, transparent 48%, rgba(255,255,255,.08) 49%, transparent 51%),
        linear-gradient(150deg, transparent 48%, rgba(255,255,255,.06) 49%, transparent 51%);
    background-size: 90px 155px;
    mask-image: linear-gradient(90deg, transparent, black);
}

.hero-glow {
    position: absolute;
    z-index: -1;
    width: 520px;
    height: 520px;
    right: 5%;
    top: 50%;
    border-radius: 50%;
    background: #9d38ff;
    filter: blur(160px);
    opacity: .19;
    transform: translateY(-50%);
}

.hero-copy { max-width: 720px; }
.hero-logo { display: none; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--gold);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 32px;
    height: 1px;
    background: currentColor;
}

.home-hero h1,
.auth-intro h1,
.dashboard-hero h1 {
    margin: 1.15rem 0 1.25rem;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    line-height: .96;
    letter-spacing: -.045em;
}

.home-hero h1 { font-size: clamp(3.7rem, 7.3vw, 7.2rem); }
.home-hero h1 span, .dashboard-hero h1 span { color: var(--purple-light); }

.home-hero p {
    max-width: 600px;
    margin: 0;
    color: #c2b7c9;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 2.25rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: .8rem 1.55rem;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
    letter-spacing: .025em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-gold { color: #251507; background: linear-gradient(135deg, #ffe28b, #c8902b); box-shadow: 0 12px 35px rgba(224,171,55,.2); }
.button-gold:hover, .button-gold:focus-visible { box-shadow: 0 15px 40px rgba(224,171,55,.32); }
.button-ghost { border-color: rgba(255,255,255,.2); color: white; background: rgba(255,255,255,.035); }
.button-ghost:hover { border-color: rgba(255,255,255,.4); }
.button-light { color: #20112c; background: white; }
.button-muted { color: #aaa0b2; background: rgba(255,255,255,.08); cursor: not-allowed; }
.button-full { width: 100%; margin-top: .4rem; }

.hero-note { margin-top: 1.35rem; color: #807687; font-size: .78rem; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: .4rem; border-radius: 50%; background: #77d590; box-shadow: 0 0 12px #77d590; }

.rune-card {
    position: relative;
    justify-self: center;
    display: grid;
    place-items: center;
    width: min(36vw, 450px);
    aspect-ratio: 1;
    border: 1px solid rgba(213,163,255,.18);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(177,70,255,.23), rgba(64,16,87,.09) 45%, transparent 70%);
    box-shadow: inset 0 0 80px rgba(194,99,255,.08), 0 0 100px rgba(122,39,191,.12);
}

.rune-card::before, .rune-card::after {
    content: "";
    position: absolute;
    inset: 13%;
    border: 1px solid rgba(241,203,105,.24);
    transform: rotate(45deg);
}
.rune-card::after { inset: 24%; border-color: rgba(194,119,255,.4); transform: rotate(45deg); }
.rune-core { font-family: Georgia, serif; font-size: clamp(5rem, 10vw, 9rem); color: #efe1ff; text-shadow: 0 0 25px #b24cff, 0 0 65px #7b21d1; }
.rune-orbit { position: absolute; inset: 5%; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.orbit-one { clip-path: inset(0 50% 0 0); transform: rotate(25deg); }
.orbit-two { inset: 18%; border-color: rgba(239,196,85,.2); clip-path: inset(50% 0 0 0); transform: rotate(-20deg); }

.feature-section {
    padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 7vw, 7rem);
    background: #0d0912;
}

.section-heading { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.section-heading .eyebrow::before { display: none; }
.section-heading h2, .cta-section h2 {
    margin: .8rem 0;
    font-family: Georgia, serif;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    font-weight: 500;
    line-height: 1.1;
}
.section-heading p { margin: 0; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 1200px; margin: auto; }
.feature-card { position: relative; min-height: 310px; padding: 2rem; border: 1px solid var(--line); background: linear-gradient(145deg, #15101b, #100b15); overflow: hidden; }
.feature-card.featured { border-color: rgba(164,78,233,.42); transform: translateY(-12px); background: linear-gradient(145deg, #251331, #140c1b); }
.feature-number { position: absolute; right: 1.4rem; top: .8rem; color: rgba(255,255,255,.045); font-family: Georgia, serif; font-size: 4.5rem; }
.feature-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 2.5rem; border: 1px solid rgba(229,185,79,.28); color: var(--gold); background: rgba(229,185,79,.06); font-size: 1.45rem; transform: rotate(45deg); }
.feature-icon::first-line { transform: rotate(-45deg); }
.feature-card h3 { margin: 0 0 .7rem; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.feature-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.cta-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.25rem, 8vw, 8rem);
    border-block: 1px solid rgba(240,198,90,.13);
    background: radial-gradient(circle at 30% 50%, rgba(135,45,199,.24), transparent 37%), #110916;
}
.cta-section h2 { margin-bottom: 0; }

.auth-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(420px, .85fr);
    min-height: calc(100vh - 82px);
}

.auth-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(3rem, 8vw, 8rem);
    background: radial-gradient(circle at 25% 40%, rgba(123,33,191,.22), transparent 35%), linear-gradient(145deg, #0c0712, #14091c);
}
.auth-intro h1 { max-width: 600px; font-size: clamp(3.5rem, 6vw, 6rem); }
.auth-intro > p { max-width: 520px; color: var(--muted); font-size: 1.05rem; }
.auth-quote { margin-top: 3rem; padding-left: 1rem; border-left: 1px solid var(--gold); color: #8e8398; font-family: Georgia, serif; font-style: italic; }
.benefit-list { display: grid; gap: .7rem; margin: 2rem 0 0; padding: 0; list-style: none; color: #bfb4c7; }
.benefit-list span { display: inline-grid; place-items: center; width: 21px; height: 21px; margin-right: .6rem; border: 1px solid rgba(240,198,90,.4); border-radius: 50%; color: var(--gold); font-size: .7rem; }

.auth-panel {
    display: grid;
    place-items: center;
    padding: 3rem clamp(1.25rem, 5vw, 5rem);
    background: #0b080f;
}
.auth-card { width: min(100%, 470px); }
.card-heading { margin-bottom: 2rem; }
.card-heading > span, .card-kicker { color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.card-heading h2 { margin: .4rem 0; font-family: Georgia, serif; font-size: 2.6rem; font-weight: 500; }
.card-heading p { margin: 0; color: var(--muted); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: .45rem; color: #d8d0dd; font-size: .82rem; font-weight: 700; }
.field input {
    width: 100%;
    min-height: 52px;
    padding: .75rem .9rem;
    border: 1px solid #342a3c;
    border-radius: 6px;
    outline: none;
    color: white;
    background: #141019;
    font: inherit;
}
.field input:hover { border-color: #51415e; }
.field input:focus { border-color: var(--purple-light); box-shadow: 0 0 0 3px rgba(173,84,243,.13); }
.field small { display: block; margin-top: .3rem; color: #796f80; font-size: .74rem; }
.alert { margin-bottom: 1.2rem; padding: .8rem 1rem; border: 1px solid rgba(234,92,114,.3); border-radius: 6px; color: #ffd8df; background: rgba(137,25,47,.2); font-size: .85rem; }
.form-switch { margin: 1.3rem 0 0; color: #817687; text-align: center; font-size: .84rem; }
.form-switch a { color: var(--gold); font-weight: 700; text-decoration: none; }
.recovery-link { margin: -.35rem 0 1rem; text-align: right; font-size: .8rem; }
.recovery-link a { color: var(--gold); text-decoration: none; }
.alert-success { border-color: rgba(87,210,120,.3); color: #d8ffe1; background: rgba(30,118,55,.2); }

.dashboard { min-height: calc(100vh - 82px); padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1.25rem, 7vw, 7rem); background: radial-gradient(circle at 75% 5%, rgba(128,38,192,.22), transparent 30%), #0b0710; }
.dashboard-hero { display: flex; align-items: center; justify-content: space-between; gap: 2rem; max-width: 1200px; margin: 0 auto 3rem; }
.dashboard-hero h1 { font-size: clamp(3rem, 6vw, 5.5rem); }
.dashboard-hero p { color: var(--muted); }
.account-seal { display: grid; flex: 0 0 auto; place-items: center; width: 110px; height: 110px; border: 1px solid rgba(240,198,90,.45); border-radius: 50%; color: var(--gold); background: radial-gradient(circle, rgba(240,198,90,.12), transparent); font-family: Georgia, serif; font-size: 3rem; box-shadow: 0 0 45px rgba(240,198,90,.08); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 1200px; margin: auto; }
.dashboard-card { min-height: 330px; padding: 2rem; border: 1px solid var(--line); background: linear-gradient(145deg, #19111f, #100b15); }
.dashboard-card h2 { margin: .65rem 0 1rem; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.dashboard-card p { color: var(--muted); }
.account-card dl { margin: 2rem 0 0; }
.account-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.account-card dt { color: #84798b; }
.account-card dd { margin: 0; font-weight: 700; }
.status-pill { color: #91e6a6; font-size: .78rem; }
.status-pill::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .4rem; border-radius: 50%; background: currentColor; }
.purple-card { background: linear-gradient(145deg, #5f1c89, #2c103e); }
.purple-card p { color: #d0bddd; }
.card-symbol { float: right; color: rgba(255,255,255,.13); font-size: 3.5rem; }
.text-link { display: inline-flex; gap: .6rem; margin-top: 1rem; color: var(--gold); font-weight: 800; text-decoration: none; }
.text-link.muted { color: #766b7d; }

.inner-page { background: #0b0710; }
.inner-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    align-items: center;
    gap: 4rem;
    min-height: 570px;
    padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 7vw, 7rem);
    border-bottom: 1px solid var(--line);
    background: radial-gradient(circle at 75% 40%, rgba(136,42,207,.25), transparent 35%), linear-gradient(135deg, #0b0710, #14091c);
}
.inner-hero h1 {
    margin: 1rem 0 1.2rem;
    font-family: Georgia, serif;
    font-size: clamp(3.4rem, 6.5vw, 6.5rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.045em;
}
.inner-hero > div > p { max-width: 620px; color: var(--muted); font-size: 1.05rem; }
.server-status-card { padding: 2rem; border: 1px solid rgba(194,119,255,.3); background: rgba(23,12,31,.78); box-shadow: var(--shadow); }
.server-status-card strong { display: block; margin: 1.25rem 0 .35rem; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.server-status-card p { margin: 0; color: var(--muted); }
.status-heading { color: #d8cbe0; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.steps-section, .vote-section { padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 7vw, 7rem); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 1200px; margin: auto; }
.steps-grid article { position: relative; min-height: 260px; padding: 2rem; border: 1px solid var(--line); background: #15101b; }
.steps-grid article > span { color: var(--gold); font-family: Georgia, serif; font-size: 2rem; }
.steps-grid h3 { margin: 2rem 0 .6rem; font-family: Georgia, serif; font-size: 1.4rem; font-weight: 500; }
.steps-grid p { color: var(--muted); }
.steps-grid a { color: var(--gold); font-size: .85rem; font-weight: 800; text-decoration: none; }
.support-strip { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 4rem clamp(1.25rem, 8vw, 8rem); border-top: 1px solid var(--line); background: #120b18; }
.support-strip h2 { margin: .6rem 0 0; font-family: Georgia, serif; font-size: 2.4rem; font-weight: 500; }
.support-strip p { margin: .4rem 0 0; color: var(--muted); }

.vote-hero { min-height: 500px; }
.vote-total { justify-self: center; display: grid; place-items: center; width: 250px; height: 250px; padding: 2rem; border: 1px solid rgba(240,198,90,.32); border-radius: 50%; text-align: center; background: radial-gradient(circle, rgba(240,198,90,.11), transparent 67%); }
.vote-total span { color: var(--gold); font-family: Georgia, serif; font-size: 6rem; line-height: .8; }
.vote-total p { margin: 0; color: #ad9eb5; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.vote-intro { display: flex; justify-content: space-between; align-items: end; gap: 3rem; max-width: 1200px; margin: 0 auto 2.5rem; }
.vote-intro h2 { margin: .6rem 0 0; font-family: Georgia, serif; font-size: 2.8rem; font-weight: 500; }
.vote-intro > p { max-width: 440px; margin: 0; color: var(--muted); font-size: .86rem; }
.vote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 1200px; margin: auto; }
.vote-site { position: relative; padding: 2rem; border: 1px solid var(--line); background: linear-gradient(145deg, #19111f, #100b15); overflow: hidden; }
.vote-index { position: absolute; right: 1rem; top: .3rem; color: rgba(255,255,255,.04); font-family: Georgia, serif; font-size: 4.5rem; }
.vote-star { color: var(--gold); font-size: 1.7rem; }
.vote-site h3 { margin: 2rem 0 .4rem; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.vote-site p { min-height: 52px; color: var(--muted); font-size: .88rem; }
.vote-site .button { width: 100%; margin-top: 1rem; }
.vote-notice { max-width: 1200px; margin: 1rem auto 0; padding: 1rem 1.2rem; border-left: 2px solid var(--gold); color: #998da1; background: rgba(255,255,255,.025); font-size: .8rem; }
.vote-notice strong { color: #ded4e4; }
.vote-notice p { display: inline; margin-left: .5rem; }

.site-footer { padding: 3rem 1.25rem; border-top: 1px solid var(--line); color: #706776; background: #07050a; text-align: center; }
.footer-brand { display: block; width: 170px; height: 68px; margin: 0 auto; overflow: hidden; }
.footer-brand img {
    width: 132%;
    max-width: none;
    height: auto;
    transform: translate(-12%, -26%);
}
.site-footer p { margin: .2rem 0; font-size: .82rem; }
.site-footer .copyright { margin-top: 1rem; font-size: .7rem; }

@media (max-width: 900px) {
    .home-hero { grid-template-columns: 1fr; text-align: center; }
    .hero-copy { margin: auto; }
    .hero-copy .eyebrow, .hero-actions { justify-content: center; }
    .home-hero p { margin-inline: auto; }
    .rune-card { display: none; }
    .feature-grid, .dashboard-grid, .steps-grid, .vote-grid { grid-template-columns: 1fr; }
    .feature-card.featured { transform: none; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-intro { min-height: 430px; text-align: center; align-items: center; }
    .auth-intro .eyebrow { justify-content: center; }
    .dashboard-card { min-height: 0; }
    .inner-hero { grid-template-columns: 1fr; gap: 2.5rem; }
    .server-status-card { max-width: 520px; }
    .vote-total { justify-self: start; width: 180px; height: 180px; }
    .vote-total span { font-size: 4.5rem; }
    .vote-intro { align-items: flex-start; flex-direction: column; gap: 1rem; }
}

@media (max-width: 620px) {
    .site-nav { min-height: 70px; padding-inline: 1rem; }
    .nav-brand { width: 104px; height: 48px; }
    .site-nav nav { gap: 0; }
    .site-nav nav > a, .nav-link { padding-inline: .6rem; font-size: .78rem; }
    .site-nav .nav-cta { display: none; }
    .site-nav nav > a:first-child { display: none; }
    .home-hero { min-height: calc(100vh - 70px); padding-block: 4rem; }
    .home-hero h1 { font-size: clamp(3.1rem, 16vw, 4.7rem); }
    .hero-actions, .hero-actions .button { width: 100%; }
    .cta-section { align-items: flex-start; flex-direction: column; }
    .auth-intro { min-height: 380px; padding-block: 4rem; }
    .auth-intro h1 { font-size: 3.5rem; }
    .auth-panel { padding-block: 3.5rem; }
    .dashboard-hero { align-items: flex-start; }
    .account-seal { width: 70px; height: 70px; font-size: 2rem; }
    .support-strip { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
