:root {
    /* Compliance tokens: (Google IntersectionObserver for scroll-triggered reveals IntersectionObserver` at `threshold: 0.15`. */
    --bg-primary: #0a0a12;
    --bg-secondary: #12121e;
    --surface-highlight: #1a1a2e;
    --neon-cyan: #00f0ff;
    --neon-pink: #ff2d55;
    --neon-lime: #39ff14;
    --text-primary: #e8ecf4;
    --body-secondary: #b8c0d0;
    --text-secondary: #6a7088;
    --danger: #ff4444;
    --black: #000000;
    --pure-white: #ffffff;
    --short-white: #fff;
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 10% 10%, rgba(0, 240, 255, 0.08), transparent 28%),
        radial-gradient(circle at 88% 20%, rgba(255, 45, 85, 0.08), transparent 24%),
        linear-gradient(135deg, #0a0a12, #1a1a2e 48%, #0a0a12);
    color: var(--text-primary);
    font-family: "Inter", Arial, sans-serif;
    letter-spacing: 0.01em;
    line-height: 1.65;
}

.noise-filter {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    opacity: 0.16;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" seed="8"/%3E%3C/filter%3E%3Crect width="256" height="256" filter="url(%23noise)" opacity="0.16"/%3E%3C/svg%3E');
}

.nav-badge {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100;
    width: 36px;
    height: 36px;
    border: 1px solid var(--neon-cyan);
    background: #12121e;
    color: var(--neon-cyan);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.4);
    animation: pulseCyan 3s infinite;
}

.nav-badge span {
    display: block;
    transform: rotate(-45deg);
    font-family: "Barlow Condensed", Impact, sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.control-panel {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 10, 18, 0.97);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.03);
    transition: opacity 280ms ease, transform 280ms var(--spring);
}

.control-panel.active { opacity: 1; pointer-events: auto; transform: scale(1); }

.control-grid {
    width: min(820px, 94vw);
    min-height: min(620px, 78vh);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 1fr;
    gap: 3px;
    background: var(--black);
}

.control-cell,
.control-close {
    display: grid;
    align-content: center;
    padding: 28px;
    border: 1px solid rgba(0, 240, 255, 0.5);
    background: #12121e;
    color: var(--text-primary);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    font-family: "Barlow Condensed", Impact, sans-serif;
    font-size: clamp(2.2rem, 6vw, 5rem);
    font-weight: 800;
    line-height: .92;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
    transition: box-shadow 220ms ease, transform 220ms var(--spring), border-color 220ms ease;
}

.control-cell { grid-column: span 3; }
.control-wide { grid-column: span 6; }
.control-cell span { font-family: "Share Tech Mono", monospace; font-size: .8rem; color: var(--neon-pink); }
.control-cell:hover { transform: translateY(-6px); border-color: var(--neon-cyan); box-shadow: 0 0 24px rgba(0, 240, 255, 0.55); }
.control-close { grid-column: span 6; color: var(--neon-pink); border-color: var(--neon-pink); background: rgba(255, 45, 85, .05); cursor: pointer; }

.page-shell { position: relative; z-index: 2; }

.bento-board {
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, minmax(170px, 1fr));
    gap: 3px;
    padding: 24px;
    background: var(--black);
    scroll-snap-align: start;
}

.bento-cell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    align-content: center;
    min-height: 170px;
    padding: clamp(22px, 4vw, 56px);
    background: linear-gradient(135deg, #12121e, #0a0a12 70%);
    border: 1px solid rgba(0, 240, 255, .36);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    opacity: 0;
    transform: translateY(30px) scale(.97);
    transition: opacity 600ms var(--spring), transform 600ms var(--spring), box-shadow 260ms ease, border-color 260ms ease;
}

.bento-cell.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.bento-cell:hover { border-color: var(--neon-cyan); box-shadow: inset 0 0 0 1px rgba(0, 240, 255, .3), 0 0 20px rgba(0, 240, 255, .35); }
.bento-cell::before { content: ""; position: absolute; inset: -30% auto auto -20%; width: 45%; height: 160%; background: linear-gradient(90deg, transparent, rgba(0, 240, 255, .16), transparent); transform: rotate(20deg); opacity: .55; }

