/* --- RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #050505; /* Deep black fallback */
    /* font-family: 'Raleway', sans-serif; */
    /* color: #e0e0e0;  *//* Off-white/Bone color */
    /* -webkit-font-smoothing: antialiased; */
/*     overflow-x: hidden;
    overflow-y: auto; */
/* }  */

body, html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    opacity: 0;
    transition: opacity 0.4s ease;

    background-color: #050505;
    font-family: 'Raleway', sans-serif;
    color: #e0e0e0;
    -webkit-font-smoothing: antialiased;

    opacity: 0;
    transition: opacity 0.4s ease;
}

/* --- VIDEO ENGINE STYLES --- */
#video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 2000ms ease-in-out; /* The Cross-fade duration */
    will-change: opacity;
    opacity: 0;
    z-index: 0;
}

.bg-video.visible {
    opacity: 1;
    z-index: 2;
}

#static-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    z-index: -1;
    display: none;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .bg-video { display: none; }
    #static-bg { display: block; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- ATMOSPHERE --- */
.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    background: radial-gradient(
        circle, 
        rgba(0,0,0,0.1) 0%, 
        rgba(0,0,0,0.4) 50%, 
        rgba(0,0,0,0.95) 100%
    );
    pointer-events: none;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
}

#ritual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: radial-gradient(
        circle, 
        transparent 20%, 
        rgba(100, 0, 0, 0.4) 80%,
        rgba(50, 0, 0, 0.9) 100%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 3s ease-in-out;
    mix-blend-mode: overlay;
}

#fade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 6;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

#fade-overlay.active {
    opacity: 1;
}

/* --- UI LAYERS --- */

/* Focus Trigger (Top Left) */
/* .ui-trigger {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 50;
    background: none;
    border: none;
    color: #555;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.3s;
} */

.text-scrim {
    position: relative;
    max-width: 72ch;

    margin-left: auto;
    margin-right: auto;
    margin-top: 2.25rem;

    padding: 3rem 4rem 3.5rem;

    border-radius: 6px;

    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.38) 0%,
        rgba(0, 0, 0, 0.32) 25%,
        rgba(0, 0, 0, 0.22) 55%,
        rgba(0, 0, 0, 0.10) 75%,
        rgba(0, 0, 0, 0.0) 100%
    );
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;

    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.55);
}

.social-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-link:hover,
.social-link:focus {
    color: rgba(255, 255, 255, 0.9);
}

.social-separator {
    margin: 0 0.6rem;
    opacity: 0.4;
}

/* .text-scrim-mini {
    position: relative;
    max-width: 72ch;
    opacity: 0.85;

    margin-left: auto;
    margin-right: auto;
    margin-top: 2.25rem;

    padding: 1.25rem 3rem 1.75rem;

    border-radius: 6px;

    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.38) 0%,
        rgba(0, 0, 0, 0.28) 50%,
        rgba(0, 0, 0, 0.12) 85%,
        rgba(0, 0, 0, 0.0) 100%
    );
} */

.text-scrim p {
    color: rgba(255, 255, 255, 0.88);
}

.text-scrim h2 {
    color: rgba(255, 255, 255, 0.78);
}

.ui-trigger {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.70); /* was #555 */
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.3s, opacity 0.3s;
    text-shadow: 0 1px 6px rgba(0,0,0,0.45);
    padding: 0.5rem 0.5em;
}

#ui-controls {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
}

.ui-trigger:hover {
    color: #fff;
}

#sound-trigger {
    opacity: 0.90;
}
#sound-trigger:hover {
    opacity: 1;
}

/* Focus Modal */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 60;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    font-family: 'Cinzel', serif;
    color: #888;
    margin-bottom: 2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.modal-content .ui-trigger {
    margin-top: 3rem;
    opacity: 0.6;
}

.modal-content .ui-trigger:hover {
    opacity: 1;
}

