/* toron.day - Neomorphic debate arena */

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

:root {
    --soft-surface: #E8E0EC;
    --deep-thought: #3A2848;
    --thesis-warm: #C06858;
    --antithesis-cool: #4878A0;
    --pressed-shadow: #C8B8D0;
    --raised-highlight: #F8F0FC;
    --muted-sage: #88A090;
    --gradient-start: #E0D8E8;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
    line-height: 1.75;
    color: var(--deep-thought);
    background: radial-gradient(ellipse at 50% 0%, var(--gradient-start), var(--soft-surface) 60%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* === Neomorphic Utilities === */
.neo-extruded {
    box-shadow:
        -6px -6px 12px rgba(248, 240, 252, 0.7),
        6px 6px 12px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.neo-inset {
    box-shadow:
        inset -4px -4px 8px rgba(248, 240, 252, 0.5),
        inset 4px 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.neo-balanced {
    box-shadow:
        -3px -3px 6px rgba(248, 240, 252, 0.5),
        3px 3px 6px rgba(0, 0, 0, 0.08),
        inset -2px -2px 4px rgba(248, 240, 252, 0.3),
        inset 2px 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.4s ease;
}

.neo-flat {
    box-shadow: none;
    transition: box-shadow 0.5s ease;
}

/* === Dot Navigation === */
.dot-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 100;
}

.dot-groove {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--pressed-shadow);
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.08);
    border-radius: 1px;
}

.dot-item {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--soft-surface);
    box-shadow:
        -2px -2px 4px rgba(248, 240, 252, 0.7),
        2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    transition: width 0.3s ease, height 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.dot-item.active {
    width: 12px;
    height: 12px;
    box-shadow:
        -3px -3px 6px rgba(248, 240, 252, 0.8),
        3px 3px 6px rgba(0, 0, 0, 0.15);
}

/* === Debate Stages === */
.debate-stage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px 60px 40px;
    position: relative;
}

/* === The Chamber === */
.chamber-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.korean-bg {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: clamp(6rem, 15vw, 12rem);
    color: var(--soft-surface);
    text-shadow:
        -4px -4px 8px rgba(248, 240, 252, 0.6),
        4px 4px 8px rgba(0, 0, 0, 0.08);
}

.chamber-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.chamber-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--deep-thought);
    letter-spacing: -0.01em;
    padding: 24px 48px;
    border-radius: 24px;
    background-color: var(--soft-surface);
    display: inline-block;
    opacity: 0;
    animation: morphIn 1s 0.5s ease forwards;
}

@keyframes morphIn {
    from { opacity: 0; box-shadow: none; }
    to {
        opacity: 1;
        box-shadow:
            -6px -6px 12px rgba(248, 240, 252, 0.7),
            6px 6px 12px rgba(0, 0, 0, 0.12);
    }
}

.chamber-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--deep-thought);
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 0.8s 1.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 32px;
    opacity: 0;
    animation: fadeIn 0.8s 2s ease forwards;
}

/* === Neomorphic Toggle Switches === */
.neo-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.neo-toggle input {
    display: none;
}

.toggle-track {
    width: 60px;
    height: 30px;
    border-radius: 15px;
    background-color: var(--soft-surface);
    box-shadow:
        inset -2px -2px 4px rgba(248, 240, 252, 0.5),
        inset 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: background-color 0.3s ease;
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--soft-surface);
    box-shadow:
        -2px -2px 4px rgba(248, 240, 252, 0.7),
        2px 2px 4px rgba(0, 0, 0, 0.12);
    transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

.neo-toggle input:checked + .toggle-track {
    background: linear-gradient(135deg, var(--thesis-warm), var(--thesis-warm));
}

.neo-toggle input:checked + .toggle-track .toggle-knob {
    left: 32px;
    background-color: var(--raised-highlight);
}

.toggle-cool input:checked + .toggle-track,
.toggle-cool-inline input:checked + .toggle-track {
    background: linear-gradient(135deg, var(--antithesis-cool), var(--antithesis-cool));
}

.toggle-label {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--deep-thought);
    letter-spacing: 0.06em;
}

/* === Debate Panels === */
.debate-panel {
    max-width: 800px;
    width: 100%;
    padding: 48px;
    border-radius: 24px;
    background-color: var(--soft-surface);
    position: relative;
}

.panel-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--deep-thought);
    opacity: 0.6;
    display: block;
    margin-bottom: 16px;
}

.panel-thesis .panel-label { color: var(--thesis-warm); }
.panel-antithesis .panel-label { color: var(--antithesis-cool); }
.panel-synthesis .panel-label { color: var(--muted-sage); }

.panel-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: var(--deep-thought);
    letter-spacing: -0.01em;
    margin-bottom: 20px;
}

.panel-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
    line-height: 1.75;
    color: var(--deep-thought);
    margin-bottom: 24px;
}

.panel-body-italic {
    font-style: italic;
    opacity: 0.85;
}

.toggle-inline {
    margin-bottom: 16px;
}

.alt-text {
    padding: 20px 24px;
    border-radius: 16px;
    background-color: var(--soft-surface);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.4s ease;
}

.alt-text.open {
    max-height: 400px;
    opacity: 1;
    padding: 20px 24px;
}

.alt-text .panel-body {
    margin-bottom: 0;
}

/* === Synthesis triple toggle === */
.triple-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.toggle-label-side {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
}

.warm-label { color: var(--thesis-warm); }
.cool-label { color: var(--antithesis-cool); }

.track-triple {
    width: 80px;
}

.knob-center {
    left: 27px;
    background-color: var(--muted-sage);
}

/* === Closing === */
.closing-content {
    text-align: center;
}

.closing-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--deep-thought);
    margin-bottom: 32px;
}

.closing-toggles .neo-toggle {
    justify-content: center;
}

.toggle-pulse .toggle-track {
    animation: pulseShadow 3s ease infinite;
}

@keyframes pulseShadow {
    0%, 100% {
        box-shadow:
            inset -2px -2px 4px rgba(248, 240, 252, 0.5),
            inset 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow:
            inset -2px -2px 4px rgba(248, 240, 252, 0.5),
            inset 2px 2px 4px rgba(0, 0, 0, 0.1),
            0 0 12px rgba(136, 160, 144, 0.3);
    }
}

/* === Panel morph on scroll === */
.debate-panel.morphed-flat {
    box-shadow: none;
}

/* === Hover morph for panels === */
.debate-panel:hover {
    box-shadow:
        -8px -8px 16px rgba(248, 240, 252, 0.8),
        8px 8px 16px rgba(0, 0, 0, 0.15);
}

.panel-antithesis:hover {
    box-shadow:
        inset -6px -6px 12px rgba(248, 240, 252, 0.6),
        inset 6px 6px 12px rgba(0, 0, 0, 0.13);
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    .chamber-title {
        opacity: 1;
        animation: none;
        box-shadow:
            -6px -6px 12px rgba(248, 240, 252, 0.7),
            6px 6px 12px rgba(0, 0, 0, 0.12);
    }
    .chamber-tagline, .toggle-row {
        opacity: 1;
        animation: none;
    }
    .toggle-knob {
        transition: none;
    }
    .toggle-pulse .toggle-track {
        animation: none;
    }
}

/* === Responsive === */
@media (max-width: 768px) {
    .debate-stage {
        padding: 40px 16px 40px 16px;
    }
    .debate-panel {
        padding: 32px 20px;
    }
    .dot-nav {
        right: 8px;
    }
    .korean-bg {
        font-size: clamp(4rem, 12vw, 8rem);
    }
}
