/* =========================================================
   NEUROGRID SYSTEMS — FUTURE PLATFORM STYLES
   File: /lab/neurogrid/assets/style.css
   ========================================================= */

:root {
    --bg-0: #03050f;
    --bg-1: #060b1d;
    --bg-2: #0a1128;
    --surface: rgba(11, 20, 46, 0.7);
    --surface-strong: rgba(13, 24, 58, 0.9);
    --line: rgba(137, 171, 255, 0.24);
    --line-strong: rgba(137, 171, 255, 0.46);

    --text-main: #eef3ff;
    --text-soft: #acbde9;
    --text-muted: #86a0d9;

    --accent-a: #7d8eff;
    --accent-b: #32dcff;
    --accent-c: #9f63ff;

    --shadow-soft: 0 20px 46px rgba(2, 8, 26, 0.5);
    --shadow-strong: 0 26px 64px rgba(1, 6, 20, 0.62);

    --radius-lg: 1.35rem;
    --radius-md: 1rem;
    --radius-sm: 0.78rem;

    --container: min(1240px, calc(100% - 2rem));
    --header-offset: 90px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 7% -8%, rgba(125, 142, 255, 0.17), transparent 34%),
        radial-gradient(circle at 92% -14%, rgba(50, 220, 255, 0.14), transparent 34%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
    line-height: 1.64;
    min-height: 100vh;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a,
button {
    color: inherit;
}

button {
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

h1,
h2,
h3,
p,
ul,
figure {
    margin: 0;
}

ul {
    list-style: none;
    padding: 0;
}

.container {
    width: var(--container);
    margin-inline: auto;
    position: relative;
    z-index: 4;
}

.section {
    padding: clamp(4rem, 8vw, 6.4rem) 0;
    scroll-margin-top: calc(var(--header-offset) + 12px);
}

/* =========================================================
   Background FX
   ========================================================= */
.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle, rgba(50, 220, 255, 0.2) 0%, rgba(125, 142, 255, 0.08) 42%, transparent 72%);
    filter: blur(18px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor-glow.is-active {
    opacity: 1;
}

.background-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gradient {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
}

.gradient-a {
    width: 420px;
    height: 420px;
    top: -140px;
    left: -140px;
    background: radial-gradient(circle, rgba(125, 142, 255, 0.55), transparent 72%);
    animation: drift-a 16s ease-in-out infinite;
}

.gradient-b {
    width: 360px;
    height: 360px;
    top: -130px;
    right: -130px;
    background: radial-gradient(circle, rgba(50, 220, 255, 0.5), transparent 72%);
    animation: drift-b 17s ease-in-out infinite;
}

.gradient-c {
    width: 340px;
    height: 340px;
    bottom: -160px;
    left: 42%;
    background: radial-gradient(circle, rgba(159, 99, 255, 0.42), transparent 72%);
    animation: pulse 12s ease-in-out infinite;
}

.grid-layer {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image:
        linear-gradient(rgba(135, 169, 255, 0.26) 1px, transparent 1px),
        linear-gradient(90deg, rgba(135, 169, 255, 0.26) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 50% 35%, black 28%, transparent 76%);
}

.scan-layer {
    position: absolute;
    inset: -15% -10%;
    background: repeating-linear-gradient(180deg, transparent 0 10px, rgba(50, 220, 255, 0.04) 10px 11px);
    opacity: 0.45;
    animation: scan 8s linear infinite;
}

.particle-field {
    position: absolute;
    inset: 0;
}

.particle {
    position: absolute;
    left: var(--left, 50%);
    bottom: -10%;
    width: var(--size, 4px);
    height: var(--size, 4px);
    border-radius: 50%;
    background: rgba(152, 188, 255, 0.75);
    box-shadow: 0 0 10px rgba(50, 220, 255, 0.35);
    opacity: 0;
    animation: rise var(--dur, 16s) linear infinite;
    animation-delay: var(--delay, 0s);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: 0.82rem;
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    padding: 0.64rem 0.8rem;
    transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.site-header.is-scrolled .nav-shell {
    background: rgba(8, 14, 33, 0.78);
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.64rem;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-core-frame {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.16rem;
    border: 1px solid rgba(137, 171, 255, 0.26);
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 0%, rgba(50, 220, 255, 0.16), transparent 52%),
        linear-gradient(180deg, rgba(12, 22, 52, 0.9), rgba(8, 14, 33, 0.9));
    padding: 0.24rem;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 12px 26px rgba(1, 8, 22, 0.45);
    overflow: hidden;
}

.nav-core-frame::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--nav-angle, 0deg),
        rgba(50, 220, 255, 0),
        rgba(50, 220, 255, 0.45),
        rgba(125, 142, 255, 0.55),
        rgba(50, 220, 255, 0)
    );
    opacity: 0.6;
    animation: nav-spin 8s linear infinite;
    z-index: 0;
}

