/* =============================================
   politics.day - Cinematic Political Awareness
   ============================================= */

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

:root {
    --film-indigo: #1A1830;
    --amber-warm: #D0A040;
    --cream-light: #F0E8D0;
    --ink: #303040;
    --ripple-blue: #4070C0;
    --scene-gray: #808898;
    --deep-shadow: #0A0818;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--film-indigo);
    color: var(--cream-light);
    overflow-x: hidden;
    line-height: 1.85;
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(28px, 3.5vw, 52px);
}

h2 {
    font-size: clamp(24px, 2.8vw, 42px);
}

p {
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.85;
}

.scene-marker {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--scene-gray);
}

.editorial-caption,
.credits-caption {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: var(--scene-gray);
}

/* --- Opening Shot (Hero) --- */
#opening-shot {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--deep-shadow) 0%, var(--film-indigo) 50%, #1E1A38 100%);
    overflow: hidden;
}

#flowing-curves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.flow-line {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawLine 1500ms ease-out forwards;
}

.flow-line-2 {
    animation-delay: 300ms;
}

.flow-line-3 {
    animation-delay: 600ms;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Ghost illustrations in hero */
.ghost-illustration {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

.ghost-gavel {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 10%;
    opacity: 0;
    animation: ghostFadeIn 2000ms 800ms ease-out forwards;
}

.ghost-ballot {
    width: 100px;
    height: 100px;
    top: 60%;
    right: 12%;
    opacity: 0;
    animation: ghostFadeIn 2000ms 1200ms ease-out forwards;
}

.ghost-podium {
    width: 110px;
    height: 110px;
    bottom: 20%;
    left: 18%;
    opacity: 0;
    animation: ghostFadeIn 2000ms 1600ms ease-out forwards;
}

@keyframes ghostFadeIn {
    to {
        opacity: 0.05;
    }
}

#hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    animation: heroFadeIn 1000ms 500ms ease-out forwards;
}

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

.domain-title {
    color: var(--cream-light);
    margin-bottom: 16px;
    text-shadow: 0 0 60px rgba(208, 160, 64, 0.15);
}

.hero-tagline {
    color: var(--scene-gray);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.05em;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    opacity: 0;
    animation: heroFadeIn 1000ms 1800ms ease-out forwards;
}

.scroll-indicator svg {
    animation: scrollBounce 2000ms ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* --- Ma-Negative-Space --- */
.ma-space {
    position: relative;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ma-space-1 { min-height: 160px; }
.ma-space-2 { min-height: 180px; }
.ma-space-3 { min-height: 150px; }
.ma-space-4 { min-height: 170px; }
.ma-space-5 { min-height: 180px; }
.ma-space-6 { min-height: 120px; }

.ma-flow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.flow-line-between {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1200ms ease-out;
}

.flow-line-between.visible {
    stroke-dashoffset: 0;
}

.ghost-float {
    position: absolute;
    width: 160px;
    height: 100px;
}

.ghost-crowd {
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
}

.ghost-hands {
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
}

/* --- Scene Panels --- */
.scene-panel {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 24px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 800ms ease-out, transform 800ms ease-out, border-left-color 300ms ease;
    border-left: 3px solid transparent;
    padding-left: 32px;
}

.scene-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.scene-panel:hover {
    border-left-color: var(--amber-warm);
}

.scene-content {
    position: relative;
}

.scene-marker {
    display: block;
    margin-bottom: 20px;
    transition: text-shadow 300ms ease;
}

.scene-panel:hover .scene-marker {
    text-shadow: 0 0 12px rgba(208, 160, 64, 0.4);
}

.scene-title {
    margin-bottom: 28px;
    color: var(--cream-light);
}

.scene-text {
    margin-bottom: 20px;
    color: var(--cream-light);
    opacity: 0.9;
}

.scene-text:last-of-type {
    margin-bottom: 0;
}

/* --- Editorial Illustration (inline in scene) --- */
.editorial-illustration {
    margin-top: 50px;
    width: 100%;
    overflow: hidden;
}

.editorial-svg {
    width: 100%;
    height: auto;
    max-height: 200px;
}

.editorial-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1500ms ease-out;
}

.scene-panel.visible .editorial-line {
    stroke-dashoffset: 0;
}

.editorial-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.editorial-dot {
    opacity: 0;
    transition: opacity 600ms ease-out 800ms;
}

.scene-panel.visible .editorial-dot {
    opacity: 1;
}

/* --- Editorial Full-Width Section --- */
.editorial-full {
    width: 100%;
    padding: 80px 24px;
    display: flex;
    justify-content: center;
    background: linear-gradient(180deg, var(--film-indigo) 0%, var(--deep-shadow) 50%, var(--film-indigo) 100%);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.editorial-full.visible {
    opacity: 1;
    transform: translateY(0);
}

.editorial-full-inner {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.editorial-full-svg {
    width: 100%;
    max-width: 700px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
}

.editorial-full .editorial-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2000ms ease-out;
}

.editorial-full.visible .editorial-line {
    stroke-dashoffset: 0;
}

/* --- Ripple Button --- */
.ripple-button-container {
    margin-top: 36px;
}

.ripple-btn {
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 1px solid var(--amber-warm);
    color: var(--amber-warm);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
    padding: 14px 36px;
    cursor: pointer;
    transition: color 300ms ease, border-color 300ms ease;
}

.ripple-btn:hover {
    color: var(--cream-light);
    border-color: var(--cream-light);
}

.ripple-btn .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: var(--ripple-blue);
    opacity: 0.4;
    transform: scale(0);
    animation: rippleExpand 600ms ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* --- Ripple Area (Interactive) --- */
.ripple-area {
    position: relative;
    width: 100%;
    height: 300px;
    margin-top: 30px;
    border: 1px solid rgba(208, 160, 64, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(10, 8, 24, 0.5) 0%, rgba(26, 24, 48, 0.5) 100%);
}

.ripple-prompt {
    font-weight: 300;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--scene-gray);
    pointer-events: none;
    transition: opacity 300ms ease;
}

.ripple-area:hover .ripple-prompt {
    opacity: 0.5;
}

.ripple-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--ripple-blue);
    opacity: 0.6;
    transform: scale(0);
    animation: rippleAreaExpand 600ms ease-out forwards;
    pointer-events: none;
}

