/* ============================================================
   24/7 iT - IMMERSIVE / CINEMATIC UI
   Rockstar VI-inspired scroll experience
   ============================================================ */

:root {
    --accent: #39ff14;
    --accent-dim: #2dd60f;
    --ink: #05060a;
    --ink-2: #0b0e16;
    --paper: #f4f6fb;
    --muted: #9aa3b2;
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--ink);
    color: #fff;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    /* clip (not hidden) so horizontal overflow is contained WITHOUT creating a
       scroll container that breaks position:sticky on the gate stage */
    overflow-x: clip;
}

body.immersive {
    -webkit-font-smoothing: antialiased;
}

/* Disable native attachment hacks from legacy CSS that fight the new layout */
.section { background-attachment: scroll; }

img { max-width: 100%; display: block; }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #7bb3f0);
    z-index: 2000;
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.7);
    transition: width 0.08s linear;
}

/* ============================================================
   CUSTOM CURSOR (desktop only)
   ============================================================ */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 3000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-dot {
    width: 7px;
    height: 7px;
    background: #fff;
}
.cursor-ring {
    width: 38px;
    height: 38px;
    border: 1.5px solid #fff;
    transition: width 0.25s var(--easing), height 0.25s var(--easing),
                background 0.25s var(--easing), opacity 0.25s var(--easing);
}
.cursor-ring.is-hover {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
}
@media (hover: none), (max-width: 900px) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* ============================================================
   SECTION DOT NAVIGATION
   ============================================================ */
.section-nav {
    position: fixed;
    top: 4.6rem;                 /* sits just below the top navigation bar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    display: flex;
    flex-direction: row;
    gap: 1rem;
}
.section-nav button {
    all: unset;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.35s var(--easing);
    position: relative;
}
.section-nav button::after {
    content: attr(data-label);
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    white-space: nowrap;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--easing);
}
.section-nav button:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.section-nav button.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(57, 255, 20, 0.8);
    transform: scale(1.25);
}
@media (max-width: 768px) { .section-nav { display: none; } }

/* ============================================================
   GENERIC CINEMATIC SECTION
   ============================================================ */
.cine {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.cine-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 7rem 2rem;
}

/* Layered media background for parallax */
.cine-bg {
    position: absolute;
    inset: -12% 0 -12% 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    will-change: transform;
}
.cine-bg video {
    position: absolute;
    top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
.cine-scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(5,6,10,0.55) 0%, rgba(5,6,10,0.35) 40%, rgba(5,6,10,0.85) 100%);
}
.cine-scrim.left {
    background: linear-gradient(90deg, rgba(5,6,10,0.92) 0%, rgba(5,6,10,0.6) 45%, rgba(5,6,10,0.15) 100%);
}

/* ============================================================
   GATE REVEAL - scroll-scrubbed "street opens up" intro
   (Rockstar VI-style: the scene swings open like gates while
    the camera pushes forward through it.)
   ============================================================ */
.reveal-stage {
    position: relative;
    height: 240vh;            /* scroll length that drives the scrub */
    background: #000;
}
.reveal-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    perspective: 1400px;       /* gives the gates real depth */
    perspective-origin: 50% 50%;
    background: #000;
}

/* Deep background the camera flies toward */
.depth-layer {
    position: absolute;
    inset: -10%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    will-change: transform, filter;
}

/* ---- Real datacenter photo revealed behind the gates ---- */
.dc-scene {
    inset: 0;
    overflow: hidden;
    background: #03040a url('includes/datacenter.jpg') no-repeat;
    background-size: cover;
    background-position: 50% 42%;      /* centered on the aisle vanishing point */
    transform-origin: 50% 44%;         /* dolly flies straight down the aisle */
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}
/* readability + depth scrim over the photo */
.dc-haze {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(70% 80% at 50% 46%, rgba(3,5,12,0) 0%, rgba(3,5,12,0.45) 70%, rgba(3,5,12,0.85) 100%),
        linear-gradient(180deg, rgba(3,5,12,0.55) 0%, rgba(3,5,12,0) 26%, rgba(3,5,12,0) 64%, rgba(3,5,12,0.85) 100%);
}
.depth-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(120% 90% at 50% 45%, rgba(5,6,10,0) 0%, rgba(5,6,10,0.35) 55%, rgba(5,6,10,0.95) 100%);
}