.nav-core-frame::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(7, 13, 32, 0.96), rgba(5, 10, 25, 0.96));
    z-index: 0;
}

.nav-sweep {
    position: absolute;
    top: 16%;
    bottom: 16%;
    left: -34%;
    width: 30%;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(50, 220, 255, 0.34), transparent);
    filter: blur(2px);
    z-index: 0;
    animation: nav-sweep 4.6s ease-in-out infinite;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.48rem 0.76rem;
    z-index: 1;
    transition: background 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0.62rem;
    right: 0.62rem;
    bottom: 0.18rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.nav-link::before {
    content: attr(data-label);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(50, 220, 255, 0.45);
    transform: translateY(7px);
    transition: opacity 0.24s ease, transform 0.24s ease;
    pointer-events: none;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    color: var(--text-main);
    background: linear-gradient(145deg, rgba(125, 142, 255, 0.2), rgba(50, 220, 255, 0.14));
    text-shadow: 0 0 12px rgba(125, 142, 255, 0.36);
    outline: none;
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.nav-link:hover::before,
.nav-link:focus-visible::before,
.nav-link.is-active::before {
    opacity: 0.28;
    transform: translateY(0);
}

.nav-dock {
    margin-top: 0.28rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.34rem;
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-dock span {
    width: 28px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(125, 142, 255, 0.12), rgba(50, 220, 255, 0.65), rgba(125, 142, 255, 0.12));
    animation: dock-pulse 2.8s ease-in-out infinite;
}

.nav-dock span:nth-child(2) { animation-delay: -0.35s; }
.nav-dock span:nth-child(3) { animation-delay: -0.7s; }
.nav-dock span:nth-child(4) { animation-delay: -1.05s; }
.nav-dock span:nth-child(5) { animation-delay: -1.4s; }

.site-header.is-scrolled .nav-dock {
    opacity: 1;
    transform: translateY(1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 0.76rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.28rem;
    background: rgba(11, 20, 46, 0.9);
}

.menu-toggle span {
    width: 19px;
    height: 2px;
    background: var(--text-main);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* =========================================================
   Buttons / Motion Helpers
   ========================================================= */
.magnetic {
    --mx: 0px;
    --my: 0px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.74rem 1.14rem;
    border: 1px solid transparent;
    transform: translate3d(var(--mx), var(--my), 0);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translate3d(var(--mx), calc(var(--my) - 2px), 0);
    outline: none;
}

.btn-primary {
    color: #040a19;
    background: linear-gradient(110deg, var(--accent-b), #7ee0ff);
    box-shadow: 0 14px 32px rgba(50, 220, 255, 0.25);
}

.btn-secondary {
    color: var(--text-main);
    background: rgba(125, 142, 255, 0.14);
    border-color: var(--line-strong);
}

.btn-ghost {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--line);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
    padding-top: clamp(5.2rem, 10.5vw, 8rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 1.2rem;
    align-items: center;
}

.eyebrow,
.section-kicker {
    display: inline-block;
    color: var(--accent-b);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
}

.hero-copy h1 {
    font-size: clamp(2.15rem, 5vw, 4.3rem);
    line-height: 1.05;
    margin: 0.7rem 0 0.95rem;
    text-wrap: balance;
}

.hero-copy p {
    color: var(--text-soft);
    max-width: 65ch;
}

.hero-actions {
    margin-top: 1.22rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.stat-list {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.stat-chip {
    border: 1px solid rgba(125, 142, 255, 0.32);
    border-radius: 999px;
    background: rgba(125, 142, 255, 0.1);
    color: #cfe0ff;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.42rem 0.7rem;
}

.hero-visual {
    position: relative;
    min-height: 520px;
}

.parallax-item {
    --py: 0px;
    transform: translate3d(0, var(--py), 0);
    will-change: transform;
}

.hero-image-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 15% 10%, rgba(125, 142, 255, 0.22), transparent 44%), var(--surface-strong);
    box-shadow: var(--shadow-strong);
    padding: 0.9rem;
}

.hero-image-card img {
    border-radius: 0.92rem;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: flex-start;
    gap: 0.56rem;
    border: 1px solid var(--line);
    border-radius: 0.84rem;
    background: rgba(8, 17, 40, 0.88);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
    padding: 0.56rem;
    max-width: 220px;
    animation: bob 5s ease-in-out infinite;
}

.floating-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 1px solid rgba(50, 220, 255, 0.24);
    opacity: 0;
    animation: pulse-ring 3.6s ease-out infinite;
}

.floating-card img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.floating-card h3 {
    font-size: 0.82rem;
    margin-bottom: 0.18rem;
}

.floating-card p {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.card-one { top: 8%; right: -2%; }
.card-two { top: 48%; left: -6%; animation-delay: -1.4s; }
.card-three { bottom: 7%; right: 6%; animation-delay: -2.2s; }

/* =========================================================
   Signal Strip
   ========================================================= */
.signal-strip {
    padding: 0.2rem 0 1rem;
}

.signal-shell {
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(8, 15, 34, 0.82);
    position: relative;
}

.signal-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(50, 220, 255, 0.22), transparent);
    transform: translateX(-100%);
    animation: scan-x 5s ease-in-out infinite;
}

.signal-track {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    white-space: nowrap;
    padding: 0.64rem 0.9rem;
    animation: marquee 26s linear infinite;
}

.signal-track span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #d6e3ff;
}

.signal-track span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-b);
    box-shadow: 0 0 0 4px rgba(50, 220, 255, 0.13);
}

