/* luminant.dev - Chrome Noir Diagonal Architecture */

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

:root {
    --void: #0a0a0a;
    --substrate: #1a1a1e;
    --surface: #2d2d35;
    --structure: #5a5a6a;
    --text-primary: #c8c8d0;
    --text-accent: #e8e8f0;
    --luminance: #f0f0ff;
    --signal-cyan: #00e5ff;
    --signal-amber: #ffb300;
    --angle: 12deg;
    --tan12: 0.2126;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void);
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.65;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

.section {
    position: relative;
    overflow: hidden;
}

/* ========================================
   The Apex Section
   ======================================== */

.section-apex {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--void);
}

.apex-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

.chrome-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 15vw, 14rem);
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(135deg, #5a5a6a 0%, #e8e8f0 25%, #c8c8d0 50%, #f0f0ff 75%, #5a5a6a 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chrome-shift 10s ease-in-out infinite;
}

@keyframes chrome-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.chrome-rule {
    margin-top: 2rem;
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
}

.rule-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--structure), var(--text-accent), var(--structure), transparent);
    width: 100%;
}

.rule-shards {
    position: relative;
    height: 60px;
    overflow: hidden;
}

.shard {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, var(--structure), var(--text-accent));
    transform-origin: left center;
}

.shard-1 { top: 8px; left: 10%; width: 30%; transform: rotate(12deg); }
.shard-2 { top: 16px; left: 25%; width: 20%; transform: rotate(12deg); opacity: 0.7; }
.shard-3 { top: 12px; left: 50%; width: 25%; transform: rotate(12deg); opacity: 0.5; }
.shard-4 { top: 24px; left: 40%; width: 35%; transform: rotate(12deg); opacity: 0.3; }
.shard-5 { top: 30px; left: 60%; width: 20%; transform: rotate(12deg); opacity: 0.2; }

.diagonal-grid-overlay {
    position: absolute;
    top: 0;
    left: -10%;
    right: -10%;
    bottom: 0;
    background: repeating-linear-gradient(
        102deg,
        transparent,
        transparent 80px,
        rgba(90, 90, 106, 0.06) 80px,
        rgba(90, 90, 106, 0.06) 81px
    );
    pointer-events: none;
    z-index: 1;
}
/* ========================================
   The Refraction Section
   ======================================== */

.section-refraction {
    min-height: 120vh;
    padding: 10vh 0;
    background: linear-gradient(168deg, var(--void) 0%, var(--substrate) 100%);
}

.refraction-clip {
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    padding: 12vh 5vw 10vh;
    background: var(--substrate);
}

.refraction-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    max-width: 1200px;
    margin: 0 auto;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--structure);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.panel.visible {
    opacity: 1;
    transform: translate(0, 0) !important;
}

.panel-left {
    transform: translate(-100px, 20px);
}

.panel-right {
    transform: translate(100px, -20px);
}

.panel-inner {
    padding: 2.5rem;
}

.section-heading {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 8rem);
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(135deg, #5a5a6a 0%, #e8e8f0 25%, #c8c8d0 50%, #f0f0ff 75%, #5a5a6a 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chrome-shift 10s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

.body-text {
    color: var(--text-primary);
    margin-top: 1.5rem;
    max-width: 40ch;
}

/* Line Chart */
.line-chart {
    width: 100%;
    height: 200px;
    display: block;
}

.chart-grid {
    stroke: var(--structure);
    stroke-width: 0.5;
    stroke-opacity: 0.3;
}

.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease;
}

.chart-line.animate {
    stroke-dashoffset: 0;
}

.data-point {
    fill: var(--signal-cyan);
    filter: drop-shadow(0 0 4px var(--signal-cyan));
    opacity: 0;
    transition: opacity 0.5s ease 1.5s;
}

.data-point.animate {
    opacity: 1;
}

