/* ===================================================
   double-standard.xyz -- brutalist anti-design experiment
   =================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #faf9f7;
    color: #212121;
    overflow-x: hidden;
}

/* --- Dual Section Grid --- */
.dual-section {
    display: grid;
    grid-template-columns: 2fr 3fr;
    min-height: 100vh;
    position: relative;
}

/* Alternating sides: even sections swap polished/raw order */
.dual-section:nth-child(even) .col.polished {
    order: 2;
}

.dual-section:nth-child(even) .col.raw {
    order: 1;
}

/* --- Polished Column --- */
.col.polished {
    background: #faf9f7;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: 1.2rem;
    line-height: 1.8;
    letter-spacing: 0.03em;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* --- Raw Column --- */
.col.raw {
    background: #fff176;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: rotate(0.5deg);
    position: relative;
    clip-path: polygon(
        0% 0%,
        100% 0%,
        100% 5%,
        97% 10%,
        100% 15%,
        98% 20%,
        100% 25%,
        96% 30%,
        100% 35%,
        97% 40%,
        100% 45%,
        98% 50%,
        100% 55%,
        96% 60%,
        100% 65%,
        97% 70%,
        100% 75%,
        98% 80%,
        100% 85%,
        97% 90%,
        100% 95%,
        100% 100%,
        0% 100%
    );
}

/* When raw column is on the left (even sections), flip jagged edge to left side */
.dual-section:nth-child(even) .col.raw {
    clip-path: polygon(
        0% 0%,
        100% 0%,
        100% 100%,
        0% 100%,
        0% 95%,
        3% 90%,
        0% 85%,
        2% 80%,
        0% 75%,
        4% 70%,
        0% 65%,
        3% 60%,
        0% 55%,
        2% 50%,
        0% 45%,
        4% 40%,
        0% 35%,
        3% 30%,
        0% 25%,
        2% 20%,
        0% 15%,
        3% 10%,
        0% 5%
    );
}

/* --- Raw Column: Dashed Borders on Everything --- */
.col.raw h1,
.col.raw h2,
.col.raw p {
    border: 3px dashed #bdbdbd;
    padding: 0.5rem;
    margin: 0.3rem 0;
}

/* --- Polished Column: No Borders, Clean --- */
.col.polished h1,
.col.polished h2,
.col.polished p {
    border: none;
    padding: 0;
    margin: 0;
}

/* --- Polished Headings --- */
.polished-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 2.8rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #212121;
    margin-bottom: 1.5rem;
}

.polished-sub,
.polished-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: 1.2rem;
    line-height: 1.8;
    letter-spacing: 0.03em;
    color: #212121;
    max-width: 480px;
}

/* --- Raw Headings --- */
.raw-heading {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.3;
    color: #212121;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.raw-sub,
.raw-text {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #212121;
}

/* --- Strikethrough on Raw Side --- */
.strikethrough {
    text-decoration: line-through;
    text-decoration-color: #7e57c2;
    text-decoration-thickness: 2px;
}

/* --- Hero Specific --- */
.hero .polished-heading {
    font-size: 3.4rem;
}

.hero .raw-heading {
    font-size: 1.8rem;
}

/* --- Equality Line --- */
.equality-line {
    width: 100%;
    height: 1px;
    background: #7e57c2;
    margin: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.equality-line.visible {
    transform: scaleX(1);
}

/* --- Merge / Reveal Section --- */
.merge-section {
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    opacity: 0;
    transition: opacity 1s ease;
}

.merge-section.visible {
    opacity: 1;
}

.merge-content {
    max-width: 640px;
    text-align: center;
}

.merge-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 2.4rem;
    line-height: 1.3;
    color: #212121;
    margin-bottom: 2rem;
}

.merge-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: #212121;
    margin-bottom: 1.5rem;
}

.merge-attribution {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #7e57c2;
    margin-top: 3rem;
}

/* --- Scroll Animations for Dual Sections --- */
.dual-section .col {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.dual-section .col.polished {
    transform: translateX(-30px);
}

.dual-section .col.raw {
    transform: translateX(30px) rotate(0.5deg);
}

.dual-section.in-view .col.polished {
    opacity: 1;
    transform: translateX(0);
}

.dual-section.in-view .col.raw {
    opacity: 1;
    transform: translateX(0) rotate(0.5deg);
}

/* --- Responsive (mobile) --- */
@media (max-width: 768px) {
    .dual-section {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .dual-section:nth-child(even) .col.polished {
        order: 0;
    }

    .dual-section:nth-child(even) .col.raw {
        order: 0;
    }

    .col.polished {
        padding: 2rem 1.5rem;
        min-height: 50vh;
    }

    .col.raw {
        padding: 1rem 0.5rem;
        min-height: 50vh;
        clip-path: none;
        transform: rotate(0.3deg);
    }

    .dual-section:nth-child(even) .col.raw {
        clip-path: none;
    }

    .polished-heading,
    .hero .polished-heading {
        font-size: 2rem;
    }

    .raw-heading,
    .hero .raw-heading {
        font-size: 1.2rem;
    }

    .merge-heading {
        font-size: 1.6rem;
    }
}