/* =========================================================
   Shared blocks
   ========================================================= */
.section-head {
    max-width: 820px;
    margin-bottom: 1.4rem;
}

.section-head h2 {
    font-size: clamp(1.45rem, 3.2vw, 2.6rem);
    line-height: 1.18;
    margin: 0.62rem 0 0.72rem;
}

.section-head p {
    color: var(--text-soft);
}

/* =========================================================
   Bento
   ========================================================= */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.95rem;
}

.bento-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 1.15rem;
}

.bento-card h3 {
    font-size: 1.1rem;
    margin: 0.44rem 0 0.52rem;
}

.bento-card p {
    color: var(--text-soft);
}

.card-icon {
    width: 54px;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 0.82rem;
    display: grid;
    place-items: center;
    background: rgba(125, 142, 255, 0.12);
}

.card-icon img {
    width: 30px;
    height: 30px;
}

.bento-primary {
    grid-column: span 6;
    background: radial-gradient(circle at 18% 14%, rgba(125, 142, 255, 0.2), transparent 46%), var(--surface-strong);
}

.bento-grid > .bento-card:nth-child(2),
.bento-grid > .bento-card:nth-child(3) {
    grid-column: span 3;
}

.bento-visual {
    grid-column: 1 / -1;
    padding: 0.7rem;
    overflow: hidden;
}

.visual-wrapper {
    border-radius: 1rem;
    overflow: hidden;
}

.visual-wrapper img {
    width: 100%;
    min-height: 230px;
    object-fit: cover;
    animation: slow-float 9s ease-in-out infinite;
}

/* =========================================================
   Systems
   ========================================================= */
.systems {
    background: linear-gradient(180deg, rgba(10, 18, 42, 0.6), rgba(10, 18, 42, 0));
}

.systems-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
}

.image-stack {
    position: relative;
    min-height: 430px;
}

.stack-card {
    position: absolute;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 0.78rem;
    background: var(--surface-strong);
    box-shadow: var(--shadow-strong);
}

.stack-card.main {
    width: 74%;
    top: 0;
    left: 0;
}

.stack-card.alt {
    width: 64%;
    right: 0;
    bottom: 0;
}

.stack-card img {
    border-radius: 0.82rem;
    width: 100%;
}

.systems-copy h2 {
    font-size: clamp(1.45rem, 3vw, 2.4rem);
    margin: 0.62rem 0 0.66rem;
}

