/* ================= GLOBAL STYLE SYSTEM ================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/remixicon@4.5.0/fonts/remixicon.css');

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

:root {
    --bg-0: #040a12;
    --bg-1: #091524;
    --bg-2: #0f2134;
    --text: #ecfbf3;
    --muted: #a3c2b4;

    --primary: #39d798;
    --primary-strong: #6affc4;
    --primary-soft: rgba(57, 215, 152, 0.2);
    --primary-soft-2: rgba(57, 215, 152, 0.1);

    --accent: #d5f5e8;
    --line: rgba(144, 233, 197, 0.28);
    --line-strong: rgba(144, 233, 197, 0.45);

    --panel: rgba(8, 19, 31, 0.7);
    --panel-strong: rgba(9, 22, 35, 0.82);
    --card-bg: rgba(10, 22, 35, 0.72);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-soft: 0 24px 56px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 36px rgba(57, 215, 152, 0.2);
    --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(70% 55% at 8% 8%, rgba(57, 215, 152, 0.16), transparent 62%),
        radial-gradient(75% 50% at 90% 10%, rgba(57, 215, 152, 0.11), transparent 65%),
        linear-gradient(180deg, var(--bg-0), var(--bg-1) 46%, var(--bg-2));
    color: var(--text);
    font-family: "Outfit", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
}

img,
canvas,
svg {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
nav a,
.btn,
.engage-btn {
    font-family: "Space Grotesk", "Outfit", sans-serif;
}

h1,
h2,
h3 {
    color: #f4fff9;
    letter-spacing: 0.25px;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.2rem, 6.2vw, 5.2rem);
    text-transform: uppercase;
}

h2 {
    font-size: clamp(1.55rem, 3.2vw, 2.5rem);
}

h3 {
    font-size: clamp(1rem, 2.2vw, 1.35rem);
}

p,
li {
    color: var(--muted);
}

ul {
    margin-top: 14px;
    margin-left: 20px;
}

li {
    margin-bottom: 8px;
}

a {
    color: inherit;
}

/* ================= NAV ================= */

nav {
    position: sticky;
    top: 0;
    z-index: 120;
    width: 100%;
    padding: 14px clamp(16px, 6vw, 110px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(7, 16, 27, 0.76);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px) saturate(122%);
}

nav > div:first-child {
    color: #f6fff9;
    font-size: 1rem;
    letter-spacing: 0.4px;
}

.brand-identity {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(161, 246, 212, 0.55);
    box-shadow: 0 0 18px rgba(57, 215, 152, 0.35);
}

.brand-text {
    letter-spacing: 0.5px;
}

nav > div:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
}

nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d5efe2;
    text-decoration: none;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.78px;
    padding: 4px 0;
    transition: color 0.25s var(--ease);
}

nav a i {
    font-size: 0.9rem;
    color: rgba(171, 248, 216, 0.9);
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transition: width 0.32s var(--ease);
}

nav a:hover,
nav a:focus-visible {
    color: #ffffff;
}

nav a[aria-current="page"] {
    color: #ffffff;
}

nav a:hover::after,
nav a:focus-visible::after,
nav a[aria-current="page"]::after {
    width: 100%;
}

/* ================= LAYOUT ================= */

section,
.hero,
footer {
    padding-left: clamp(16px, 8vw, 150px);
    padding-right: clamp(16px, 8vw, 150px);
}

section {
    padding-top: clamp(64px, 8vw, 108px);
    padding-bottom: clamp(64px, 8vw, 108px);
    content-visibility: auto;
    contain-intrinsic-size: 1px 920px;
}

.hero {
    padding-top: clamp(88px, 10vw, 150px);
    padding-bottom: clamp(84px, 10vw, 140px);
    text-align: center;
}

.hero h1,
.slide-up h1 {
    text-shadow: 0 0 36px rgba(58, 219, 155, 0.28);
}

.hero p,
.slide-up > p {
    max-width: 880px;
    margin-top: 16px;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

/* ================= SURFACES ================= */

.panel,
.card {
    background: linear-gradient(160deg, rgba(12, 26, 40, 0.82), rgba(8, 18, 29, 0.68));
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px) saturate(122%);
    box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(217, 255, 236, 0.05);
}

.panel {
    margin-top: 26px;
    padding: clamp(20px, 4vw, 38px);
    border-radius: var(--radius-lg);
}

.panel p + p {
    margin-top: 12px;
}

.grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(14px, 2.5vw, 26px);
}

.card {
    position: relative;
    overflow: hidden;
    padding: clamp(18px, 3vw, 28px);
    transition: transform 0.26s var(--ease), border-color 0.26s var(--ease), box-shadow 0.26s var(--ease);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3), 0 0 18px rgba(57, 215, 152, 0.18);
}

/* ================= INTERACTIVE SURFACES ================= */

.interactive-surface {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    transition: transform 0.2s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
    --mx: 50%;
    --my: 50%;
}

.interactive-surface::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.22s var(--ease);
    background:
        radial-gradient(340px circle at var(--mx) var(--my), rgba(145, 246, 206, 0.16), transparent 60%),
        linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 45%);
}

