/* double-standard.xyz — Kinetic Typography Hero */
/* Palette: #0f0f0f #ffffff #666666 #3b82f6 #ef4444 #fbbf24 */
/* Fonts: Montserrat 900, Inter 400, Fira Code 400 */

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

html {
    scroll-behavior: auto;
    overflow-x: hidden;
}

body {
    background: #0f0f0f;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ========== TOP BAR ========== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    transition: opacity 0.4s ease;
}

.topbar-brand {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #666666;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.topbar-scroll-hint {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #666666;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    animation: pulseHint 2s ease-in-out infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.topbar-scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ========== CENTER LINE ========== */
.center-line {
    position: fixed;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.06);
    z-index: 10;
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.center-line.visible {
    transform: scaleY(1);
}

/* ========== HERO: THE WORD ========== */
.hero {
    height: 200vh;
    position: relative;
    overflow: visible;
}

.hero-inner {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.split-container {
    display: flex;
    width: 100%;
    justify-content: center;
    position: relative;
}

.word-half {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(80px, 15vw, 200px);
    line-height: 0.9;
    color: #ffffff;
    white-space: nowrap;
    will-change: transform;
    transition: none;
}

.word-left {
    clip-path: inset(0 50% 0 0);
    margin-right: -0.5em;
}

.word-right {
    clip-path: inset(0 0 0 50%);
    margin-left: -0.5em;
}

.word-center {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 6vw, 80px);
    color: #fbbf24;
    line-height: 0.9;
    opacity: 0;
    transform: translateY(10px);
    will-change: opacity, transform;
    transition: opacity 0.6s ease, transform 0.6s ease;
    margin-top: 0.3em;
}

.word-center.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========== CONTRADICTIONS ========== */
.contradictions {
    position: relative;
    z-index: 5;
}

.contradiction-block {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.contradiction-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

.contra-blue {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(28px, 5vw, 64px);
    color: #3b82f6;
    line-height: 1.05;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.contra-red {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(22px, 4vw, 52px);
    color: #ef4444;
    line-height: 1.05;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease 0.25s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.contradiction-block.in-view .contra-blue {
    opacity: 1;
    transform: translateX(0);
}

.contradiction-block.in-view .contra-red {
    opacity: 1;
    transform: translateX(0);
}

.contra-footnote {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #666666;
    letter-spacing: 0.05em;
}

/* ========== MERGE ========== */
.merge {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.merge-inner {
    text-align: center;
    max-width: 700px;
}

.merge-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(24px, 4vw, 48px);
    color: #fbbf24;
    line-height: 1.15;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.merge-text-second {
    margin-top: 0.8em;
    transition-delay: 0.3s;
}

.merge.in-view .merge-text {
    opacity: 1;
    transform: translateY(0);
}

.merge-line {
    width: 0;
    height: 2px;
    background: #666666;
    margin: 2.5rem auto 0;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

.merge.in-view .merge-line {
    width: 80px;
}

/* ========== QUESTION ========== */
.question {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.question-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 20px);
    color: #ffffff;
    opacity: 0;
    transition: opacity 1.2s ease;
    letter-spacing: 0.02em;
}

.question.in-view .question-text {
    opacity: 1;
}

.question-footnote {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #666666;
    margin-top: 3rem;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.question.in-view .question-footnote {
    opacity: 0.6;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .topbar {
        padding: 0.8rem 1.2rem;
    }

    .contradiction-block {
        padding: 2rem 1.2rem;
    }

    .contra-blue {
        transform: translateX(-20px);
    }

    .contra-red {
        transform: translateX(20px);
    }

    .contra-footnote {
        bottom: 1.2rem;
        right: 1.2rem;
    }
}

@media (max-width: 480px) {
    .word-half {
        font-size: clamp(60px, 18vw, 120px);
    }

    .word-center {
        font-size: clamp(28px, 8vw, 50px);
    }
}
