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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent scrolling for full immersion */
    background-color: #050505;
    font-family: 'Cinzel', serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   BACKGROUND & PARALLAX
   ========================================= */
.background-wrapper {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    z-index: 1;
    pointer-events: none;
}

.bg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 15%; /* Shifted to show full character */
    background-repeat: no-repeat;
    /* Ensure high quality rendering */
    image-rendering: -webkit-optimize-contrast;
}

/* =========================================
   ATMOSPHERIC EFFECTS
   ========================================= */
.effects-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* Vignette for focus and darker mood */
.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.6) 100%);
    z-index: 10;
}

/* Rain Effect */
.rain {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    background: repeating-linear-gradient(
        transparent 0,
        rgba(255, 255, 255, 0.03) 2px,
        transparent 6px
    );
    animation: rain-fall 0.8s linear infinite;
    opacity: 0.4;
    transform: rotate(15deg);
}

@keyframes rain-fall {
    0% { transform: translateY(0) rotate(15deg); }
    100% { transform: translateY(50%) rotate(15deg); }
}

/* Fog / Mist */
.fog {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iNDAwIj48ZmlsdGVyIGlkPSJmIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC4wMSIgbnVtT2N0YXZlcz0iNSIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNmKSIgb3BhY2l0eT0iMC4zIi8+PC9zdmc+');
    opacity: 0.15;
    animation: fog-drift 60s linear infinite;
    mix-blend-mode: screen;
}

@keyframes fog-drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Spiritual Dust Particles */
.dust-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(212, 175, 55, 0.4);
    animation: float-dust 10s infinite ease-in-out;
}

.p1 { width: 3px; height: 3px; top: 20%; left: 10%; animation-duration: 12s; }
.p2 { width: 2px; height: 2px; top: 60%; left: 20%; animation-duration: 15s; animation-delay: 1s; }
.p3 { width: 4px; height: 4px; top: 40%; left: 80%; animation-duration: 18s; animation-delay: 2s; }
.p4 { width: 2px; height: 2px; top: 80%; left: 60%; animation-duration: 14s; animation-delay: 0.5s; }
.p5 { width: 3px; height: 3px; top: 10%; left: 50%; animation-duration: 20s; animation-delay: 3s; }

@keyframes float-dust {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

/* Soft Light Sweep */
.light-sweep-overlay {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    animation: light-sweep-screen 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes light-sweep-screen {
    0%, 40% { left: -100%; }
    50% { left: 200%; }
    100% { left: 200%; }
}

/* =========================================
   LAYOUT & CONTENT
   ========================================= */
.content-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to bottom */
    padding: 4vw;
}

/* Headline Block - Left / Lower Left */
.headline-block {
    margin-bottom: 3rem;
    max-width: 60vw;
    text-align: left;
    position: relative;
    z-index: 101;
}

/* Typography */
.cinematic-text {
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 20px rgba(212, 175, 55, 0.3);
}

h1 {
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: #fff;
    /* Sandy gold glow/shadow */
    text-shadow: 
        0 4px 4px rgba(0,0,0,0.8),
        0 0 15px rgba(212, 175, 55, 0.4);
}

h2 {
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #e0e0e0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Headline Animations */
.reveal-impact {
    animation: impact-reveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: scale(1.1);
}

.reveal-fade {
    animation: fade-up 1.2s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes impact-reveal {
    0% { opacity: 0; transform: scale(1.5); filter: blur(10px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes fade-up {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Pulse after reveal for Headline 1 */
.reveal-impact {
    animation: impact-reveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               subtle-pulse 4s ease-in-out infinite 1.5s;
}

@keyframes subtle-pulse {
    0%, 100% { text-shadow: 0 4px 4px rgba(0,0,0,0.8), 0 0 15px rgba(212, 175, 55, 0.4); }
    50% { text-shadow: 0 4px 4px rgba(0,0,0,0.8), 0 0 25px rgba(212, 175, 55, 0.7); }
}

/* =========================================
   CTA BUTTON
   ========================================= */
.cta-block {
    margin-bottom: 2vh;
    display: flex;
    justify-content: flex-start; /* Align left/center */
    position: relative;
    z-index: 102;
}

.cta-wrapper {
    position: relative;
}

/* Targeting the generated anchor tag */
.cta-wrapper a {
    display: inline-block;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.5rem);
    text-transform: uppercase;
    color: #2a1a00; /* Dark brown text for contrast on gold */
    background: linear-gradient(180deg, #f0d49a 0%, #d9b77c 40%, #b68a4d 100%);
    padding: 1.2rem 3rem;
    border: 1px solid #ffedc2;
    border-radius: 4px;
    box-shadow: 
        0 0 0 1px #8a6a3a, /* Inner dark border */
        0 10px 20px rgba(0,0,0,0.5),
        0 0 15px rgba(212, 175, 55, 0.3); /* Outer glow */
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    
    /* Urgent attention pulse */
    animation: urgent-pulse 4s infinite;
}

/* Hover State */
.cta-wrapper a:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 0 1px #8a6a3a,
        0 15px 30px rgba(0,0,0,0.6),
        0 0 25px rgba(212, 175, 55, 0.6);
    background: linear-gradient(180deg, #fff0c7 0%, #e6c58d 40%, #c49655 100%);
}

/* Active/Click State */
.cta-wrapper a:active {
    transform: scale(0.98);
}

/* Light Sweep on Button */
.cta-wrapper a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: skewX(-20deg);
    animation: btn-shine 3s infinite;
}

@keyframes btn-shine {
    0%, 70% { left: -100%; }
    100% { left: 200%; }
}

/* Urgent Pulse Animation (Short rapid blink) */
@keyframes urgent-pulse {
    0%, 90% { transform: scale(1); filter: brightness(1); }
    92% { transform: scale(1.02); filter: brightness(1.2); }
    94% { transform: scale(1); filter: brightness(1); }
    96% { transform: scale(1.02); filter: brightness(1.2); }
    98% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1); filter: brightness(1); }
}

/* =========================================
   MEDIA QUERIES
   ========================================= */
@media (max-width: 768px) {
    .content-layer {
        align-items: center; /* Center content on mobile */
        padding-bottom: 10vh;
    }

    .headline-block {
        text-align: center;
        max-width: 90vw;
        margin-bottom: 2rem;
    }

    .cta-block {
        justify-content: center;
        width: 100%;
    }

    .cta-wrapper a {
        width: 90vw;
        text-align: center;
        padding: 1rem;
    }

    /* Adjust background for mobile portrait */
    .bg-image {
        background-position: 65% 15%; /* Shift to keep character visible */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.1rem;
    }
}
