:root {
    --bg-color: #061A2F;
    --text-primary: #DDE3EA;
    --text-secondary: #8A96A3;
    --accent: #3FA9F5;
    --accent-light: #7FD8FF;
    --font-heading: 'JetBrains Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

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

body,
html {
    width: 100%;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none;
    /* Hide default cursor to use custom one */
}

/* Custom Cursor */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background-color: var(--text-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1),
        height 0.3s cubic-bezier(0.25, 1, 0.5, 1),
        background-color 0.3s ease;
}

#cursor.active {
    width: 60px;
    height: 60px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2), 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Background Effects */
.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.bloom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 50% 50%, rgba(6, 26, 47, 0) 0%, rgba(6, 26, 47, 1) 100%),
        radial-gradient(circle at 15% 25%, rgba(63, 169, 245, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(127, 216, 255, 0.08) 0%, transparent 40%);
}



/* Scenes Structure */
.scroll-container {
    position: relative;
    z-index: 10;
}

.scene {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: var(--bg-color);
    z-index: 10;
    will-change: transform, opacity;
    transform: translateZ(0); /* Force 3D */
}

.content-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Hero Scene */
.hero-content {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 0;
    opacity: 0;
}

.hero-title {
    font-family: 'Times New Roman', Times, serif;
    /* Or any premium serif font */
    font-size: clamp(80px, 15vw, 200px);
    font-weight: 400;
    line-height: 0.9;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    color: rgba(221, 227, 234, 0.4);
    /* Soft Silver with opacity */
}

/* For overlapping text lines if needed */
.title-line {
    position: relative;
    display: inline-block;
}

.title-line-1 {
    margin-right: -20px;
    /* Slight overlap */
}

.title-line-2 {
    display: block;
    margin-top: -10px;
}

/* The mask layer which creates the white fill on top of the circle */
.mask-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #ffffff;
    /* Bright white text inside the circle */
    overflow: hidden;
    clip-path: circle(0% at 50% 50%);
    /* Will be animated via GSAP */
    pointer-events: none;
}

.mask-text {
    position: absolute;
    top: 0;
    left: 0;
}

