:root {
    color-scheme: dark;
    --bg-space: #0a0a0f;
    --bg-panel: rgba(13, 18, 33, 0.7);
    --glass-border: rgba(255, 255, 255, 0.12);
    --primary: #00ffff;
    --accent: #39ff14;
    --text-primary: #f5f7ff;
    --text-secondary: rgba(229, 235, 255, 0.72);
    --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: var(--bg-space);
    color: var(--text-primary);
    font-family: var(--font-sans);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main {
    display: flex;
    flex-direction: column;
}

.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.globe-container {
    position: absolute;
    inset: 0;
    transition:
        transform 0.6s ease,
        opacity 0.6s ease;
    will-change: transform, opacity;
}

.hero.shrunk .globe-container {
    transform: translate3d(-20vw, -10vh, 0) scale(0.42);
    opacity: 0.65;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.loading-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--bg-space);
    z-index: 10;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-screen p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    max-width: 42rem;
    padding: 5rem clamp(2rem, 4vw, 5rem);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    pointer-events: none;
}

.branding {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.32rem;
    font-size: 0.7rem;
    opacity: 0.85;
}

.badge {
    display: inline-flex;
    width: fit-content;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 18, 33, 0.6);
}

.subheadline {
    margin: 0;
    font-size: 0.7rem;
}

.headline {
    margin: 0;
    font-size: clamp(2.5rem, 4.8vw, 4.2rem);
    line-height: 1.1;
    max-width: 32rem;
}

.hero-copy {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 32rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    pointer-events: auto;
}

.cta {
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.3s ease;
}

.cta.primary {
    color: #03243c;
    background: linear-gradient(135deg, #00ffff, #39ff14);
    box-shadow: 0 0 20px rgba(0, 255, 200, 0.45);
}

.cta.secondary {
    color: var(--text-primary);
    background: rgba(15, 20, 40, 0.65);
    border: 1px solid rgba(0, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.18);
}

.cta:hover {
    transform: translateY(-2px);
}

.metrics {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: auto;
}

.metrics li {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.info-panel {
    position: absolute;
    right: clamp(2rem, 8vw, 8rem);
    bottom: clamp(2rem, 10vh, 8rem);
    min-width: 18rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    z-index: 3;
    display: none;
}

.info-panel.visible {
    display: block;
}

.info-close {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.35rem;
    cursor: pointer;
}

.info-content h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.hud {
    position: absolute;
    inset: 2rem 2rem auto auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 2;
}

.hud-card {
    min-width: 13rem;
    padding: 1rem 1.2rem;
    border-radius: 1rem;
    background: rgba(12, 24, 42, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    font-size: 0.85rem;
}

.hud-title {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.18rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
}

.hud-bar {
    position: relative;
    width: 100%;
    height: 0.4rem;
    border-radius: 999px;
    background: rgba(0, 255, 255, 0.15);
    overflow: hidden;
    margin-bottom: 0.7rem;
}

.hud-bar-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.9),
        rgba(57, 255, 20, 0.9)
    );
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
}

.legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.legend li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.legend li span:first-child {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.6);
}

.legend li[data-type="ground"] span:first-child {
    background: rgba(57, 255, 20, 0.6);
}

.legend li[data-type="flow"] span:first-child {
    border-radius: 0.2rem;
    background: linear-gradient(
        90deg,
        rgba(0, 255, 255, 0.6),
        rgba(57, 255, 20, 0.6)
    );
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    opacity: 0.6;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
}

.chevron {
    width: 0.4rem;
    height: 1.2rem;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.25;
        transform: scaleY(0.7);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

.features-section {
    position: relative;
    padding: clamp(5.5rem, 8vw, 9rem) clamp(2rem, 11vw, 12rem)
        clamp(5rem, 7vw, 7.5rem);
    overflow: hidden;
    background:
        radial-gradient(
            circle at 20% -10%,
            rgba(0, 255, 255, 0.18),
            transparent 60%
        ),
        radial-gradient(
            circle at 80% 0%,
            rgba(57, 255, 20, 0.12),
            transparent 55%
        ),
        var(--bg-space);
}

.features-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.65;
}

