/* ============================
   monopole.style — CSS
   ============================ */

:root {
    --void-indigo: #1a1a2e;
    --midnight-plate: #16213e;
    --signal-cream: #e8d5b7;
    --tarnished-copper: #b87333;
    --reactor-teal: #0f969c;
    --monopole-vermillion: #e63946;
    --graphite-matte: #2a2a3d;
    --dust-lavender: #8888a8;
    --bg: #1a1a2e;
    --scroll: 0;
}

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

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

body {
    background-color: var(--bg);
    color: var(--signal-cream);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    letter-spacing: 0.01em;
    line-height: 1.65;
    overflow-x: hidden;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    filter: url(#noise);
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

/* Isometric Grid Background */
.iso-grid-bg {
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cline x1='0' y1='48' x2='24' y2='0' stroke='%23b87333' stroke-width='0.5' opacity='0.06'/%3E%3Cline x1='24' y1='0' x2='48' y2='48' stroke='%23b87333' stroke-width='0.5' opacity='0.06'/%3E%3Cline x1='0' y1='24' x2='48' y2='24' stroke='%23b87333' stroke-width='0.5' opacity='0.06'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
    z-index: 0;
}

/* Star Layer */
.star-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    pointer-events: none;
}

.star svg {
    display: block;
}

/* ============================
   COVER SPREAD
   ============================ */
.cover-spread {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    overflow: hidden;
}

.cover-content {
    text-align: center;
    position: relative;
    z-index: 3;
}

.iso-wrapper {
    perspective: 800px;
    margin-bottom: 2rem;
}

.hero-logotype {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(2.8rem, 6.5vw, 5.5rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--signal-cream);
    transform: rotateX(15deg) rotateZ(-3deg);
    transform-style: preserve-3d;
    position: relative;
    display: inline-block;
}

.hero-logotype span {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    animation: charFadeIn 0.4s ease-out forwards;
}

@keyframes charFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logotype span:nth-child(1) { animation-delay: 0.1s; }
.hero-logotype span:nth-child(2) { animation-delay: 0.14s; }
.hero-logotype span:nth-child(3) { animation-delay: 0.18s; }
.hero-logotype span:nth-child(4) { animation-delay: 0.22s; }
.hero-logotype span:nth-child(5) { animation-delay: 0.26s; }
.hero-logotype span:nth-child(6) { animation-delay: 0.30s; }
.hero-logotype span:nth-child(7) { animation-delay: 0.34s; }
.hero-logotype span:nth-child(8) { animation-delay: 0.38s; }
.hero-logotype span:nth-child(9) { animation-delay: 0.42s; }
.hero-logotype span:nth-child(10) { animation-delay: 0.46s; }
.hero-logotype span:nth-child(11) { animation-delay: 0.50s; }
.hero-logotype span:nth-child(12) { animation-delay: 0.54s; }
.hero-logotype span:nth-child(13) { animation-delay: 0.58s; }
.hero-logotype span:nth-child(14) { animation-delay: 0.62s; }

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    color: var(--dust-lavender);
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Isometric Cubes */
.iso-cube {
    position: absolute;
    width: 40px;
    height: 40px;
    transform: rotateX(55deg) rotateZ(45deg);
    transform-style: preserve-3d;
}

.cube-top, .cube-left, .cube-right {
    position: absolute;
    width: 40px;
    height: 40px;
}

.cube-top {
    background: var(--graphite-matte);
    transform: translateZ(40px);
    opacity: 0.8;
}

.cube-left {
    background: var(--midnight-plate);
    transform: rotateX(-90deg);
    transform-origin: bottom;
    opacity: 0.6;
}

.cube-right {
    background: #3a3a52;
    transform: rotateY(90deg);
    transform-origin: left;
    opacity: 0.7;
}

.cover-cube {
    bottom: 15%;
    right: 12%;
}

.theory-cube {
    position: relative;
    margin-top: 2rem;
    margin-left: 1rem;
}

/* ============================
   THEORY SPREAD
   ============================ */
.theory-spread {
    position: relative;
    min-height: 150vh;
    z-index: 2;
    padding: clamp(4rem, 8vw, 8rem) clamp(2rem, 4vw, 5rem);
}

.theory-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: clamp(2rem, 4vw, 5rem);
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--signal-cream);
    margin-bottom: 2rem;
}