.hero-subtitle-container {
    position: absolute;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.scroll-indicator span {
    display: block;
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
    animation: scrollMove 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollMove {
    0% { transform: translateY(-15px); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}

.glitch-text {
    font-family: var(--font-heading);
    font-size: min(7vw, 80px);
    font-weight: 700;
    position: relative;
    display: inline-block;
    opacity: 0;
    color: var(--text-primary);
}

.glitch-active {
    animation: text-pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.glitch-active::before,
.glitch-active::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch-active::before {
    left: 4px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 1500px, 56px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-active::after {
    left: -4px;
    text-shadow: -2px 0 #00fff9;
    clip: rect(44px, 1500px, 12px, 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

/* Scene 3 — Full 3D Cinematic */
.scene-3d-cinema {
    perspective: 1000px;
    overflow: hidden;
    background: var(--bg-color);
}

/* Perspective grid floor */
.s3-grid-floor {
    position: absolute;
    bottom: -10%;
    left: -20%;
    width: 140%;
    height: 60%;
    background:
        linear-gradient(90deg, rgba(63, 169, 245, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(63, 169, 245, 0.08) 1px, transparent 1px);
    background-size: 80px 80px;
    transform: rotateX(65deg) translateZ(-50px);
    transform-origin: center bottom;
    opacity: 0;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
}

/* Glowing orbs */
.s3-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0;
}

.s3-orb-1 {
    width: 350px;
    height: 350px;
    background: rgba(63, 169, 245, 0.25);
    top: 15%;
    left: 10%;
}

.s3-orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(127, 216, 255, 0.15);
    top: 50%;
    right: 8%;
}

.s3-orb-3 {
    width: 180px;
    height: 180px;
    background: rgba(63, 169, 245, 0.12);
    bottom: 20%;
    left: 40%;
}

/* Depth layers for floating words */
.s3-depth-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.s3-float-word {
    position: absolute;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.04);
    white-space: nowrap;
    opacity: 0;
    will-change: transform;
}

/* Back layer — large, far away */
.s3-layer-back .s3-fw-1 {
    font-size: clamp(4rem, 10vw, 10rem);
    top: 10%;
    left: 5%;
}

.s3-layer-back .s3-fw-2 {
    font-size: clamp(3rem, 7vw, 7rem);
    top: 65%;
    right: 5%;
}

.s3-layer-back .s3-fw-3 {
    font-size: clamp(5rem, 12vw, 14rem);
    top: 35%;
    left: 55%;
}

/* Mid layer — medium */
.s3-layer-mid .s3-fw-4 {
    font-size: clamp(2.5rem, 6vw, 6rem);
    top: 20%;
    right: 15%;
    color: rgba(94, 23, 235, 0.06);
}

.s3-layer-mid .s3-fw-5 {
    font-size: clamp(2rem, 5vw, 5rem);
    bottom: 25%;
    left: 10%;
    color: rgba(0, 195, 255, 0.05);
}

/* Center content */
.s3-center-content {
    position: relative;
    z-index: 10;
    text-align: center;
    transform-style: preserve-3d;
}

.s3-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 0.95;
    background: linear-gradient(135deg, #DDE3EA 0%, #3FA9F5 40%, #7FD8FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateZ(-200px) rotateX(20deg);
    will-change: transform, opacity;
}

.s3-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 550px;
    margin: 25px auto 0;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(30px);
}

.s3-line {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-light), transparent);
    margin: 30px auto 0;
    border-radius: 2px;
}

/* Scene 4 */
.reveal-text {
    font-family: var(--font-heading);
    font-size: min(5vw, 60px);
    font-weight: 700;
    letter-spacing: -2px;
    display: inline-block;
    opacity: 0;
    background: linear-gradient(90deg, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 60px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transform: translateY(100px) rotateX(-15deg);
    opacity: 0;
    transform-style: preserve-3d;
}

.card-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(63, 169, 245, 0.15) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0.5;
}


/* Extra scene */
.contact-scene {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 100;
    min-height: 100vh;
    height: auto;
    padding: 120px 30px 80px;
    background: var(--bg-color);
}

.fade-text {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.cta-btn {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    color: var(--bg-color);
    background: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.cta-btn:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    background: #e0e0e0;
}

/* Footer & Socials */

.social-footer {
    width: 100%;
    padding: 60px 0 0;
    position: relative;
    bottom: 0;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 30px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 50px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.footer-tagline {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.social-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 1 !important;
    /* Force high visibility */
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.social-link svg {
    fill: var(--text-primary) !important;
    /* Force silver color for icons */
    width: 20px;
    height: 20px;
    display: block;
    transition: transform 0.3s ease;
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-3px);
    border-color: rgba(63, 169, 245, 0.4) !important;
    background: rgba(63, 169, 245, 0.1) !important;
    color: var(--accent-light);
}

.social-link svg {
    transition: transform 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.15);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    width: 100%;
    text-align: center;
}

.footer-bottom p {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.5px;
}

/* Animations */
@keyframes text-pop-in {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }

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

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 1500px, 90px, 0);
    }

    10% {
        clip: rect(60px, 1500px, 20px, 0);
    }

    20% {
        clip: rect(30px, 1500px, 80px, 0);
    }

    30% {
        clip: rect(80px, 1500px, 10px, 0);
    }

    40% {
        clip: rect(20px, 1500px, 40px, 0);
    }

    50% {
        clip: rect(90px, 1500px, 60px, 0);
    }

    60% {
        clip: rect(40px, 1500px, 30px, 0);
    }

    70% {
        clip: rect(70px, 1500px, 80px, 0);
    }

    80% {
        clip: rect(10px, 1500px, 50px, 0);
    }

    90% {
        clip: rect(50px, 1500px, 20px, 0);
    }

    100% {
        clip: rect(30px, 1500px, 90px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 1500px, 100px, 0);
    }

    10% {
        clip: rect(25px, 1500px, 40px, 0);
    }

    20% {
        clip: rect(85px, 1500px, 10px, 0);
    }

    30% {
        clip: rect(15px, 1500px, 60px, 0);
    }

    40% {
        clip: rect(75px, 1500px, 20px, 0);
    }

    50% {
        clip: rect(35px, 1500px, 80px, 0);
    }

    60% {
        clip: rect(95px, 1500px, 30px, 0);
    }

    70% {
        clip: rect(5px, 1500px, 70px, 0);
    }

    80% {
        clip: rect(45px, 1500px, 5px, 0);
    }

    90% {
        clip: rect(85px, 1500px, 50px, 0);
    }

    100% {
        clip: rect(25px, 1500px, 90px, 0);
    }
}