.features-gridlines {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 180px 180px;
    transform: skewY(-8deg) scale(1.2);
    animation: drift-grid 32s linear infinite;
}

@keyframes drift-grid {
    0% {
        background-position:
            0 0,
            0 0;
    }
    100% {
        background-position:
            0 360px,
            360px 0;
    }
}

.features-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 4vw, 3.5rem);
}

.features-head {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 56rem;
    opacity: 0;
    transform: translateY(42px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.features-head.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.features-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.28rem;
    font-size: 0.75rem;
    color: rgba(0, 255, 255, 0.75);
}

.features-title {
    margin: 0;
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
    line-height: 1.1;
    text-shadow: 0 0 32px rgba(0, 255, 255, 0.2);
}

.features-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.feature-card {
    --card-padding: clamp(1.8rem, 3vw, 2.4rem);
    position: relative;
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: rgba(9, 14, 26, 0.32);
    border: 1px solid rgba(0, 255, 255, 0.16);
    border-radius: 1.4rem;
    box-shadow: 0 24px 48px rgba(0, 20, 35, 0.45);
    backdrop-filter: blur(12px);
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
    transition:
        opacity 0.8s ease,
        transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.35s ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.22),
        rgba(57, 255, 20, 0)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feature-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 28px 60px rgba(0, 255, 255, 0.28);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover .feature-animation {
    filter: drop-shadow(0 0 16px rgba(0, 255, 255, 0.45));
}

.feature-card:focus-visible {
    outline: 2px solid rgba(0, 255, 255, 0.9);
    outline-offset: 6px;
}

.feature-card h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
}

.feature-card p {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.feature-card--wide {
    grid-column: 3 / span 8;
    align-self: center;
}

.feature-animation {
    --feature-image-focus: 45%;
    --feature-image-shift: 0%;
    height: clamp(160px, 18vw, 220px);
    background: none;
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: filter 0.3s ease;
    display: grid;
    place-items: center;
    line-height: 0;
}

.feature-animation svg {
    max-width: 100%;
    max-height: 100%;
}

.feature-animation img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% var(--feature-image-focus, 45%);
    transform: translateY(var(--feature-image-shift, 0%));
    display: block;
}

.feature-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 0.9rem;
    padding: var(--card-padding);
    background: linear-gradient(
        180deg,
        rgba(9, 14, 26, 0.55),
        rgba(7, 12, 22, 0.82)
    );
    backdrop-filter: blur(22px) saturate(140%);
    border-top: 1px solid rgba(0, 255, 255, 0.12);
    border-radius: 0 0 1.4rem 1.4rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (hover: none) {
    .feature-card:hover {
        transform: translateY(0) scale(1);
        box-shadow: 0 24px 48px rgba(0, 20, 35, 0.45);
    }

    .feature-card:hover::before {
        opacity: 0;
    }
}

@media (max-width: 1100px) {
    .feature-card {
        grid-column: span 12;
    }

    .feature-card--wide {
        grid-column: span 12;
    }
}

@media (max-width: 720px) {
    .features-section {
        padding: 4.5rem 1.8rem 4rem;
    }

    .features-gridlines {
        background-size: 140px 140px;
    }

    .feature-animation {
        height: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .features-gridlines {
        animation-duration: 120s;
    }

    .features-head,
    .feature-card,
    .feature-card:hover {
        transform: none;
        opacity: 1;
        transition: none;
    }
}

.content {
    padding: clamp(4rem, 6vw, 7rem) clamp(2rem, 12vw, 12rem) 6rem;
    display: grid;
    gap: clamp(2.5rem, 5vw, 4rem);
    background:
        radial-gradient(
            circle at top,
            rgba(0, 255, 255, 0.05),
            transparent 55%
        ),
        var(--bg-space);
}

.content h2 {
    margin-top: 0;
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.content p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 58ch;
}

.anchor-targets {
    position: relative;
    height: 0;
    width: 0;
    overflow: hidden;
}

.anchor-targets span {
    display: block;
    height: 0;
    width: 0;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(140px, 18vh, 240px);
    background:
        linear-gradient(
            to top,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(255, 255, 255, 0.08) 40%,
            rgba(255, 255, 255, 0) 100%
        ),
        linear-gradient(
            to top,
            rgba(0, 255, 255, 0.12) 0%,
            rgba(0, 255, 255, 0.03) 40%,
            rgba(0, 255, 255, 0) 100%
        );
    pointer-events: auto;
    touch-action: pan-y;
    z-index: 4;
}

.site-footer {
    position: relative;
    overflow: hidden;
    background: #0f1014;
    border-top: 1px solid rgba(0, 255, 255, 0.08);
    color: #a3adc7;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 20% 0%,
        rgba(0, 255, 255, 0.08),
        transparent 55%
    );
    opacity: 0.6;
    pointer-events: none;
}

