/* bada.day — Warm Cyberpunk Data Terminal */

:root {
    --color-bg-deep: #110e0b;
    --color-bg: #1a1410;
    --color-bg-module: #1e1714;
    --color-amber: #e8a94d;
    --color-copper: #d4956b;
    --color-terracotta: #c4624a;
    --color-sand: #e8dcd0;
    --color-muted: #8a7566;
    --color-border: rgba(232, 169, 77, 0.15);
    --color-glow: rgba(232, 169, 77, 0.06);

    --font-display: 'Exo 2', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'Overpass Mono', monospace;
}

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    background: var(--color-bg-deep);
    color: var(--color-sand);
    font-family: var(--font-body);
    font-weight: 300;
    overflow-x: hidden;
}

/* Scan line overlay */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(17, 14, 11, 0.03) 2px,
        rgba(17, 14, 11, 0.03) 4px
    );
}

.ambient-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 999;
    background: radial-gradient(ellipse at 30% 20%, rgba(232, 169, 77, 0.03) 0%, transparent 50%);
}

/* Terminal Container */
.terminal-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

/* Zones */
.zone {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Grid Terminal */
.grid-terminal {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1px;
    width: 100%;
    max-width: 1200px;
    background: var(--color-border);
}

/* Zone 1 Grid */
.zone-boot .grid-terminal {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "header status"
        "geo ticker";
}

.module-header { grid-area: header; }
.module-status { grid-area: status; }
.module-geo-1 { grid-area: geo; }
.module-ticker { grid-area: ticker; }

/* Zone 2 Grid */
.grid-info {
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "nav geo2 metrics"
        "nav text metrics";
}

.module-nav { grid-area: nav; }
.module-geo-2 { grid-area: geo2; }
.module-text { grid-area: text; }
.module-metrics { grid-area: metrics; }

/* Zone 3 Grid */
.grid-deep {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "geo3 log"
        "coords footer";
}

.module-geo-3 { grid-area: geo3; }
.module-log { grid-area: log; }
.module-coords { grid-area: coords; }
.module-footer { grid-area: footer; }

/* Modules */
.module {
    background: var(--color-bg-module);
    padding: 1.5rem;
    position: relative;
    min-height: 160px;
    display: flex;
    flex-direction: column;
}

.module-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-amber);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.8;
}

/* Header Module */
.site-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.4rem, 5.5vw, 5rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-amber);
    line-height: 1.12;
}

.tagline {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.75rem;
    letter-spacing: 0.04em;
}

/* Status Module */
.status-lines {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
    justify-content: center;
}

.status-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.status-key {
    color: var(--color-muted);
    letter-spacing: 0.05em;
}

.status-val {
    color: var(--color-copper);
}

.status-val.active {
    color: var(--color-amber);
    text-shadow: 0 0 8px rgba(232, 169, 77, 0.4);
}

/* Ticker Module */
.ticker-content {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-muted);
    white-space: nowrap;
    animation: tickerScroll 20s linear infinite;
}

@keyframes tickerScroll {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

/* Nav Module */
.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
    justify-content: center;
}

.nav-item {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-sand);
    cursor: pointer;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-border);
    transition: color 0.3s, border-color 0.3s;
}

.nav-item:hover {
    color: var(--color-amber);
    border-color: var(--color-amber);
}

.nav-code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-terracotta);
    margin-right: 0.75rem;
}

/* Info Text */
.info-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-sand);
    flex: 1;
    display: flex;
    align-items: center;
}

/* Metrics Module */
.metric-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.metric-label {
    color: var(--color-muted);
    width: 80px;
    letter-spacing: 0.04em;
}

.metric-bar {
    flex: 1;
    height: 3px;
    background: rgba(232, 169, 77, 0.1);
    position: relative;
}

.bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--color-amber);
    transition: width 1s ease;
}

.metric-val {
    color: var(--color-copper);
    width: 50px;
    text-align: right;
}

/* Log Module */
.log-entries {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: center;
}

.log-entry {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-muted);
}

.log-time {
    color: var(--color-terracotta);
    margin-right: 0.6rem;
}

/* Coords Module */
.coord-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    justify-content: center;
}