@keyframes rippleAreaExpand {
    to {
        transform: scale(1);
        opacity: 0;
    }
}

/* --- Credits Roll (Footer) --- */
#credits-roll {
    position: relative;
    padding: 100px 24px 80px;
    text-align: center;
    background: linear-gradient(180deg, var(--film-indigo) 0%, var(--deep-shadow) 100%);
    overflow: hidden;
}

.credits-flow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    pointer-events: none;
}

.credits-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1000ms ease-out, transform 1000ms ease-out;
}

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

.credits-title {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--cream-light);
    margin: 20px 0 16px;
}

.credits-text {
    color: var(--scene-gray);
    font-size: 15px;
    margin-bottom: 8px;
}

.credits-divider {
    margin: 30px auto;
    display: flex;
    justify-content: center;
}

/* --- Duotone Cinematic Overlay --- */
.scene-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -32px;
    right: -24px;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 24, 48, 0.03) 0%, rgba(208, 160, 64, 0.02) 100%);
    pointer-events: none;
    z-index: -1;
    border-radius: 2px;
}

/* --- Hand-drawn elements hover opacity --- */
.ghost-illustration {
    transition: opacity 600ms ease;
}

.ma-space:hover .ghost-illustration.ghost-float {
    opacity: 0.2;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .scene-panel {
        padding: 40px 20px;
        padding-left: 24px;
    }

    .ma-space {
        min-height: 100px !important;
    }

    .ripple-area {
        height: 200px;
    }

    .ghost-float {
        display: none;
    }

    .ghost-gavel,
    .ghost-ballot,
    .ghost-podium {
        display: none;
    }

    .editorial-full {
        padding: 50px 16px;
    }

    #credits-roll {
        padding: 60px 20px 50px;
    }
}

@media (max-width: 480px) {
    .scene-panel {
        border-left: none;
        padding-left: 20px;
    }

    .hero-tagline {
        font-size: 14px;
    }
}
