/* ════════════════════════════════════════════
   STRATIFY – intro.css   (S-in-place edition)
   ════════════════════════════════════════════ */

:root {
    --black: #050605;
    --off-white: #F7F9F7;
    --violet: #7c3aed;
    --violet-lt: #c084fc;
    --violet-dk: #4c1d95;
    --font: 'Inter', system-ui, sans-serif;
}

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

html {
    scroll-behavior: auto;
    font-size: 16px;
}

body {
    font-family: var(--font);
    background: var(--black);
    color: var(--off-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Ambient canvas ── */
#ambientCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.45;
}

/* ════════════════════════════════════════════
   WHITE BOOM FLASH
   ════════════════════════════════════════════ */
.boom-flash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
}

.boom-flash.active {
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

.boom-flash.hold {
    opacity: 1;
}

/* ── Skip button ── */
.skip-btn {
    position: fixed;
    top: 28px;
    right: 36px;
    z-index: 1000;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(247, 249, 247, 0.3);
    background: none;
    border: 1px solid rgba(247, 249, 247, 0.1);
    padding: 8px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.skip-btn:hover {
    color: var(--off-white);
    border-color: rgba(247, 249, 247, 0.4);
}

/* ════════════════════════════════════════════
   SCROLL SPACER + STICKY SECTION
   ════════════════════════════════════════════ */
.scroll-spacer {
    position: relative;
    height: 600vh;
    /* slower scroll = animation more visible */
    z-index: 10;
}

.cinematic-intro {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: visible;
    /* allow BOOM scale to bleed outside */
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ════════════════════════════════════════════
   WORDMARK  — outer centres it, inner is flex row
   ════════════════════════════════════════════ */
.wordmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}

.wordmark-inner {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    overflow: visible;
    animation: wm-enter 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.2s;
}

@keyframes wm-enter {
    from {
        opacity: 0;
        transform: translateY(48px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Each letter ── */
.wl {
    display: inline-block;
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--off-white);
    user-select: none;
    will-change: transform, opacity, filter;
    transform-origin: center center;
}

/* ════════════════════════════════════════════
   THE HERO S  (.wl-s  — stays in place)
   JS adds shake classes; transform-origin = centre
   ════════════════════════════════════════════ */
.wl-s {
    /* Plain white — same as all other STRATIFY letters */
    position: relative;
    z-index: 10;
    transform-origin: 50% 50%;
    color: var(--off-white);
    /* No gradient, no glow — clean uniform look */
}

/* ─── STAGE 1: gentle shake IN PLACE ─── */
.wl-s.shake-light {
    animation: shake-light 0.5s ease-in-out infinite;
}

@keyframes shake-light {

    0%,
    100% {
        transform: translateX(0) rotate(0deg) scale(1);
    }

    20% {
        transform: translateX(-5px) rotate(-0.7deg) scale(1);
    }

    40% {
        transform: translateX(5px) rotate(0.7deg) scale(1);
    }

    60% {
        transform: translateX(-3px) rotate(-0.4deg) scale(1);
    }

    80% {
        transform: translateX(3px) rotate(0.4deg) scale(1);
    }
}

/* ─── STAGE 2: heavy shake + just 15% bigger (feels powerful, not huge) ─── */
.wl-s.shake-heavy {
    animation: shake-heavy 0.28s ease-in-out infinite;
}

@keyframes shake-heavy {

    0%,
    100% {
        transform: translateX(0) rotate(0deg) scale(1.15);
    }

    15% {
        transform: translateX(-13px) rotate(-2.2deg) scale(1.15);
    }

    35% {
        transform: translateX(14px) rotate(2.2deg) scale(1.15);
    }

    55% {
        transform: translateX(-10px) rotate(-1.8deg) scale(1.15);
    }

    75% {
        transform: translateX(10px) rotate(1.8deg) scale(1.15);
    }
}

/* ─── STAGE 3: BOOM — JS takes over via inline style ─── */
.wl-s.boom {
    animation: none !important;
    /* JS: transition + scale(55) + filter white-glow */
    transition: transform 0.25s cubic-bezier(0.5, 0, 0.75, 0),
        filter 0.2s ease,
        opacity 0.3s ease !important;
}

/* ── Scroll hint ── */
.scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(247, 249, 247, 0.3);
    z-index: 5;
    animation: fade-float 2.5s ease-in-out infinite;
}

.sh-line {
    width: 1px;
    height: 48px;
    background: rgba(247, 249, 247, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.sh-dot {
    width: 1px;
    height: 16px;
    background: var(--violet-lt);
    border-radius: 1px;
    animation: sh-travel 1.8s ease-in-out infinite;
}

@keyframes sh-travel {
    0% {
        transform: translateY(-16px);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(48px);
        opacity: 0;
    }
}

@keyframes fade-float {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}