/* freedom.compare - Enlightenment Scholarly Debate */

:root {
    --warm-parchment: #FDF8F0;
    --linen-cool: #EDF2F7;
    --aged-parchment: #FAF3E8;
    --brass-rule: #8B7355;
    --sepia-text: #2D2418;
    --warm-stone: #A0937D;
    --branding: #6B5B4E;
    --sand: #D4C5A9;
    --accent: #C4622A;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--warm-parchment);
    color: var(--sepia-text);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    overflow-x: hidden;
}

::selection {
    background: var(--sand);
    color: var(--sepia-text);
}

/* === Balance Indicator === */
#balance-indicator {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

#balance-indicator:hover {
    opacity: 0.8;
}

.balance-icon {
    width: 40px;
    height: 40px;
}

/* === Page Sections === */
.page-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 4rem);
    position: relative;
}

/* === Section 1: The Inscription (Hero) === */
#inscription {
    background: var(--warm-parchment);
    flex-direction: column;
}

.inscription-content {
    text-align: center;
    max-width: 600px;
}

.domain-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    letter-spacing: -0.01em;
    color: var(--sepia-text);
    margin-bottom: 24px;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.domain-title.visible {
    opacity: 1;
}

.inscription-line {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 20px;
    color: var(--warm-stone);
    margin-bottom: 48px;
    opacity: 0;
    transition: opacity 1s ease 0.8s;
}

.inscription-line.visible {
    opacity: 1;
}

.hero-scale {
    opacity: 0;
    transition: opacity 1.5s ease 1.5s;
}

.hero-scale.visible {
    opacity: 1;
}

.scale-svg {
    width: 240px;
    height: 160px;
}

.scale-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.5s ease-in-out;
}

.scale-path.drawn {
    stroke-dashoffset: 0;
}

/* === Thesis Sections === */
.thesis-section {
    background: var(--warm-parchment);
}

.thesis-content {
    max-width: 640px;
}

.section-number {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 28px;
    color: var(--brass-rule);
    display: block;
    margin-bottom: 16px;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
    color: var(--sepia-text);
    margin-bottom: 24px;
    line-height: 1.15;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

.thesis-body {
    color: var(--sepia-text);
    font-size: 18px;
    line-height: 1.75;
    opacity: 0;
    transition: opacity 0.6s ease 0.2s;
}

.thesis-body.visible {
    opacity: 1;
}

/* === Comparison Zones === */
.comparison-zone {
    background: var(--aged-parchment);
    flex-direction: column;
    min-height: auto;
    padding-top: clamp(4rem, 8vw, 8rem);
    padding-bottom: clamp(4rem, 8vw, 8rem);
}

.comparison-panels {
    display: flex;
    gap: 0;
    max-width: 1000px;
    width: 100%;
    align-items: stretch;
}

.panel {
    flex: 1;
    padding: clamp(2rem, 3vw, 3rem);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-warm {
    background: var(--warm-parchment);
    transform: translateX(-30px);
}

.panel-cool {
    background: var(--linen-cool);
    transform: translateX(30px);
}

.panel-warm.visible,
.panel-cool.visible {
    opacity: 1;
    transform: translateX(0);
}

.panel-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-stone);
    display: block;
    margin-bottom: 12px;
}

.panel-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    color: var(--sepia-text);
    margin-bottom: 16px;
    line-height: 1.2;
}

.panel-body {
    font-size: 16px;
    line-height: 1.72;
    color: var(--sepia-text);
    margin-bottom: 16px;
}

.panel-source {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--warm-stone);
    letter-spacing: 0.04em;
    display: block;
    padding-top: 12px;
    border-top: 1px solid var(--sand);
}

.comparison-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    flex-shrink: 0;
}

.divider-line {
    width: 2px;
    height: 60px;
}

.vs-mark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 18px;
    color: var(--brass-rule);
    margin: 12px 0;
}

.weighing-note {
    max-width: 680px;
    margin-top: 48px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease 0.3s;
}

.weighing-note.visible {
    opacity: 1;
}

.note-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 16px;
    line-height: 1.72;
    color: var(--warm-stone);
}

/* === Closing Section === */
.closing-domain {
    margin-top: 60px;
    text-align: center;
}

.closing-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 24px;
    color: var(--branding);
    display: block;
    margin-bottom: 8px;
}

.closing-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--warm-stone);
    display: block;
    opacity: 0.6;
}

/* === Responsive === */
@media (max-width: 768px) {
    .comparison-panels {
        flex-direction: column;
    }

    .comparison-divider {
        flex-direction: row;
        padding: 16px 0;
    }

    .divider-line {
        width: 60px;
        height: 2px;
    }

    .panel-warm,
    .panel-cool {
        transform: translateX(0) translateY(20px);
    }

    .panel-warm.visible,
    .panel-cool.visible {
        transform: translateX(0) translateY(0);
    }
}
