:root {
    color-scheme: dark;
    font-family: "Arial", Helvetica, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f131d;
    color: #1f2933;
    overflow: hidden;
    transition: background 0.6s ease;
}

.intro-wall {
    position: absolute;
    inset: -10% -20%;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-content: center;
    filter: saturate(1.05) brightness(0.6);
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.intro-wall img {
    width: clamp(120px, 16vmin, 240px);
    height: clamp(120px, 16vmin, 240px);
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 35px -18px rgba(8, 15, 30, 0.8);
}

body.active {
    background: #04070d;
    color: #f8fafc;
}

.intro {
    display: grid;
    place-items: center;
    gap: 1.25rem;
    padding: 2.5rem 3rem;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #d8dde2;
    box-shadow: 0 18px 35px -20px rgba(15, 23, 42, 0.85);
    text-align: center;
    max-width: 520px;
    color: #111827;
    transition: opacity 0.6s ease;
    position: relative;
    z-index: 1;
}

.intro.is-hidden {
    opacity: 0;
    pointer-events: none;
}

body.active .intro-wall {
    opacity: 0;
}

.title {
    font-size: clamp(2.25rem, 7vw, 3.8rem);
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: #16213d;
    text-shadow: 0 2px 4px rgba(17, 24, 39, 0.16);
}

#yesButton {
    padding: 0.75rem 2.5rem;
    border: 1px solid #0f4c81;
    border-radius: 4px;
    background: #1464a0;
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#yesButton:hover {
    transform: translateY(-1px);
    background: #115587;
    box-shadow: 0 3px 10px rgba(15, 76, 129, 0.35);
}

#yesButton:focus-visible {
    outline: 3px solid rgba(20, 100, 160, 0.6);
    outline-offset: 3px;
}

.intro-tagline {
    font-size: 0.95rem;
    color: #374151;
    max-width: 34ch;
    line-height: 1.55;
}

.intro-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.intro-gallery img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

#stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
    overflow: hidden;
}

body.active #stage {
    opacity: 1;
    transform: scale(1);
    pointer-events: none;
}

.portrait-stream {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
    z-index: 0;
}

body.active .portrait-stream {
    opacity: 0.8;
}

.portrait-track {
    position: absolute;
    left: 0;
    display: flex;
    gap: 6vmin;
    width: max-content;
    transform: translateX(0);
    animation: scroll-left var(--speed, 28s) linear infinite;
    filter: saturate(1.08) brightness(1.05);
    opacity: 0.9;
}

.portrait-track.track-one {
    top: 12%;
    --speed: 32s;
}

.portrait-track.track-two {
    bottom: 14%;
    --speed: 36s;
    animation-name: scroll-right;
    opacity: 0.8;
}

body:not(.active) .portrait-track {
    animation-play-state: paused;
}

.portrait-track img {
    width: clamp(160px, 20vmin, 320px);
    height: clamp(190px, 26vmin, 420px);
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 32px 70px -30px rgba(4, 18, 38, 0.8);
    opacity: 0.95;
    filter: contrast(1.15) saturate(1.22);
}

.portrait-track img:nth-child(odd) {
    transform: rotate(-4deg);
}

.portrait-track img:nth-child(even) {
    transform: rotate(3deg);
}

.hero-image {
    position: relative;
    z-index: 1;
    width: min(72vmin, 680px);
    height: auto;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.05);
    box-shadow: 0 45px 100px -35px rgba(8, 47, 73, 0.75);
}

.overlay-text {
    position: absolute;
    top: 2%;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 2;
    font-size: clamp(1.0rem, 2.6vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 0.2rem;
    text-shadow:
        2px 0 6px rgba(8, 13, 23, 0.9),
        -2px 0 6px rgba(8, 13, 23, 0.9),
        0 2px 6px rgba(8, 13, 23, 0.9),
        0 -2px 6px rgba(8, 13, 23, 0.9),
        0 14px 40px rgba(2, 6, 23, 0.65);
    -webkit-text-stroke: 1px rgba(8, 13, 23, 0.75);
    animation: pulse-tilt 4.5s ease-in-out infinite;
    pointer-events: none;
    white-space: normal;
    text-align: center;
    width: min(110vw, 90rem);
}

#sand {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 3;
}

.grain {
    position: absolute;
    top: -20%;
    background: rgba(251, 191, 36, 0.45);
    border-radius: 999px;
    filter: blur(0.6px);
    animation: fall var(--dur, 8s) linear infinite;
    animation-delay: var(--delay, 0s);
    opacity: var(--opacity, 0.35);
}

@keyframes fall {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(var(--drift, 15px), 130vh, 0);
    }
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes pulse-tilt {
    0% {
        transform: translate(-50%, 0) rotate(-8deg) scale(0.9);
    }
    25% {
        transform: translate(-50%, -1%) rotate(-2deg) scale(1.05);
    }
    50% {
        transform: translate(-50%, 1%) rotate(4deg) scale(1.12);
    }
    75% {
        transform: translate(-50%, -1%) rotate(0deg) scale(0.98);
    }
    100% {
        transform: translate(-50%, 0) rotate(-8deg) scale(0.9);
    }
}
