/* dilemma.dev - Split-Screen Dualism */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    background: #1a1a1a;
    color: #f0f0f0;
    overflow-x: hidden;
    padding-bottom: 48px;
}

/* ===== TYPOGRAPHY ===== */
.serif-display {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
}

.sans-display {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
}

/* ===== SPLIT SECTION GRID ===== */
.split-section {
    display: grid;
    grid-template-columns: 1fr 2px 1fr;
    min-height: 100vh;
    position: relative;
    transition: grid-template-columns 300ms ease;
}

.split-section:hover .split-left:hover ~ .split-right,
.split-section .split-right:not(:hover) {
    /* handled by JS for more precise control */
}

/* ===== LEFT SIDE (Option A) ===== */
.split-left {
    background: #ffffff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* ===== RIGHT SIDE (Option B) ===== */
.split-right {
    background: #0a0a0a;
    color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* ===== DIVIDER LINE ===== */
.divider {
    background: #e63946;
    width: 2px;
    min-height: 100%;
    animation: sway 4s ease-in-out infinite;
    z-index: 10;
}

@keyframes sway {
    0%, 100% {
        transform: translateX(-1px);
    }
    50% {
        transform: translateX(1px);
    }
}

/* ===== HERO SECTION ===== */
#hero {
    min-height: 100vh;
}

#hero .split-left {
    cursor: pointer;
}

#hero .split-right {
    cursor: pointer;
}

.hero-word {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: transform 300ms ease, opacity 300ms ease;
}

#hero .split-left .hero-word {
    color: #1a1a1a;
}

#hero .split-right .hero-word {
    color: #f0f0f0;
}

#hero .split-left:hover .hero-word {
    transform: scale(1.05);
}

#hero .split-right:hover .hero-word {
    transform: scale(1.05);
}

.hero-domain {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #e63946;
    z-index: 20;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 #ffffff,
        1px -1px 0 #ffffff,
        -1px 1px 0 #0a0a0a,
        1px 1px 0 #0a0a0a;
}

/* ===== DILEMMA CARDS ===== */
.dilemma-card .card-content {
    max-width: 400px;
    width: 100%;
}

.dilemma-card .serif-display,
.dilemma-card .sans-display {
    margin-bottom: 1rem;
}

.dilemma-card .split-left .serif-display {
    color: #1a1a1a;
}

.dilemma-card .split-right .sans-display {
    color: #f0f0f0;
}

.option-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #888888;
}

.split-left .option-label {
    color: #2b6cb0;
}

.split-right .option-label {
    color: #c05621;
}

.option-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.split-left .option-text {
    color: #1a1a1a;
}

.split-right .option-text {
    color: #f0f0f0;
    opacity: 0.9;
}

.accent-tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.625rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    padding: 0.35em 1em;
    border-width: 1px;
    border-style: solid;
}

.accent-left {
    color: #2b6cb0;
    border-color: #2b6cb0;
}

.accent-right {
    color: #c05621;
    border-color: #c05621;
}

/* ===== HOVER EXPANSION ===== */
.split-section.lean-left {
    grid-template-columns: 55fr 2px 45fr;
}

.split-section.lean-right {
    grid-template-columns: 45fr 2px 55fr;
}

/* ===== BALANCE BAR ===== */
#balance-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #0a0a0a;
    border-top: 1px solid #e63946;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 100;
    padding: 0 1.5rem;
}

#balance-scale {
    width: 120px;
    height: 48px;
}

#scale-group {
    transform-origin: 50px 35px;
    transform: rotate(var(--tilt, 0deg));
    transition: transform 500ms ease;
    color: #888;
}

.balance-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.625rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.balance-label-left {
    color: #2b6cb0;
}

.balance-label-right {
    color: #c05621;
}

/* ===== DILEMMA CARD DIVIDER PULSE ===== */
.dilemma-card .divider {
    animation: sway 4s ease-in-out infinite, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ===== SECTION TRANSITIONS ===== */
.split-left,
.split-right {
    transition: background-color 300ms ease;
}

.split-left:hover {
    background: #f8f8f8;
}

.split-right:hover {
    background: #111111;
}

/* ===== MOBILE RESPONSIVE (below 768px) ===== */
@media (max-width: 768px) {
    .split-section {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 2px 1fr;
        min-height: auto;
    }

    .split-left,
    .split-right {
        min-height: 50vh;
        padding: 2rem 1.5rem;
    }

    .divider {
        width: 100%;
        height: 2px;
        animation: sway-horizontal 4s ease-in-out infinite;
    }

    @keyframes sway-horizontal {
        0%, 100% {
            transform: translateY(-1px);
        }
        50% {
            transform: translateY(1px);
        }
    }

    .dilemma-card .divider {
        animation: sway-horizontal 4s ease-in-out infinite, pulse 2s ease-in-out infinite;
    }

    .split-section.lean-left,
    .split-section.lean-right {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 2px 1fr;
    }

    .hero-domain {
        font-size: 0.75rem;
    }

    .hero-word {
        font-size: clamp(1.5rem, 8vw, 3rem);
    }

    #balance-bar {
        height: 40px;
    }

    body {
        padding-bottom: 40px;
    }
}
