:root {
    --c-forest: #0e1e14;
    --c-canopy: #2a4a30;
    --c-night: #4ae868;
    --c-magenta: #e84a8a;
    --c-cyan: #4ae8d8;
    --c-monitor: #d0e8d4;
    --c-data: #5a7a60;
    --f-head: "Barlow Condensed", "Impact", "Arial Narrow", sans-serif;
    --f-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
    --f-mono: "Fira Code", "Consolas", "Menlo", monospace;
}

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

html { background: var(--c-forest); }

body {
    font-family: var(--f-body);
    background: var(--c-forest);
    color: var(--c-monitor);
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* === atmospheric overlays === */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(74, 232, 104, 0.04) 0 1px, transparent 1px 3px);
    z-index: 9999;
    mix-blend-mode: screen;
}

.vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 9998;
}

/* === HERO === */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--c-forest);
}

.hero-layer {
    position: absolute;
    inset: 0;
}

.hero-layer-back {
    z-index: 1;
    opacity: 0;
    transition: opacity 1.4s ease-out;
}

.hero-revealed .hero-layer-back { opacity: 1; }

.grid-overlay {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(74, 232, 104, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 232, 104, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 30% 40%, rgba(74, 232, 216, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(232, 74, 138, 0.06) 0%, transparent 50%);
    background-size: 60px 60px, 60px 60px, 100% 100%, 100% 100%;
    animation: grid-drift 18s linear infinite;
}

@keyframes grid-drift {
    from { background-position: 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 60px 60px, 60px 60px, 0 0, 0 0; }
}

.hero-layer-mid {
    z-index: 2;
    opacity: 0.55;
    overflow: hidden;
}

.data-stream {
    position: absolute;
    white-space: nowrap;
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--c-night);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.55;
}

.data-stream span { padding-right: 70px; }

.stream-a {
    top: 18%;
    left: 0;
    width: 200%;
    animation: stream-scroll-a 38s linear infinite;
    color: var(--c-night);
    filter: blur(0.4px);
}

.stream-b {
    top: 78%;
    left: 0;
    width: 200%;
    animation: stream-scroll-b 52s linear infinite;
    color: var(--c-cyan);
}

@keyframes stream-scroll-a {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes stream-scroll-b {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.hero-layer-front {
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(24px, 6vw, 96px);
}

.hero-content {
    max-width: 920px;
    opacity: 0;
    transform: translateY(20px);
    animation: fade-up 1.2s ease-out forwards;
    animation-delay: 0.3s;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--f-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--c-night);
    border: 1px solid rgba(74, 232, 104, 0.4);
    padding: 8px 14px;
    margin-bottom: 24px;
    background: rgba(14, 30, 20, 0.6);
}

.tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-night);
    box-shadow: 0 0 12px var(--c-night);
    animation: tag-pulse 1.6s ease-in-out infinite;
}

@keyframes tag-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--c-night); }
    50% { opacity: 0.4; box-shadow: 0 0 4px var(--c-night); }
}

.tag-time { color: var(--c-cyan); font-weight: 500; }

.hero-title {
    font-family: var(--f-head);
    font-weight: 900;
    font-size: clamp(52px, 11vw, 168px);
    line-height: 0.86;
    letter-spacing: -0.01em;
    color: var(--c-monitor);
    text-transform: uppercase;
    text-shadow: -2px 0 var(--c-night), 2px 0 var(--c-magenta);
    position: relative;
    margin-bottom: 28px;
    animation: title-glitch 5.2s steps(1) infinite;
}

@keyframes title-glitch {
    0%, 88%, 100% { text-shadow: -2px 0 var(--c-night), 2px 0 var(--c-magenta); transform: translate(0, 0); }
    89% { text-shadow: -4px 0 var(--c-night), 4px 0 var(--c-magenta), 0 -2px var(--c-cyan); transform: translate(2px, 0); }
    91% { text-shadow: 3px 0 var(--c-night), -3px 0 var(--c-magenta); transform: translate(-1px, 0); }
    93% { text-shadow: -2px 1px var(--c-night), 2px -1px var(--c-magenta); transform: translate(0, 1px); }
}

.hero-sub {
    font-family: var(--f-body);
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.65;
    color: var(--c-monitor);
    max-width: 660px;
    margin-bottom: 32px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    font-family: var(--f-mono);
    font-size: 12px;
}

.meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 2px solid var(--c-night);
    padding-left: 12px;
}

.meta-key { color: var(--c-data); text-transform: uppercase; letter-spacing: 0.14em; font-size: 10px; }
.meta-val { color: var(--c-monitor); font-size: 14px; font-weight: 700; letter-spacing: 0.05em; }

.hero-panels {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    inset: 0;
}

