/* ============================================
   politics.bar - Styles
   Warm Vaporwave / HUD Overlay / Botanical
   ============================================ */

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

:root {
    --terracotta-flame: #C4633E;
    --peach-stucco: #E8A87C;
    --espresso-dark: #1E1A17;
    --roasted-umber: #2C2520;
    --warm-parchment: #F2D4B8;
    --olive-vine: #7A9E6B;
    --worn-leather: #6B5A4E;
    --faded-mauve: #D4A0C7;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--warm-parchment);
    background: linear-gradient(135deg, var(--espresso-dark), var(--roasted-umber));
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Dot Grid Background Texture --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--worn-leather) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* --- CRT Scanlines --- */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.03) 3px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* --- HUD Frame --- */
#hud-frame {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    pointer-events: none;
    z-index: 100;
}

/* Corner Brackets */
.hud-corner {
    position: absolute;
    width: 24px;
    height: 24px;
}

.hud-corner-tl {
    top: 0;
    left: 0;
    border-top: 1px solid rgba(196, 99, 62, 0.4);
    border-left: 1px solid rgba(196, 99, 62, 0.4);
}

.hud-corner-tr {
    top: 0;
    right: 0;
    border-top: 1px solid rgba(196, 99, 62, 0.4);
    border-right: 1px solid rgba(196, 99, 62, 0.4);
}

.hud-corner-bl {
    bottom: 0;
    left: 0;
    border-bottom: 1px solid rgba(196, 99, 62, 0.4);
    border-left: 1px solid rgba(196, 99, 62, 0.4);
}

.hud-corner-br {
    bottom: 0;
    right: 0;
    border-bottom: 1px solid rgba(196, 99, 62, 0.4);
    border-right: 1px solid rgba(196, 99, 62, 0.4);
}

/* Edge Lines */
.hud-edge {
    position: absolute;
    opacity: 0;
}

.hud-edge-top {
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, rgba(196,99,62,0.4), rgba(196,99,62,0.15), rgba(196,99,62,0.4));
}

.hud-edge-bottom {
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, rgba(196,99,62,0.4), rgba(196,99,62,0.15), rgba(196,99,62,0.4));
}

.hud-edge-left {
    left: 0;
    top: 24px;
    bottom: 24px;
    width: 1px;
    background: linear-gradient(180deg, rgba(196,99,62,0.4), rgba(196,99,62,0.15), rgba(196,99,62,0.4));
}

.hud-edge-right {
    right: 0;
    top: 24px;
    bottom: 24px;
    width: 1px;
    background: linear-gradient(180deg, rgba(196,99,62,0.4), rgba(196,99,62,0.15), rgba(196,99,62,0.4));
}

/* Corner Rosettes */
.hud-rosette {
    position: absolute;
    opacity: 0;
    animation: rosetteSpin 60s linear infinite;
}

.hud-rosette-tl { top: -4px; left: -4px; }
.hud-rosette-tr { top: -4px; right: -4px; }
.hud-rosette-bl { bottom: -4px; left: -4px; }
.hud-rosette-br { bottom: -4px; right: -4px; }

@keyframes rosetteSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Status Bar */
#hud-status-bar {
    position: absolute;
    top: 4px;
    left: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-parchment);
    opacity: 0;
}

.hud-label {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--terracotta-flame);
}

.hud-data {
    opacity: 0.6;
    font-size: 0.65rem;
}

/* Radar Sweep */
#radar-container {
    position: absolute;
    top: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    opacity: 0;
}

#radar-sweep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(196, 99, 62, 0) 0%,
        rgba(196, 99, 62, 0.3) 25%,
        rgba(196, 99, 62, 0) 30%
    );
    animation: sweep 4s linear infinite;
}

@keyframes sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(196, 99, 62, 0.2);
    border-radius: 50%;
}

.radar-ring-inner {
    width: 22px;
    height: 22px;
}

.radar-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    transform: translate(-50%, -50%);
    background: var(--terracotta-flame);
    border-radius: 50%;
}

/* Nav Dots */
#nav-dots {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 101;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(196, 99, 62, 0.4);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s ease;
    pointer-events: auto;
}

