:root {
    /* Modern Dark Theme Palette */
    --bg-base: #030712;
    --bg-surface: #0B1120;
    --bg-surface-light: #161D2E;

    --border-dim: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.1);

    --primary-accent: #3B82F6;
    --primary-hover: #2563EB;
    --secondary-accent: #8B5CF6;
    --success: #10B981;
    --error: #EF4444;

    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --text-darker: #6B7280;

    --font-heading: 'Outfit', sans-serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;

    --transition-fast: 0.2s ease-out;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);

    --glow-primary: rgba(59, 130, 246, 0.3);
    --glow-secondary: rgba(139, 92, 246, 0.3);
}

html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Ambient Backgrounds */
.ambient-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.15;
    pointer-events: none;
    animation: float 20s infinite alternate ease-in-out;
}

.glow-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--primary-accent) 0%, transparent 70%);
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--secondary-accent) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 5%) scale(1.1);
    }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(var(--border-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-dim) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, transparent 20%, black 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, transparent 20%, black 80%);
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin: 0;
    line-height: 1.1;
    color: var(--text-main);
}

h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 0;
    font-weight: 400;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.relative {
    position: relative;
}

.z-10 {
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}

section {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5rem;
}

.section-subtitle {
    font-size: 1.25rem;
    margin-top: 1rem;
}

/* Glass Panels */
.glass-panel {
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-accent), #4F46E5);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary.glow-btn:hover {
    box-shadow: 0 0 20px var(--glow-primary), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Nav */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 100;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-fast);
    /* Make the black background of the image transparent */
    mix-blend-mode: screen;
}

.site-logo:hover {
    opacity: 0.8;
}

.footer-logo {
    height: 40px;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a:not(.btn) {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:not(.btn):hover {
    color: var(--text-main);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* SECTION 1: HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem;
    text-align: center;
}

.hero-canvas-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

#hero-diagram {
    width: 100%;
    height: 100%;
}

.canvas-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--bg-base), transparent);
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
}

.hero p {
    margin: 0 auto 3rem auto;
    font-size: 1.35rem;
    max-width: 700px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
}

.scroll-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--primary-accent), transparent);
}

/* SECTION 2: BENTO GRID */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 1.5rem;
}

.bento-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.card-large {
    grid-column: span 2;
    background: linear-gradient(145deg, rgba(11, 17, 32, 0.8), rgba(11, 17, 32, 0.4));
}

.card-tall {
    grid-row: span 2;
    padding: 0;
}

.bento-content {
    padding: 2.5rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(11, 17, 32, 1) 40%, transparent);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bento-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    z-index: 1;
    transition: var(--transition-slow);
}

.card-tall:hover .bento-img {
    transform: scale(1.05);
    opacity: 0.7;
}

.bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    margin-bottom: auto;
}

.dark-accent {
    background: rgba(255, 255, 255, 0.02);
}

.dark-accent .bento-icon {
    color: var(--secondary-accent);
}

/* SECTION 3: INFRASTRUCTURE */
.infra-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: flex-start;
}

.infra-sticky {
    position: sticky;
    top: 8rem;
}

.infra-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.infra-card {
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.card-num {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: -10px;
    right: 20px;
    line-height: 1;
}

.infra-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.infra-visual {
    margin-top: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.infra-card:hover .infra-visual {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    box-shadow: 0 0 20px var(--glow-primary);
}

/* SECTION 4: PROCESS (Timeline) */
.modern-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: 5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.timeline-connector {
    flex-grow: 1;
    height: 2px;
    background: var(--border-light);
    margin-top: 30px;
    position: relative;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    position: relative;
    z-index: 2;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.timeline-item:hover .timeline-icon,
.active-icon {
    border-color: var(--primary-accent);
    color: #fff;
    box-shadow: 0 0 20px var(--glow-primary);
    transform: scale(1.1);
}

.timeline-item h4 {
    margin-bottom: 0.5rem;
}

.timeline-item p {
    font-size: 0.9rem;
}

/* SECTION 5: CASE STUDY */
.comparison-container {
    display: flex;
    margin-top: 4rem;
    overflow: hidden;
    position: relative;
}

.comparison-side {
    flex: 1;
    padding: 4rem;
}

.state-before {
    background: rgba(0, 0, 0, 0.2);
}

.state-after {
    background: rgba(59, 130, 246, 0.05);
}

.state-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.success-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.1rem;
}

.error-list li i {
    color: var(--error);
    margin-top: 2px;
    opacity: 0.7;
}

.success-list li i {
    color: var(--success);
    margin-top: 2px;
}

.success-list li {
    color: #fff;
}

.comparison-divider {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    z-index: 10;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--primary-accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* SECTION 6: CTA */
.final-cta {
    padding: 8rem 0;
}

.cta-glass-card {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.2), rgba(139, 92, 246, 0.1));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 50%);
}

.cta-glass-card h2 {
    margin-bottom: 1.5rem;
}

.cta-glass-card p {
    margin: 0 auto 3rem auto;
    font-size: 1.25rem;
    color: #fff;
}

/* ANIMATIONS */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-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;
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border-dim);
    padding: 5rem 0 2rem 0;
    background: var(--bg-surface);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-desc {
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-accent);
    transform: translateX(2px);
}

.footer-bottom {
    border-top: 1px solid var(--border-dim);
    padding-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-darker);
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card-large {
        grid-column: span 2;
    }

    .infra-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .infra-sticky {
        position: relative;
        top: 0;
        text-align: center;
    }

    .infra-sticky p {
        margin: 0 auto;
    }

    .modern-timeline {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 20px;
        gap: 2rem;
    }

    .timeline-connector {
        width: 2px;
        height: 40px;
        margin: -10px 0 -10px 29px;
    }

    .timeline-item {
        flex-direction: row;
        width: auto;
        gap: 1.5rem;
        text-align: left;
    }

    .timeline-icon {
        margin-bottom: 0;
    }

    .comparison-container {
        flex-direction: column;
    }

    .comparison-side {
        padding: 3rem 2rem;
    }

    .comparison-divider {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .card-large {
        grid-column: span 1;
    }

    .card-tall {
        grid-row: span 1;
        min-height: 350px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}