:root { color-scheme: dark; }
* { box-sizing: border-box; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    background:
        radial-gradient(circle at 50% -10%, rgba(24,200,255,.12), transparent 25%),
        radial-gradient(circle at 80% 0%, rgba(168,85,247,.10), transparent 20%),
        linear-gradient(180deg, #030816 0%, #040a18 24%, #030713 55%, #030816 100%);
    color: #eef4ff;
    overflow-x: hidden;
}

.noise::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .045;
    background-image:
        radial-gradient(circle at 25% 30%, rgba(255,255,255,.9) .55px, transparent .8px),
        radial-gradient(circle at 75% 60%, rgba(255,255,255,.8) .6px, transparent .9px),
        radial-gradient(circle at 10% 80%, rgba(255,255,255,.6) .5px, transparent .8px);
    background-size: 70px 70px, 95px 95px, 120px 120px;
    z-index: 4;
    mix-blend-mode: screen;
}

.section-line { position: relative; }
.section-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 1200px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
}

.glass {
    background: linear-gradient(180deg, rgba(11,19,38,.88), rgba(7,13,28,.86));
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 16px 60px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.glass-soft {
    background: linear-gradient(180deg, rgba(12,20,42,.64), rgba(7,12,25,.52));
    border: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 16px 50px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-shell {
    background: linear-gradient(180deg, rgba(14,22,42,.74), rgba(9,15,30,.68));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow:
        0 18px 54px rgba(0,0,0,.26),
        0 0 0 1px rgba(255,255,255,.03) inset,
        inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.outline-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(24,200,255,.35), rgba(255,255,255,.02), rgba(168,85,247,.24));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: .7;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-radius: 9999px;
    padding: .4rem .8rem;
    font-size: .72rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: #8fe6ff;
    background: rgba(9, 18, 35, .72);
    border: 1px solid rgba(24,200,255,.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 24px rgba(24,200,255,.08);
}

.eyebrow::before {
    content: '';
    width: .42rem;
    height: .42rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #3de0ff, #0ca7ff);
    box-shadow: 0 0 18px rgba(24,200,255,.9);
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #b5ddff 28%, #18c8ff 58%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .95;
}

.hero-mobile-fallback {
    display: none;
    position: absolute;
    left: 50%;
    top: 7.75rem;
    width: min(82vw, 21rem);
    aspect-ratio: 1 / 1;
    pointer-events: none;
    z-index: 0;
    opacity: .72;
    transform: translateX(-50%);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    filter: drop-shadow(0 18px 38px rgba(7, 18, 43, .22));
    transition: transform .45s ease, opacity .35s ease, filter .45s ease;
    animation: heroOrbFloat 9s ease-in-out infinite;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3Cdefs%3E%3CradialGradient id='sphere' cx='36%25' cy='30%25' r='76%25'%3E%3Cstop offset='0%25' stop-color='%23b9f7ff'/%3E%3Cstop offset='22%25' stop-color='%2380e2ff'/%3E%3Cstop offset='56%25' stop-color='%23429dff'/%3E%3Cstop offset='84%25' stop-color='%232c6ff2'/%3E%3Cstop offset='100%25' stop-color='%23357bff'/%3E%3C/radialGradient%3E%3CradialGradient id='glow' cx='50%25' cy='50%25' r='55%25'%3E%3Cstop offset='0%25' stop-color='%237ce8ff' stop-opacity='.22'/%3E%3Cstop offset='100%25' stop-color='%237ce8ff' stop-opacity='0'/%3E%3C/radialGradient%3E%3ClinearGradient id='ring' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2356d8ff' stop-opacity='.34'/%3E%3Cstop offset='50%25' stop-color='%233b82f6' stop-opacity='.16'/%3E%3Cstop offset='100%25' stop-color='%23a855f7' stop-opacity='.28'/%3E%3C/linearGradient%3E%3Cfilter id='soft' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeGaussianBlur stdDeviation='16'/%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='324' cy='324' r='184' fill='url(%23glow)' filter='url(%23soft)'/%3E%3Cellipse cx='320' cy='330' rx='176' ry='186' fill='url(%23sphere)'/%3E%3Cellipse cx='270' cy='244' rx='72' ry='48' fill='%23effcff' opacity='.16'/%3E%3Cpath d='M262 206c48 8 93 37 134 78-50-14-107-8-154 18 8-43 21-70 50-96Z' fill='%23d7fbff' opacity='.14'/%3E%3Cellipse cx='338' cy='362' rx='132' ry='108' fill='%234e8fff' opacity='.08'/%3E%3Ccircle cx='320' cy='320' r='226' fill='none' stroke='url(%23ring)' stroke-width='8' opacity='.36'/%3E%3Cellipse cx='320' cy='320' rx='250' ry='154' fill='none' stroke='%2356d8ff' stroke-width='3' opacity='.14' transform='rotate(28 320 320)'/%3E%3Cellipse cx='320' cy='320' rx='148' ry='272' fill='none' stroke='%23788bff' stroke-width='2.4' opacity='.12' transform='rotate(-28 320 320)'/%3E%3Cg opacity='.16' stroke='%23789cff' stroke-width='1.8' fill='none'%3E%3Cpath d='M162 360l86-152 154-48 88 80-20 178-146 72-128-34z'/%3E%3Cpath d='M248 208l76 282M402 160L236 456M162 360l328-120M236 490l254-250'/%3E%3C/g%3E%3C/svg%3E");
}

@keyframes heroOrbFloat {
    0% { transform: translateX(-50%) rotate(0deg) translateY(0) scale(1); }
    50% { transform: translateX(-50%) rotate(10deg) translateY(-10px) scale(1.035); }
    100% { transform: translateX(-50%) rotate(0deg) translateY(0) scale(1); }
}

.hero-section:active .hero-mobile-fallback {
    transform: translateX(-50%) scale(1.06) rotate(14deg);
    opacity: .82;
    filter: drop-shadow(0 22px 46px rgba(7, 18, 43, .28));
}

.orbital-line {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(76, 168, 255, .18);
    filter: drop-shadow(0 0 18px rgba(24,200,255,.08));
    pointer-events: none;
}

.grid-fade {
    background-image:
        linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 82%);
    -webkit-mask-image: radial-gradient(circle at center, black 35%, transparent 82%);
}

.floating { animation: float 7s ease-in-out infinite; }
.floating-delayed { animation: float 9s ease-in-out infinite 1.2s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

.marquee {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, white 12%, white 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, white 12%, white 88%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.testimonial-track {
    display: flex;
    transition: transform .75s cubic-bezier(.22,1,.36,1);
}

.service-card, .feature-card, .timeline-item, .metric-card, .stack-badge, .contact-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.glow-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 999px;
    background: #18c8ff;
    box-shadow: 0 0 16px rgba(24,200,255,.8);
}

.metric-value {
    letter-spacing: -.04em;
    line-height: .95;
}

.footer-link:hover,
.nav-link:hover {
    color: white;
}

.mobile-menu-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height .35s ease, opacity .25s ease, transform .35s ease;
}

.mobile-menu-panel.is-open {
    max-height: 25rem;
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 767px) {
    .glass {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .glass-soft {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .nav-shell {
        backdrop-filter: blur(14px) saturate(1.06);
        -webkit-backdrop-filter: blur(14px) saturate(1.06);
    }

    .hero-canvas {
        display: none;
    }

    .hero-mobile-fallback {
        display: block;
    }

    .orbital-line,
    .grid-fade {
        opacity: .45;
    }
}

html.light-theme {
    color-scheme: light;
}

html.light-theme body {
    background:
        radial-gradient(circle at 50% -10%, rgba(47,107,255,.10), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(168,85,247,.08), transparent 22%),
        linear-gradient(180deg, #f6fbff 0%, #edf5ff 38%, #eef4ff 100%);
    color: #0f172a;
}

html.light-theme .noise::before {
    opacity: .02;
    mix-blend-mode: multiply;
}

html.light-theme .glass {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(241,247,255,.88));
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 16px 60px rgba(59,130,246,.08), inset 0 1px 0 rgba(255,255,255,.9);
}

html.light-theme .nav-shell {
    background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(244,248,255,.66));
    border: 1px solid rgba(59,130,246,.14);
    box-shadow:
        0 22px 55px rgba(59,130,246,.10),
        0 10px 24px rgba(15,23,42,.05),
        inset 0 1px 0 rgba(255,255,255,.95);
    backdrop-filter: blur(28px) saturate(1.18);
    -webkit-backdrop-filter: blur(28px) saturate(1.18);
}

html.light-theme .glass-soft {
    background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(243,247,255,.66));
    border: 1px solid rgba(15,23,42,.07);
    box-shadow: 0 16px 40px rgba(59,130,246,.06), inset 0 1px 0 rgba(255,255,255,.85);
}

html.light-theme .eyebrow {
    color: #0f4ccf;
    background: rgba(255,255,255,.8);
    border-color: rgba(47,107,255,.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 24px rgba(47,107,255,.06);
}

html.light-theme .outline-glow {
    opacity: .5;
}

html.light-theme .section-line::before {
    background: linear-gradient(90deg, transparent, rgba(15,23,42,.1), transparent);
}

html.light-theme .grid-fade {
    opacity: .08;
}

html.light-theme .bg-mesh-dark {
    opacity: .26;
}

html.light-theme .hero-canvas {
    opacity: .88;
}

html.light-theme [class*="text-white/"] {
    color: rgba(15,23,42,.78) !important;
}

html.light-theme [class~="text-white"] {
    color: #0f172a !important;
}

html.light-theme [class*="border-white/"] {
    border-color: rgba(15,23,42,.10) !important;
}

html.light-theme [class*="bg-white/"] {
    background-color: rgba(15,23,42,.04) !important;
}

html.light-theme .footer-link:hover,
html.light-theme .nav-link:hover {
    color: #0f172a;
}

html.light-theme .text-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 34%, #0284c7 68%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

html.light-theme [class*="bg-gradient-to-r"],
html.light-theme [class*="bg-gradient-to-br"] {
    filter: saturate(1.05) contrast(1.06);
}

html.light-theme [class*="bg-gradient-to-r"][class~="text-white"],
html.light-theme [class*="bg-gradient-to-br"][class~="text-white"] {
    color: #ffffff !important;
}

html.light-theme .text-cyan-300,
html.light-theme .text-blue-300,
html.light-theme .text-violet-300,
html.light-theme .text-purple-300,
html.light-theme .text-emerald-300,
html.light-theme .text-amber-300 {
    color: #1d4ed8 !important;
}

html.light-theme .text-fuchsia-300 {
    color: #7c3aed !important;
}

html.light-theme .code-preview-shell {
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,247,255,.94));
    border-color: rgba(59,130,246,.12);
    box-shadow: 0 24px 60px rgba(59,130,246,.10), inset 0 1px 0 rgba(255,255,255,.95);
}