/* The brand revealed in the depth behind the gates */
.reveal-brand {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
    opacity: 0;
    will-change: transform, opacity;
}
.reveal-brand .hero-eyebrow { margin-bottom: 1rem; }
.reveal-brand .hero-title { font-size: clamp(2.4rem, 8.5vw, 7.5rem); line-height: 0.95; }
.reveal-brand .hero-sub { margin: 1.4rem auto 2rem; font-size: clamp(0.95rem, 1.4vw, 1.2rem); }

/* The datacenter photo, sliced into vertical strips that flip away one
   after another in a staggered cascade, revealing the corridor behind.
   Closed, the strips reassemble the full image seamlessly. */
.cascade {
    position: absolute;
    inset: 0;
    z-index: 5;
    transform-style: preserve-3d;
}
.cascade .strip {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: #03040a;
    background-image: url('includes/datacenter.jpg');
    background-repeat: no-repeat;
    background-size: 100vw auto;     /* full-width image, strips read its slices */
    background-position-y: center;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-origin: center center;
}
/* thin seam shadow down each strip's right edge for panel definition */
.cascade .strip::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 14px; height: 100%;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 100%);
}

/* Center light beam that floods out of the opening as the gates part */
.gate-glow {
    position: absolute;
    top: -5%;
    left: 50%;
    height: 110%;
    width: 46vw;
    z-index: 6;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg,
        rgba(180,230,255,0) 0%,
        rgba(200,255,215,0.22) 42%,
        rgba(255,255,255,0.85) 50%,
        rgba(200,255,215,0.22) 58%,
        rgba(180,230,255,0) 100%);
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
    will-change: opacity, transform;
}

/* "Scroll to enter" prompt at the start of the stage */
.gate-enter {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #fff;
    will-change: opacity;
}
.gate-enter .mouse {
    width: 24px; height: 38px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 14px; position: relative;
}
.gate-enter .mouse::after {
    content: ''; position: absolute; top: 7px; left: 50%;
    width: 3px; height: 7px; background: var(--accent); border-radius: 3px;
    transform: translateX(-50%); animation: wheel 1.6s var(--easing) infinite;
}

@media (max-width: 768px) {
    .reveal-stage { height: 260vh; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-stage { height: auto; min-height: 100vh; }
    .reveal-pin { position: relative; }
    .cascade, .gate-glow { display: none; }
    .reveal-brand { opacity: 1; position: relative; min-height: 100vh; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    height: 100vh;
    min-height: 640px;
}
.hero .cine-scrim {
    background: radial-gradient(120% 120% at 50% 20%, rgba(5,6,10,0.25) 0%, rgba(5,6,10,0.7) 60%, rgba(5,6,10,0.96) 100%);
}
.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}
.hero-eyebrow {
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.4rem;
    text-indent: 0.5em;
}
.hero-title {
    font-size: clamp(3.2rem, 12vw, 11rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.03em;
    margin: 0;
    text-transform: uppercase;
}
.hero-title .grad {
    background: linear-gradient(135deg, var(--accent), #9dff76 40%, #7bb3f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #d6dbe4;
    max-width: 720px;
    margin: 1.8rem auto 2.6rem;
    line-height: 1.6;
    font-weight: 300;
}
.hero-actions {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Reveal words for the hero title */
.reveal-line { overflow: hidden; display: block; }
.reveal-line > span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1s var(--easing);
}
.in-view .reveal-line > span { transform: translateY(0); }

/* Scroll cue */
.scroll-cue {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
}
.scroll-cue .mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 14px;
    position: relative;
}
.scroll-cue .mouse::after {
    content: '';
    position: absolute;
    top: 7px; left: 50%;
    width: 3px; height: 7px;
    background: var(--accent);
    border-radius: 3px;
    transform: translateX(-50%);
    animation: wheel 1.6s var(--easing) infinite;
}
@keyframes wheel { 0% { opacity: 0; top: 7px; } 40% { opacity: 1; } 80% { opacity: 0; top: 18px; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.05rem 2.4rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.35s var(--easing), box-shadow 0.35s var(--easing), background 0.35s var(--easing), color 0.35s var(--easing);
}
.btn.primary {
    background: var(--accent);
    color: #04130a;
    box-shadow: 0 8px 30px rgba(57,255,20,0.35);
}
.btn.primary:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(57,255,20,0.55); }
.btn.ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}
.btn.ghost:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--accent); }

/* ============================================================
   SECTION HEADINGS / TEXT REVEAL
   ============================================================ */