.footer-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
}

#footer-sky {
    width: 100%;
    height: 100%;
    display: block;
}

.footer-inner {
    position: relative;
    z-index: 1;
    padding: clamp(3.5rem, 6vw, 4.5rem) clamp(2rem, 10vw, 11rem);
}

.footer-grid {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.footer-column {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-column h3 {
    margin: 0 0 1.1rem;
    font-size: 1.1rem;
    color: #f5f7ff;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.footer-column a {
    color: #a3adc7;
    font-size: 0.95rem;
    transition:
        color 0.2s ease,
        text-decoration-color 0.2s ease;
}

.footer-column a:hover,
.footer-column a:focus {
    color: var(--primary);
    text-decoration: underline;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem 0;
}

.footer-logo svg {
    width: 3rem;
    height: 3rem;
    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.12));
}

.footer-logo h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #ffffff;
}

.footer-brandmark {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.82rem;
    letter-spacing: 0.24rem;
    text-transform: uppercase;
    color: rgba(163, 173, 199, 0.75);
}

.footer-tagline {
    margin: 0;
    max-width: 22rem;
    font-size: 0.98rem;
    color: rgba(229, 235, 255, 0.7);
}

.footer-social {
    list-style: none;
    display: inline-flex;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
}

.footer-social a {
    display: inline-flex;
    width: 2.4rem;
    height: 2.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(19, 26, 40, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.12);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.footer-social svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: rgba(163, 173, 199, 0.85);
    transition: fill 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus {
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(0, 255, 255, 0.45);
    box-shadow: 0 0 16px rgba(0, 255, 255, 0.25);
}

.footer-social a:hover svg,
.footer-social a:focus svg {
    fill: #39ff14;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    padding: 1.2rem 1.5rem;
    font-size: 0.85rem;
    color: rgba(163, 173, 199, 0.65);
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .footer-inner {
        padding: 3.2rem 1.6rem;
    }

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

    .footer-brand {
        order: -1;
    }

    .footer-column ul {
        gap: 0.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-social a {
        transition: none;
    }

    .footer-social svg,
    .footer-column a {
        transition: none;
    }
}

@media (max-width: 960px) {
    .hero-overlay {
        max-width: none;
        padding: 4rem 2.5rem 3.5rem;
    }

    .hud {
        position: static;
        margin: 0 2.5rem 2rem;
        align-items: stretch;
    }

    .info-panel {
        position: fixed;
        inset: auto 1.5rem 1.5rem;
    }

    .hero.shrunk .globe-container {
        transform: translate3d(-40vw, -15vh, 0) scale(0.5);
    }
}

@media (max-width: 640px) {
    .hero {
        height: 110vh;
    }

    .metrics {
        flex-direction: column;
        gap: 0.8rem;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .cta {
        width: 100%;
        text-align: center;
    }

    .hud {
        margin: 0 1.5rem 1.5rem;
    }
}

.lang-switcher {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    gap: 0.5rem;
    z-index: 5;
    pointer-events: auto;
}

.lang-switcher .cta {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    line-height: 1;
}

@media (max-width: 640px) {
    .lang-switcher {
        top: 0.75rem;
        left: 0.75rem;
    }
}
