/* ================================================
   politics.bar — Fairycore Metallic Scroll
   Palette: navy-metallic
   Typography: JetBrains Mono
   Layout: parallax-sections
   ================================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #0A0E1A;
    color: #7088A8;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.85;
    overflow-x: hidden;
    position: relative;
}

/* ---- Fairy Dust Canvas ---- */
.fairy-dust-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* ---- Parallax Background Layer (fairy illustrations) ---- */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.fairy-illustration {
    position: absolute;
    width: 360px;
    height: 360px;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.fairy-illustration.visible {
    opacity: 1;
}

.fairy-illustration--1 {
    top: 5%;
    left: 8%;
}

.fairy-illustration--2 {
    top: 25%;
    right: 5%;
}

.fairy-illustration--3 {
    top: 45%;
    left: 3%;
}

.fairy-illustration--4 {
    top: 65%;
    right: 8%;
}

.fairy-illustration--5 {
    top: 85%;
    left: 10%;
}

/* ---- Parallax Metallic Decorative Layer ---- */
.parallax-metallic {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
}

.metallic-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(96,128,160,0.08), transparent);
    height: 1px;
    width: 60%;
}

.metallic-line--1 {
    top: 15%;
    left: 20%;
}

.metallic-line--2 {
    top: 35%;
    left: 10%;
    width: 80%;
}

.metallic-line--3 {
    top: 55%;
    left: 25%;
    width: 50%;
}

.metallic-line--4 {
    top: 75%;
    left: 5%;
    width: 70%;
}

.metallic-line--5 {
    top: 92%;
    left: 15%;
    width: 65%;
}

/* ---- Scroll Sections ---- */
.scroll-section {
    position: relative;
    min-height: 80vh;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0A0E1A;
    padding: 80px 40px;
}

.scroll-section--hero {
    min-height: 100vh;
    background: #0A0E1A;
}

.scroll-section--alt {
    background: #0E1220;
}

