/* ============================================
   monopole.ai - Memphis Bold Meets Particle Physics
   ============================================ */

/* --- Color Palette ---
   Cream Background: #F5F0E0
   Burgundy Primary: #6B1A30
   Burgundy Light:   #A03050
   Deep Brown:       #3A1018
   Warm Brown:       #4A3828
   Memphis Pink:     #E8A0A0
   Memphis Blue:     #60809A
   Memphis Yellow:   #E8D480
   Marble Light:     #E8E0D0
   Marble Dark:      #DDD5C0
*/

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

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

body {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    color: #4A3828;
    background-color: #F5F0E0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Background Field Lines Canvas --- */
#fieldLinesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
}

/* --- Navigation --- */
#mainNav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 3px solid #6B1A30;
    background: #F5F0E0;
    color: #6B1A30;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s ease,
                color 0.3s ease,
                box-shadow 0.3s ease;
    cursor: pointer;
}

.nav-btn:hover {
    transform: rotate(3deg);
    background-color: #6B1A30;
    color: #F5F0E0;
    box-shadow: 0 6px 16px rgba(107, 26, 48, 0.25);
}

.nav-btn svg {
    display: block;
}

/* --- Sections Base --- */
.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    z-index: 1;
}

.section-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Section Dividers --- */
.section-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 5;
}

/* --- Typography --- */
.section-title {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #3A1018;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-body {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    color: #4A3828;
    margin-bottom: 1.2rem;
}

.equation-label {
    font-family: 'Zilla Slab', serif;
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
    color: #6B1A30;
    display: block;
    margin-bottom: 0.5rem;
}

.card-title {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #3A1018;
    margin-bottom: 0.6rem;
}

/* ============================================
   SECTION 0: THE HYPOTHESIS (Hero)
   ============================================ */
.section-hypothesis {
    background-color: #F5F0E0;
    display: flex;
    flex-direction: column;
}

.section-hypothesis .section-inner {
    flex: 1;
}

