/* dilemma.quest - Glassmorphic Philosophical Narrative */

:root {
    --bg-deep: #0d0f14;
    --bg-surface: #161a24;
    --bg-elevated: #1e2433;
    --text-primary: #d8dee9;
    --text-secondary: #8892a4;
    --text-muted: #6b7a8d;
    --accent-glacial: #7eb8d4;
    --accent-amber: #c9a96e;
    --glass-border: rgba(180, 200, 220, 0.12);
    --glass-fill: rgba(140, 160, 190, 0.06);
    --glass-blur: blur(20px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    overflow: hidden;
}

/* Scroll Container */
#scroll-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Snap Sections */
.snap-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 100%);
}

.snap-section[data-section="2"],
.snap-section[data-section="4"] {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
}

/* Section Content */
.section-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

.section-center {
    margin: 0 auto;
    padding: 0 8vw;
    text-align: center;
    width: 100%;
}

.section-left {
    padding-left: 12vw;
    padding-right: 4vw;
    width: 65%;
}

.section-right {
    padding-right: 12vw;
    padding-left: 4vw;
    margin-left: auto;
    width: 65%;
    text-align: right;
}

/* Typography */
.display-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.accent-glacial {
    color: var(--accent-glacial);
    font-style: italic;
}

.body-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 640px;
}

.body-text em {
    color: var(--accent-amber);
    font-style: italic;
}

.body-text-centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.text-muted-block {
    color: var(--text-muted);
}

.section-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-amber);
    margin-bottom: 2rem;
    opacity: 0.7;
}

/* Glass Partition */
.glass-partition {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 4px;
    background: rgba(180, 190, 205, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 2px;
}

/* Glass Card */
.glass-card {
    backdrop-filter: var(--glass-blur) saturate(120%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(120%);
    background: var(--glass-fill);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 500ms ease-out, border-color 500ms ease-out, box-shadow 500ms ease-out;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.glass-card:hover {
    transform: scale(1.04);
    border-color: rgba(180, 200, 220, 0.25);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Breathing Space (side panels for glass cards) */
.breathing-space {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-right {
    right: 8vw;
}

.breathing-right .glass-card {
    width: 280px;
    height: 380px;
}

.breathing-left {
    left: 8vw;
}

.breathing-left .glass-card {
    width: 280px;
    height: 380px;
}

/* Weighing Lines */
.weighing-lines {
    position: relative;
    margin: 2rem 0;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.weighing-line {
    height: 1px;
    background: var(--text-muted);
    opacity: 0.3;
    width: 0%;
    transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.weighing-line.animate {
    width: 100%;
}

.line-top.animate {
    width: 70%;
    transition-duration: 1.4s;
}

.line-bottom.animate {
    width: 50%;
    transition-duration: 1.8s;
}

.section-right .weighing-line {
    margin-left: auto;
}

/* Book Spine Markers */
.book-spine-marker {
    position: absolute;
    left: 0;
    top: 30%;
    width: 2px;
    height: 80px;
    background: var(--accent-amber);
    opacity: 0.4;
}

.snap-section[data-section="4"] .book-spine-marker {
    top: 20%;
    height: 100px;
}

/* Floating Glyphs */
.floating-glyph {
    position: absolute;
    font-family: 'Cormorant Garamond', serif;
    color: var(--bg-elevated);
    z-index: 1;
    pointer-events: none;
    animation: float-glyph 30s ease-in-out infinite alternate;
}

.glyph-1 {
    font-size: 10rem;
    top: 15%;
    right: 12%;
    opacity: 0.35;
}

.glyph-2 {
    font-size: 8rem;
    bottom: 20%;
    left: 8%;
    opacity: 0.25;
    animation-delay: -10s;
}

.glyph-3 {
    font-size: 12rem;
    top: 10%;
    right: 20%;
    opacity: 0.2;
    animation-delay: -5s;
}

.glyph-4 {
    font-size: 9rem;
    bottom: 15%;
    left: 15%;
    opacity: 0.25;
    animation-delay: -15s;
}

.glyph-5 {
    font-size: 11rem;
    top: 8%;
    right: 10%;
    opacity: 0.2;
    animation-delay: -8s;
}

.glyph-6 {
    font-size: 7rem;
    bottom: 25%;
    left: 5%;
    opacity: 0.3;
    animation-delay: -20s;
}

.glyph-7 {
    font-size: 9rem;
    top: 60%;
    right: 5%;
    opacity: 0.15;
    animation-delay: -12s;
}

.glyph-8 {
    font-size: 10rem;
    top: 10%;
    left: 10%;
    opacity: 0.2;
    animation-delay: -3s;
}

@keyframes float-glyph {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* Decision Point (Section 5) */
.decision-point {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 3rem auto;
    max-width: 800px;
}

.decision-card {
    width: 280px;
    min-height: 320px;
    padding: 2.5rem 2rem;
    text-align: center;
    gap: 1.5rem;
}

.card-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-amber);
}

.card-quote {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.5;
    color: var(--text-primary);
}

.card-attribution {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.decision-line {
    width: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.pulse-line {
    width: 100%;
    height: 2px;
    animation: pulse-opacity 4s ease-in-out infinite;
}

@keyframes pulse-opacity {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

.closing-text {
    margin-top: 3rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .section-left,
    .section-right {
        width: 100%;
        padding: 0 6vw;
        text-align: left;
    }

    .section-right .weighing-line {
        margin-left: 0;
    }

    .breathing-space {
        position: relative;
        top: auto;
        transform: none;
        margin: 2rem auto;
        right: auto;
        left: auto;
    }

    .breathing-right .glass-card,
    .breathing-left .glass-card {
        width: 200px;
        height: 260px;
    }

    .snap-section {
        flex-direction: column;
        justify-content: center;
        padding: 4vh 0;
    }

    .decision-point {
        flex-direction: column;
        gap: 1.5rem;
    }

    .decision-card {
        width: 240px;
        min-height: 220px;
    }

    .decision-line {
        width: 2px;
        height: 40px;
        transform: rotate(90deg);
    }

    .floating-glyph {
        display: none;
    }
}

@media (max-width: 480px) {
    .display-heading {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .body-text {
        font-size: 1rem;
    }
}