.nav-dot.active {
    background: var(--terracotta-flame);
    box-shadow: 0 0 8px rgba(196, 99, 62, 0.5);
}

.nav-dot:hover {
    border-color: var(--faded-mauve);
    box-shadow: 0 0 6px rgba(212, 160, 199, 0.3);
}

/* --- Panels --- */
.panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    will-change: transform;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.panel-content {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 40px;
    z-index: 1;
}

/* --- Panel 1: Situation Room --- */
#panel-situation {
    position: relative;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 9vw, 7rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta-flame);
    text-align: center;
    overflow: hidden;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px);
}

.briefing-indicator {
    text-align: center;
    margin-top: 24px;
}

.briefing-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-parchment);
    opacity: 0.6;
    animation: blink 2s step-end infinite;
}

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

.vine-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
}

.vine-draw {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

/* --- Panel Dividers --- */
.panel-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 60px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 99, 62, 0.3), transparent);
}

.divider-rosette {
    flex-shrink: 0;
    animation: rosetteSpin 60s linear infinite;
}

/* --- Panel 2: Dossier --- */
.dossier-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.laurel-wreath {
    display: block;
    margin: 0 auto 8px;
    opacity: 0.5;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta-flame);
}

.dossier-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.dossier-card {
    position: relative;
    background: var(--roasted-umber);
    border: 1px solid rgba(196, 99, 62, 0.3);
    padding: 32px 24px;
    opacity: 0;
    transform: translateY(40px);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.3);
}

.dossier-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.dossier-card[data-tilt="1"].visible {
    transform: perspective(1000px) rotateY(2deg);
}

.dossier-card[data-tilt="2"].visible {
    transform: perspective(1000px) rotateX(-1.5deg) rotateY(-1deg);
}

.dossier-card[data-tilt="3"].visible {
    transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}

.card-hud-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--worn-leather);
    margin-bottom: 12px;
}

.card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--peach-stucco);
    margin-bottom: 12px;
}

.card-body {
    color: var(--warm-parchment);
    opacity: 0.85;
    margin-bottom: 16px;
}

.card-illustration {
    display: block;
    margin-top: 12px;
    opacity: 0.5;
}

/* RGB Channel Shift on hover */
.dossier-card:hover .card-title {
    text-shadow: 1px 0 var(--terracotta-flame), -1px 0 var(--faded-mauve);
}

.dossier-card:hover {
    border-color: rgba(212, 160, 199, 0.3);
}

/* --- Panel 3: The Garden --- */
#panel-garden {
    background: var(--espresso-dark);
}

.panel-garden-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.garden-illustration {
    width: 80%;
    max-width: 700px;
    height: auto;
}

.garden-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

/* Fireflies */
.firefly {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--warm-parchment);
    border-radius: 50%;
    opacity: 0.3;
    pointer-events: none;
}

.firefly:nth-child(1) { animation: fireflyDrift1 8s ease-in-out infinite; }
.firefly:nth-child(2) { animation: fireflyDrift2 10s ease-in-out infinite; }
.firefly:nth-child(3) { animation: fireflyDrift3 7s ease-in-out infinite; }
.firefly:nth-child(4) { animation: fireflyDrift4 12s ease-in-out infinite; }
.firefly:nth-child(5) { animation: fireflyDrift5 9s ease-in-out infinite; }
.firefly:nth-child(6) { animation: fireflyDrift6 11s ease-in-out infinite; }
.firefly:nth-child(7) { animation: fireflyDrift7 6s ease-in-out infinite; }
.firefly:nth-child(8) { animation: fireflyDrift8 8.5s ease-in-out infinite; }
.firefly:nth-child(9) { animation: fireflyDrift9 10.5s ease-in-out infinite; }
.firefly:nth-child(10) { animation: fireflyDrift10 7.5s ease-in-out infinite; }

@keyframes fireflyDrift1 {
    0%, 100% { transform: translate(0, 0); opacity: 0.2; }
    25% { transform: translate(20px, -15px); opacity: 0.7; }
    50% { transform: translate(-10px, -30px); opacity: 0.4; }
    75% { transform: translate(30px, -10px); opacity: 0.8; }
}