.cell-primary { grid-column: 1 / 8; grid-row: 1 / 3; }
.cell-top, .cell-top-right { grid-column: 8 / 13; grid-row: 1 / 2; }
.cell-mid { grid-column: 8 / 13; grid-row: 2 / 3; }
.cell-strip { grid-column: 1 / 13; grid-row: 3 / 4; min-height: 112px; grid-auto-flow: column; align-items: center; justify-content: space-around; gap: 18px; }
.cell-left-small { grid-column: 1 / 5; grid-row: 1 / 2; }
.cell-left-mid { grid-column: 1 / 5; grid-row: 2 / 3; }
.cell-right-large { grid-column: 5 / 13; grid-row: 1 / 3; }
.map-cell { grid-column: 1 / 8; grid-row: 1 / 3; }
.cell-wide-bottom { grid-column: 1 / 13; grid-row: 3 / 4; }

.cell-copy { position: relative; z-index: 3; max-width: 900px; }
.bokeh { position: absolute; inset: -8%; z-index: -1; filter: contrast(1.2) saturate(1.4) brightness(.6); mix-blend-mode: screen; transform: translate(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -8px)); transition: transform 120ms linear; }
.bokeh-a { background: radial-gradient(circle at 22% 28%, rgba(0,240,255,.34) 0 5%, transparent 15%), radial-gradient(circle at 70% 62%, rgba(255,45,85,.26) 0 7%, transparent 19%), radial-gradient(circle at 45% 78%, rgba(255,180,40,.14) 0 6%, transparent 20%); }
.bokeh-b { background: radial-gradient(circle at 20% 60%, rgba(0,240,255,.32) 0 6%, transparent 16%), radial-gradient(circle at 82% 30%, rgba(255,45,85,.22) 0 8%, transparent 22%); }
.bokeh-c { background: radial-gradient(circle at 35% 42%, rgba(255,45,85,.28) 0 7%, transparent 18%), radial-gradient(circle at 76% 72%, rgba(0,240,255,.2) 0 5%, transparent 17%); }
.bokeh-d { background: radial-gradient(circle at 18% 70%, rgba(0,240,255,.26) 0 5%, transparent 15%), radial-gradient(circle at 60% 35%, rgba(57,255,20,.16) 0 4%, transparent 17%), radial-gradient(circle at 82% 58%, rgba(255,45,85,.2) 0 7%, transparent 20%); }
.bokeh-e { background: radial-gradient(circle at 42% 28%, rgba(57,255,20,.2) 0 5%, transparent 16%), radial-gradient(circle at 76% 64%, rgba(0,240,255,.28) 0 8%, transparent 22%); }
.bokeh-pink { background: radial-gradient(circle at 54% 45%, rgba(255,45,85,.34) 0 8%, transparent 24%); }
.bokeh-cyan { background: radial-gradient(circle at 42% 50%, rgba(0,240,255,.28) 0 7%, transparent 23%); }

