/* ==========================================================================
   FUTURISTIC 3D SCROLL WEBSITE DESIGN SYSTEM
   ========================================================================== */

/* DESIGN VARIABLES */
:root {
    --bg-dark: #40404d;
    --bg-obsidian: #010103;
    --bg-card: rgba(10, 10, 18, 0.65);

    --color-primary: #00f0ff;
    --color-primary-glow: rgba(0, 240, 255, 0.4);
    --color-secondary: #0072ff;

    --text-white: #ffffff;
    --text-muted: #8a9cae;
    --text-dark: #0f172a;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* RESET & BASE STYLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #112233;
    border-radius: 4px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

a {
    color: inherit;
    text-decoration: none;
    color: #ffffff;
}

a:hover {
    color: inherit;
    text-decoration: none;
    color: #00f0ff;
}

/* UTILITY CLASSES */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.text-center {
    text-align: center;
}

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

.cyan-accent {
    color: var(--color-primary);
}

.relative-z {
    position: relative;
    z-index: 5;
}

/* GLOW EFFECT SYSTEM */
.cyan-glow {
    color: var(--text-white);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.6),
        0 0 20px rgba(0, 240, 255, 0.4),
        0 0 40px rgba(0, 240, 255, 0.15);
}

/* PRELOADER OVERLAY */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-obsidian);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.loader-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
}

.logo-icon {
    color: var(--color-primary);
    text-shadow: 0 0 12px var(--color-primary);
    animation: pulseGlow 2s infinite ease-in-out;
}

.loader-status {
    margin-bottom: 24px;
}

.status-terminal {
    display: block;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--color-primary);
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    opacity: 0.8;
}

.status-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.loader-progress-bar-container {
    width: 320px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.loader-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    box-shadow: 0 0 8px var(--color-primary);
    border-radius: 10px;
    transition: width 0.1s ease-out;
}

.loader-percentage {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
}

/* HEADER NAVIGATION */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(0, 12, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1400px;
    height: 80px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-fast);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-white);
}

.nav-link:hover::after {
    width: 100%;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-smooth);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 0.95rem;
    border-radius: 30px;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

.btn-cyan-glow {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    color: var(--bg-dark);
    font-weight: 700;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4),
        0 0 40px rgba(0, 240, 255, 0.15);
    overflow: hidden;
}

.btn-cyan-glow .btn-text {
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.btn-cyan-glow .btn-glow-layer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: transform 0.6s ease;
    z-index: 1;
}

.btn-cyan-glow:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.7),
        0 0 50px rgba(0, 240, 255, 0.3);
    color: var(--text-white);
}

.btn-cyan-glow:hover .btn-glow-layer {
    transform: translateX(60%);
}

/* HERO SCROLL CONTAINER */
.scroll-section {
    position: relative;
    height: 5000px;
    background-color: var(--bg-obsidian);
}

.sticky-container {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#animation-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#animation-canvas.ready {
    opacity: 1;
}

/* HUD HIGH TECH LAYER EFFECT */
.hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(1, 1, 3, 0.85) 100%),
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
    background-size: 100% 100%, 100% 4px;
    z-index: 2;
    pointer-events: none;
}

.hud-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

/* OVERLAYS SYSTEM */
.content-overlay {
    position: absolute;
    z-index: 3;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
}

.content-overlay.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 1. Intro Overlay */
.intro-overlay {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 90%;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-overlay.active {
    transform: translate(-50%, -50%);
}

.intro-overlay .glow-text {
    font-size: 4.8rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 24px;
}

.scroll-indicator {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.25);
    padding: 14px 32px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
    animation: subtlePulse 2.5s infinite ease-in-out;
}

.scroll-indicator .arrow {
    font-size: 1.4rem;
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary);
    animation: bounce 1.5s infinite ease-in-out;
}

@keyframes subtlePulse {

    0%,
    100% {
        border-color: rgba(0, 240, 255, 0.2);
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
        transform: scale(1);
    }

    50% {
        border-color: rgba(0, 240, 255, 0.5);
        box-shadow: 0 0 25px rgba(0, 240, 255, 0.35);
        transform: scale(1.04);
    }
}


/* 2. Storytelling Cards Overlay */
.story-overlay {
    top: 50%;
    transform: translateY(-45%);
    width: 90%;
    max-width: 500px;
}

.story-overlay.active {
    transform: translateY(-50%);
}

#overlay-story-1 {
    left: 8%;
}

#overlay-story-2 {
    right: 8%;
}

#overlay-story-3 {
    left: 8%;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.07);
    transition: var(--transition-smooth);
}