@media screen and (max-width: 768px) {

    /* Disable custom cursor on mobile */
    body,
    html {
        cursor: auto;
        overflow-x: hidden;
    }

    #cursor {
        display: none;
    }

    /* Layout Adjustments */
    .menu-toggle {
        top: 20px !important;
        right: 20px !important;
        bottom: auto !important;
        width: 50px !important;
        height: 50px !important;
    }

    .logo-container {
        top: 20px !important;
        left: 20px !important;
        transform: none !important;
    }

    .hero-logo {
        width: 45px !important;
    }

    /* Typography */
    .hero-title {
        font-size: clamp(35px, 12vw, 60px) !important;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 11px;
        text-align: center;
        padding: 0 10px;
    }

    .glitch-text {
        font-size: clamp(28px, 8vw, 45px);
    }

    .glitch-desc {
        font-size: 1rem;
        padding: 0 15px;
    }

    .parallax-title {
        font-size: clamp(30px, 10vw, 60px);
    }

    .reveal-text {
        font-size: clamp(24px, 8vw, 40px);
    }

    /* Spacing & Sizes */
    .glass-card {
        padding: 25px !important;
        border-radius: 12px !important;
        width: 90vw;
        margin: 0 auto;
    }

    .stack-card {
        padding: 25px !important;
        border-radius: 16px !important;
    }

    .cards-wrapper {
        width: 92vw !important;
        height: 65vh !important;
    }

    .card-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        margin-bottom: 10px;
    }

    .card-desc {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        max-width: 95%;
        margin-bottom: 20px;
    }

    .social-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-circle {
        width: 90vw;
        height: 90vw;
        max-width: 300px;
        max-height: 300px;
    }

    /* 3D Scene Mobile Adjustments */
    .s3-title {
        font-size: clamp(2rem, 8vw, 4rem);
    }

    .s3-subtitle {
        font-size: 0.9rem;
        padding: 0 15px;
    }

    .s3-layer-back .s3-fw-1,
    .s3-layer-back .s3-fw-2,
    .s3-layer-back .s3-fw-3,
    .s3-layer-mid .s3-fw-4,
    .s3-layer-mid .s3-fw-5 {
        font-size: clamp(1.5rem, 5vw, 3rem) !important;
    }

    /* Mobile Menu Font Size Adjustment */
    .menu-link {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.3);
        text-align: center;
        width: 100%;
    }

    .menu-nav {
        gap: 15px;
        width: 100%;
        padding: 0 20px;
    }

    /* Why Choose Us Pillars Mobile Alignment */
    .pillar-content {
        text-align: center !important;
        max-width: 100% !important;
    }

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


/* --- Added Styles --- */

/* Hero Logo */
.logo-container {
    margin-bottom: 20px;
    position: relative;
    z-index: 5;
    transform: perspective(600px);
    opacity: 0;
}

.hero-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    animation: floating-logo 4s ease-in-out infinite;
}

@keyframes floating-logo {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(3deg);
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.6));
    }

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

/* Service / Glitch Details */
.glitch-desc {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 20px auto 0;
    opacity: 0;
}

.stagger-line {
    overflow: hidden;
    display: block;
    margin-bottom: 8px;
}

