/* ============================================
   monopole.systems - Magnetic Field Aesthetic
   Bi-polar color system: Cool North / Warm South
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: #e8f0f9;
    color: #0a1929;
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

/* --- Global SVG Field Lines --- */
.field-lines-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* Field Line Stroke Animation */
.field-line {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: fieldFlow 10s ease-in-out infinite alternate;
}

.north-line { animation-delay: 0s; }
.south-line { animation-delay: 0.5s; }
.equator-line { animation-delay: 1s; }

.n1 { animation-duration: 9s; }
.n2 { animation-duration: 11s; }
.n3 { animation-duration: 10s; }
.n4 { animation-duration: 12s; }
.n5 { animation-duration: 8.5s; }
.n6 { animation-duration: 10.5s; }

.s1 { animation-duration: 9.5s; }
.s2 { animation-duration: 11.5s; }
.s3 { animation-duration: 10.2s; }
.s4 { animation-duration: 12s; }
.s5 { animation-duration: 8.8s; }
.s6 { animation-duration: 10.8s; }

@keyframes fieldFlow {
    0% {
        stroke-dashoffset: 1200;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Libre Baskerville', 'Georgia', serif;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
}

.pole-label,
.equator-label,
.data-label,
.strength-label-n,
.strength-label-eq,
.strength-label-s,
.data-divider-label {
    font-family: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    z-index: 1;
    overflow: hidden;
}

.hero-north {
    flex: 1;
    background: #e8f0f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-south {
    flex: 1;
    background: #fef3e8;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content-north,
.hero-content-south {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 5rem);
    letter-spacing: -0.015em;
    line-height: 1.15;
    display: inline-block;
}

.title-north {
    color: #0a1929;
}

.title-south {
    color: #4d2601;
}

.hero-subtitle-north {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.4rem;
    color: #4a90e2;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
    font-weight: 400;
}

.hero-tagline {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    color: #4d2601;
    font-style: italic;
    max-width: 320px;
    line-height: 1.6;
}

/* Hero Divider - Tension Line */
.hero-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        #d0d0d0 20%,
        #d0d0d0 80%,
        transparent 100%
    );
    opacity: 0.5;
    z-index: 3;
    transform: translateX(-0.25px);
}

/* Concentric Circles Motif */
.concentric-north,
.concentric-south {
    position: absolute;
    width: 350px;
    height: 350px;
    pointer-events: none;
}

.concentric-north {
    top: 10%;
    right: -5%;
    animation: concentricPulse 8s ease-in-out infinite;
}

.concentric-south {
    bottom: 10%;
    left: -5%;
    animation: concentricPulse 8s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes concentricPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.7; }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
}

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

/* ============================================
   NORTH POLE SECTION
   ============================================ */
.north-section {
    position: relative;
    background: #e8f0f9;
    z-index: 1;
    padding: 6rem 0;
    min-height: 500px;
}

.north-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 30%, rgba(74, 144, 226, 0.06), transparent 70%);
    pointer-events: none;
}

.pole-inner {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.pole-text {
    flex: 1;
}

.pole-visual {
    flex: 0 0 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pole-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a90e2;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 1rem;
}

.north-heading {
    color: #0a1929;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.north-section .section-body {
    color: #0a1929;
    margin-bottom: 1.2rem;
    max-width: 560px;
}

/* North Visualization */
.north-viz .viz-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: saturate(70%);
}

.viz-n1 { animation-duration: 9s; stroke-dasharray: 600; stroke-dashoffset: 600; animation: fieldFlow 9s ease-in-out infinite alternate; }
.viz-n2 { animation-duration: 10s; stroke-dasharray: 500; stroke-dashoffset: 500; animation: fieldFlow 10s ease-in-out infinite alternate; animation-delay: 0.3s; }
.viz-n3 { animation-duration: 10s; stroke-dasharray: 500; stroke-dashoffset: 500; animation: fieldFlow 10s ease-in-out infinite alternate; animation-delay: 0.6s; }
.viz-n4 { animation-duration: 9s; stroke-dasharray: 600; stroke-dashoffset: 600; animation: fieldFlow 9s ease-in-out infinite alternate; animation-delay: 0.9s; }
.viz-n5 { animation-duration: 11s; stroke-dasharray: 450; stroke-dashoffset: 450; animation: fieldFlow 11s ease-in-out infinite alternate; animation-delay: 0.4s; }

