/* ============================================================
   monopole.center — CSS Stylesheet
   1930s Electromagnetic Research Bureau Aesthetic
   DESIGN terms: Interactions:** interaction scale-hover respond proximity by scaling smoothly. `transform: states (Monopole IntersectionObserver (threshold: fades 2.5s: Lora" (Google
   ============================================================ */

:root {
    --deep-ground: #2b2824;
    --primary-surface: #e8e0d4;
    --warm-accent: #9c8a6e;
    --cool-accent: #5d7a72;
    --ink-primary: #4a3f35;
    --highlight: #8a9a6b;
    --pressed-rose: #a67e7e;
    --alert-focus: #8b4049;
    --frame-rule: #6b6259;
}

/* ============================================================
   Base Styles
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    background-color: var(--primary-surface);
    color: var(--ink-primary);
    line-height: 1.7;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    letter-spacing: 0.01em;
    font-weight: 300;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 50% 8%, rgba(156, 138, 110, 0.18), transparent 34rem),
        linear-gradient(0deg, rgba(156, 138, 110, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(156, 138, 110, 0.06) 1px, transparent 1px);
    background-size: auto, 40px 40px, 40px 40px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0.34;
    background:
        repeating-linear-gradient(105deg, transparent 0 13px, rgba(74, 63, 53, 0.025) 13px 14px),
        radial-gradient(circle at 18% 22%, rgba(138, 154, 107, 0.12), transparent 18rem),
        radial-gradient(circle at 82% 64%, rgba(93, 122, 114, 0.11), transparent 22rem);
    mix-blend-mode: multiply;
}

.design-calibration {
    display: none;
}

/* ============================================================
   HUD Frame (Fixed Overlay)
   ============================================================ */

.hud-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(43, 40, 36, 0.08));
}

.compass-rose {
    transform-box: fill-box;
    transform-origin: center;
    animation: compass-breathe 8s ease-in-out infinite;
}

#azimuth-dial {
    transform-box: fill-box;
    transform-origin: center;
}

/* Light background inverts frame elements slightly */
body.dark-section .hud-frame {
    opacity: 0.9;
}

/* ============================================================
   Content Aperture
   ============================================================ */

.content-aperture {
    position: relative;
    z-index: 50;
    max-width: 820px;
    margin: 0 auto;
    padding: 80px 40px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .content-aperture {
        padding: 60px 24px;
    }
}

/* ============================================================
   Sections
   ============================================================ */