.interactive-surface::after {
    content: "";
    position: absolute;
    inset: -2px;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.24s var(--ease);
    box-shadow:
        inset 0 0 0 1px rgba(168, 250, 216, 0.16),
        0 0 28px rgba(57, 215, 152, 0.24);
}

.interactive-surface.is-hover {
    border-color: var(--line-strong);
    box-shadow:
        0 24px 42px rgba(0, 0, 0, 0.34),
        0 0 24px rgba(57, 215, 152, 0.22),
        inset 0 0 0 1px rgba(213, 255, 235, 0.08);
}

.interactive-surface.is-hover::before,
.interactive-surface.is-hover::after,
.interactive-surface:focus-within::before,
.interactive-surface:focus-within::after {
    opacity: 1;
}

.interactive-surface > * {
    position: relative;
    z-index: 2;
}

/* ================= ACTIONS ================= */

.btn,
.engage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    min-height: 42px;
    padding: 11px 18px;
    border: 1px solid rgba(150, 238, 202, 0.48);
    border-radius: 12px;
    background: linear-gradient(120deg, #1f6146, #38b17f);
    color: #f4fff9;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.35px;
    cursor: pointer;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease);
    box-shadow: 0 10px 24px rgba(56, 177, 127, 0.25);
}

button.btn {
    font-family: inherit;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn:hover,
.btn:focus-visible,
.engage-btn:hover,
.engage-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(56, 177, 127, 0.34), var(--shadow-glow);
    filter: brightness(1.03);
}

/* ================= FORMS / TABLES ================= */

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(8, 18, 29, 0.55);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(130, 220, 183, 0.14);
    text-align: left;
}

th {
    color: #eafcf3;
    background: rgba(12, 25, 39, 0.8);
}

input,
select,
textarea,
button {
    font: inherit;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    color: #e7fff2;
    background: rgba(8, 17, 28, 0.72);
    border: 1px solid rgba(141, 232, 194, 0.34);
    border-radius: 12px;
}

input::placeholder,
textarea::placeholder {
    color: rgba(184, 220, 204, 0.78);
}

/* ================= SLIDERS / STATUS ================= */

.slider-group {
    margin-top: 14px;
}

.slider-group label {
    display: block;
    margin-bottom: 8px;
    color: #d4efdf;
    font-size: 0.82rem;
    letter-spacing: 0.4px;
}

input[type="range"] {
    width: 100%;
    appearance: none;
    background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #184734, #2f8663);
    border: 1px solid rgba(133, 226, 187, 0.3);
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(236, 255, 247, 0.75);
    background: linear-gradient(180deg, #93ffd4, #3cd394);
    margin-top: -6px;
    box-shadow: 0 0 14px rgba(60, 211, 148, 0.52);
}

input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #184734, #2f8663);
    border: 1px solid rgba(133, 226, 187, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(236, 255, 247, 0.75);
    border-radius: 50%;
    background: linear-gradient(180deg, #93ffd4, #3cd394);
    box-shadow: 0 0 14px rgba(60, 211, 148, 0.52);
}

.status-box {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(8, 17, 28, 0.8);
    color: var(--muted);
    line-height: 1.75;
}

.status {
    color: #f0fff7;
    font-weight: 700;
}

.kpi-bar,
.meter {
    margin-top: 16px;
    height: 16px;
    width: 100%;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(5, 12, 20, 1);
}

.kpi-fill,
.meter-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1f5a40, #39d798, #73ffca);
    transition: width 0.45s var(--ease);
}

#simChart {
    margin-top: 18px;
    min-height: 230px;
}

/* ================= FOOTER ================= */

footer {
    margin-top: 20px;
    padding-top: 34px;
    padding-bottom: 34px;
    text-align: center;
    color: rgba(190, 226, 209, 0.85);
    font-size: 0.8rem;
    border-top: 1px solid var(--line);
    background: rgba(6, 12, 20, 0.88);
}

/* ================= ACCESSIBILITY ================= */

a:focus-visible,
.btn:focus-visible,
.engage-btn:focus-visible,
input[type="range"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(177, 247, 220, 0.9);
    outline-offset: 2px;
}

/* ================= PAGE-SPECIFIC UTILITIES ================= */

.top-action-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 14px;
    align-items: stretch;
}

.top-action-main,
.top-action-side,
.compare-cell,
.download-card,
.hero-kpi,
.stat-chip,
.release-banner,
.quick-rail .quick-btn,
.palette-box,
.walkthrough-box {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(11, 23, 36, 0.82), rgba(9, 18, 30, 0.7));
}

.top-action-main,
.top-action-side,
.compare-cell,
.download-card,
.walkthrough-box {
    padding: 16px;
}

.action-button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 10px;
}

.stat-chip-row,
.hero-kpis {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 10px;
}

.hero-kpis {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.stat-chip,
.hero-kpi {
    padding: 10px;
}

.stat-chip strong,
.hero-kpi strong {
    display: block;
    color: #f4fff9;
    font-size: 1rem;
}

.stat-chip span,
.hero-kpi span {
    color: var(--muted);
    font-size: 0.75rem;
}

.release-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(136, 230, 191, 0.36);
    color: #e9fff4;
    background: rgba(11, 23, 36, 0.74);
    font-size: 0.72rem;
}