.coord-line {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.coord-key {
    color: var(--color-muted);
}

.coord-val {
    color: var(--color-amber);
}

/* Footer */
.footer-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-muted);
    line-height: 1.8;
    flex: 1;
    display: flex;
    align-items: center;
}

/* 3D Geometry Scenes */
.geo-scene {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 600px;
    min-height: 140px;
}

/* Hexagonal Prism */
.hexprism {
    width: 80px;
    height: 140px;
    position: relative;
    transform-style: preserve-3d;
    animation: hexRotate 12s linear infinite;
}

.hex-face {
    position: absolute;
    width: 80px;
    height: 140px;
    background: linear-gradient(180deg, rgba(232, 169, 77, 0.12) 0%, rgba(196, 98, 74, 0.08) 100%);
    border: 1px solid rgba(232, 169, 77, 0.25);
    backface-visibility: visible;
}

.hex-face-1 { transform: rotateY(0deg) translateZ(40px); }
.hex-face-2 { transform: rotateY(60deg) translateZ(40px); }
.hex-face-3 { transform: rotateY(120deg) translateZ(40px); }
.hex-face-4 { transform: rotateY(180deg) translateZ(40px); }
.hex-face-5 { transform: rotateY(240deg) translateZ(40px); }
.hex-face-6 { transform: rotateY(300deg) translateZ(40px); }

@keyframes hexRotate {
    from { transform: rotateY(0deg) rotateX(15deg); }
    to { transform: rotateY(360deg) rotateX(15deg); }
}

/* Orbital Rings */
#orbital-scene {
    position: relative;
}

.orbital-ring {
    position: absolute;
    border: 1px solid rgba(232, 169, 77, 0.3);
    border-radius: 50%;
    transform-style: preserve-3d;
}

.ring-1 {
    width: 120px;
    height: 120px;
    animation: orbitSpin 8s linear infinite;
    transform: rotateX(70deg);
}

.ring-2 {
    width: 90px;
    height: 90px;
    animation: orbitSpin 6s linear infinite reverse;
    transform: rotateX(70deg) rotateY(60deg);
    border-color: rgba(212, 149, 107, 0.3);
}

.ring-3 {
    width: 60px;
    height: 60px;
    animation: orbitSpin 10s linear infinite;
    transform: rotateX(70deg) rotateY(120deg);
    border-color: rgba(196, 98, 74, 0.3);
}

.orbital-core {
    width: 8px;
    height: 8px;
    background: var(--color-amber);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(232, 169, 77, 0.6);
}

@keyframes orbitSpin {
    from { transform: rotateX(70deg) rotateZ(0deg); }
    to { transform: rotateX(70deg) rotateZ(360deg); }
}

/* Stepped Pyramid */
.stepped-pyramid {
    transform-style: preserve-3d;
    animation: pyramidRotate 16s linear infinite;
    position: relative;
    width: 120px;
    height: 100px;
}

.pyramid-level {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(232, 169, 77, 0.15) 0%, rgba(196, 98, 74, 0.1) 100%);
    border: 1px solid rgba(232, 169, 77, 0.2);
}

.level-1 { width: 100px; height: 18px; bottom: 0; }
.level-2 { width: 80px; height: 18px; bottom: 20px; }
.level-3 { width: 60px; height: 18px; bottom: 40px; }
.level-4 { width: 40px; height: 18px; bottom: 60px; }
.level-5 { width: 20px; height: 18px; bottom: 80px; background: rgba(232, 169, 77, 0.25); }

@keyframes pyramidRotate {
    0%, 100% { transform: rotateY(0deg) rotateX(10deg); }
    50% { transform: rotateY(180deg) rotateX(10deg); }
}

/* Module hover glow */
.module {
    transition: box-shadow 0.4s ease;
}

.module:hover {
    box-shadow: inset 0 0 30px rgba(232, 169, 77, 0.04), 0 0 1px rgba(232, 169, 77, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .zone { padding: 1rem; }

    .zone-boot .grid-terminal,
    .grid-info,
    .grid-deep {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas: none;
    }

    .module {
        grid-area: auto !important;
    }

    .site-title {
        font-size: 2rem;
    }
}
