:root {
    --bg-dark: #050505;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #0b96be;
    --primary-glow: rgba(11, 150, 190, 0.5);
    --secondary: #004b76;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
        "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --gradient-1: linear-gradient(135deg, #0b96be, #004b76, #ffffff);
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #004b76;
    --primary-glow: rgba(0, 75, 118, 0.3);
    --secondary: #0b96be;
    --gradient-1: linear-gradient(135deg, #004b76, #0b96be, #1e293b);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Faster initial render on long pages (Chromium/WebKit) */
section:not(.hero),
footer {
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

/* Background effects */
.blob-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(11, 150, 190, 0.15) 0%, rgba(5, 5, 5, 0) 70%);
    filter: blur(80px);
    z-index: -1;
    animation: drift 20s infinite alternate ease-in-out;
}

[data-theme="light"] .blob-bg {
    background: radial-gradient(circle, rgba(11, 150, 190, 0.2) 0%, rgba(248, 250, 252, 0) 70%);
}

.blob-2 {
    top: auto;
    bottom: -10%;
    left: auto;
    right: -10%;
    background: radial-gradient(circle, rgba(0, 75, 118, 0.15) 0%, rgba(5, 5, 5, 0) 70%);
    animation: drift2 25s infinite alternate ease-in-out;
}

[data-theme="light"] .blob-2 {
    background: radial-gradient(circle, rgba(0, 75, 118, 0.2) 0%, rgba(248, 250, 252, 0) 70%);
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

@keyframes drift2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-10%, -10%) scale(1.2);
    }
}

/* Typography & Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 700;
}

/* Glassmorphism */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    padding: 16px 0;
    transition: all 0.3s ease;
}

[data-theme="light"] .glass-header {
    background: rgba(248, 250, 252, 0.7);
}

.glass-header.scrolled {
    background: rgba(5, 5, 5, 0.85);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .glass-header.scrolled {
    background: rgba(248, 250, 252, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Header & Nav */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
    background: var(--glass-bg);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

#brand-logo,
.footer-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a:not(.btn-primary-sm) {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:not(.btn-primary-sm):hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: 0.3s;
}

/* Buttons */
.btn-primary,
.btn-primary-sm,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-dark);
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .btn-primary:hover {
    background: #000000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary-sm {
    background: var(--text-main);
    color: var(--bg-dark);
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-primary-sm:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

[data-theme="light"] .btn-primary-sm:hover {
    background: #000000;
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    padding: 16px 32px;
    font-size: 1.1rem;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Services */
.services {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    padding: 32px;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.service-card p {
    color: var(--text-muted);
}

/* About Section */
.about {
    padding: 120px 0;
    position: relative;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 24px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    gap: 48px;
    margin-top: 40px;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.image-placeholder {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.floating-img {
    width: 60%;
    height: auto;
    animation: floating 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
    border-radius: 24px;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* CTA Section */
.cta-section {
    padding: 120px 0;
}

.cta-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-card h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 16px;
}

.cta-card p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Footer */
footer {
    background: #000;
    padding: 80px 0 24px;
    border-top: 1px solid var(--glass-border);
}

[data-theme="light"] footer {
    background: #ffffff;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 48px;
    margin-bottom: 64px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    margin-top: 16px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 64px;
}

.link-group h3 {
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.link-group a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.link-group a:hover {
    color: var(--text-main);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations Setup */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* simple mobile menu handling */
    }

    .nav-links.nav-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        padding: 20px 0;
        border-bottom: 1px solid var(--glass-border);
    }

    [data-theme="light"] .nav-links.nav-active {
        background: rgba(248, 250, 252, 0.95);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-cta {
        flex-direction: column;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .blob-bg,
    .floating-img {
        animation: none !important;
    }

    .animate-up {
        transition: none !important;
        opacity: 1;
        transform: none;
    }
}
