:root {
    --bg: #080d1f;
    --surface: rgba(12, 18, 40, 0.7);
    --surface-soft: rgba(20, 28, 56, 0.56);
    --text: #e9efff;
    --muted: rgba(233, 239, 255, 0.76);
    --line: rgba(233, 239, 255, 0.16);
    --accent: #6cf0ff;
    --accent-2: #9f7cff;
    --success: #62f2ab;
    --danger: #ff6f91;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 10, 26, 0.3), rgba(6, 10, 26, 0.75));
    z-index: -1;
    pointer-events: none;
}

body.theme-solar::before {
    background:
        radial-gradient(circle at 20% 12%, rgba(108, 240, 255, 0.2), transparent 42%),
        radial-gradient(circle at 82% 10%, rgba(159, 124, 255, 0.22), transparent 46%),
        linear-gradient(180deg, rgba(4, 10, 28, 0.32), rgba(4, 10, 28, 0.8));
}

body.theme-comic::before {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 111, 145, 0.22), transparent 40%),
        radial-gradient(circle at 88% 16%, rgba(255, 225, 107, 0.18), transparent 42%),
        radial-gradient(circle at 50% 88%, rgba(122, 255, 214, 0.14), transparent 45%),
        linear-gradient(180deg, rgba(18, 8, 34, 0.38), rgba(22, 10, 45, 0.82));
}

.unicorn-background {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

body.with-video-bg .unicorn-background {
    display: none;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.glass {
    background: var(--surface);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--muted);
    margin-top: -1rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 13, 31, 0.5);
    backdrop-filter: blur(12px);
}

.nav-container {
    width: min(1120px, 92vw);
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.25rem;
}

.nav-link {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
}

.hero {
    padding-top: 7rem;
    padding-bottom: 3rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    gap: 3rem;
}

.hero-content {
    max-width: 700px;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1.15;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1.8rem;
    max-width: 65ch;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.stat-item {
    padding: 1.5rem 1.2rem;
    background: rgba(12, 18, 40, 0.4);
    border: 1px solid var(--line);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(12, 18, 40, 0.6);
    border-color: var(--accent);
    transform: translateY(-4px);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--muted);
    max-width: 58ch;
    margin-bottom: 1.4rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn {
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.72rem 1.15rem;
    font-weight: 600;
    transition: 0.25s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #061021;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn-ghost {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hero-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.metric-card {
    border-radius: 16px;
    padding: 1rem;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.metric-label {
    color: var(--muted);
    font-size: 0.85rem;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.card {
    border-radius: 20px;
    padding: 1.2rem;
}

.card h3 {
    margin-bottom: 0.6rem;
}

.card p {
    color: var(--muted);
}

.chip-row {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    border: 1px solid var(--line);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
}

.page-header {
    padding-top: 8rem;
    padding-bottom: 2rem;
}

.page-header-box {
    border-radius: 22px;
    padding: 2rem;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stack {
    display: grid;
    gap: 1rem;
}

.timeline {
    position: relative;
    padding-left: 1.2rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -0.12rem;
    top: 0.4rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--accent);
}

.media-frame {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: #030815;
}

.media-frame iframe,
.media-frame video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
}

.media-frame img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.calc-input {
    width: 100%;
    margin-top: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 0.72rem;
}

.calc-input:focus {
    outline: none;
    border-color: var(--accent);
}

.results-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.7rem;
}

.result {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.7rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
}

.result strong {
    display: block;
    color: var(--accent);
}

.footer {
    margin-top: 3rem;
    padding: 2rem 0 2.5rem;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-link {
    color: var(--muted);
    font-size: 1.2rem;
    transition: 0.2s ease;
}

.social-link:hover {
    color: var(--text);
}

@media (max-width: 900px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .split {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 72px;
        right: 4vw;
        left: 4vw;
        padding: 0.9rem;
        flex-direction: column;
        border: 1px solid var(--line);
        background: rgba(8, 13, 31, 0.94);
        backdrop-filter: blur(8px);
        border-radius: 14px;
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }
}
