/* ============================================
   intro.css — Cinematic impress.js deck
   Glasswing.com.au
   ============================================ */

/* No-JS fallback: hide the deck entirely if JS didn't run */
html:not(.js) #impress { display: none !important; }

/* While the intro is active, freeze the page and hide everything else */
body.intro-active {
    overflow: hidden;
    background: #000;
}

body.intro-active .nav,
body.intro-active .hero,
body.intro-active section,
body.intro-active footer,
body.intro-active .ad-unit,
body.intro-active .btt {
    visibility: hidden;
}

/* ── Fullscreen visual backdrop (separate from impress positioning) ── */
.intro-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background:
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 70% 30%, rgba(34, 211, 238, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse at center, #0a0a0a 0%, #000 100%);
    pointer-events: none;
    transition: opacity 800ms cubic-bezier(.7, 0, .3, 1);
}

.intro-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
}

.intro-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
}

body.intro-dismissing .intro-backdrop {
    opacity: 0;
}

body:not(.intro-active) .intro-backdrop {
    display: none;
}

/* ── The deck itself ────────────────────────────────────────────── */
/* impress.js applies its own position/top/left/transform inline — DON'T override. */
#impress {
    z-index: 9999;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    opacity: 1;
    transition: opacity 800ms cubic-bezier(.7, 0, .3, 1);
}

#impress.dismissing {
    opacity: 0;
    pointer-events: none;
}

/* ── Each slide ────────────────────────────────────────────────── */
.step {
    width: 1000px;
    max-width: 92vw;
    text-align: center;
    padding: 0 40px;
    transition: opacity 700ms ease, transform 300ms cubic-bezier(.2, .8, .2, 1);
    transform-style: preserve-3d;
}

.step:not(.active) {
    opacity: 0.25;
}

.step.active {
    opacity: 1;
}

/* Parallax target — the inner wrapper that mouse-tilts.
 * NO transition: the JS RAF loop already lerps the target → setting a CSS
 * transition on top creates per-frame interpolation jank. */
.step-inner {
    transform-style: preserve-3d;
    will-change: transform;
}

.step-eyebrow {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #22d3ee;
    margin-bottom: 32px;
    opacity: 0.9;
}

.step-title-xl {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(2.8rem, 8vw, 6.5rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
    color: #fff;
    text-shadow:
        0 0 40px rgba(99, 102, 241, 0.3),
        0 0 80px rgba(34, 211, 238, 0.15);
}

.step-sub {
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    max-width: 720px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.step-actions {
    display: inline-flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Re-declare button basics inside the deck — keeps styles.css untouched */
#impress .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 100px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

#impress .btn--white {
    background: #fff;
    color: #0a0a0a;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
}
#impress .btn--white:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.4);
}

#impress .btn--outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
#impress .btn--outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* ── Skip button ────────────────────────────────────────────────── */
/* impress-common.css sets `.impress-enabled { pointer-events: none }` to fix
 * a Chrome z-stacking bug, then re-enables `pointer-events:auto` on #impress.
 * The skip button + progress dots sit OUTSIDE #impress, so they need their
 * own pointer-events:auto override or clicks are swallowed by <html>. */
.intro-skip,
.intro-progress,
.intro-progress-dot {
    pointer-events: auto;
}

.intro-skip {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 18px;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}
.intro-skip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* ── Progress dots (slide indicator) ───────────────────────────── */
.intro-progress {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10001;
}
.intro-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}
.intro-progress-dot.active {
    background: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
    transform: scale(1.3);
}

/* ── Scroll hint ────────────────────────────────────────────────── */
.intro-hint {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 10001;
    animation: hintPulse 2.5s ease-in-out infinite;
}
@keyframes hintPulse {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
    50%      { opacity: 0.9; transform: translateX(-50%) translateY(4px); }
}

/* ── Reduced motion: kill all intro transitions ────────────────── */
@media (prefers-reduced-motion: reduce) {
    #impress,
    .step,
    .step-inner,
    .intro-progress-dot,
    .intro-hint {
        transition: none !important;
        animation: none !important;
    }
}

/* ── Mobile (< 480 px): keep the drama, just fit the viewport ──── */
@media (max-width: 480px) {
    .step             { padding: 0 20px; }
    .step-eyebrow     { font-size: 0.7rem; letter-spacing: 0.2em; margin-bottom: 20px; }
    .step-title-xl    { font-size: 3.4rem; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 24px; }
    .step-sub         { font-size: 0.95rem; margin-bottom: 24px; }
    .step-actions     { gap: 12px; }
    #impress .btn     { padding: 12px 22px; font-size: 0.85rem; }
    .intro-skip       { top: 16px; right: 16px; padding: 8px 14px; font-size: 0.75rem; }
    .intro-progress   { bottom: 24px; }
    .intro-hint       { bottom: 56px; font-size: 0.65rem; }
}

/* Very narrow phones (< 360 px) — squeeze further so nothing wraps weirdly */
@media (max-width: 360px) {
    .step-title-xl    { font-size: 2.8rem; }
    .step-sub         { font-size: 0.85rem; }
}

/* ── Impress not-supported fallback ────────────────────────────── */
.impress-not-supported #impress {
    display: none !important;
}
.impress-not-supported body.intro-active {
    overflow: auto;
}
.impress-not-supported body.intro-active .nav,
.impress-not-supported body.intro-active .hero,
.impress-not-supported body.intro-active section,
.impress-not-supported body.intro-active footer,
.impress-not-supported body.intro-active .ad-unit,
.impress-not-supported body.intro-active .btt {
    visibility: visible;
}