.concentric-ring {
    animation: concentricPulse 6s ease-in-out infinite;
}

/* Direction Arrows */
.direction-arrows {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.direction-arrows svg {
    width: 30px;
    height: 30px;
}

.north-arrows {
    animation: arrowFloat 3s ease-in-out infinite;
}

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

.south-arrows {
    animation: arrowFloatUp 3s ease-in-out infinite;
}

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

/* ============================================
   EQUATORIAL TRANSITION
   ============================================ */
.equator-section {
    position: relative;
    background: #d0d0d0;
    z-index: 1;
    padding: 4rem 0;
    min-height: 120px;
    text-align: center;
}

.equator-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.equator-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.8rem;
}

.equator-text {
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    color: #444;
    font-style: italic;
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto;
}

.equator-line-visual {
    margin-top: 1.5rem;
}

.equator-svg {
    width: 100%;
    max-width: 600px;
    height: 60px;
}

.equator-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: fieldFlow 12s ease-in-out infinite alternate;
}

/* ============================================
   SOUTH POLE SECTION
   ============================================ */
.south-section {
    position: relative;
    background: #fef3e8;
    z-index: 1;
    padding: 6rem 0;
    min-height: 500px;
}

.south-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 70% 70%, rgba(230, 126, 34, 0.06), transparent 70%);
    pointer-events: none;
}

.south-inner {
    flex-direction: row-reverse;
}

.south-text {
    text-align: right;
}

.south-label {
    color: #e67e22;
}

.south-heading {
    color: #4d2601;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.south-section .section-body {
    color: #4d2601;
    margin-bottom: 1.2rem;
    max-width: 560px;
    margin-left: auto;
}

/* South Visualization */
.south-viz .viz-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: saturate(70%);
}

.viz-s1 { stroke-dasharray: 600; stroke-dashoffset: 600; animation: fieldFlow 9.5s ease-in-out infinite alternate; }
.viz-s2 { stroke-dasharray: 500; stroke-dashoffset: 500; animation: fieldFlow 10.5s ease-in-out infinite alternate; animation-delay: 0.3s; }
.viz-s3 { stroke-dasharray: 500; stroke-dashoffset: 500; animation: fieldFlow 10.5s ease-in-out infinite alternate; animation-delay: 0.6s; }
.viz-s4 { stroke-dasharray: 600; stroke-dashoffset: 600; animation: fieldFlow 9.5s ease-in-out infinite alternate; animation-delay: 0.9s; }
.viz-s5 { stroke-dasharray: 450; stroke-dashoffset: 450; animation: fieldFlow 11.5s ease-in-out infinite alternate; animation-delay: 0.4s; }

/* ============================================
   DATA / STRUCTURE SECTION
   ============================================ */
.data-section {
    position: relative;
    z-index: 1;
    padding: 5rem 0;
    background: linear-gradient(to bottom, #e8f0f9 0%, #e8f0f9 45%, #d0d0d0 50%, #fef3e8 55%, #fef3e8 100%);
}

.data-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.data-heading {
    text-align: center;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: #0a1929;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.data-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1.2rem 2rem;
}

.north-data {
    background: rgba(232, 240, 249, 0.8);
    border-left: 3px solid #4a90e2;
}

.south-data {
    background: rgba(254, 243, 232, 0.8);
    border-left: 3px solid #e67e22;
}

.data-cell {
    display: flex;
    align-items: center;
}

.data-label {
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-value {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1rem;
}

.north-data .data-value {
    color: #0a1929;
}

.south-data .data-value {
    color: #4d2601;
}

.data-divider {
    text-align: center;
    padding: 1rem 0;
    position: relative;
}

.data-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #d0d0d0;
}

.data-divider-label {
    position: relative;
    background: #d0d0d0;
    padding: 0.3rem 1rem;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Field Strength Bar */
.field-strength-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 3rem;
}

.strength-north {
    flex: 1;
    background: linear-gradient(to right, #4a90e2, #a8d4ff);
}

.strength-center {
    flex: 0.3;
    background: #d0d0d0;
}

.strength-south {
    flex: 1;
    background: linear-gradient(to right, #f5d6b8, #e67e22);
}

.strength-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0 0.2rem;
}

.strength-label-n {
    color: #4a90e2;
    font-weight: 500;
    font-size: 0.85rem;
}

.strength-label-eq {
    color: #999;
    font-size: 0.8rem;
}

.strength-label-s {
    color: #e67e22;
    font-weight: 500;
    font-size: 0.85rem;
}

/* ============================================
   CLOSURE SECTION
   ============================================ */
.closure-section {
    position: relative;
    z-index: 1;
    padding: 5rem 0 6rem;
    background: linear-gradient(135deg, #e8f0f9 0%, #f0f0f0 50%, #fef3e8 100%);
    text-align: center;
}

.closure-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.closure-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #0a1929;
    margin-bottom: 1.5rem;
}

.closure-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 2.5rem;
}

.closure-visual {
    margin: 2rem auto;
    max-width: 600px;
}

.closure-svg {
    width: 100%;
    height: auto;
}

.cl1 { stroke-dasharray: 500; stroke-dashoffset: 500; animation: fieldFlow 8s ease-in-out infinite alternate; }
.cl2 { stroke-dasharray: 480; stroke-dashoffset: 480; animation: fieldFlow 9s ease-in-out infinite alternate; animation-delay: 0.5s; }
.cl3 { stroke-dasharray: 480; stroke-dashoffset: 480; animation: fieldFlow 9s ease-in-out infinite alternate; animation-delay: 1s; }
.cl4 { stroke-dasharray: 500; stroke-dashoffset: 500; animation: fieldFlow 8s ease-in-out infinite alternate; animation-delay: 1.5s; }

.closure-signature {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: #999;
    margin-top: 3rem;
    text-transform: lowercase;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.pole-section .pole-inner,
.equator-inner,
.data-inner,
.closure-inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1.0),
                transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1.0);
}