.stagger-text {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

.service-details {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: var(--text-secondary);
    margin-top: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
}

/* Parallax Scene */
.parallax-scene {
    position: relative;
    overflow: hidden;
    height: 120vh;
    /* slightly taller for parallax scrolling */
}

.parallax-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.parallax-title {
    font-family: var(--font-heading);
    font-size: min(8vw, 100px);
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.parallax-desc {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-top: 20px;
}

.floating-elements {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.float-wrapper {
    position: absolute;
}

.float-el {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 6rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    /* very subtle back text */
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-block;
    transition: color 0.3s ease;
}

/* Preset positions for wrappers */
.float-wrapper:nth-child(1) {
    top: 10%;
    left: 10%;
}

.float-wrapper:nth-child(2) {
    top: 70%;
    left: 15%;
}

.float-wrapper:nth-child(3) {
    top: 20%;
    right: 10%;
}

.float-wrapper:nth-child(4) {
    top: 80%;
    right: 20%;
}

.float-wrapper:nth-child(5) {
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
}

/* --- Full Screen Menu --- */

.menu-toggle {
    position: fixed;
    top: 40px; /* Changed from bottom: 40px */
    right: 50px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 10000;
    cursor: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

@media screen and (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    will-change: transform, opacity;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9990;
    pointer-events: none;
    overflow: hidden;
}

.menu-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    clip-path: circle(0% at 90% 10%);
    will-change: clip-path;
}

.menu-overlay.is-active {
    pointer-events: all;
}

.menu-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    perspective: 1000px;
}

.menu-logo-container {
    position: absolute;
    top: 40px;
    left: 50px;
}

.menu-logo {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

.menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.menu-link {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    backface-visibility: hidden;
    will-change: transform, opacity;
    transition: color 0.3s ease, -webkit-text-stroke 0.3s ease;
}

.menu-link::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-primary);
    width: 0%;
    overflow: hidden;
    transition: width 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    white-space: nowrap;
    -webkit-text-stroke: 0px;
}

.menu-link:hover {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.menu-link:hover::before {
    width: 100%;
}

.menu-link.active::before {
    width: 100%;
}

/* --- Contact Form Styles --- */
.contact-form-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.2rem;
    transition: border-bottom-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--text-primary);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
}

.contact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 60px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Formspree messaging hidden in favor of custom overlay */
[data-fs-success],
[data-fs-error] {
    display: none !important;
}

.pillar-content {
    margin-bottom: 20px;
    max-width: 600px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

/* --- Desktop Horizontal Navbar --- */
.desktop-nav {
    position: fixed;
    top: 40px;
    right: 50px;
    z-index: 9980;
    display: none;
    /* Hidden by default, show on desktop */
    perspective: 1000px;
}

@media screen and (min-width: 769px) {
    .desktop-nav {
        display: flex;
        align-items: center;
    }
}

.desktop-nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.desktop-nav-links:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.desktop-nav-link {
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-block;
    position: relative;
    transform-style: preserve-3d;
}

.desktop-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: translateZ(20px);
}

.desktop-nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

/* --- Antigravity Stacking Cards --- */
.stacking-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    gap: 28px;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(63, 169, 245, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(63, 169, 245, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    border-top: 1px solid rgba(63, 169, 245, 0.1);
    z-index: 50; /* Ensure it stays above other elements */
}

.stacking-overlay-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 30%, rgba(3, 3, 5, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.cards-wrapper {
    position: relative;
    width: 85vw;
    max-width: 700px;
    height: 60vh;
    perspective: 1500px;
    z-index: 5;
}

.stack-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Glass Door Effect */
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-radius: 32px;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 2px 5px rgba(255, 255, 255, 0.2);
    transform-origin: center top;
    will-change: transform, opacity;
}

.card-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.card-desc {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #e0e0e0;
    max-width: 80%;
    line-height: 1.5;
    margin-bottom: 30px;
}

.card-cta {
    display: inline-block;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card-cta:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

/* Base card positioning: 
   Card 1 is visible by default. 
   Cards 2,3,4 are initially hidden below viewport and fully opaque. 
   We will manage their exact starting positions via GSAP so they don't flash.
*/
.stack-card {
    opacity: 0;
    /* Wait for GSAP to handle them to avoid flash */
}

/* --- Full Screen Loader --- */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: hidden;
}

.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-logo {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    animation: loader-glitch 2s infinite linear;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 5px;
    color: var(--text-primary);
    text-transform: uppercase;
    opacity: 0.6;
}

.loader-bar-container {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--text-primary);
    box-shadow: 0 0 10px var(--text-primary);
}

@keyframes loader-glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* --- SPA Page Transitions --- */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    z-index: 20000;
    transform: translateY(100%);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.transition-logo {
    width: 80px;
    opacity: 0;
    filter: blur(10px);
}