.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.2rem;
}
.display {
    font-size: clamp(2.2rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 1.4rem;
    text-transform: uppercase;
}
.lead {
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    color: #c9cfda;
    line-height: 1.7;
    font-weight: 300;
    max-width: 640px;
}

/* fade/slide reveal utility */
[data-reveal] {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity 1s var(--easing), transform 1s var(--easing);
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
[data-reveal][data-delay="1"] { transition-delay: 0.12s; }
[data-reveal][data-delay="2"] { transition-delay: 0.24s; }
[data-reveal][data-delay="3"] { transition-delay: 0.36s; }
[data-reveal][data-delay="4"] { transition-delay: 0.48s; }

/* ============================================================
   MANIFESTO (big statement)
   ============================================================ */
.manifesto {
    background: radial-gradient(80% 120% at 50% 0%, #11151f 0%, var(--ink) 70%);
    text-align: center;
    padding: 12rem 2rem;
}
.manifesto h2 {
    font-size: clamp(2rem, 6vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: 1100px;
    margin: 0 auto;
    text-transform: uppercase;
}
.manifesto h2 .accent { color: var(--accent); }
.manifesto .word {
    display: inline-block;
    opacity: 0.12;
    transition: opacity 0.4s var(--easing);
}

/* ============================================================
   SPLIT / SERVICES PINNED SHOWCASE
   ============================================================ */
.split .cine-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.split.flip .copy { order: 2; }
@media (max-width: 900px) {
    .split .cine-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .split.flip .copy { order: 0; }
}

/* Service list */
.svc-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.svc-list li {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 600;
    color: #e8ebf1;
    transition: color 0.3s var(--easing), padding-left 0.3s var(--easing);
    cursor: pointer;
}
.svc-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.12); }
.svc-list li:hover { color: var(--accent); padding-left: 0.8rem; }
/* CSS-drawn chevron (no glyph/emoji) */
.svc-list li .arrow {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    transform: rotate(45deg);
    transition: transform 0.3s var(--easing);
}
.svc-list li:hover .arrow { transform: rotate(45deg) translate(4px, -4px); }

/* Floating media panel */
.media-panel {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
}
.media-panel img, .media-panel video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 1.4s var(--easing);
}
.media-panel:hover img, .media-panel:hover video { transform: scale(1.12); }
.media-panel .tag {
    position: absolute;
    bottom: 1rem; left: 1rem;
    background: rgba(5,6,10,0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ============================================================
   STATS COUNTERS
   ============================================================ */
.stats {
    background: var(--ink-2);
    padding: 8rem 2rem;
}
.stats-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; } }
.stat .num {
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent), #7bb3f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat .lbl {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ============================================================
   FEATURE CARDS (tilt + reveal)
   ============================================================ */
.cards-section { padding: 8rem 2rem; background: radial-gradient(70% 100% at 50% 0%, #0d1119, var(--ink)); }
.cards-head { max-width: 1180px; margin: 0 auto 3.5rem; text-align: center; }
.cards-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
}
@media (max-width: 900px) { .cards-grid { grid-template-columns: 1fr; } }
.tilt-card {
    position: relative;
    background: linear-gradient(160deg, #141925, #0c1018);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 2.4rem;
    transition: transform 0.2s var(--easing), border-color 0.4s var(--easing), box-shadow 0.4s var(--easing);
    transform-style: preserve-3d;
    will-change: transform;
}
.tilt-card:hover {
    border-color: rgba(57,255,20,0.4);
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.tilt-card .ico {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1.2rem;
    transform: translateZ(40px);
    font-variant-numeric: tabular-nums;
}
.tilt-card h3 {
    font-size: 1.5rem;
    margin: 0 0 0.8rem;
    transform: translateZ(28px);
}
.tilt-card p {
    color: #b6bdc9;
    line-height: 1.7;
    font-weight: 300;
    margin: 0;
    transform: translateZ(16px);
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.cta-final {
    position: relative;
    text-align: center;
    padding: 12rem 2rem;
    overflow: hidden;
}
.cta-final .cine-bg { filter: brightness(0.4); }
.cta-final h2 {
    font-size: clamp(2.4rem, 7vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0 0 1.4rem;
    position: relative;
    z-index: 3;
}
.cta-final p { position: relative; z-index: 3; color: #cfd5e0; max-width: 620px; margin: 0 auto 2.6rem; font-size: 1.2rem; }
.cta-final .hero-actions { position: relative; z-index: 3; }

/* ============================================================
   FOOTER (kept dark + refined)
   ============================================================ */
footer#section-footer {
    background: #06070b !important;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    [data-reveal], .reveal-line > span { opacity: 1 !important; transform: none !important; }
    html { scroll-behavior: auto; }
}
