/* ========================================
   MadXR Scroll Experience — premium XR studio treatment
   Loaded after styles.css; overrides section backgrounds so the
   fixed canvas stage shows through, and restyles the opening hero.
   ======================================== */

:root {
    --xr-font-display: 'Space Grotesk', 'Inter', sans-serif;
    --xr-font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

/* ----------------------------------------
   Stage layers
   ---------------------------------------- */
#xrStage {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body.xr-fallback #xrStage {
    display: none;
}

.xr-vignette {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(98deg, rgba(3, 7, 15, 0.78) 0%, rgba(3, 7, 15, 0.42) 30%, transparent 58%),
        radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(3, 6, 14, 0.75) 100%),
        linear-gradient(to bottom, rgba(5, 10, 21, 0.55), transparent 18%, transparent 82%, rgba(5, 10, 21, 0.6));
}

/* content sits above the stage (navbar keeps its own fixed/z-index from styles.css) */
.xr-hero,
.xr-scene-break,
.services,
.about,
.contact,
.footer,
.xr-hud {
    position: relative;
    z-index: 1;
}

/* sections become translucent panels so the simulation shows through */
.services {
    background: linear-gradient(to bottom, rgba(5, 10, 21, 0.88), rgba(5, 10, 21, 0.82));
    border-top: 1px solid rgba(0, 212, 255, 0.12);
    border-bottom: 1px solid rgba(0, 212, 255, 0.08);
}

.about {
    background: linear-gradient(to bottom, rgba(10, 15, 30, 0.88), rgba(10, 15, 30, 0.82));
    border-top: 1px solid rgba(0, 212, 255, 0.12);
    border-bottom: 1px solid rgba(0, 212, 255, 0.08);
}

.contact {
    background: linear-gradient(to bottom, rgba(5, 10, 21, 0.9), rgba(5, 10, 21, 0.86));
    border-top: 1px solid rgba(0, 212, 255, 0.12);
}

.footer {
    background: #050a15;
}

/* ----------------------------------------
   Hero
   ---------------------------------------- */
.xr-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 0;
    overflow: hidden;
}

/* reserve the bottom band of the hero for the scroll cue + marquee so
   the stats row can never collide with them on short viewports */
.xr-hero .container {
    padding-bottom: 150px;
}

.xr-hero-content {
    max-width: 880px;
    position: relative;
}

/* soft scrim so hero copy stays readable over the bright 3D stage */
.xr-hero-content::before {
    content: '';
    position: absolute;
    inset: -70px -140px -60px -110px;
    background: radial-gradient(closest-side, rgba(3, 7, 15, 0.62), rgba(3, 7, 15, 0.3) 62%, transparent);
    z-index: -1;
    pointer-events: none;
}

.xr-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--xr-font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    color: var(--electric-blue);
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    animation: xr-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.xr-eyebrow::before {
    content: '';
    width: 48px;
    height: 1px;
    background: linear-gradient(to right, var(--electric-blue), transparent);
    box-shadow: 0 0 8px var(--electric-blue-glow);
}

