/* ============================================================
   RHYDLE — CINEMATIC PARTICLES DESIGN (Stitch)
   Newsreader + Public Sans + Fraunces | Gold #F9D406 | Black #070706
   ============================================================ */

:root {
    --dark: #070706;
    --gold: #F9D406;
    --obsidian: rgba(12, 12, 10, 0.85);
    --grid-color: rgba(255, 255, 255, 0.04);
    --border-color: rgba(255, 255, 255, 0.08);
}

/* ── Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    background-color: var(--dark);
    color: #F0EFE8;
    font-family: 'Public Sans', sans-serif;
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 100% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    position: relative;
}


/* ── Font Classes ── */
.font-serif-auth {
    font-family: 'Newsreader', serif;
    letter-spacing: -0.01em;
}

/* ── Glimmer Field ── */
.glimmer-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glimmer-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ── Cinematic Particles ── */
.cinematic-particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    filter: blur(1px);
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
    20% { opacity: 0.15; }
    80% { opacity: 0.15; }
    100% {
        opacity: 0;
        transform: translate(var(--drift-x), var(--drift-y)) scale(1.2);
    }
}

@keyframes glimmer-pulse {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.3; transform: scale(1.2); }
}

/* ── Journey Line ── */
.journey-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(249,212,6,0.15) 15%, rgba(249,212,6,0.15) 85%, transparent);
    transform: translateX(-50%);
    z-index: 0;
}

/* ── Step Node ── */
.step-node {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--gold);
    position: relative;
    z-index: 10;
    box-shadow: 0 0 15px rgba(249,212,6,0.5);
}

/* ── Narrative Block ── */
.narrative-block {
    position: relative;
    z-index: 10;
    padding-top: 8rem;
    padding-bottom: 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .narrative-block {
        padding-top: 12rem;
        padding-bottom: 12rem;
    }
}

/* ── Obsidian Glass ── */
.obsidian-glass {
    background: var(--obsidian);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 0 !important;
}

/* ── Sharp Button ── */
.sharp-btn {
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Premium Glow ── */
.premium-glow {
    box-shadow:
        0 0 40px -10px rgba(249, 212, 6, 0.35),
        inset 0 0 20px rgba(249, 212, 6, 0.05);
    border: 1px solid rgba(249, 212, 6, 0.4) !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-glow:hover {
    box-shadow:
        0 0 60px -5px rgba(249, 212, 6, 0.5),
        inset 0 0 30px rgba(249, 212, 6, 0.1);
    border: 1px solid rgba(249, 212, 6, 0.6) !important;
}

/* ── Loader Spinner ── */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loader {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #070706;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ── Modal ── */
#successModal.active {
    opacity: 1;
    pointer-events: all;
}
#successModal.active #modalContent {
    transform: scale(1) translateY(0);
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.08); }
    to { transform: scale(1); opacity: 1; }
}
#successModal.active .modal-icon {
    animation: popIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible, input:focus-visible, a:focus-visible {
    outline: 2px solid #F9D406;
    outline-offset: 3px;
}
