:root {
    --obsidian: #0F0F0F;
    --white: #F8F8F8;
    --gold: #D4AF37;
    --font-heading: 'Oswald', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body {
    background-color: var(--obsidian);
    color: var(--white);
    font-family: var(--font-heading);
    overflow-x: hidden;
    line-height: 1.5;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--white);
    z-index: 10000;
    pointer-events: none;
    animation: initialWhiteFade 3s ease-in forwards;
}

@keyframes initialWhiteFade {
    0% { opacity: 1; }
    33% { opacity: 1; } /* Remains white for the first 1s (of 3s) */
    100% { opacity: 0; visibility: hidden; } /* Fades out over the remaining 2s */
}

/* Film Grain Texture */
.film-grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9999;
    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.85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.075;
    animation: 
        grainFadeIn 2s ease-out 1s forwards, /* Starts fading a sec earlier */
        grain 8s steps(10) infinite;
}

@keyframes grainFadeIn {
    0% { opacity: 1; }
    100% { opacity: 0.075; }
}

@keyframes grain {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -10%);
    }

    20% {
        transform: translate(-15%, 5%);
    }

    30% {
        transform: translate(7%, -25%);
    }

    40% {
        transform: translate(-5%, 25%);
    }

    50% {
        transform: translate(-15%, 10%);
    }

    60% {
        transform: translate(15%, 0%);
    }

    70% {
        transform: translate(0%, 15%);
    }

    80% {
        transform: translate(3%, 35%);
    }

    90% {
        transform: translate(-10%, 10%);
    }
}

/* Navigation */
.sticky-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    z-index: 100;
    display: flex;
    justify-content: center;
    mix-blend-mode: difference;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-nav.visible {
    transform: translateY(0);
    opacity: 1;
}

.nav-content {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo-container {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 62px;
    width: auto;
}

.monogram {
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.25rem;
}

.cta-button {
    margin-left: auto;
    background: var(--gold);
    color: var(--obsidian);
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.cta-button:hover {
    background: #e6c855;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    transform: scale(1.02);
}

.sticky-nav.hide-cta .cta-button {
    opacity: 0;
    pointer-events: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo {
    margin-bottom: -2rem;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.brand-logo {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}

.headline {
    font-size: clamp(3rem, 8vw, 7rem);
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 2rem;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

.sub-headline {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0;
    color: #CCC;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
    pointer-events: none;
}

.scroll-indicator.hidden {
    opacity: 0 !important;
}

.mouse {
    width: 20px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.wheel {
    width: 2px;
    height: 6px;
    background-color: var(--white);
    border-radius: 2px;
    margin-top: 5px;
    animation: scrollWheel 2s ease-in-out infinite;
}

.scroll-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.scroll-arrows span {
    display: block;
    width: 8px;
    height: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    animation: arrowFloat 2s infinite;
}

.scroll-arrows span:nth-child(2) {
    animation-delay: -0.2s;
}

.scroll-arrows span:nth-child(3) {
    animation-delay: -0.4s;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

@keyframes arrowFloat {
    0% { opacity: 0; transform: rotate(45deg) translate(-2px, -2px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(2px, 2px); }
}

/* Narrative Scroll */
.narrative-scroll {
    padding: 8rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15vh;
}

.article {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.clause-card {
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.clause-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--gold) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    mix-blend-mode: color-dodge;
    pointer-events: none;
    z-index: -1;
}

.clause-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px -10px rgba(212, 175, 55, 0.15);
}

.clause-card:hover::before {
    opacity: 0.15;
}

.clause-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.clause-number {
    font-family: var(--font-mono);
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.clause-header h2 {
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.clause-card p {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #AAA;
    cursor: default;
}

/* Footer CTA */
.final-cta {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding: 4rem 2rem;
}

.footer-content {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-heading {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.primary-button {
    background: var(--gold);
    color: var(--obsidian);
    border: none;
    padding: 1.5rem 3rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.primary-button:hover {
    background: #e6c855;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
    transform: scale(1.02);
}

.footer-bottom {
    margin-top: 8rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #666;
    border-top: 1px solid #222;
    padding-top: 2rem;
    text-align: left;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .clause-card {
        padding: 2rem;
    }

    .monogram {
        display: none;
    }
}

.timestamp-container {
    display: flex;
    gap: 0.5rem;
}

.mono-value {
    color: var(--white);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.light-leak-follower {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Hover Image Links */
.image-hover-link {
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: rgba(212, 175, 55, 0.4);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-hover-link:hover {
    color: var(--white);
    text-decoration-color: var(--white);
}

.floating-hover-image {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 350px;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.floating-hover-image.active {
    opacity: 1;
    transform: scale(1);
}