.release-chip-value {
    margin-left: 4px;
}

.release-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.8rem;
}

.release-banner {
    position: sticky;
    top: 62px;
    z-index: 95;
    margin: 0 clamp(16px, 6vw, 120px);
    margin-top: 10px;
    padding: 10px 14px;
    display: flex;
    gap: 10px 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.release-banner strong {
    color: #f1fff8;
}

.release-banner p {
    margin: 0;
    color: #cde8da;
    font-size: 0.82rem;
}

.quick-rail {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 120;
    display: grid;
    gap: 8px;
}

.quick-rail .quick-btn {
    min-width: 132px;
    padding: 8px 11px;
    color: #e8fff2;
    font-size: 0.74rem;
    text-decoration: none;
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.quick-rail .quick-btn:hover,
.quick-rail .quick-btn:focus-visible {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    box-shadow: 0 0 20px rgba(57, 215, 152, 0.16);
}

.palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 220;
    background: rgba(2, 8, 14, 0.76);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 20px;
}

.palette-overlay.open {
    display: flex;
}

.palette-box {
    width: min(760px, 96vw);
    max-height: 72vh;
    overflow: hidden;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
}

.palette-input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(136, 230, 191, 0.28);
    background: rgba(10, 19, 31, 0.92);
    color: #f0fff8;
    padding: 14px 16px;
    font-size: 0.95rem;
    border-radius: 0;
}

.palette-results {
    max-height: calc(72vh - 56px);
    overflow: auto;
}

.palette-item {
    display: grid;
    gap: 4px;
    padding: 11px 14px;
    border-top: 1px solid rgba(136, 230, 191, 0.14);
    text-decoration: none;
}

.palette-item:first-child {
    border-top: 0;
}

.palette-item:hover,
.palette-item.active {
    background: rgba(57, 215, 152, 0.1);
}

.palette-item strong {
    color: #f2fff9;
    font-size: 0.85rem;
}

.palette-item span {
    color: #b6d4c5;
    font-size: 0.74rem;
}

.compare-grid,
.download-enhanced {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
}

.download-enhanced {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.compare-graph {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(131, 222, 184, 0.2);
    display: grid;
    gap: 8px;
}

.compare-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
    align-items: center;
}

.compare-row span {
    color: #d3ecde;
    font-size: 0.74rem;
}

.compare-row b {
    display: block;
    height: 10px;
    border: 1px solid rgba(139, 230, 193, 0.32);
    background: linear-gradient(90deg, #245f45, #39d798);
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.download-meta span,
.timeline-filter button {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    color: #e5fff1;
    border: 1px solid rgba(141, 232, 194, 0.32);
    background: rgba(8, 16, 27, 0.8);
}

.timeline-filter {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-filter button {
    cursor: pointer;
}

.timeline-filter button.active {
    border-color: rgba(141, 232, 194, 0.56);
    background: rgba(57, 215, 152, 0.16);
}

.walkthrough-overlay {
    position: fixed;
    inset: 0;
    z-index: 230;
    display: none;
    place-items: center;
    background: rgba(2, 8, 14, 0.78);
    padding: 16px;
}

.walkthrough-overlay.open {
    display: grid;
}

.walkthrough-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 980px) {
    nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }

    nav > div:last-child {
        width: 100%;
        justify-content: flex-start;
    }

    .release-banner {
        top: 102px;
    }

    .quick-rail {
        display: none;
    }
}

@media (max-width: 760px) {
    nav {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    nav > div:first-child {
        font-size: 0.94rem;
    }

    nav > div:last-child {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        width: 100%;
        padding-bottom: 4px;
        gap: 8px;
    }

    nav a {
        white-space: nowrap;
        flex: 0 0 auto;
        font-size: 0.7rem;
    }

    nav a i {
        font-size: 0.84rem;
    }

    .hero-kpis {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }

    .compare-grid,
    .download-enhanced,
    .top-action-grid,
    .action-button-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    h1 {
        font-size: clamp(1.9rem, 9vw, 2.7rem);
    }

    h2 {
        font-size: clamp(1.3rem, 6.6vw, 1.8rem);
    }

    h3 {
        font-size: clamp(1rem, 4.8vw, 1.2rem);
    }

    section {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .hero {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .panel,
    .card {
        border-radius: 14px;
    }

    .btn,
    .engage-btn {
        width: 100%;
    }

    button.btn {
        margin-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .interactive-surface {
        transform: none !important;
    }

    .interactive-surface::before,
    .interactive-surface::after {
        display: none;
    }
}

body.perf-lite {
    --shadow-soft: 0 14px 28px rgba(0, 0, 0, 0.32);
    --shadow-glow: 0 0 14px rgba(57, 215, 152, 0.14);
}

body.perf-lite .panel,
body.perf-lite .card {
    backdrop-filter: none;
}

body.perf-lite .interactive-surface {
    transform: none !important;
}