.theory-text p {
    margin-bottom: 1.5rem;
    max-width: 55ch;
}

.fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.theory-diagrams {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

.iso-diagram {
    width: 100%;
}

.diagram-box {
    background: var(--graphite-matte);
    border: 1px solid rgba(184, 115, 51, 0.15);
    padding: 1rem;
    aspect-ratio: 1;
    max-width: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-lines-svg {
    width: 100%;
    height: 100%;
}

.diagram-caption {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    color: var(--dust-lavender);
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    font-feature-settings: "liga" 0;
}

/* Isometric projection diagram */
.iso-projection {
    position: relative;
    overflow: hidden;
}

.iso-inner-grid {
    width: 100%;
    height: 100%;
    position: relative;
    transform: rotateX(55deg) rotateZ(45deg);
    transform-style: preserve-3d;
}

.grid-plane {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(15, 150, 156, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.grid-plane.offset {
    width: 80px;
    height: 80px;
    border-color: rgba(15, 150, 156, 0.5);
}

.grid-plane.offset-2 {
    width: 40px;
    height: 40px;
    border-color: rgba(15, 150, 156, 0.7);
}

/* ============================
   FIELD MAP
   ============================ */
.field-map {
    position: relative;
    min-height: 150vh;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.field-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.field-star {
    position: absolute;
}

.constellation-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.field-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 4rem clamp(2rem, 6vw, 8rem);
}

.skew-block {
    background: rgba(42, 42, 61, 0.85);
    border-left: 2px solid var(--tarnished-copper);
    padding: 2rem 3rem;
    transform: skewY(-3deg);
    max-width: 600px;
}

.skew-block p {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    letter-spacing: 0.08em;
    line-height: 1.6;
    color: var(--signal-cream);
    transform: skewY(3deg);
}

.block-1 { align-self: flex-start; }
.block-2 { align-self: flex-end; }
.block-3 { align-self: center; }

.block-2 {
    border-left: none;
    border-right: 2px solid var(--reactor-teal);
}

.block-3 {
    border-left-color: var(--monopole-vermillion);
}

/* ============================
   SPECIFICATION SHEET
   ============================ */
.spec-sheet {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(4rem, 8vw, 8rem) clamp(2rem, 4vw, 5rem);
    max-width: 700px;
    margin: 0 auto;
}

.spec-sheet .section-header {
    margin-bottom: 3rem;
}

.spec-list {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(15, 150, 156, 0.2);
}

.spec-row:first-child {
    border-top: 1px solid rgba(15, 150, 156, 0.2);
}

.spec-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--dust-lavender);
    font-feature-settings: "liga" 0;
}

.spec-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--signal-cream);
    font-feature-settings: "liga" 0;
}

/* ============================
   COLOPHON
   ============================ */
.colophon {
    position: relative;
    z-index: 2;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.colophon-field-lines {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.colophon-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.colophon-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.colophon-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--signal-cream);
    margin-bottom: 1rem;
}

.colophon-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    color: var(--dust-lavender);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-feature-settings: "liga" 0;
}

.colophon-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    color: rgba(136, 136, 168, 0.5);
    letter-spacing: 0.05em;
    font-feature-settings: "liga" 0;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .theory-grid {
        grid-template-columns: 1fr;
    }

    .skew-block {
        max-width: 100%;
    }

    .block-1, .block-2, .block-3 {
        align-self: stretch;
    }

    .diagram-box {
        max-width: 180px;
    }
}