/* Radial Gauges */
.radial-gauges {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.gauge {
    width: 100px;
    height: 100px;
}

.gauge-fill {
    transition: stroke-dashoffset 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gauge-value {
    font-family: "JetBrains Mono", monospace;
    font-size: 18px;
    font-weight: 400;
}
/* ========================================
   The Parallax Void Section
   ======================================== */

.section-void {
    min-height: 120vh;
    padding: 5vh 0;
    background: var(--void);
}

.void-clip {
    clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
    min-height: 110vh;
    background: var(--void);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.void-content {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.void-gridlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.gridline {
    position: absolute;
    width: 140%;
    height: 1px;
    left: -20%;
    background: linear-gradient(90deg, transparent 0%, rgba(90, 90, 106, 0.15) 20%, rgba(90, 90, 106, 0.15) 80%, transparent 100%);
    transform: rotate(12deg);
    transform-origin: center;
}

.gridline:nth-child(1) { top: 10%; }
.gridline:nth-child(2) { top: 22%; }
.gridline:nth-child(3) { top: 34%; }
.gridline:nth-child(4) { top: 46%; }
.gridline:nth-child(5) { top: 58%; }
.gridline:nth-child(6) { top: 70%; }
.gridline:nth-child(7) { top: 82%; }
.gridline:nth-child(8) { top: 94%; }

.void-symbol {
    position: relative;
    z-index: 10;
}

.void-numeral {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: clamp(8rem, 25vw, 20rem);
    background: linear-gradient(135deg, #5a5a6a 0%, #e8e8f0 25%, #c8c8d0 50%, #f0f0ff 75%, #5a5a6a 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chrome-shift 10s ease-in-out infinite, void-rotate 20s linear infinite;
    display: block;
}

@keyframes void-rotate {
    0% { transform: perspective(800px) rotateY(0deg); }
    100% { transform: perspective(800px) rotateY(360deg); }
}

.contour-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.contour {
    position: absolute;
    border: 1px solid var(--structure);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

.contour-1 { width: 200px; height: 200px; }
.contour-2 { width: 350px; height: 350px; }
.contour-3 { width: 500px; height: 500px; }
.contour-4 { width: 650px; height: 650px; }
/* ========================================
   The Array Section
   ======================================== */

.section-array {
    min-height: 140vh;
    padding: 5vh 0;
    background: var(--substrate);
}

.array-clip {
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    min-height: 130vh;
    background: var(--substrate);
    padding: 12vh 5vw;
    position: relative;
}

.array-strips {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.strip {
    background: var(--surface);
    border: 1px solid var(--structure);
    border-radius: 2px;
    clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%);
    transform: translateX(var(--strip-offset, 0));
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    perspective: 600px;
}

.strip.visible {
    opacity: 1;
    transform: translateX(0);
}

.strip-1 { --strip-offset: -60px; }
.strip-2 { --strip-offset: 40px; }
.strip-3 { --strip-offset: -80px; }
.strip-4 { --strip-offset: 60px; }
.strip-5 { --strip-offset: -40px; }
.strip-6 { --strip-offset: 50px; }

.strip-inner {
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.strip-label {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: var(--structure);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.strip-value {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.04em;
    color: var(--text-accent);
}

.strip-unit {
    font-size: 0.5em;
    color: var(--structure);
    margin-left: 0.2em;
}

.strip-chart {
    width: 100%;
    height: 60px;
}

.mini-line {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s ease;
}

.mini-line.animate {
    stroke-dashoffset: 0;
}

/* Node Diagram */
.node-diagram {
    width: 100%;
    height: 80px;
}

.edge {
    stroke: var(--structure);
    stroke-width: 1;
    transition: stroke 0.3s ease;
}

.edge.highlight {
    stroke: var(--signal-cyan);
}

.node {
    fill: var(--text-accent);
    animation: node-pulse 3s ease-in-out infinite;
}

@keyframes node-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Skyline Background */
.skyline-bg {
    position: absolute;
    bottom: 15%;
    left: 0;
    right: 0;
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    opacity: 0.15;
    pointer-events: none;
}

.building {
    width: 30px;
    background: var(--surface);
    position: relative;
}

.b1 { height: 80px; }
.b2 { height: 130px; }
.b3 { height: 60px; }
.b4 { height: 160px; }
.b5 { height: 100px; }
.b6 { height: 180px; }
.b7 { height: 70px; }
.b8 { height: 140px; }
.b9 { height: 90px; }
.b10 { height: 150px; }
.b11 { height: 110px; }
.b12 { height: 170px; }

.building::after {
    content: "";
    position: absolute;
    top: 10%;
    left: 4px;
    right: 4px;
    bottom: 10%;
    background: repeating-linear-gradient(
        180deg,
        transparent,
        transparent 6px,
        rgba(240, 240, 255, 0.15) 6px,
        rgba(240, 240, 255, 0.15) 10px
    );
}
/* ========================================
   The Terminus Section
   ======================================== */

.section-terminus {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--void);
}

.terminus-content {
    text-align: center;
    position: relative;
    width: 100%;
    padding: 5vh 5vw;
}

.terminus-rule {
    margin-bottom: 3rem;
    width: 100%;
}

.terminus-rule .rule-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--structure), var(--text-accent), var(--structure), transparent);
}

.terminus-text {
    position: relative;
    z-index: 10;
}

.terminus-domain {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: var(--structure);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.terminus-attribution {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.transit-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.transit-path {
    stroke-dasharray: 8 12;
    animation: transit-flow 4s linear infinite;
}

.transit-path-2 {
    animation-delay: -2s;
    animation-duration: 6s;
}

@keyframes transit-flow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -40; }
}

/* ========================================
   Shake Interaction
   ======================================== */

.shake {
    animation: shake 0.15s ease 3;
    border-color: var(--signal-cyan) !important;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-3px); }
    40%, 80% { transform: translateX(3px); }
}

/* ========================================
   Section Diagonal Transitions
   ======================================== */

.section-refraction,
.section-void,
.section-array {
    opacity: 0;
    transform: translate(60px, -15px);
    transition: opacity 1s ease, transform 1s ease;
}

.section-refraction.in-view,
.section-void.in-view,
.section-array.in-view {
    opacity: 1;
    transform: translate(0, 0);
}

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

@media (max-width: 768px) {
    .refraction-panels {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .panel-inner {
        padding: 1.5rem;
    }

    .radial-gauges {
        gap: 1rem;
    }

    .gauge {
        width: 70px;
        height: 70px;
    }

    .strip-inner {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .skyline-bg {
        display: none;
    }

    .contour-1 { width: 120px; height: 120px; }
    .contour-2 { width: 200px; height: 200px; }
    .contour-3 { width: 280px; height: 280px; }
    .contour-4 { width: 360px; height: 360px; }
}