/* tanso.group — Carbon Structural Collective
   Sci-fi, full-bleed, midnight-blue, blueprint-outlined typography */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #A0B4CC;
    background: #0A1628;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========= NOISE CANVAS (fixed, global) ========= */
#noise-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.08;
    mix-blend-mode: screen;
    z-index: 9999;
}

/* ========= HEADER ========= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 5vw;
    z-index: 100;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(10, 22, 40, 0.85), rgba(10, 22, 40, 0));
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========= MONO LABELS ========= */
.mono-label {
    font-family: "Share Tech Mono", "Courier New", monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #4A6FA5;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mono-label.vertical {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 0.25em;
    white-space: nowrap;
}

.alert-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #FF4D4D;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 77, 77, 0.7);
    animation: pulse-alert 1.8s ease-in-out infinite;
}

@keyframes pulse-alert {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.status-indicator {
    color: #E8EEF4;
}

/* ========= SECTIONS (full-bleed) ========= */
.section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

.grid-wrap {
    display: grid;
    grid-template-columns: 5vw 1fr 5vw;
    min-height: 100vh;
    width: 100%;
}

.grid-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.grid-side.left {
    border-right: 1px solid rgba(30, 58, 95, 0.4);
}

.grid-side.right {
    border-left: 1px solid rgba(30, 58, 95, 0.4);
}

.grid-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 5vw;
    position: relative;
    z-index: 2;
}

/* ========= SECTION 1: HERO ARRAY ========= */
.section-array {
    background: radial-gradient(ellipse at center, #132744 0%, #0A1628 75%);
}

.hero-meta {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-title {
    font-family: "Bebas Neue", "Impact", sans-serif;
    font-weight: 400;
    font-size: clamp(6rem, 15vw, 14rem);
    line-height: 0.95;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px #4A6FA5;
    text-shadow: 0 0 40px rgba(74, 111, 165, 0.15);
    margin: 2rem 0;
    white-space: nowrap;
    overflow: visible;
    position: relative;
}

/* Fallback for browsers without text-stroke */
@supports not (-webkit-text-stroke: 1px #4A6FA5) {
    .hero-title {
        color: #0A1628;
        text-shadow: 0 0 1px #4A6FA5;
    }
}

.hero-sub {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 60ch;
    margin-top: 3rem;
}

.hero-tagline {
    font-family: "Inter", sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 300;
    color: #E8EEF4;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.crosshair-wrap {
    margin-top: 6rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.crosshair {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 30px;
}

.crosshair::before,
.crosshair::after {
    content: "";
    position: absolute;
    background: #4A6FA5;
}

.crosshair::before {
    left: 50%;
    top: 0;
    width: 1px;
    height: 30px;
    transform: translateX(-0.5px);
}

.crosshair::after {
    top: 50%;
    left: 0;
    height: 1px;
    width: 30px;
    transform: translateY(-0.5px);
}

/* ========= SCAN LINES ========= */
.scan-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(30, 58, 95, 0.5) 3px,
        rgba(30, 58, 95, 0.5) 4px
    );
    opacity: 0.35;
    mix-blend-mode: overlay;
    z-index: 1;
}

/* ========= SECTION 2: STRUCTURE ========= */
.section-structure {
    background: #0A1628;
    border-top: 1px solid #1E3A5F;
    border-bottom: 1px solid #1E3A5F;
}

.section-kicker {
    margin-bottom: 1.5rem;
    color: #4A6FA5;
}

.section-title {
    font-family: "Bebas Neue", "Impact", sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #E8EEF4;
    margin-bottom: 3rem;
}

.diagram-wrap {
    position: relative;
    width: 80vw;
    max-width: 1200px;
    margin: 2rem auto 4rem;
    padding: 2rem;
    aspect-ratio: 5 / 3;
}

.nanotube-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 20px rgba(74, 111, 165, 0.12));
}

.mag-group {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    transform-box: fill-box;
    will-change: transform;
}

/* Corner brackets */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.corner-tl {
    top: 0;
    left: 0;
    border-top: 2px solid #4A6FA5;
    border-left: 2px solid #4A6FA5;
}