.transition-active .page-transition-overlay {
    pointer-events: all;
}

/* --- 3D Features Scene --- */
.features-3d-scene {
    overflow: hidden;
    background-color: var(--bg-color);
    perspective: 1200px;
    min-height: 100vh;
}

.features-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(63, 169, 245, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(63, 169, 245, 0.05) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: center center;
    opacity: 1;
    pointer-events: none;
}

.features-content-wrap {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.features-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: 12px;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(30px);
}

.features-underline {
    width: 60px;
    height: 3px;
    margin: 0 auto 60px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    opacity: 0;
}

.features-carousel {
    position: relative;
    width: 100%;
    height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.feature-card {
    position: absolute;
    width: 340px;
    height: 440px;
    transform-style: preserve-3d;
    cursor: pointer;
    will-change: transform, opacity;
}

.card-inner {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 45px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Subtle glow on active card */
.feature-card[style*="z-index: 100"] .card-inner,
.feature-card:hover .card-inner {
    border-color: rgba(94, 23, 235, 0.3);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(94, 23, 235, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, rgba(63, 169, 245, 0.18), rgba(127, 216, 255, 0.08));
    border: 1px solid rgba(63, 169, 245, 0.3);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
}

.card-icon svg {
    stroke: var(--accent);
    filter: drop-shadow(0 0 8px rgba(94, 23, 235, 0.4));
}

.card-number {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(94, 23, 235, 0.35);
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.card-feature-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
    letter-spacing: 1px;
}

.card-feature-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 280px;
}

.features-nav {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
}

.nav-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.dot.active {
    width: 28px;
    background: var(--accent);
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(63, 169, 245, 0.5);
}

/* Mobile adjustments for features */
@media screen and (max-width: 768px) {
    .features-title {
        letter-spacing: 6px !important;
    }

    .feature-card {
        width: 280px !important;
        height: 400px !important;
    }

    .features-carousel {
        height: 430px !important;
    }

    .card-feature-title {
        font-size: 1.2rem !important;
    }

    .card-feature-desc {
        font-size: 0.85rem !important;
    }

    .card-icon {
        width: 55px !important;
        height: 55px !important;
    }
}

/* ================================================================
   GLITCH & CINEMATIC OVERHAUL — hatechlabs landing page
   ================================================================ */

/* --- Scanlines Overlay --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.06) 3px,
        rgba(0, 0, 0, 0.06) 4px
    );
    animation: scanlines-drift 8s linear infinite;
    opacity: 0.7;
}

@keyframes scanlines-drift {
    0%   { background-position: 0 0; }
    100% { background-position: 0 200px; }
}

/* --- CRT Vignette Overlay --- */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9996;
    background: radial-gradient(
        ellipse at center,
        transparent 55%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

/* ----------------------------------------------------------------
   HERO TITLE — RGB split + glitch burst
   ---------------------------------------------------------------- */
@keyframes rgb-split-hero {
    0%,  88%, 100% {
        text-shadow: none;
        transform: translate(0) skewX(0deg);
        filter: none;
    }
    89% {
        text-shadow: -4px 0 rgba(255, 0, 150, 0.85), 4px 0 rgba(0, 220, 255, 0.85);
        transform: translate(-2px, 0) skewX(-0.5deg);
    }
    90% {
        text-shadow: 4px 0 rgba(255, 0, 150, 0.85), -4px 0 rgba(0, 220, 255, 0.85);
        transform: translate(3px, 0) skewX(0.5deg);
        filter: brightness(1.3);
    }
    91% {
        text-shadow: -2px 0 rgba(255, 0, 150, 0.6), 2px 0 rgba(0, 220, 255, 0.6);
        transform: translate(0) skewX(0deg);
        filter: none;
    }
    92% {
        text-shadow: none;
        transform: translate(0);
    }
}

.hero-title {
    animation: rgb-split-hero 7s ease-in-out infinite;
    position: relative;
}

/* Hero title ghost layers triggered by JS .glitch-burst class */
.hero-title.glitch-burst {
    position: relative;
}

.hero-title.glitch-burst::before,
.hero-title.glitch-burst::after {
    content: attr(data-glitch);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-title.glitch-burst::before {
    left: -4px;
    color: rgba(255, 0, 150, 0.75);
    clip-path: polygon(0 15%, 100% 15%, 100% 50%, 0 50%);
    animation: glitch-slice-a 0.18s steps(2) forwards;
}

.hero-title.glitch-burst::after {
    left: 4px;
    color: rgba(0, 220, 255, 0.75);
    clip-path: polygon(0 55%, 100% 55%, 100% 85%, 0 85%);
    animation: glitch-slice-b 0.18s steps(2) forwards;
}

@keyframes glitch-slice-a {
    0%   { transform: translate(-5px, 2px); opacity: 1; }
    60%  { transform: translate(5px, -2px); opacity: 0.7; }
    100% { transform: translate(0);         opacity: 0; }
}

@keyframes glitch-slice-b {
    0%   { transform: translate(5px, -2px); opacity: 1; }
    60%  { transform: translate(-5px, 2px); opacity: 0.7; }
    100% { transform: translate(0);         opacity: 0; }
}

/* ----------------------------------------------------------------
   SCENE 2 — International Brand Styling
   ---------------------------------------------------------------- */
.glitch-text {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 10vw, 6.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -3px;
    color: var(--text-primary);
    text-transform: uppercase;
    position: relative;
    opacity: 0;
    margin-bottom: 30px;
    cursor: default;
    text-shadow: 0 0 20px rgba(63, 169, 245, 0.2);
}

.glitch-active::before {
    left: 4px !important;
    text-shadow: -4px 0 var(--accent) !important;
    clip-path: polygon(0 0, 100% 0, 100% 42%, 0 42%) !important;
    clip: unset !important;
}

.glitch-active::after {
    left: -4px !important;
    text-shadow: 4px 0 var(--accent-light) !important;
    clip-path: polygon(0 58%, 100% 58%, 100% 100%, 0 100%) !important;
    clip: unset !important;
}

.glitch-desc {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
}

/* ----------------------------------------------------------------
   SCENE DIVIDERS
   ---------------------------------------------------------------- */
.scene + .scene,
#scene-features-3d + .scene,
#stacking-cards-scene + .scene,
#stacking-cards-scene + #scene-footer {
    position: relative;
}

.scene + .scene::before,
#scene-features-3d + .scene::before,
#stacking-cards-scene + .scene::before,
#stacking-cards-scene + #scene-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    width: 84%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(63, 169, 245, 0.35),
        rgba(127, 216, 255, 0.35),
        transparent
    );
    pointer-events: none;
    z-index: 20;
}