.focus-list {
    list-style: none;
    margin-bottom: 3rem;
}

.focus-list li {
    margin: 1.5rem 0;
}

.focus-list button {
    background: none;
    border: none;
    color: #e0e0e0;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s, text-shadow 0.3s;
}

.focus-list button:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Content Shared */
.content-layer,
.presentation-layer {
    position: absolute;
    z-index: 10;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    min-height: 100vh;
    justify-content: flex-start;

    padding-top: 6rem;
    padding-right: 2rem;
    padding-bottom: 4rem;
    padding-left: 2rem;

    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
}

/* Landing */
.content-layer {
    animation: fadeInUp 1.5s ease-out forwards;
    opacity: 1;
}

/* Text Fade Transition Class */
.text-fade-out {
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.text-fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
}

#intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: inherit;
    width: 100%;
}

/* Presentation (Hidden Initially) */
.presentation-layer {
    opacity: 0;
    pointer-events: none;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    transform: scale(0.98);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TYPOGRAPHY --- */

h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding-bottom: 1rem;
    transition: opacity 0.5s ease;
}

h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #a8a8a8;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    transition: opacity 0.5s ease;
}

p {
    max-width: 600px;
    font-size: 0.9rem;
    line-height: 1.8;
    letter-spacing: 0.05em;
    color: #cccccc;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,1);
    transition: opacity 0.5s ease;
}

/* --- BUTTONS --- */

.btn-trance {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    cursor: pointer;
    transition: all 0.4s ease;
    margin: 0 10px;
}

#action-container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.btn-trance:hover {
    background: rgba(255,255,255,0.1);
    letter-spacing: 0.3em;
    border-color: #fff;
}

.btn-text {
    margin-top: 3rem;
    background: none;
    border: none;
    color: #777;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    font-size: 0.7rem;
    transition: color 0.3s ease;
}

.btn-text:hover {
    color: #fff;
}

#exit-btn {
    margin: 0 0 1.75rem 0;
    padding-top: 3rem;

    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

#exit-btn:hover {
    color: #ffffff;
}

/* Artist Focus Action Styles */
.artist-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.focus-buttons-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-link {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;

    transition: color 0.2s ease, opacity 0.2s ease;
}

.social-link:hover,
.social-link:focus {
    color: rgba(255, 255, 255, 0.95);
}

/* --- STATUS TEXT --- */
.status-text {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 0.6rem;
    opacity: 0.5;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: opacity 1s ease;
    z-index: 20;
    text-align: right;
}

/* --- PRESENTATION GRID --- */
.presentation-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #d4d4d4;
    margin-bottom: 1rem;
}

.divider {
    width: 60px;
    height: 2px;
    background: #444; /* Default neutral */
    margin: 0 auto 3rem auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: background 1s;
}

/* Focus specific dividers */
.focus-primal .divider { background: #8b0000; box-shadow: 0 0 10px #8b0000; }
.focus-folk .divider { background: #5f7161; box-shadow: 0 0 10px #5f7161; }
/* .focus-artist .divider { background: #888; } */
.focus-artist .divider {
    background: #4a6fa5;
    box-shadow: 0 0 10px rgba(74, 111, 165, 0.6);
}

.cycles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
}

#landing-desc strong {
    display: block;
    margin-bottom: 1rem;
    letter-spacing: 0.08em;
}

#landing-desc {
    line-height: 1.7;
    letter-spacing: 0.045em;
}