.systems-copy > p {
    color: var(--text-soft);
}

.feature-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.62rem;
}

.feature-item {
    border: 1px solid var(--line);
    border-radius: 0.86rem;
    background: rgba(9, 16, 37, 0.7);
    padding: 0.76rem;
}

.feature-item h3 {
    font-size: 1rem;
    margin-bottom: 0.28rem;
}

.feature-item p {
    color: var(--text-soft);
    font-size: 0.9rem;
}

/* =========================================================
   Architecture
   ========================================================= */
.architecture-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 18% 20%, rgba(159, 99, 255, 0.14), transparent 44%), var(--surface-strong);
    box-shadow: var(--shadow-strong);
    padding: 1.18rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
}

.orbit-map {
    position: relative;
    min-height: 360px;
    display: grid;
    place-items: center;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(134, 175, 255, 0.3);
}

.ring-one { width: 300px; height: 300px; animation: spin 16s linear infinite; }
.ring-two { width: 220px; height: 220px; animation: spin 11s linear infinite reverse; }
.ring-three { width: 150px; height: 150px; animation: spin 8s linear infinite; }

.core-node {
    position: relative;
    z-index: 2;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(125, 142, 255, 0.18);
    box-shadow: 0 0 0 12px rgba(125, 142, 255, 0.08);
    padding: 0.76rem 1rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.orbit-node {
    position: absolute;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 16, 37, 0.85);
    color: #d7e4ff;
    font-size: 0.74rem;
    padding: 0.36rem 0.58rem;
}

.node-a { top: 8%; left: 45%; }
.node-b { top: 28%; right: 8%; }
.node-c { bottom: 22%; right: 14%; }
.node-d { bottom: 9%; left: 43%; }
.node-e { top: 30%; left: 10%; }

.architecture-copy h2 {
    font-size: clamp(1.4rem, 2.9vw, 2.2rem);
    margin: 0.6rem 0;
}

.architecture-copy p {
    color: var(--text-soft);
}

.architecture-list {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.5rem;
}

.architecture-list li {
    position: relative;
    color: #c7d8ff;
    padding-left: 1rem;
}

.architecture-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.56rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-b);
}

/* =========================================================
   Insights / CTA / Footer
   ========================================================= */
.insights {
    background: linear-gradient(180deg, rgba(7, 14, 31, 0.36), rgba(7, 14, 31, 0));
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.92rem;
}

.insight-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 0.78rem;
    position: relative;
    overflow: hidden;
}

.insight-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 38%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(50, 220, 255, 0.16), transparent);
    transform: skewX(-20deg);
    animation: card-sweep 6.6s ease-in-out infinite;
}

.insight-card figure {
    border-radius: 0.86rem;
    overflow: hidden;
    margin-bottom: 0.7rem;
}

.insight-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.insight-card h3 {
    font-size: 1.06rem;
    margin-bottom: 0.38rem;
}

.insight-card p {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.cta-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 50% -10%, rgba(50, 220, 255, 0.2), transparent 44%), var(--surface-strong);
    box-shadow: var(--shadow-strong);
    text-align: center;
    padding: 1.6rem;
}

.cta-shell h2 {
    font-size: clamp(1.4rem, 3vw, 2.25rem);
    margin: 0.56rem 0 0.58rem;
}

.cta-shell p {
    color: var(--text-soft);
    max-width: 68ch;
    margin: 0 auto;
}

.cta-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.66rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(5, 11, 27, 0.88);
    padding: 1.36rem 0 1.72rem;
    text-align: center;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.scroll-top {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(137, 171, 255, 0.35);
    background: radial-gradient(circle at 40% 20%, rgba(50, 220, 255, 0.3), rgba(11, 20, 46, 0.96));
    color: #ddecff;
    font-size: 1rem;
    display: grid;
    place-items: center;
    z-index: 30;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    box-shadow: 0 14px 30px rgba(2, 8, 22, 0.54);
    transition: opacity 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.scroll-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top:hover,
.scroll-top:focus-visible {
    box-shadow: 0 18px 32px rgba(50, 220, 255, 0.24);
    outline: none;
}

/* =========================================================
   Motion classes
   ========================================================= */
.tilt-card {
    --rx: 0deg;
    --ry: 0deg;
    transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: transform 0.24s ease;
}

.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    transition:
        opacity 0.72s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.72s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--d, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes drift-a {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(16px, -16px); }
}

