:root {
    --primary: #3252a8;
    --secondary: #5f7195;
    --accent: #c49a47;
    --highlight: #c49a47;
    --dark: #162238;
    --light: #f8fafc;
    --site-bg: #162238;
    --page-hero-offset: 4.75rem;
    --home-hero-offset: 5.5rem;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--site-bg);
    background:
        radial-gradient(circle at top, rgba(109, 144, 208, 0.14), transparent 30%),
        linear-gradient(180deg, #162238 0%, #1c2a44 24%, #162238 100%);
    color: var(--dark);
}

.site-container {
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

.site-hero-copy {
    margin-inline: auto;
    max-width: 64rem;
    text-align: center;
}

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-accent { background-color: var(--accent); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.border-primary { border-color: var(--primary); }

#navbar.scrolled .nav-shell {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.82);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.nav-shell {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.page-hero-offset {
    padding-top: var(--page-hero-offset);
}

.home-hero-offset {
    padding-top: var(--home-hero-offset);
}

.floating-section-nav {
    position: fixed;
    top: 50%;
    left: clamp(0.75rem, 2vw, 1.5rem);
    z-index: 40;
    transform: translateY(-50%);
}

.section-nav-rail {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 65px rgba(15, 23, 42, 0.24);
}

.section-nav-button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(241, 245, 249, 0.8);
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.section-nav-button:hover,
.section-nav-button:focus-visible {
    transform: translateX(0.12rem);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.section-nav-button.active {
    background: linear-gradient(135deg, rgba(50, 82, 168, 0.95), rgba(95, 113, 149, 0.92));
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(50, 82, 168, 0.24);
}

.section-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    min-width: 1.5rem;
    font-size: 0.95rem;
}

.section-nav-text {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: max-width 0.25s ease, opacity 0.2s ease;
}

.section-nav-rail:hover .section-nav-text,
.section-nav-button:focus-visible .section-nav-text {
    max-width: 6rem;
    opacity: 1;
}

.mobile-section-nav {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 40;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
}

.mobile-section-indicator {
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
}

.mobile-section-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
    transition: transform 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}

.mobile-section-arrow:hover,
.mobile-section-arrow:focus-visible {
    transform: translateY(-0.08rem);
    background: rgba(50, 82, 168, 0.94);
}

.mobile-section-arrow[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.nav-item {
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.45rem;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #7e90b2);
    transition: width 0.25s ease, left 0.25s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    left: 1rem;
    width: calc(100% - 2rem);
}

.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.mobile-menu.show {
    max-height: 36rem;
}

@media (min-width: 1024px) {
    :root {
        --page-hero-offset: 5.75rem;
        --home-hero-offset: 6.75rem;
    }
}

.section-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #ecefea;
    color: #46505f;
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-pill-dark {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
}

.elevated-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.elevated-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
    border-color: rgba(100, 116, 139, 0.28);
}

.surface-section-soft {
    background: #f0f2ee;
}

.surface-section-mist {
    background: #ecefe9;
}

.surface-card-soft {
    background: #f7f8f4;
}

.surface-chip-soft {
    background: #e7eae4;
    color: #556070;
}

.hero-updates {
    text-align: left;
}

.hero-updates-label {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.hero-updates-dot {
    height: 0.55rem;
    width: 0.55rem;
    border-radius: 999px;
    background: var(--highlight);
    box-shadow: 0 0 0.8rem rgba(196, 154, 71, 0.5);
}

.hero-updates-viewport {
    margin-top: 1rem;
    overflow: hidden;
}

.hero-updates-track {
    display: flex;
    width: max-content;
    gap: 1rem;
    animation: hero-marquee 34s linear infinite;
}

.hero-updates:hover .hero-updates-track {
    animation-play-state: paused;
}

.hero-update-card {
    min-width: clamp(18rem, 28vw, 23rem);
    max-width: 23rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.1rem;
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(7, 14, 28, 0.18);
}

.hero-update-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 0.35rem 0.7rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f1d79d;
}

.hero-update-title {
    margin-top: 0.9rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.6;
    color: #f8fafc;
}

.hero-update-meta {
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.8);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-size: 160% 160%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 8s ease infinite;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-18px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(16px);
    }
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(79, 70, 229, 0);
    }
    50% {
        box-shadow: 0 0 24px rgba(50, 82, 168, 0.18);
    }
}

@keyframes hero-marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 0.5rem));
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.9s ease-out both;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

.animation-delay-900 {
    animation-delay: 0.9s;
}

.animation-delay-1200 {
    animation-delay: 1.2s;
}

.animate-float {
    animation: float 8s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 9s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-glow 4s ease-in-out infinite;
}

.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
}

img {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(50, 82, 168, 0.24);
    outline-offset: 2px;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.15);
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

@media (max-width: 1024px) {
    .nav-item::after {
        display: none;
    }
}

@media (min-width: 640px) {
    .site-container {
        padding-inline: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .site-container {
        padding-inline: 2rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 3rem !important;
    }

    h2 {
        font-size: 2.25rem !important;
    }

    .hero-update-card {
        min-width: 80vw;
    }
}

@media (max-width: 767px) {
    .floating-section-nav {
        display: none;
    }

    .mobile-section-nav {
        display: flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