.hero-panel {
    position: absolute;
    background: linear-gradient(135deg, rgba(42, 74, 48, 0.7) 0%, rgba(14, 30, 20, 0.6) 100%);
    border: 1px solid rgba(74, 232, 104, 0.3);
    padding: 18px 22px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    opacity: 0;
    animation: panel-in 1.2s cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
}

.hero-panel-1 {
    top: 14%;
    right: 8%;
    animation-delay: 1.1s;
    transform: rotate(2deg);
}

.hero-panel-2 {
    top: 50%;
    right: 4%;
    animation-delay: 1.4s;
    transform: rotate(-1deg);
}

.hero-panel-3 {
    bottom: 12%;
    right: 18%;
    animation-delay: 1.7s;
    transform: rotate(1.5deg);
}

@keyframes panel-in {
    from { opacity: 0; transform: translateX(40px) rotate(0deg); }
    to { opacity: 0.92; }
}

.panel-id { font-family: var(--f-mono); font-size: 10px; color: var(--c-cyan); letter-spacing: 0.16em; }
.panel-headline { font-family: var(--f-head); font-size: 14px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--c-monitor); }
.panel-value { font-family: var(--f-head); font-weight: 700; font-size: 28px; color: var(--c-night); letter-spacing: 0.02em; }

@keyframes fade-up {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
    .hero-panels { display: none; }
}

/* glitch bands */
.glitch-band {
    height: 12px;
    overflow: hidden;
    background: linear-gradient(90deg, var(--c-night), var(--c-magenta), var(--c-cyan), var(--c-night));
    background-size: 400% 100%;
    animation: band-shift 3.2s linear infinite;
    position: relative;
    display: flex;
    align-items: center;
}

.glitch-band-1 { height: 14px; }
.glitch-band-2 { height: 8px; opacity: 0.6; }
.glitch-band-3 { height: 16px; }

.glitch-band span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    color: var(--c-forest);
    font-family: var(--f-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    animation: band-text 6s linear infinite;
    white-space: nowrap;
}

@keyframes band-shift {
    from { background-position: 0% 0; }
    to { background-position: 400% 0; }
}

@keyframes band-text {
    from { transform: translateX(100vw); }
    to { transform: translateX(-100%); }
}

/* === metrics === */
.metrics {
    padding: clamp(60px, 8vw, 120px) clamp(20px, 5vw, 80px);
    background: var(--c-forest);
    position: relative;
}

.metrics-inner { max-width: 1320px; margin: 0 auto; }

.section-head { margin-bottom: clamp(40px, 5vw, 64px); max-width: 760px; }
.section-tag {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--c-night);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(74, 232, 104, 0.4);
    padding-bottom: 4px;
}
.section-title {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(36px, 5vw, 64px);
    text-transform: uppercase;
    color: var(--c-monitor);
    line-height: 1;
    margin-bottom: 18px;
    letter-spacing: -0.005em;
}
.section-lead {
    font-size: clamp(15px, 1.4vw, 17px);
    color: var(--c-monitor);
    line-height: 1.7;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.metric-card {
    position: relative;
    background: linear-gradient(135deg, rgba(42, 74, 48, 0.55) 0%, rgba(14, 30, 20, 0.85) 100%);
    border: 1px solid rgba(74, 232, 104, 0.18);
    padding: 24px 22px 18px;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    transition: transform 0.25s ease;
}

.metric-card:hover { transform: translateY(-3px); }

.metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--c-night);
}

.metric-card.metric-2::before { background: var(--c-magenta); }
.metric-card.metric-4::before { background: var(--c-magenta); }
.metric-card.metric-6::before { background: var(--c-cyan); }
.metric-card.metric-3::before { background: var(--c-cyan); }

.metric-label {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--c-data);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.metric-value {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(38px, 4.4vw, 58px);
    color: var(--c-monitor);
    letter-spacing: -0.01em;
    line-height: 1;
    margin: 6px 0 4px;
}

.metric-card.metric-1 .metric-value,
.metric-card.metric-5 .metric-value { color: var(--c-night); }
.metric-card.metric-3 .metric-value,
.metric-card.metric-6 .metric-value { color: var(--c-cyan); }
.metric-card.metric-2 .metric-value,
.metric-card.metric-4 .metric-value { color: var(--c-magenta); }

.metric-foot {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--c-data);
    margin-top: auto;
}

.metric-spark {
    margin-top: 10px;
    height: 36px;
}

.metric-spark svg { width: 100%; height: 100%; display: block; opacity: 0.85; }

/* === watch (layered panels) === */
.watch {
    padding: clamp(60px, 9vw, 140px) clamp(20px, 5vw, 80px);
    background: var(--c-forest);
    position: relative;
    overflow: hidden;
}

.watch-inner {
    max-width: 1180px;
    margin: 0 auto;
    position: relative;
    min-height: 720px;
}

.watch-stack { position: relative; }