@keyframes fireflyDrift2 {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    25% { transform: translate(-25px, 20px); opacity: 0.6; }
    50% { transform: translate(15px, 35px); opacity: 0.2; }
    75% { transform: translate(-20px, 10px); opacity: 0.7; }
}

@keyframes fireflyDrift3 {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    25% { transform: translate(30px, 10px); opacity: 0.2; }
    50% { transform: translate(-20px, -25px); opacity: 0.8; }
    75% { transform: translate(15px, 20px); opacity: 0.3; }
}

@keyframes fireflyDrift4 {
    0%, 100% { transform: translate(0, 0); opacity: 0.2; }
    33% { transform: translate(-30px, -20px); opacity: 0.6; }
    66% { transform: translate(25px, 15px); opacity: 0.8; }
}

@keyframes fireflyDrift5 {
    0%, 100% { transform: translate(0, 0); opacity: 0.4; }
    25% { transform: translate(15px, 25px); opacity: 0.7; }
    50% { transform: translate(-25px, 10px); opacity: 0.2; }
    75% { transform: translate(20px, -15px); opacity: 0.6; }
}

@keyframes fireflyDrift6 {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    33% { transform: translate(-20px, 30px); opacity: 0.5; }
    66% { transform: translate(30px, -25px); opacity: 0.8; }
}

@keyframes fireflyDrift7 {
    0%, 100% { transform: translate(0, 0); opacity: 0.6; }
    25% { transform: translate(25px, -20px); opacity: 0.2; }
    50% { transform: translate(-15px, 25px); opacity: 0.7; }
    75% { transform: translate(10px, -30px); opacity: 0.4; }
}

@keyframes fireflyDrift8 {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    50% { transform: translate(-35px, 20px); opacity: 0.7; }
}

@keyframes fireflyDrift9 {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    33% { transform: translate(20px, -30px); opacity: 0.2; }
    66% { transform: translate(-30px, 15px); opacity: 0.8; }
}

@keyframes fireflyDrift10 {
    0%, 100% { transform: translate(0, 0); opacity: 0.2; }
    25% { transform: translate(-15px, -20px); opacity: 0.6; }
    50% { transform: translate(25px, 10px); opacity: 0.3; }
    75% { transform: translate(-10px, 25px); opacity: 0.7; }
}

/* --- Panel 4: Sign Off --- */
#panel-signoff {
    position: relative;
}

.signoff-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.signoff-line-left,
.signoff-line-right {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--terracotta-flame));
}

.signoff-line-right {
    background: linear-gradient(90deg, var(--terracotta-flame), transparent);
}

.signoff-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta-flame);
    white-space: nowrap;
}

.signoff-rosette {
    flex-shrink: 0;
}

.signal-lost {
    text-align: center;
    margin-top: 32px;
}

.signal-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--terracotta-flame);
    opacity: 0.6;
    animation: pulse 3s ease-in-out infinite;
}

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

.signoff-vines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    pointer-events: none;
}

/* --- CRT Screen Curvature (subtle) --- */
body {
    box-shadow: inset 0 0 120px 40px rgba(0, 0, 0, 0.3);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    /* Simplify HUD to corners only */
    .hud-edge {
        display: none;
    }

    #hud-status-bar {
        font-size: 0.6rem;
    }

    .hud-data:last-child {
        display: none;
    }

    #radar-container {
        width: 36px;
        height: 36px;
        top: 20px;
        right: 20px;
    }

    /* Nav dots to bottom */
    #nav-dots {
        right: auto;
        top: auto;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
    }

    /* Cards stack */
    .dossier-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dossier-card[data-tilt="1"].visible,
    .dossier-card[data-tilt="2"].visible,
    .dossier-card[data-tilt="3"].visible {
        transform: perspective(1000px) rotateY(1deg);
    }

    .panel-content {
        padding: 40px 24px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .garden-illustration {
        width: 95%;
    }

    .signoff-container {
        flex-wrap: wrap;
        gap: 8px;
    }

    .signoff-line-left,
    .signoff-line-right {
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .hud-corner {
        width: 16px;
        height: 16px;
    }

    #hud-frame {
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .hero-title {
        font-size: clamp(2rem, 14vw, 3rem);
    }
}