/* ----------------------------------------------------------------
   TERMINAL CURSOR on hero subtitle
   ---------------------------------------------------------------- */
.hero-subtitle::after {
    content: '_';
    color: var(--accent);
    animation: cursor-blink 1.1s step-end infinite;
    margin-left: 3px;
    font-weight: 700;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ----------------------------------------------------------------
   CTA BUTTON — shimmer sweep
   ---------------------------------------------------------------- */
.cta-btn {
    position: relative;
    overflow: hidden;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.22),
        transparent
    );
    transition: left 0.55s ease;
    pointer-events: none;
}

.cta-btn:hover::before {
    left: 160%;
}

/* ----------------------------------------------------------------
   DESKTOP NAV — home link highlight
   ---------------------------------------------------------------- */
.desktop-nav-link[href="index.html"] {
    color: var(--text-primary);
    background: rgba(63, 169, 245, 0.15);
    box-shadow: 0 0 12px rgba(63, 169, 245, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ----------------------------------------------------------------
   FEATURES UNDERLINE — fix: was opacity:0, never animated by JS
   ---------------------------------------------------------------- */
.features-underline {
    opacity: 1 !important;
    width: 60px;
}

/* ----------------------------------------------------------------
   SCENE 4 — glass card perspective parent
   ---------------------------------------------------------------- */
#scene-4 {
    perspective: 1200px;
}

/* ----------------------------------------------------------------
   MOBILE — comprehensive layout conflict fixes (≤768px)
   ---------------------------------------------------------------- */
@media screen and (max-width: 768px) {

    /* Navigation */
    .logo-container {
        top: 16px !important;
        left: 16px !important;
        transform: none !important;
    }

    .hero-logo {
        width: 40px !important;
    }

    .menu-toggle {
        top: 16px !important;
        right: 16px !important;
        width: 46px !important;
        height: 46px !important;
    }

    /* Hero */
    .hero-title {
        font-size: clamp(55px, 16vw, 90px) !important;
        line-height: 0.93 !important;
        animation: none !important; /* too distracting at small size */
    }

    .hero-subtitle-container {
        bottom: 28px;
    }

    .hero-subtitle {
        font-size: 10px;
        letter-spacing: 1.5px;
        padding: 0 12px;
        text-align: center;
    }

    .hero-subtitle::after {
        display: none;
    }

    /* Scene 2 */
    #scene-2 .content-wrapper {
        padding: 0 20px;
        text-align: center;
    }

    /* Features 3D */
    .features-3d-scene {
        padding: 40px 0 20px;
        min-height: 100vh;
    }

    .features-content-wrap {
        padding: 0 8px;
    }

    .features-carousel {
        height: 420px !important;
    }

    .feature-card {
        width: 265px !important;
        height: 385px !important;
    }

    .card-inner {
        padding: 28px 22px !important;
    }

    /* Scene 4 */
    #scene-4 {
        padding: 0 16px;
        perspective: none;
    }

    .glass-card {
        width: 90vw !important;
        max-width: 100% !important;
        padding: 28px 20px !important;
        border-radius: 16px !important;
        transform: none !important; /* remove 3D tilt on mobile */
    }

    .card-subtitle {
        font-size: 0.9rem !important;
    }

    /* Scene 5 */
    .parallax-scene {
        height: auto !important;
        min-height: 100vh;
        padding: 80px 20px;
    }

    .parallax-title {
        font-size: clamp(26px, 11vw, 52px) !important;
    }

    .parallax-desc {
        font-size: 1rem !important;
        padding: 0 10px;
    }

    /* Stacking Cards */
    .cards-wrapper {
        width: 90vw !important;
        max-width: 100% !important;
        height: 58vh !important;
    }

    .stack-card {
        padding: 28px 22px !important;
        border-radius: 18px !important;
    }

    .card-title {
        font-size: clamp(1.4rem, 6vw, 2.2rem) !important;
        letter-spacing: -1px !important;
    }

    .card-desc {
        font-size: clamp(0.85rem, 3.5vw, 1rem) !important;
        max-width: 100% !important;
    }

    .card-cta {
        font-size: 0.78rem !important;
        padding: 9px 20px !important;
    }

    /* Contact / Footer */
    .contact-scene {
        padding: 80px 16px 60px !important;
    }

    .fade-text {
        font-size: clamp(1rem, 4vw, 1.4rem) !important;
        text-align: center;
        margin-bottom: 2rem;
    }

    .cta-btn {
        padding: 1rem 2.4rem !important;
        font-size: 0.95rem !important;
    }

    .social-links {
        gap: 10px !important;
    }

    .social-link {
        padding: 9px 14px !important;
        font-size: 0.75rem !important;
        gap: 7px !important;
    }

    .social-link svg {
        width: 16px !important;
        height: 16px !important;
    }

    .footer-inner {
        padding: 36px 16px 28px !important;
        gap: 22px !important;
    }

    /* Scanlines lighter on mobile */
    .scanlines {
        opacity: 0.3;
        animation: none;
    }

    /* Scene dividers hide on mobile */
    .scene + .scene::before,
    #scene-features-3d + .scene::before,
    #stacking-cards-scene + .scene::before {
        display: none;
    }
}

/* ----------------------------------------------------------------
   TABLET (769 – 1024px)
   ---------------------------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 1024px) {

    .hero-title {
        font-size: clamp(80px, 13vw, 150px) !important;
    }

    .feature-card {
        width: 305px;
        height: 420px;
    }

    .glass-card {
        padding: 40px !important;
    }

    .desktop-nav {
        top: 28px;
        right: 28px;
    }

    .logo-container {
        top: 28px !important;
        left: 32px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scanlines,
    .hero-title,
    .hero-subtitle::after,
    .loader-logo,
    .cta-btn::before {
        animation: none !important;
        transition: none !important;
    }
}