.watch-panel {
    background: linear-gradient(135deg, rgba(42, 74, 48, 0.92) 0%, rgba(14, 30, 20, 0.9) 100%);
    border: 1px solid rgba(74, 232, 104, 0.22);
    padding: clamp(24px, 3vw, 40px);
    margin-bottom: -90px;
    position: relative;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.watch-panel-base {
    width: 88%;
    margin-left: 0;
    z-index: 1;
    opacity: 0.78;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.watch-panel-mid {
    width: 78%;
    margin-left: 14%;
    z-index: 2;
    opacity: 0.92;
    transform: translateY(-30px);
    border-color: rgba(74, 232, 216, 0.28);
    clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), 100% 100%, 0 100%, 0 22px);
}

.watch-panel-top {
    width: 70%;
    margin-left: 28%;
    z-index: 3;
    opacity: 1;
    transform: translateY(-50px);
    border-color: rgba(232, 74, 138, 0.4);
    background: linear-gradient(135deg, rgba(42, 74, 48, 0.98) 0%, rgba(20, 40, 26, 0.98) 100%);
    margin-bottom: 20px;
    clip-path: polygon(0 22px, 22px 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

@media (max-width: 900px) {
    .watch-panel-base, .watch-panel-mid, .watch-panel-top {
        width: 100%;
        margin-left: 0;
        margin-bottom: 18px;
        transform: none;
    }
    .watch-inner { min-height: 0; }
}

.panel-stamp {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--c-cyan);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(74, 232, 216, 0.4);
    padding-bottom: 4px;
}

.watch-h {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(24px, 3vw, 36px);
    color: var(--c-monitor);
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: -0.005em;
}

.watch-pre {
    background: rgba(0, 0, 0, 0.45);
    padding: 18px 22px;
    border-left: 3px solid var(--c-night);
    overflow-x: auto;
    margin-bottom: 8px;
}

.watch-pre code {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--c-night);
    line-height: 1.7;
    white-space: pre;
}

.watch-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.watch-list li {
    display: flex;
    gap: 14px;
    align-items: baseline;
    border-bottom: 1px dashed rgba(74, 232, 104, 0.18);
    padding-bottom: 10px;
}

.list-tag {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--c-forest);
    background: var(--c-night);
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    flex-shrink: 0;
    min-width: 56px;
    text-align: center;
    font-weight: 700;
}

.list-tag-red { background: var(--c-magenta); }
.list-tag-green { background: var(--c-night); }

.list-text {
    font-family: var(--f-body);
    font-size: 14px;
    color: var(--c-monitor);
    line-height: 1.6;
}

.watch-p {
    font-size: clamp(15px, 1.3vw, 17px);
    color: var(--c-monitor);
    line-height: 1.75;
    margin-bottom: 14px;
}

.watch-p em { color: var(--c-cyan); font-style: italic; }

/* === diagnostic === */
.diagnostic {
    padding: clamp(60px, 8vw, 120px) clamp(20px, 5vw, 80px);
    background: linear-gradient(180deg, var(--c-forest) 0%, rgba(20, 40, 26, 1) 100%);
}

.diagnostic-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 900px) {
    .diagnostic-inner {
        grid-template-columns: 1.1fr 1fr;
    }
}

.diag-side p {
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.85;
    color: var(--c-monitor);
    margin-bottom: 18px;
}

.diag-side em {
    color: var(--c-cyan);
    font-style: italic;
    border-bottom: 1px dashed var(--c-cyan);
}

.diag-feed {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(74, 232, 104, 0.3);
    padding: 22px;
    height: 460px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.diag-feed-head {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(74, 232, 104, 0.3);
    padding-bottom: 10px;
}

.feed-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-night);
    box-shadow: 0 0 8px var(--c-night);
    animation: tag-pulse 1.4s ease-in-out infinite;
}

.feed-name {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--c-night);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.diag-feed-body {
    flex: 1;
    overflow: hidden;
    font-family: var(--f-mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--c-monitor);
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
}

.feed-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 12px;
    opacity: 0;
    animation: feed-in 0.5s ease-out forwards;
}

.feed-row .ts { color: var(--c-cyan); }
.feed-row .msg { color: var(--c-monitor); }
.feed-row .status { color: var(--c-night); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; }
.feed-row .status-amber { color: var(--c-magenta); }

@keyframes feed-in {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

/* footer */
.watch-footer {
    background: var(--c-forest);
    border-top: 1px solid rgba(74, 232, 104, 0.18);
    padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 80px);
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 800px) {
    .footer-inner {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-stamp {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--c-night);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(74, 232, 104, 0.3);
}

.footer-col p {
    font-family: var(--f-body);
    font-size: 14px;
    color: var(--c-monitor);
    line-height: 1.7;
}

@media (max-width: 720px) {
    .hero-title { font-size: clamp(48px, 14vw, 96px); }
    .section-title { font-size: clamp(32px, 9vw, 44px); }
    .data-stream { font-size: 10px; }
}