.section-content {
    max-width: 1100px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-content--hero {
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

/* ---- Border-Animate Keyframes ---- */
@keyframes borderAnimate {
    0%   { border-color: #4060A0; box-shadow: inset 0 0 1px #4060A0, 0 0 20px rgba(64,96,160,0.05); }
    33%  { border-color: #8060A0; box-shadow: inset 0 0 1px #8060A0, 0 0 20px rgba(128,96,160,0.05); }
    66%  { border-color: #6080A0; box-shadow: inset 0 0 1px #6080A0, 0 0 20px rgba(96,128,160,0.05); }
    100% { border-color: #4060A0; box-shadow: inset 0 0 1px #4060A0, 0 0 20px rgba(64,96,160,0.05); }
}

@keyframes borderAnimateSlow {
    0%   { border-color: #4060A0; box-shadow: inset 0 0 2px rgba(64,96,160,0.3), 0 0 30px rgba(64,96,160,0.06); }
    25%  { border-color: #6080A0; box-shadow: inset 0 0 2px rgba(96,128,160,0.3), 0 0 30px rgba(96,128,160,0.06); }
    50%  { border-color: #8060A0; box-shadow: inset 0 0 2px rgba(128,96,160,0.3), 0 0 30px rgba(128,96,160,0.06); }
    75%  { border-color: #6080A0; box-shadow: inset 0 0 2px rgba(96,128,160,0.3), 0 0 30px rgba(96,128,160,0.06); }
    100% { border-color: #4060A0; box-shadow: inset 0 0 2px rgba(64,96,160,0.3), 0 0 30px rgba(64,96,160,0.06); }
}

/* ---- Hero Section ---- */
.hero-title-block {
    text-align: center;
    position: relative;
}

.hero-title-border {
    display: inline-block;
    padding: 48px 64px;
    position: relative;
    border: 1px solid #4060A0;
    animation: borderAnimateSlow 8s linear infinite;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.hero-title-border.revealed {
    opacity: 1;
    transform: translateY(0);
}

.hero-glyphline {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.65rem;
    color: #4060A0;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-glyphline.revealed {
    opacity: 1;
}

.hero-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: #C0D0E8;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-title.revealed {
    opacity: 1;
}

.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: #507088;
    font-style: italic;
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-subtitle.revealed {
    opacity: 1;
}

.hero-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4060A0, #8060A0, #6080A0, transparent);
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.5s ease;
}

.hero-scanline.active {
    opacity: 0.6;
    animation: scanDown 3s ease-in-out forwards;
}

@keyframes scanDown {
    0% { top: 0; opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

/* ---- Margin Notes (Book-Scholarly) ---- */
.margin-note {
    position: absolute;
    max-width: 160px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.margin-note--left {
    left: -180px;
    text-align: right;
    transform: translateY(-50%) translateX(-10px);
}

.margin-note--left.visible {
    transform: translateY(-50%) translateX(0);
}

.margin-note--right {
    right: -180px;
    text-align: left;
    transform: translateY(-50%) translateX(10px);
}

.margin-note--right.visible {
    transform: translateY(-50%) translateX(0);
}

.margin-note__marker {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    color: #4060A0;
    margin-bottom: 4px;
}

.margin-note__text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-style: italic;
    font-size: 0.7rem;
    line-height: 1.6;
    color: #507088;
}

/* ---- Content Cards with Border-Animate ---- */
.content-card {
    background: rgba(10, 14, 26, 0.6);
    border: 1px solid #4060A0;
    padding: 48px;
    max-width: 700px;
    width: 100%;
    animation: borderAnimate 8s linear infinite;
    position: relative;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.content-card__heading {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #C0D0E8;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.content-card__body p {
    margin-bottom: 16px;
    color: #7088A8;
    font-weight: 300;
}

.content-card__body p:last-child {
    margin-bottom: 0;
}

.content-card__footnote {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(64,96,160,0.2);
    font-weight: 300;
    font-style: italic;
    font-size: 0.78rem;
    color: #507088;
}

.footnote-marker {
    color: #8060A0;
    font-style: normal;
}

/* ---- Section Headings ---- */
.section-heading {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: #C0D0E8;
    letter-spacing: 0.1em;
    margin-bottom: 48px;
    text-align: center;
}

/* ---- Analysis Grid ---- */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    width: 100%;
}

.analysis-card {
    background: rgba(14, 18, 32, 0.8);
    border: 1px solid #4060A0;
    padding: 36px;
    animation: borderAnimate 8s linear infinite;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

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

.analysis-card:nth-child(2) {
    animation-delay: -2s;
}

.analysis-card:nth-child(3) {
    animation-delay: -4s;
}

.analysis-card:nth-child(4) {
    animation-delay: -6s;
}

.analysis-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.analysis-card__icon svg {
    width: 100%;
    height: 100%;
}

.analysis-card__title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: #C0D0E8;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.analysis-card__desc {
    font-weight: 300;
    font-size: clamp(0.78rem, 0.9vw, 0.88rem);
    color: #7088A8;
    line-height: 1.8;
}

/* ---- Chronicle Entries ---- */
.chronicle-entries {
    width: 100%;
    max-width: 750px;
    position: relative;
    padding-left: 32px;
}

.chronicle-entries::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #4060A0, #8060A0, #6080A0, transparent);
}

.chronicle-entry {
    position: relative;
    padding: 32px 0 32px 32px;
    border-bottom: 1px solid rgba(64,96,160,0.1);
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.chronicle-entry.visible {
    opacity: 1;
    transform: translateX(0);
}

.chronicle-entry:last-child {
    border-bottom: none;
}

.chronicle-entry__marker {
    position: absolute;
    left: -36px;
    top: 40px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4060A0;
    box-shadow: 0 0 8px rgba(64,96,160,0.4);
    animation: markerPulse 4s ease-in-out infinite;
}

@keyframes markerPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(64,96,160,0.4); }
    50% { box-shadow: 0 0 16px rgba(128,96,160,0.6); }
}

.chronicle-entry__date {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    color: #4060A0;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.chronicle-entry__title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: #C0D0E8;
    margin-bottom: 10px;
}

.chronicle-entry__content p {
    font-weight: 300;
    color: #7088A8;
    font-size: clamp(0.8rem, 0.95vw, 0.9rem);
    line-height: 1.85;
}

/* ---- Inscription Block ---- */
.inscription-block {
    max-width: 700px;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.inscription-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.inscription-border {
    border: 1px solid #4060A0;
    padding: 48px;
    animation: borderAnimateSlow 8s linear infinite;
    text-align: center;
}

.inscription-heading {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #C0D0E8;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.inscription-lines {
    margin-bottom: 32px;
}

.inscription-line {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.8rem, 0.95vw, 0.9rem);
    color: #7088A8;
    line-height: 2.2;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.inscription-line.revealed {
    opacity: 1;
    transform: translateY(0);
}

.inscription-line--accent {
    color: #4060A0;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.inscription-sigil {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    opacity: 0;
    transform: rotate(-30deg) scale(0.8);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.inscription-sigil.revealed {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.inscription-sigil svg {
    width: 100%;
    height: 100%;
    animation: sigilRotate 30s linear infinite;
}

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

/* ---- Codex Block ---- */
.codex-block {
    width: 100%;
    max-width: 600px;
    margin-bottom: 64px;
}

.codex-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.codex-item {
    display: flex;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid rgba(64,96,160,0.08);
}

.codex-item__key {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    color: #4060A0;
    min-width: 140px;
}

.codex-item__separator {
    color: #507088;
    margin: 0 12px;
    font-size: 0.8rem;
}

.codex-item__value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.8rem;
    color: #7088A8;
}

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(64,96,160,0.15);
    width: 100%;
    max-width: 600px;
}

.site-footer__text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    color: #C0D0E8;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.site-footer__sub {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-style: italic;
    font-size: 0.72rem;
    color: #507088;
}

/* ---- Fairy Glow Effect ---- */
.scroll-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(96,128,160,0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- Card Hover Glow ---- */
.content-card:hover,
.analysis-card:hover {
    box-shadow: inset 0 0 2px currentColor, 0 0 30px rgba(96,128,160,0.08);
}

/* ---- Responsive ---- */
@media (max-width: 1400px) {
    .margin-note--left {
        left: -160px;
    }
    .margin-note--right {
        right: -160px;
    }
}

@media (max-width: 1100px) {
    .margin-note {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        max-width: 100%;
        text-align: center;
        margin-bottom: 24px;
        opacity: 1;
    }

    .margin-note.visible {
        transform: none;
    }

    .margin-note--left,
    .margin-note--right {
        transform: none;
    }

    .margin-note--left.visible,
    .margin-note--right.visible {
        transform: none;
    }

    .section-content {
        align-items: center;
    }

    .section-content--hero {
        flex-direction: column;
    }

    .scroll-section {
        padding: 60px 24px;
    }
}

@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-title-border {
        padding: 32px 28px;
    }

    .content-card {
        padding: 28px;
    }

    .inscription-border {
        padding: 32px 20px;
    }

    .scroll-section {
        padding: 48px 16px;
    }

    .fairy-illustration {
        width: 240px;
        height: 240px;
    }

    .chronicle-entry {
        padding-left: 20px;
    }

    .codex-item__key {
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: 0.08em;
    }

    .fairy-illustration {
        width: 180px;
        height: 180px;
    }

    .analysis-card {
        padding: 24px;
    }

    .inscription-border {
        padding: 24px 16px;
    }
}