@keyframes drift-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-16px, 12px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.34; transform: scale(1); }
    50% { opacity: 0.54; transform: scale(1.1); }
}

@keyframes scan {
    0% { transform: translateY(-2%); }
    100% { transform: translateY(2%); }
}

@keyframes rise {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.28; }
    100% { transform: translateY(-120vh); opacity: 0; }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes slow-float {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes nav-spin {
    from { --nav-angle: 0deg; }
    to { --nav-angle: 360deg; }
}

@keyframes nav-sweep {
    0%, 100% { left: -34%; opacity: 0; }
    40% { opacity: 0.8; }
    60% { left: 102%; opacity: 0; }
}

@keyframes dock-pulse {
    0%, 100% { transform: scaleX(1); opacity: 0.38; }
    50% { transform: scaleX(1.26); opacity: 0.95; }
}

@keyframes pulse-ring {
    0% { opacity: 0; transform: scale(1); }
    20% { opacity: 0.45; }
    100% { opacity: 0; transform: scale(1.05); }
}

@keyframes scan-x {
    0%, 100% { transform: translateX(-100%); }
    45%, 55% { transform: translateX(100%); }
}

@keyframes card-sweep {
    0%, 100% { left: -42%; opacity: 0; }
    42% { opacity: 0.7; }
    60% { left: 118%; opacity: 0; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
    .bento-primary,
    .bento-grid > .bento-card:nth-child(2),
    .bento-grid > .bento-card:nth-child(3) {
        grid-column: span 6;
    }

    .insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1020px) {
    :root {
        --header-offset: 72px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.52rem);
        left: 0;
        right: 0;
        border: 1px solid var(--line);
        border-radius: 0.92rem;
        background: rgba(8, 14, 33, 0.95);
        box-shadow: var(--shadow-soft);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.84rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.24s ease, transform 0.24s ease, max-height 0.24s ease;
    }

    .site-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        max-height: 82vh;
    }

    .nav-link,
    .site-nav .btn {
        width: 100%;
        text-align: left;
        justify-content: flex-start;
    }

    .nav-core-frame {
        border-radius: 0.84rem;
        padding: 0.4rem;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-core-frame::before,
    .nav-sweep {
        display: none;
    }

    .nav-link {
        border-radius: 0.7rem;
    }

    .nav-dock {
        display: none;
    }

    .hero-grid,
    .systems-layout,
    .architecture-shell,
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 460px;
    }

    .floating-card {
        max-width: 200px;
    }

    .card-one { top: 2%; right: 0; }
    .card-two { top: 58%; left: 0; }
    .card-three { bottom: 4%; right: 2%; }
}

@media (max-width: 760px) {
    :root {
        --container: min(1240px, calc(100% - 1.2rem));
    }

    .site-header {
        padding-top: 0.54rem;
    }

    .nav-shell {
        padding: 0.46rem 0.54rem;
    }

    .brand span {
        display: none;
    }

    .hero-actions,
    .cta-actions {
        width: 100%;
    }

    .hero-actions .btn,
    .cta-actions .btn {
        width: 100%;
    }

    .hero-visual {
        min-height: 420px;
    }

    .floating-card {
        position: static;
        max-width: none;
        margin-top: 0.5rem;
        animation: none;
    }

    .image-stack {
        min-height: 0;
        display: grid;
        gap: 0.6rem;
    }

    .stack-card {
        position: static;
        width: 100% !important;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-grid > .bento-card,
    .bento-primary,
    .bento-grid > .bento-card:nth-child(2),
    .bento-grid > .bento-card:nth-child(3) {
        grid-column: auto;
    }

    .orbit-map {
        min-height: 280px;
    }

    .ring-one { width: 230px; height: 230px; }
    .ring-two { width: 170px; height: 170px; }
    .ring-three { width: 120px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cursor-glow,
    .scan-layer,
    .particle-field {
        display: none !important;
    }

    .nav-core-frame::before,
    .nav-sweep,
    .nav-dock,
    .signal-shell::after,
    .insight-card::before,
    .floating-card::after {
        animation: none !important;
        display: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