html.light-theme .code-preview-editor {
    background:
        radial-gradient(circle at top left, rgba(34,211,238,.10), transparent 22%),
        radial-gradient(circle at bottom right, rgba(124,58,237,.10), transparent 28%),
        linear-gradient(180deg, #eff6ff 0%, #e0ecff 100%);
    border-color: rgba(59,130,246,.12) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
    color: rgba(15,23,42,.88) !important;
}

html.light-theme .code-preview-shell .window-title {
    color: rgba(15,23,42,.68) !important;
    letter-spacing: .28em;
}

html.light-theme .code-preview-editor .text-sky-300 {
    color: #0f766e !important;
}

html.light-theme .code-preview-editor .text-cyan-300 {
    color: #1d4ed8 !important;
}

html.light-theme .code-preview-editor .text-emerald-300 {
    color: #047857 !important;
}

html.light-theme .code-preview-editor .text-amber-300 {
    color: #b45309 !important;
}

html.light-theme .code-preview-editor .text-fuchsia-300 {
    color: #9333ea !important;
}

html.light-theme .service-card .flex.flex-wrap.gap-2 span {
    font-weight: 600;
    border-width: 1px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

html.light-theme .service-card:nth-child(1) .flex.flex-wrap.gap-2 span {
    color: #0369a1 !important;
    background: rgba(14,165,233,.12) !important;
    border-color: rgba(14,165,233,.20) !important;
}

html.light-theme .service-card:nth-child(2) .flex.flex-wrap.gap-2 span {
    color: #7c3aed !important;
    background: rgba(139,92,246,.11) !important;
    border-color: rgba(139,92,246,.18) !important;
}

html.light-theme .service-card:nth-child(3) .flex.flex-wrap.gap-2 span {
    color: #2563eb !important;
    background: rgba(59,130,246,.11) !important;
    border-color: rgba(59,130,246,.18) !important;
}

html.light-theme .service-card:nth-child(4) .flex.flex-wrap.gap-2 span {
    color: #b45309 !important;
    background: rgba(245,158,11,.12) !important;
    border-color: rgba(245,158,11,.22) !important;
}

html.light-theme .api-preview-shell {
    background:
        radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,247,255,.94));
    border-color: rgba(59,130,246,.12);
    box-shadow: 0 24px 60px rgba(59,130,246,.10), inset 0 1px 0 rgba(255,255,255,.95);
}

html.light-theme .api-preview-editor {
    background:
        radial-gradient(circle at top left, rgba(34,211,238,.10), transparent 22%),
        radial-gradient(circle at bottom right, rgba(124,58,237,.10), transparent 28%),
        linear-gradient(180deg, #eff6ff 0%, #e0ecff 100%);
    border-color: rgba(59,130,246,.12) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
    color: rgba(15,23,42,.88) !important;
}

html.light-theme .api-preview-shell .window-title {
    color: rgba(15,23,42,.68) !important;
    letter-spacing: .28em;
}

html.light-theme .api-preview-editor .text-sky-300 {
    color: #0f766e !important;
}

html.light-theme .api-preview-editor .text-cyan-300 {
    color: #1d4ed8 !important;
}

html.light-theme .api-preview-editor .text-emerald-300 {
    color: #047857 !important;
}

html.light-theme .api-preview-editor .text-amber-300 {
    color: #b45309 !important;
}

html.light-theme .api-preview-editor .text-fuchsia-300 {
    color: #9333ea !important;
}