.hero-circle {
    position: relative;
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-circle-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-circle-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

.hero-title {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #3A1018;
    margin-bottom: 1rem;
    overflow: hidden;
}

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

.hero-title .char.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-subtitle {
    font-family: 'Karla', sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: #4A3828;
    opacity: 0;
    transition: opacity 1s ease 2.5s;
    line-height: 1.6;
}

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

/* Hero field lines */
.hero-field-lines {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-field-lines .field-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

.hero-field-lines .field-line.animate {
    transition: stroke-dashoffset 2s ease-out;
    stroke-dashoffset: 0;
}

/* Squiggles around hero circle */
.squiggle {
    position: absolute;
    opacity: 0;
    transform: scale(0);
}

.squiggle.visible {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.squiggle-top {
    top: -20px;
    left: 20%;
    width: 60%;
    height: 30px;
}

.squiggle-right {
    top: 20%;
    right: -25px;
    width: 30px;
    height: 60%;
}

.squiggle-bottom {
    bottom: -20px;
    left: 20%;
    width: 60%;
    height: 30px;
}

.squiggle-left {
    top: 20%;
    left: -25px;
    width: 30px;
    height: 60%;
}

/* ============================================
   SECTION 1: DIRAC'S ARGUMENT (Triangle)
   ============================================ */
.section-dirac {
    background: linear-gradient(45deg, #F5F0E0, #E8E0D0, #F5F0E0, #DDD5C0);
}

.memphis-triangle-container {
    position: relative;
    max-width: 700px;
    width: 100%;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.memphis-triangle-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.triangle-shape {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 100px solid #6B1A30;
    opacity: 0.12;
    z-index: 0;
}

.triangle-content {
    position: relative;
    z-index: 2;
    background: #F5F0E0;
    border: 4px solid #6B1A30;
    padding: 50px 40px;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    padding-top: 100px;
    text-align: center;
}

@media (max-width: 768px) {
    .triangle-content {
        clip-path: none;
        padding-top: 40px;
        border-radius: 12px;
    }
}

.memphis-quote {
    position: relative;
    margin-top: 1.5rem;
    padding: 1.2rem 1.5rem;
    border-left: 4px solid #E8D480;
}

.memphis-quote p {
    font-family: 'Zilla Slab', serif;
    font-size: 1.2rem;
    font-weight: 600;
    font-style: italic;
    color: #6B1A30;
    line-height: 1.6;
}

.memphis-quote cite {
    font-family: 'Karla', sans-serif;
    font-size: 0.9rem;
    color: #4A3828;
    font-style: normal;
    display: block;
    margin-top: 0.5rem;
}

.quote-squiggle {
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 20px;
}

/* Memphis decorative elements */
.memphis-deco {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.memphis-deco.visible {
    opacity: 1;
}

.deco-circle-small {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #E8A0A0;
    top: 10%;
    right: 8%;
    transform: scale(0);
}

.deco-circle-small.visible {
    transform: scale(1);
}

.deco-rect-tilted {
    width: 60px;
    height: 40px;
    border: 3px solid #60809A;
    bottom: 20%;
    left: 5%;
    transform: rotate(-15deg) scale(0);
}

.deco-rect-tilted.visible {
    transform: rotate(-15deg) scale(1);
}

.section-squiggle {
    position: absolute;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.section-squiggle.visible {
    opacity: 1;
}

.sq-dirac {
    bottom: 15%;
    right: 3%;
    width: 200px;
    height: 30px;
}

/* ============================================
   SECTION 2: THE SEARCH (Zigzag Rectangle)
   ============================================ */
.section-detection {
    background-color: #F5F0E0;
}

.memphis-zigzag-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.memphis-zigzag-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.zigzag-top, .zigzag-bottom {
    display: block;
    width: 100%;
    height: 40px;
}

.zigzag-content {
    background: #F5F0E0;
    border-left: 4px solid #6B1A30;
    border-right: 4px solid #6B1A30;
    padding: 40px;
}

.detection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 1.5rem;
}

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

.detection-card {
    padding: 24px;
    border: 3px solid #6B1A30;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.detection-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(107, 26, 48, 0.15);
}

.marble-panel {
    background: linear-gradient(45deg, #F5F0E0, #E8E0D0, #F5F0E0, #DDD5C0);
}

.sq-detection-1 {
    left: -10px;
    top: 30%;
    width: 30px;
    height: 200px;
}

.sq-detection-2 {
    right: -10px;
    bottom: 25%;
    width: 30px;
    height: 200px;
}

.deco-diamond {
    width: 50px;
    height: 50px;
    border: 3px solid #E8D480;
    top: 8%;
    left: 12%;
    transform: rotate(45deg) scale(0);
}

.deco-diamond.visible {
    transform: rotate(45deg) scale(1);
}

/* ============================================
   SECTION 3: AI & MONOPOLES (Diamond)
   ============================================ */
.section-ai {
    background: linear-gradient(45deg, #F5F0E0, #E8E0D0, #F5F0E0, #DDD5C0);
}

.memphis-diamond-container {
    position: relative;
    max-width: 750px;
    width: 100%;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.memphis-diamond-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.diamond-border {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 120px;
    height: 120px;
    border: 4px solid #6B1A30;
    background: transparent;
    opacity: 0.2;
    z-index: 0;
}

.diamond-content {
    position: relative;
    z-index: 2;
    background: #F5F0E0;
    border: 4px solid #6B1A30;
    padding: 50px 40px;
}

.ai-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.ai-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-feature:hover {
    transform: translateY(-6px);
}

.feature-icon {
    width: 72px;
    height: 72px;
    border: 3px solid #6B1A30;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F0E0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.ai-feature:hover .feature-icon {
    background: linear-gradient(135deg, #F5F0E0, #E8E0D0);
    box-shadow: 0 8px 20px rgba(107, 26, 48, 0.15);
}

.feature-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #3A1018;
    text-align: center;
}

.sq-ai {
    bottom: 20%;
    left: 2%;
    width: 200px;
    height: 30px;
}

.deco-circle-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #60809A;
    top: 8%;
    right: 5%;
    transform: scale(0);
}

.deco-circle-large.visible {
    transform: scale(1);
}

/* ============================================
   SECTION 4: THE FUTURE (Circle)
   ============================================ */
.section-future {
    background-color: #F5F0E0;
}

.memphis-circle-container {
    position: relative;
    width: 55vw;
    height: 55vw;
    max-width: 700px;
    max-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.memphis-circle-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.circle-border-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.circle-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px;
    max-width: 500px;
}

.closing-line {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: #6B1A30;
    margin-top: 1.5rem;
    letter-spacing: 0.04em;
}

.future-field-lines {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.future-field-lines .field-line {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

.future-field-lines .field-line.animate {
    transition: stroke-dashoffset 2.5s ease-out;
    stroke-dashoffset: 0;
}

.squiggle-future-1 {
    top: -20px;
    left: 15%;
    width: 70%;
    height: 30px;
}

.squiggle-future-2 {
    top: 15%;
    right: -25px;
    width: 30px;
    height: 70%;
}

/* ============================================
   FOOTER
   ============================================ */
#siteFooter {
    position: relative;
    z-index: 1;
    background: #3A1018;
    padding: 60px 40px;
    text-align: center;
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-squiggle {
    width: 300px;
    height: 20px;
    margin: 0 auto 1.5rem;
    display: block;
}

.footer-text {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #F5F0E0;
    margin-bottom: 0.5rem;
}

.footer-sub {
    font-family: 'Karla', sans-serif;
    font-size: 0.95rem;
    color: #E8A0A0;
    line-height: 1.6;
}

/* ============================================
   HOVER INTERACTIVITY ON SECTIONS
   ============================================ */
.section:hover .field-line {
    opacity: 0.4 !important;
    transition: opacity 0.5s ease;
}

.section .field-line {
    transition: opacity 0.5s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-circle {
        width: 90vw;
        height: 90vw;
    }

    .hero-circle-content {
        padding: 20px;
    }

    .section-inner {
        padding: 60px 20px;
    }

    .memphis-circle-container {
        width: 90vw;
        height: 90vw;
        border-radius: 20px;
    }

    .circle-content {
        padding: 30px;
    }

    .triangle-content {
        clip-path: none;
        padding-top: 40px;
        border-radius: 12px;
    }

    .detection-grid {
        grid-template-columns: 1fr;
    }

    .ai-features {
        gap: 24px;
    }

    #mainNav {
        top: 10px;
        right: 10px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
    }

    .squiggle-right,
    .squiggle-left,
    .sq-detection-1,
    .sq-detection-2 {
        display: none;
    }

    .memphis-deco {
        display: none;
    }

    .diamond-border {
        display: none;
    }

    .triangle-shape {
        display: none;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fieldLineFlow {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -40;
    }
}

.field-line-flowing {
    animation: fieldLineFlow 3s linear infinite;
    stroke-dasharray: 20 20;
}

.section:hover .field-line-flowing {
    animation-duration: 1.5s;
}