.section {
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Light background sections */
.light-bg {
    background-color: var(--primary-surface);
    color: var(--ink-primary);
    padding: 80px 40px;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(156, 138, 110, 0.18);
}

/* Dark background sections */
.dark-bg {
    background-color: var(--deep-ground);
    color: var(--primary-surface);
    padding: 80px 40px;
    margin-left: -40px;
    margin-right: -40px;
    padding-left: 80px;
    padding-right: 80px;
    position: relative;
    box-shadow: 0 22px 80px rgba(43, 40, 36, 0.26), inset 0 0 0 1px rgba(156, 138, 110, 0.32);
    background-image:
        radial-gradient(circle at 50% 10%, rgba(93, 122, 114, 0.22), transparent 28rem),
        linear-gradient(0deg, rgba(156, 138, 110, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(156, 138, 110, 0.08) 1px, transparent 1px);
    background-size: auto, 48px 48px, 48px 48px;
}

.dark-bg .section-title {
    color: var(--primary-surface);
}

.dark-bg .section-subtitle {
    color: var(--warm-accent);
}

.dark-bg p {
    color: var(--primary-surface);
}

.dark-bg .caveat-aside {
    color: var(--alert-focus);
}

/* Grid pattern for light sections */
.light-bg {
    background-image:
        radial-gradient(circle at 18% 12%, rgba(138, 154, 107, 0.11), transparent 16rem),
        linear-gradient(0deg, rgba(156, 138, 110, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(156, 138, 110, 0.08) 1px, transparent 1px);
    background-size: auto, 40px 40px, 40px 40px;
}

/* ============================================================
   Typography
   ============================================================ */

/* Display headlines - Poiret One */
h1, h2 {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1.0;
    margin-bottom: 1em;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--ink-primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.section-subtitle {
    font-family: 'Lora', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    font-weight: 500;
    color: var(--warm-accent);
    letter-spacing: 0.02em;
    line-height: 1.4;
    margin-bottom: 2em;
}

/* Body text - Source Sans 3 */
p {
    margin-bottom: 1.5em;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* Annotation labels - Caveat */
.caveat-aside {
    font-family: 'Caveat', cursive;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.3;
    color: var(--alert-focus);
    display: inline-block;
    transform: rotate(-1.5deg);
    margin: 0 0.5em;
}

/* ============================================================
   Opening Field Section
   ============================================================ */

.opening-field {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--primary-surface);
    background-image:
        radial-gradient(circle at center, rgba(156, 138, 110, 0.08), transparent 24rem),
        linear-gradient(0deg, rgba(74, 63, 53, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 63, 53, 0.055) 1px, transparent 1px);
    background-size: auto, 36px 36px, 36px 36px;
    padding: 0;
    opacity: 1;
    transform: none;
}

.monopole-diagram {
    margin-bottom: 2em;
    width: min(62vw, 440px);
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(74, 63, 53, 0.14));
}

/* Animate field lines on page load */
@keyframes draw-field-lines {
    from {
        stroke-dashoffset: var(--dash-offset);
    }
    to {
        stroke-dashoffset: 0;
    }
}

.animated-field-lines .field-line {
    animation: draw-field-lines 3s ease-out forwards;
    animation-delay: 0.3s;
}

.opening-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-primary);
    animation: fade-in 0.6s ease-out 1.5s both;
    margin-bottom: 1em;
}

.opening-invitation {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--warm-accent);
    animation: fade-in 0.6s ease-out 2.5s both;
    line-height: 1.6;
    max-width: 34rem;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================================
   Section Dividers
   ============================================================ */

.section-divider {
    width: 100%;
    height: 40px;
    margin: 2em 0;
}

.section-divider path {
    animation: draw-divider 0.8s ease-out forwards;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.section.in-view .section-divider path {
    animation: draw-divider 0.8s ease-out forwards;
}

@keyframes draw-divider {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================================================
   Theory Note Section
   ============================================================ */

.theory-note {
    min-height: auto;
}

.theory-content {
    margin-top: 2em;
}

.theory-content p {
    margin-bottom: 1.5em;
}

/* ============================================================
   Field Map Section (Interactive)
   ============================================================ */

.field-map {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.interactive-field-map {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 2em auto;
    border: 1px solid rgba(156, 138, 110, 0.34);
    padding: 1em;
    background:
        radial-gradient(circle at 50% 50%, rgba(156, 138, 110, 0.12), transparent 8rem),
        rgba(0, 0, 0, 0.05);
    overflow: visible;
}

.field-region {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.field-region:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(156, 138, 110, 0.35));
}

.field-region:hover text {
    opacity: 1 !important;
    transition: opacity 0.4s ease-out;
}

/* ============================================================
   Herbarium Section
   ============================================================ */

.herbarium {
    min-height: auto;
}

.specimen-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 2em;
    margin-top: 3em;
    flex-wrap: wrap;
}

.specimen {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    padding: 1rem;
    border: 1px solid rgba(156, 138, 110, 0.22);
    background: rgba(232, 224, 212, 0.56);
    box-shadow: 0 12px 28px rgba(74, 63, 53, 0.08);
}

.specimen:hover {
    transform: scale(1.08);
    box-shadow: 0 18px 44px rgba(74, 63, 53, 0.14);
}

.specimen-illustration {
    width: 100%;
    height: auto;
    margin-bottom: 1em;
}

.specimen-label {
    background: var(--primary-surface);
    border: 1px solid rgba(74, 63, 53, 0.3);
    padding: 0.75em 1em;
    border-radius: 2px;
    margin-top: 1em;
}

.specimen-name {
    font-family: 'Caveat', cursive;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--ink-primary);
    font-style: italic;
    display: block;
}

/* ============================================================
   Instrument Panel Section
   ============================================================ */

.instrument-panel {
    min-height: auto;
}

.gauge-cluster {
    display: flex;
    justify-content: space-around;
    gap: 2em;
    margin: 3em 0;
    flex-wrap: wrap;
}

.gauge {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}

.gauge:hover {
    filter: drop-shadow(0 0 14px rgba(156, 138, 110, 0.28));
}

.gauge-face {
    width: 100%;
    height: auto;
}

.instrument-text {
    margin-top: 3em;
}

.instrument-text p {
    color: var(--primary-surface);
}

/* ============================================================
   Closing Section
   ============================================================ */

.closing {
    min-height: auto;
    text-align: center;
}

.closing-text {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.8;
    margin-bottom: 1.5em;
    color: var(--ink-primary);
}

/* ============================================================
   Responsive Design
   ============================================================ */

@media (max-width: 1024px) {
    .dark-bg {
        padding-left: 40px;
        padding-right: 40px;
        margin-left: -24px;
        margin-right: -24px;
    }

    .content-aperture {
        padding: 60px 24px;
    }
}

@media (max-width: 768px) {
    .light-bg {
        padding: 60px 24px;
    }

    .dark-bg {
        padding: 60px 24px;
        margin-left: -24px;
        margin-right: -24px;
    }

    .specimen-grid {
        gap: 1.5em;
    }

    .gauge-cluster {
        gap: 1.5em;
    }

    .caveat-aside {
        display: block;
        margin: 1em 0;
    }

    h1, h2 {
        letter-spacing: 0.12em;
    }
}

@media (max-width: 480px) {
    .content-aperture {
        padding: 40px 16px;
    }

    .light-bg,
    .dark-bg {
        padding: 40px 16px;
    }

    .specimen-grid {
        flex-direction: column;
        align-items: center;
    }

    .gauge-cluster {
        flex-direction: column;
        align-items: center;
    }

    .specimen,
    .gauge {
        width: 100%;
        max-width: 280px;
    }
}

/* ============================================================
   Animation Utilities
   ============================================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

@keyframes compass-breathe {
    0%, 100% { opacity: 0.72; }
    50% { opacity: 0.44; }
}

/* ============================================================
   Print Styles
   ============================================================ */

@media print {
    .hud-frame {
        display: none;
    }

    body {
        background: white;
    }

    .section {
        page-break-inside: avoid;
    }
}