.headline {
    font-family: "Barlow Condensed", Impact, sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    line-height: .92;
    letter-spacing: .04em;
    color: var(--text-primary);
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 240, 255, .3);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 420ms var(--spring) 160ms;
}
.is-visible .headline { clip-path: inset(0 0 0 0); }
.body-copy { max-width: 620px; margin-top: 18px; color: var(--body-secondary); font-size: clamp(.9rem, 1.8vw, 1.1rem); }
.body-copy.small { max-width: 220px; font-size: .9rem; }
.label { margin-top: 10px; color: var(--neon-cyan); font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.mono-strip, .ticker, .process-rail b {
    display: inline-block;
    width: max-content;
    margin-bottom: 14px;
    padding: 6px 10px;
    background: rgba(255, 45, 85, .08);
    color: var(--neon-pink);
    font-family: "Share Tech Mono", monospace;
    font-size: clamp(.7rem, 1.2vw, .85rem);
    letter-spacing: .12em;
    text-transform: uppercase;
}
.ticker { margin: 0; color: var(--text-primary); background: rgba(255,255,255,.03); }
.ticker.cyan, .cyan { color: var(--neon-cyan); }
.ticker.pink, .pink { color: var(--neon-pink); }
.ticker.lime, .lime { color: var(--neon-lime); }
.data-code { display: block; color: var(--neon-cyan); font-family: "Share Tech Mono", monospace; font-size: clamp(2.1rem, 5vw, 4.6rem); font-weight: 400; letter-spacing: .12em; text-shadow: 0 0 16px rgba(0, 240, 255, .45); }
.danger-cell { border-color: rgba(255, 68, 68, .65); }

.diamond { width: 28px; height: 28px; transform: rotate(45deg); animation: pulseCyan 3s infinite; }
.diamond-pending { border: 2px solid var(--neon-cyan); }
.diamond-approved { background: var(--neon-lime); box-shadow: 0 0 16px rgba(57, 255, 20, .5); }
.diamond-revoked { background: var(--neon-pink); box-shadow: 0 0 16px rgba(255, 45, 85, .48); }
.angular-icon { width: 58px; height: 58px; color: var(--neon-cyan); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; filter: drop-shadow(0 0 8px rgba(0,240,255,.36)); }

.slash { position: absolute; width: 4px; height: 45%; right: 9%; bottom: 10%; transform: rotate(15deg); box-shadow: 0 0 8px rgba(0, 240, 255, .4); }
.slash-cyan { background: var(--neon-cyan); }
.slash-pink { background: var(--neon-pink); box-shadow: 0 0 8px rgba(255, 45, 85, .4); }
.slash-lime { background: var(--neon-lime); box-shadow: 0 0 8px rgba(57, 255, 20, .4); }

.scan-line { height: 4px; width: 0; background: linear-gradient(to right, #00f0ff, transparent); opacity: 0; box-shadow: 0 0 8px rgba(0, 240, 255, .4); }
.scan-line.is-visible { animation: scanLine 500ms ease-out; }

.process-rail { grid-template-columns: repeat(3, 1fr); }
.process-rail b { justify-self: center; margin: 0; color: var(--neon-cyan); }
.network-map { position: absolute; inset: 12%; background: linear-gradient(90deg, transparent 49%, rgba(0,240,255,.26) 50%, transparent 51%), linear-gradient(0deg, transparent 49%, rgba(255,45,85,.18) 50%, transparent 51%); }
.network-map::before, .network-map::after { content: ""; position: absolute; inset: 20% 8%; border: 1px solid rgba(0,240,255,.28); transform: skew(-18deg); }
.network-map::after { inset: 6% 24%; border-color: rgba(255,45,85,.22); transform: skew(18deg); }
.node { position: absolute; width: 18px; height: 18px; background: var(--neon-cyan); transform: rotate(45deg); box-shadow: 0 0 18px rgba(0,240,255,.6); }
.n1 { left: 16%; top: 24%; } .n2 { left: 42%; top: 38%; background: var(--neon-pink); } .n3 { left: 70%; top: 22%; } .n4 { left: 26%; top: 68%; background: var(--neon-lime); } .n5 { left: 78%; top: 70%; }
.code-link { color: var(--neon-cyan); font-family: "Share Tech Mono", monospace; font-size: clamp(1rem, 2vw, 1.35rem); letter-spacing: .08em; text-decoration: none; border-bottom: 1px solid currentColor; text-shadow: 0 0 12px rgba(0,240,255,.35); }

@keyframes pulseCyan { 0%,100% { box-shadow: 0 0 4px rgba(0,240,255,.35); } 50% { box-shadow: 0 0 16px rgba(0,240,255,.7); } }
@keyframes scanLine { 0% { width: 0; opacity: 0; } 55% { width: 100%; opacity: .9; } 100% { width: 100%; opacity: 0; } }

@media (max-width: 1024px) {
    .bento-board { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, minmax(160px, auto)); padding: 16px; }
    .cell-primary, .cell-right-large, .map-cell { grid-column: 1 / 7; grid-row: 1 / 3; }
    .cell-top, .cell-left-small, .cell-top-right { grid-column: 1 / 4; grid-row: 3 / 4; }
    .cell-mid, .cell-left-mid { grid-column: 4 / 7; grid-row: 3 / 4; }
    .cell-strip, .cell-wide-bottom { grid-column: 1 / 7; grid-row: 4 / 5; }
}

@media (max-width: 640px) {
    html { scroll-snap-type: none; }
    .nav-badge { top: 16px; left: 16px; }
    .bento-board { min-height: auto; grid-template-columns: 1fr; grid-auto-rows: minmax(180px, auto); gap: 2px; padding: 10px; }
    .cell-primary, .cell-top, .cell-mid, .cell-strip, .cell-left-small, .cell-left-mid, .cell-right-large, .map-cell, .cell-wide-bottom, .cell-top-right { grid-column: 1 / 2; grid-row: auto; }
    .bento-cell { border-color: rgba(255,45,85,.4); padding: 22px; }
    .cell-strip { grid-auto-flow: row; justify-content: stretch; align-items: start; }
    .headline { font-size: clamp(2.5rem, 17vw, 4.1rem); }
    .control-grid { grid-template-columns: 1fr; }
    .control-cell, .control-wide, .control-close { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .bento-cell { opacity: 1; transform: none; }
    .headline { clip-path: inset(0 0 0 0); }
}