.card-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    background: rgba(0, 240, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

.glass-card h2 {
    font-size: 2rem;
    color: var(--text-white);
    margin-bottom: 16px;
    line-height: 1.25;
}

.glass-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* DETAILS SECTION */
.details-section {
    padding: 140px 0;
    background: linear-gradient(to bottom, var(--bg-dark), var(--bg-obsidian));
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.section-header {
    max-width: 700px;
    margin: 0 auto 80px auto;
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.6;
}

/* Service Card Grids */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

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

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

.service-card p {
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.service-list {
    list-style: none;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.service-list li {
    font-size: 0.85rem;
    color: var(--text-white);
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.service-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* Interactive Card Glows */
.hover-glow:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 240, 255, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* ABOUT SECTION */
.about-section {
    padding: 100px 0 140px 0;
    background-color: var(--bg-obsidian);
    position: relative;
    z-index: 10;
}

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

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
}

.stat-unit {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-left: 2px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.about-card-visual {
    position: relative;
}

.visual-glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.07) 0%, transparent 65%);
    pointer-events: none;
}

/* Tech Console Layout */
.tech-hud {
    padding: 0;
    overflow: hidden;
}

.hud-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hud-dot.red {
    background: #ef4444;
}

.hud-dot.yellow {
    background: #eab308;
}

.hud-dot.green {
    background: #22c55e;
}

.hud-title {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 10px;
    letter-spacing: 0.05em;
}

.hud-console {
    padding: 24px;
    font-family: monospace;
    font-size: 0.85rem;
    background: #020204;
    min-height: 220px;
}

.console-line {
    margin-bottom: 10px;
    opacity: 0.9;
}

.text-green {
    color: #4ade80;
}

.text-cyan {
    color: var(--color-primary);
}

.text-yellow {
    color: #facc15;
}

.cursor-line {
    display: flex;
    align-items: center;
    color: var(--text-white);
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--color-primary);
    margin-left: 4px;
    animation: blink 1s infinite steps(2, start);
}

/* CTA SECTION (Glowing cyan CTA button & subheading) */
.cta-section {
    padding: 160px 0;
    position: relative;
    background-color: var(--bg-dark);
    z-index: 10;
    overflow: hidden;
}

.cta-background-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cta-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.cta-subheading {
    max-width: 650px;
    margin: 0 auto 48px auto;
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    justify-content: center;
}

/* FOOTER */
.main-footer {
    padding: 60px 0;
    background-color: var(--bg-obsidian);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    position: relative;
    z-index: 10;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-meta {
    font-family: monospace;
    color: var(--color-primary);
    opacity: 0.6;
}

/* ANIMATIONS KEYFRAMES */
@keyframes bounce {

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

    50% {
        transform: translateY(6px);
    }
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }

    .intro-overlay .glow-text {
        font-size: 3.8rem;
    }

    .section-title {
        font-size: 2.8rem;
    }

    .about-grid {
        gap: 50px;
    }
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about-text-content {
        text-align: center;
    }

    .section-title.text-left {
        text-align: center;
    }

    .stats-container {
        justify-content: center;
    }

    .hud-console {
        min-height: 180px;
    }

    /* Reposition storytelling elements on medium screens for readability */
    .story-overlay {
        left: 50% !important;
        transform: translate(-50%, -45%) !important;
        width: 90%;
        max-width: 480px;
    }

    .story-overlay.active {
        transform: translate(-50%, -50%) !important;
    }

    #overlay-story-2 {
        right: auto;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        /* Simplify nav on mobile */
    }

    .intro-overlay .glow-text {
        font-size: 2.6rem;
    }

    .intro-overlay p {
        font-size: 0.95rem;
    }

    .glass-card {
        padding: 28px;
    }

    .glass-card h2 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

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

    .stats-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-number {
        justify-content: center;
    }

    .cta-title {
        font-size: 2.4rem;
    }

    .cta-subheading {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 16px 32px;
        font-size: 0.85rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* CONTACT PAGE SPECIFIC STYLES */
.contact-main {
    padding: 160px 0 120px 0;
    position: relative;
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.contact-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

.contact-header {
    position: relative;
    z-index: 5;
    margin-bottom: 40px;
}

.contact-form-card {
    position: relative;
    z-index: 5;
    max-width: 650px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--color-primary);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.form-control {
    width: 100%;
    background: rgba(2, 2, 4, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px 18px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
    background: rgba(2, 2, 4, 0.9);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

textarea.form-control {
    resize: vertical;
}

.form-actions {
    margin-top: 36px;
}

.btn-block {
    width: 100%;
}