.xr-hero-title {
    font-family: var(--xr-font-display);
    font-size: clamp(2.6rem, 6.5vw, 5.2rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--color-white);
    margin-bottom: 1.75rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
    animation: xr-rise 0.9s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.xr-highlight {
    background: linear-gradient(110deg, var(--electric-blue) 10%, var(--electric-blue-light) 50%, #7df3ff 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 22px rgba(0, 212, 255, 0.45));
}

.xr-hero-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.65;
    color: var(--color-gray-300);
    max-width: 620px;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.8);
    animation: xr-rise 0.9s 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.xr-hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: xr-rise 0.9s 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* notched "game UI" corners; glow via drop-shadow so the clip keeps it */
.xr-hero-cta .btn {
    border-radius: 2px;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    letter-spacing: 0.03em;
}

.xr-hero-cta .btn-primary {
    box-shadow: none;
    filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.4)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.xr-hero-cta .btn-primary:hover {
    filter: drop-shadow(0 0 26px rgba(0, 212, 255, 0.55)) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

.btn-ghost {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: var(--border-radius-md);
    color: var(--color-white);
    font-weight: 600;
    background: rgba(0, 212, 255, 0.04);
    transition: all var(--transition-base);
}

.btn-ghost:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
}

/* hero stats row */
.xr-hero-stats {
    display: flex;
    gap: 3.5rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(0, 212, 255, 0.16);
    padding-top: 1.4rem;
    max-width: 620px;
    animation: xr-rise 0.9s 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.xr-stat {
    display: flex;
    flex-direction: column;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

.xr-stat-num {
    font-family: var(--xr-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.1;
}

.xr-stat-num em {
    font-style: normal;
    color: var(--electric-blue);
}

.xr-stat-label {
    font-family: var(--xr-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gray-500);
    margin-top: 0.35rem;
}

/* industry marquee at the bottom of the hero */
.xr-marquee {
    margin-top: auto;
    padding: 1.1rem 0;
    border-top: 1px solid rgba(0, 212, 255, 0.14);
    background: rgba(5, 10, 21, 0.45);
    backdrop-filter: blur(6px);
    overflow: hidden;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.xr-marquee-track {
    display: inline-block;
    animation: xr-marquee 36s linear infinite;
}

.xr-marquee-track span {
    font-family: var(--xr-font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    color: var(--color-gray-400);
    text-transform: uppercase;
}

.xr-marquee-track i {
    font-style: normal;
    color: var(--electric-blue);
    margin: 0 1.6rem;
    text-shadow: 0 0 10px var(--electric-blue-glow);
}

@keyframes xr-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* scroll cue */
.xr-scroll-cue {
    position: absolute;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--xr-font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.3em;
    color: var(--color-gray-400);
    text-transform: uppercase;
    animation: xr-rise 0.9s 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    pointer-events: none;
}

.xr-scroll-cue::after {
    content: '';
    width: 1px;
    height: 34px;
    background: linear-gradient(to bottom, var(--electric-blue), transparent);
    animation: xr-drip 1.8s ease-in-out infinite;
}

@keyframes xr-drip {
    0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
    60% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

@keyframes xr-rise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------
   Scene break bands (full-bleed showcase moments)
   ---------------------------------------- */
.xr-scene-break {
    min-height: 88vh;
    display: flex;
    align-items: flex-end;
    padding: 0 0 14vh;
    pointer-events: none;
}

.xr-scene-label {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 560px;
    padding: 1.4rem 1.8rem 1.5rem;
    border-left: 2px solid var(--electric-blue);
    background: linear-gradient(to right, rgba(3, 7, 15, 0.66), rgba(3, 7, 15, 0.25) 70%, transparent);
    backdrop-filter: blur(5px);
}

.xr-scene-label.xr-in {
    opacity: 1;
    transform: translateY(0);
}

.xr-scene-index {
    display: block;
    font-family: var(--xr-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    color: var(--electric-blue);
    margin-bottom: 0.9rem;
}

.xr-scene-title {
    font-family: var(--xr-font-display);
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--color-white);
    margin-bottom: 0.8rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.xr-scene-desc {
    color: var(--color-gray-300);
    font-size: 1.05rem;
    line-height: 1.6;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
}

/* ----------------------------------------
   HUD (fixed, bottom-left)
   ---------------------------------------- */
.xr-hud {
    position: fixed;
    left: 28px;
    bottom: 26px;
    z-index: 5;
    font-family: var(--xr-font-mono);
    pointer-events: none;
    user-select: none;
    padding: 12px 16px 14px;
    background: rgba(3, 7, 15, 0.42);
    backdrop-filter: blur(6px);
}

/* HUD corner brackets */
.xr-hud::before,
.xr-hud::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: rgba(0, 212, 255, 0.65);
    border-style: solid;
}

.xr-hud::before {
    top: 0;
    left: 0;
    border-width: 1px 0 0 1px;
}

.xr-hud::after {
    bottom: 0;
    right: 0;
    border-width: 0 1px 1px 0;
}

.xr-hud-top {
    display: flex;
    gap: 14px;
    align-items: baseline;
    margin-bottom: 4px;
}

#xrHudIndex {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    color: var(--color-gray-500);
}

#xrHudName {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    color: var(--electric-blue);
    text-shadow: 0 0 12px var(--electric-blue-glow);
}

#xrHudModule {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    color: var(--color-gray-400);
    margin-bottom: 9px;
}

.xr-hud-bar {
    width: 190px;
    height: 2px;
    background: rgba(0, 212, 255, 0.15);
    overflow: hidden;
}

#xrHudFill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, var(--electric-blue), var(--electric-blue-light));
    box-shadow: 0 0 8px var(--electric-blue);
}

.xr-hud-flash {
    animation: xr-hud-flash 0.7s ease;
}

@keyframes xr-hud-flash {
    0% { opacity: 0.2; transform: translateX(-6px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ----------------------------------------
   Section "module" tags + content panel polish
   ---------------------------------------- */
.xr-sec-tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--xr-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    color: var(--electric-blue);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.xr-sec-tag::before,
.section-header .xr-sec-tag::after {
    content: '';
    width: 34px;
    height: 1px;
    background: linear-gradient(to right, var(--electric-blue), transparent);
}

.section-header .xr-sec-tag::after {
    background: linear-gradient(to left, var(--electric-blue), transparent);
}

.about-text .xr-sec-tag {
    display: flex;
}

/* service cards: dark glass with corner brackets */
.services .service-card {
    position: relative;
    background: rgba(7, 12, 23, 0.72);
    backdrop-filter: blur(7px);
    border: 1px solid rgba(0, 212, 255, 0.14);
    border-radius: 4px;
}

.services .service-card::before,
.services .service-card::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: rgba(0, 212, 255, 0.55);
    border-style: solid;
    transition: all var(--transition-base);
}

.services .service-card::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.services .service-card::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

.services .service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 28px rgba(0, 212, 255, 0.12);
}

.services .service-card:hover::before,
.services .service-card:hover::after {
    width: 26px;
    height: 26px;
    border-color: var(--electric-blue);
}

.service-icon {
    box-shadow: inset 0 0 18px rgba(0, 212, 255, 0.12), 0 0 14px rgba(0, 212, 255, 0.12);
}

/* about: stats grid drops to 2 after removing the satisfaction stat */
.about-stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: 420px;
}

.about .feature-item {
    background: rgba(7, 12, 23, 0.55);
    backdrop-filter: blur(5px);
    border-radius: 2px;
}

/* contact panel polish */
.contact-method {
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: 2px;
    backdrop-filter: blur(5px);
}

.contact-form {
    border-radius: 4px;
    backdrop-filter: blur(7px);
}

/* ----------------------------------------
   Responsive / motion
   ---------------------------------------- */
/* short viewports: drop the cue instead of letting it crowd the content */
@media (max-height: 760px) {
    .xr-scroll-cue {
        display: none;
    }

    .xr-hero .container {
        padding-bottom: 90px;
    }
}

@media (max-width: 768px) {
    .xr-hero {
        padding-top: 100px;
    }

    .xr-hero-stats {
        gap: 1.75rem;
    }

    .xr-stat-num {
        font-size: 1.5rem;
    }

    .xr-scroll-cue {
        display: none;
    }

    .xr-hud {
        left: 16px;
        bottom: 16px;
    }

    .xr-hud-bar {
        width: 130px;
    }

    .xr-scene-break {
        min-height: 72vh;
        padding-bottom: 10vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xr-marquee-track {
        animation: none;
    }

    .xr-scroll-cue::after {
        animation: none;
    }

    .xr-eyebrow,
    .xr-hero-title,
    .xr-hero-subtitle,
    .xr-hero-cta,
    .xr-hero-stats,
    .xr-scroll-cue {
        animation: none;
    }

    .xr-scene-label {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