.corner-tr {
    top: 0;
    right: 0;
    border-top: 2px solid #4A6FA5;
    border-right: 2px solid #4A6FA5;
}

.corner-bl {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid #4A6FA5;
    border-left: 2px solid #4A6FA5;
}

.corner-br {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid #4A6FA5;
    border-right: 2px solid #4A6FA5;
}

/* Body column */
.body-column {
    max-width: 50ch;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.body-column p {
    color: #A0B4CC;
    font-size: 1rem;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(30, 58, 95, 0.6);
}

.data-row .mono-label:last-child {
    color: #E8EEF4;
}

/* ========= SECTION 3: NETWORK ========= */
.section-network {
    background: #0A1628;
    position: relative;
    overflow: hidden;
}

#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.overlay-card {
    position: relative;
    background: rgba(19, 39, 68, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(74, 111, 165, 0.25);
    padding: 3rem;
    max-width: 55ch;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.overlay-card p {
    color: #A0B4CC;
    margin: 1rem 0;
}

.readout-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(30, 58, 95, 0.5);
}

.readout-row .mono-label:last-child {
    color: #E8EEF4;
}

.readout-row.alert .mono-label:last-child {
    color: #FF4D4D;
}

/* ========= SECTION 4: DESIGNATION ========= */
.section-designation {
    background: radial-gradient(ellipse at 50% 80%, #132744 0%, #0A1628 70%);
    position: relative;
}

.closing-title {
    font-family: "Bebas Neue", "Impact", sans-serif;
    font-weight: 400;
    font-size: clamp(5rem, 13vw, 12rem);
    line-height: 0.95;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin: 3rem 0;
    position: relative;
    color: transparent;
    -webkit-text-stroke: 1px #4A6FA5;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(74, 111, 165, 0.45) 0px, transparent 2px),
        radial-gradient(circle at 80% 70%, rgba(74, 111, 165, 0.45) 0px, transparent 2px),
        radial-gradient(circle at 40% 80%, rgba(74, 111, 165, 0.35) 0px, transparent 2px),
        radial-gradient(circle at 60% 20%, rgba(74, 111, 165, 0.35) 0px, transparent 2px),
        linear-gradient(120deg, rgba(74, 111, 165, 0.12), rgba(168, 185, 209, 0.18), rgba(74, 111, 165, 0.12));
    background-size: 160px 160px, 200px 200px, 220px 220px, 180px 180px, 400% 400%;
    background-position: 0 0;
    -webkit-background-clip: text;
    background-clip: text;
    animation: drift-noise 18s linear infinite;
    white-space: nowrap;
}

@keyframes drift-noise {
    0%   { background-position: 0 0, 0 0, 0 0, 0 0, 0% 50%; }
    50%  { background-position: 160px 80px, -120px 140px, 200px -100px, -60px 80px, 100% 50%; }
    100% { background-position: 320px 160px, -240px 280px, 400px -200px, -120px 160px, 200% 50%; }
}

.closing-line {
    font-family: "Inter", sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 300;
    color: #E8EEF4;
    line-height: 1.6;
    max-width: 60ch;
    margin-top: 2rem;
    letter-spacing: 0.02em;
}

.footer-meta {
    display: flex;
    gap: 3rem;
    margin-top: 6rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(30, 58, 95, 0.6);
    padding-top: 1.5rem;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 900px) {
    .hero-title {
        letter-spacing: 0.2em;
        font-size: clamp(3rem, 16vw, 10rem);
    }

    .closing-title {
        letter-spacing: 0.2em;
        font-size: clamp(3rem, 14vw, 8rem);
    }

    .grid-wrap {
        grid-template-columns: 3vw 1fr 3vw;
    }

    .grid-center {
        padding: 6rem 3vw;
    }

    .hero-meta,
    .footer-meta {
        gap: 1.5rem;
    }

    .diagram-wrap {
        width: 90vw;
        padding: 1rem;
    }

    .overlay-card {
        padding: 2rem;
    }

    .site-header {
        padding: 1rem 3vw;
    }

    .site-header .mono-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .hero-title {
        letter-spacing: 0.15em;
    }

    .closing-title {
        letter-spacing: 0.15em;
    }
}