.cycle-card {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    width: 300px;
    text-align: left;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.cycle-card:hover {
    background: rgba(30, 30, 30, 0.6);
    border-color: #aaa;
    transform: translateY(-5px);
}

.cycle-card.is-playable {
    cursor: pointer;
}

.focus-primal .cycle-card:hover { border-color: #8b0000; }
.focus-folk .cycle-card:hover { border-color: #5f7161; }

.cycle-card .rune {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: #444;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.cycle-card:hover .rune {
    color: #e0e0e0;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.focus-primal .cycle-card:hover .rune { color: #8b0000; text-shadow: 0 0 15px rgba(139, 0, 0, 0.5); }
.focus-folk .cycle-card:hover .rune { color: #5f7161; text-shadow: 0 0 15px rgba(95, 113, 97, 0.5); }

.cycle-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.cycle-card .meta {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 1rem;
    letter-spacing: 0.2em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.cycle-card .desc {
    font-size: 0.85rem;
    color: #bbb;
    line-height: 1.6;
    margin-bottom: 0;
    text-shadow: none;
}

/* --- STATE ANIMATIONS --- */

/* State: Ritual Active (Shield Wall Open) */
body.ritual-active #ritual-overlay {
    opacity: 1;
    /* animation: pulse-red 5s infinite ease-in-out; */
}

/* Hide Landing Page */
body.ritual-active .content-layer#landing-layer {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

/* Show Presentation Layer */
body.ritual-active .presentation-layer {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
    transition-delay: 0.5s;
}

/* .presentation-layer .social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;

    width: fit-content;
    margin: 0 auto;

    padding: 1rem 1.5rem;

    border-top: 1px solid rgba(255,255,255,0.08);

    letter-spacing: 0.22em;
  
    margin-top: 0.75rem;
    padding-top: 1.5rem;

    margin-left: auto;
    margin-right: auto;
} */

.presentation-layer .social-links {
    width: fit-content;
    margin: 0.75rem auto 0;

    padding: 1.5rem 1.5rem 0;

    border-top: 1px solid rgba(255,255,255,0.08);

    letter-spacing: 0.22em;
}

.presentation-layer .social-link {
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

.presentation-layer .social-link:hover,
.presentation-layer .social-link:focus {
    color: rgba(255, 255, 255, 0.95);
}

body.ritual-active.focus-primal #ritual-overlay {
    background: radial-gradient(
        circle,
        transparent 20%,
        rgba(100, 0, 0, 0.4) 80%,
        rgba(50, 0, 0, 0.9) 100%
    );
    animation: pulse-red 5s infinite ease-in-out;
}

body.ritual-active.focus-folk #ritual-overlay {
    background: radial-gradient(
        circle,
        transparent 20%,
        rgba(40, 70, 40, 0.45) 80%,
        rgba(20, 40, 20, 0.9) 100%
    );
    animation: pulse-green 6s infinite ease-in-out;
}

body.ritual-active.focus-artist #ritual-overlay {
    background: radial-gradient(
        circle,
        transparent 20%,
        rgba(40, 60, 90, 0.45) 80%,
        rgba(20, 30, 55, 0.9) 100%
    );
    animation: pulse-blue 6s infinite ease-in-out;
}

.focus-folk .presentation-layer .social-links {
    border-top-color: rgba(95, 113, 97, 0.35);
}

@keyframes pulse-green {
    0%   { opacity: 0.25; }
    50%  { opacity: 0.55; }
    100% { opacity: 0.25; }
}

@keyframes pulse-red {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

@keyframes pulse-blue {
    0%   { opacity: 0.22; }
    50%  { opacity: 0.5; }
    100% { opacity: 0.22; }
}

/* Responsive */
@media (max-width: 768px) {
     .social-links {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.75rem;
    }

    .social-separator {
        display: none;
        opacity: 0.35;
    }

    .social-link {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
    }
    .cycles-grid {
        flex-direction: column;
        align-items: center;
    }
    .cycle-card {
        width: 100%;
        max-width: 350px;
    }
    .focus-buttons-row {
        flex-direction: column;
    }
    .text-scrim {
    padding: 2rem;
    }
}

@media (min-width: 1024px) and (min-height: 700px) {
    .content-layer,
    .presentation-layer {
        justify-content: center;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 1024px) {
    .cycles-grid {
        gap: 1.5rem;
    }
}