.pole-section .pole-inner.visible,
.equator-inner.visible,
.data-inner.visible,
.closure-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

/* North elements attracted inward (downward) */
.north-section .pole-inner {
    transform: translateY(-20px);
}

.north-section .pole-inner.visible {
    transform: translateY(0);
}

/* South elements attracted inward (upward) */
.south-section .pole-inner {
    transform: translateY(20px);
}

.south-section .pole-inner.visible {
    transform: translateY(0);
}

/* ============================================
   HOVER INTERACTIONS - Pole Flip Effect
   ============================================ */
.north-section .pole-visual:hover .north-line {
    stroke: #c47a30;
    transition: stroke 0.3s ease-in-out;
}

.south-section .pole-visual:hover .south-line {
    stroke: #5a9fd6;
    transition: stroke 0.3s ease-in-out;
}

/* Link styling */
a {
    color: inherit;
    text-decoration: none;
    position: relative;
}

.north-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4a90e2;
    transition: width 0.3s ease-in-out, background 0.3s ease-in-out;
}

.north-section a:hover::after {
    width: 100%;
}

.north-section a:active::after {
    background: #e67e22;
}

.south-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e67e22;
    transition: width 0.3s ease-in-out, background 0.3s ease-in-out;
}

.south-section a:hover::after {
    width: 100%;
}

.south-section a:active::after {
    background: #4a90e2;
}

/* ============================================
   FIELD STRENGTH OPACITY (scroll-driven)
   ============================================ */
.field-line.faded {
    opacity: 0.15 !important;
    transition: opacity 0.6s ease-in-out;
}

.field-line.intense {
    opacity: 0.55 !important;
    transition: opacity 0.6s ease-in-out;
}

/* ============================================
   CURSOR REPULSION (applied via JS)
   ============================================ */
.repel {
    transition: transform 0.1s ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
    }

    .hero-divider {
        top: 50%;
        left: 0;
        width: 100%;
        height: 1px;
        transform: none;
    }

    .pole-inner,
    .south-inner {
        flex-direction: column !important;
        gap: 2rem;
        padding: 0 2rem;
    }

    .pole-visual {
        flex: none;
        width: 100%;
    }

    .south-text {
        text-align: left;
    }

    .south-section .section-body {
        margin-left: 0;
    }

    .data-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .concentric-north,
    .concentric-south {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .pole-inner {
        padding: 0 1.2rem;
    }

    .data-row {
        grid-template-columns: 1fr;
        gap: 0.3rem;
        padding: 1rem;
    }

    .direction-arrows {
        gap: 1rem;
    }
}

/* ============================================
   TENSION LINES
   ============================================ */
.north-section::after,
.south-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 0.5px;
    background: #1a1a1a;
    opacity: 0.08;
}

.south-section::after {
    bottom: auto;
    top: 0;
    /* slight misalignment */
    left: 4.5%;
    right: 5.5%;
}
