:root {
    color-scheme: dark;
    --bg: #060b13;
    --panel: rgba(16, 25, 38, 0.4);
    --panel-strong: rgba(19, 28, 42, 0.7);
    --line: rgba(138, 166, 192, 0.15);
    --line-glow: rgba(29, 147, 229, 0.4);
    --text: #f0f6fc;
    --muted: #8b9bb4;
    --accent: #1d93e5;
    --accent-soft: #5ebaf5;
    --accent-glow: rgba(29, 147, 229, 0.35);
    --shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --content-width: 1180px;
}

* {
    box-sizing: border-box;
}

::selection {
    background: rgba(29, 147, 229, 0.35);
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

::-moz-selection {
    background: rgba(29, 147, 229, 0.35);
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-soft) transparent;
    scroll-padding-top: 140px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(29, 147, 229, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(29, 147, 229, 0.6);
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 85%);
    z-index: 0;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

.main-wrapper {
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 147, 229, 0.15) 0%, transparent 70%);
    top: 100px;
    left: -150px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    z-index: 0;
    animation: floatGlow 12s ease-in-out infinite alternate;
}

.ambient-glow.glow-2 {
    top: 20%;
    left: auto;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 15s;
}

.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 147, 229, 0.12) 0%, transparent 50%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-300px, -300px);
    z-index: 9999;
    will-change: transform;
    opacity: 0;
    transition: opacity 800ms ease;
    mix-blend-mode: screen;
}

body:hover .cursor-glow {
    opacity: 1;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

.page-shell {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 0 auto;
    padding-bottom: 48px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    backdrop-filter: blur(24px) saturate(180%);
    background: rgba(8, 12, 18, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.topbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 40px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: inline-block;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 10px 30px var(--accent-glow);
    object-fit: cover;
}

.brand-icon {
    background: #1d93e5;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.brand-text span {
    color: var(--muted);
    font-size: 0.82rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    position: relative;
    transition: color 180ms ease, text-shadow 180ms ease;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-soft);
    box-shadow: 0 0 8px var(--accent-glow);
    border-radius: 2px;
    transition: all 300ms ease;
    transform: translateX(-50%);
}

.nav a:hover,
.nav a:focus-visible {
    color: var(--text);
}

.nav a.is-active {
    color: var(--accent-soft);
    text-shadow: 0 0 12px var(--accent-glow);
}

.nav a.is-active::after {
    width: 100%;
}

.lang-switch {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.lang-button {
    min-width: 48px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 250ms cubic-bezier(0.4, 0, 0.2, 1), color 250ms ease, box-shadow 250ms ease;
}

.lang-button.is-active {
    background: linear-gradient(135deg, #5ebaf5, #1d93e5);
    color: #020810;
    font-weight: 700;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.hero,
.section,
.footer {
    position: relative;
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 96px);
    padding: 24px 0 20px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent-soft);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.highlight-card h2 {
    margin: 0;
    font-family: "Outfit", sans-serif;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    padding-bottom: 0.15em;
    background: linear-gradient(to bottom right, #ffffff, #a2bad8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 {
    max-width: none;
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    filter: drop-shadow(0 0 18px rgba(29, 147, 229, 0.5));
}

.hero-subtitle {
    margin: 10px 0 0;
    color: #dcebe3;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    line-height: 1.38;
    max-width: 50ch;
}

.hero-text,
.section-heading,
.feature-card p,
.lineage-copy p,
.highlight-list p,
.footer p {
    color: var(--muted);
    line-height: 1.72;
}

.hero-text {
    max-width: 62ch;
    margin: 14px 0 0;
    font-size: 0.96rem;
    line-height: 1.64;
}

.hero-copy {
    max-width: 820px;
    margin: 0 auto;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 20px 0 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 300ms ease;
}

.button:hover::after {
    opacity: 1;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-4px) scale(1.02);
}

.button-primary {
    color: #020810;
    background: linear-gradient(135deg, #5ebaf5, #1d93e5);
    box-shadow: 0 12px 30px var(--accent-glow);
}

.button-primary:hover {
    box-shadow: 0 16px 40px rgba(29, 147, 229, 0.5);
}

.button-secondary {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.hero-points {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    margin: 0 auto;
    gap: 12px;
    padding: 0;
    list-style: none;
    text-align: left;
}

.hero-points li {
    position: relative;
    padding-left: 22px;
    color: #d8e6de;
    font-size: 0.95rem;
    line-height: 1.5;
}

.hero-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-soft);
    box-shadow: 0 0 16px var(--accent-soft);
}

.feature-card,
.highlight-card,
.footer,
.lineage-rail {
    backdrop-filter: blur(18px);
}

.highlight-list strong,
.feature-card h3 {
    display: block;
}

.section {
    padding: 68px 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-heading h2,
.highlight-card h2 {
    font-size: clamp(2rem, 4vw, 3.6rem);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.feature-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(20, 25, 36, 0.6), rgba(10, 14, 20, 0.4));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 400ms ease, box-shadow 400ms ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--line-glow);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(29, 147, 229, 0.1) inset;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-index {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--accent-soft);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
}

.feature-card h3 {
    margin: 0 0 12px;
    font-size: 1.32rem;
}

.feature-card p {
    margin: 0;
}

.fork-section {
    overflow: hidden;
}

.lineage-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.lineage-rail {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.lineage-rail span {
    position: relative;
    padding-left: 20px;
    color: #dceae3;
}

.lineage-rail span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    transition: transform 300ms ease, background 300ms ease;
}

.lineage-rail span:hover::before {
    transform: scale(1.5);
    background: #5ebaf5;
}

.lineage-rail span:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1.2em;
    width: 1px;
    height: calc(100% - 0.2em);
    background: var(--line);
    z-index: -1;
}

.lineage-copy {
    padding: 8px 0;
}

.lineage-copy p {
    margin: 0 0 16px;
    font-size: 1.06rem;
}

.highlight-card {
    padding: 40px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(29, 147, 229, 0.2), transparent 40%),
        linear-gradient(135deg, rgba(20, 26, 34, 0.8), rgba(10, 13, 18, 0.9));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.highlight-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.highlight-list div {
    padding: 24px 20px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 300ms ease, background 300ms ease;
}

.highlight-list div:hover {
    transform: translateY(-4px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.1);
}

.highlight-list p {
    margin: 10px 0 0;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding: 26px 0 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.footer a {
    color: var(--accent-soft);
    text-decoration: none;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms cubic-bezier(0.165, 0.84, 0.44, 1), transform 800ms cubic-bezier(0.165, 0.84, 0.44, 1);
}


.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@media (max-width: 980px) {
    .hero {
        min-height: auto;
        padding-top: 20px;
    }

    .hero h1 {
        max-width: none;
    }

    .feature-grid,
    .highlight-list,
    .lineage-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-shell {
        width: min(calc(100% - 20px), var(--content-width));
    }

    .topbar-inner {
        padding: 16px 20px;
        position: relative;
    }

    .topbar-inner,
    .footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .topbar-actions {
        width: 100%;
        display: block;
    }

    .nav {
        gap: 14px;
        font-size: 0.95rem;
    }

    .lang-switch {
        position: absolute;
        top: 19px;
        right: 20px;
        transform: scale(0.85);
        transform-origin: top right;
    }

    html {
        scroll-padding-top: 140px;
    }

    .section {
        padding: 54px 0;
    }

    .hero {
        min-height: calc(100vh - 140px);
        padding-top: 20px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        width: 100%;
        margin-top: 32px;
    }

    .button {
        width: 240px;
        min-height: 46px;
        padding: 0;
        font-size: 0.98rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
