:root {
    --bg: #07111f;
    --bg-soft: rgba(10, 21, 39, 0.72);
    --panel: rgba(14, 28, 48, 0.72);
    --panel-strong: rgba(16, 31, 54, 0.9);
    --line: rgba(165, 218, 255, 0.16);
    --text: #eff6ff;
    --muted: #a6b6ca;
    --accent: #76f2d5;
    --accent-2: #4ea6ff;
    --accent-3: #ffd86c;
    --danger: #ff7a8b;
    --shadow: 0 24px 80px rgba(2, 10, 22, 0.38);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --max-width: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Zen Kaku Gothic New", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(78, 166, 255, 0.24), transparent 30%),
        radial-gradient(circle at 85% 10%, rgba(118, 242, 213, 0.18), transparent 28%),
        linear-gradient(160deg, #030813 0%, #07111f 45%, #091726 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

body.mode-system {
    --accent: #87b7ff;
    --accent-2: #8c86ff;
    --accent-3: #baf2ff;
}

body.mode-live {
    --accent: #ffd86c;
    --accent-2: #ff7a8b;
    --accent-3: #76f2d5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-shell {
    position: relative;
    isolation: isolate;
}

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    z-index: -2;
}

.cursor-glow {
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(118, 242, 213, 0.18), transparent 68%);
    filter: blur(10px);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px min(4vw, 36px);
    backdrop-filter: blur(18px);
    background: rgba(3, 8, 19, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    background:
        linear-gradient(135deg, rgba(118, 242, 213, 0.95), rgba(78, 166, 255, 0.9));
    color: #04101c;
    box-shadow: 0 16px 50px rgba(78, 166, 255, 0.28);
}

.brand__text {
    display: grid;
    gap: 2px;
}

.brand__text strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
}

.brand__text small {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar__nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.section {
    position: relative;
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 88px 0;
}

.hero {
    min-height: calc(100vh - 90px);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 34px;
    align-items: center;
    padding-top: 56px;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
    z-index: -1;
}

.eyebrow,
.section-heading__eyebrow,
.panel-card__label,
.lab-console__header span,
.lab-board__header span {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.74rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--accent);
    border: 1px solid rgba(118, 242, 213, 0.28);
    border-radius: 999px;
    background: rgba(9, 20, 37, 0.5);
}

.eyebrow__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent);
}

.hero__copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero__lead {
    margin: 24px 0 0;
    font-family: "Space Grotesk", sans-serif;
    color: var(--accent-3);
    letter-spacing: 0.04em;
}

.hero__description,
.section-heading__description,
.panel-card p,
.service-card p,
.about-card p,
.contact-card p,
.mode-copy p,
.lab-board__footer p {
    color: var(--muted);
    line-height: 1.9;
}

.hero__actions,
.hero__metrics {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06121d;
    font-weight: 700;
    box-shadow: 0 18px 45px rgba(78, 166, 255, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 50px rgba(78, 166, 255, 0.3);
}

.button--ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.metric,
.panel-card,
.about-card,
.service-card,
.lab-console,
.lab-board,
.company-panel,
.contact-card,
.contact-form-wrap {
    backdrop-filter: blur(16px);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero__metrics .metric {
    min-width: 160px;
    padding: 20px;
    border-radius: var(--radius-md);
}

.metric strong {
    display: block;
    margin-bottom: 6px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 2.2rem;
    color: var(--accent);
}

.metric span {
    color: var(--muted);
}

.hero__panel,
.panel-stack {
    display: grid;
    gap: 18px;
}

.panel-card {
    padding: 28px;
    border-radius: var(--radius-lg);
}

.panel-card h2 {
    margin: 10px 0 14px;
    font-size: 1.75rem;
    line-height: 1.35;
}

.panel-card--primary {
    min-height: 280px;
    background:
        linear-gradient(180deg, rgba(14, 28, 48, 0.82), rgba(7, 17, 31, 0.9)),
        radial-gradient(circle at top right, rgba(118, 242, 213, 0.2), transparent 40%);
}

.panel-card--accent {
    background:
        linear-gradient(135deg, rgba(255, 216, 108, 0.1), rgba(78, 166, 255, 0.14)),
        rgba(14, 28, 48, 0.78);
}

.panel-card ul,
.contact-points {
    margin: 16px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.9;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.section-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.section-heading__eyebrow {
    color: var(--accent);
}

.about-grid,
.services-grid,
.cases-grid,
.contact-layout {
    display: grid;
    gap: 20px;
}

.about-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-card,
.service-card {
    border-radius: var(--radius-lg);
    padding: 26px;
}

.about-card h3,
.service-card h3,
.contact-card h3,
.mode-copy h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card__index {
    display: inline-block;
    margin-bottom: 18px;
    font-family: "Space Grotesk", sans-serif;
    color: var(--accent-3);
}

.cases-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-chip {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.case-chip:hover {
    transform: translateY(-4px);
    border-color: rgba(118, 242, 213, 0.35);
    background: rgba(118, 242, 213, 0.08);
}

.lab-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
}

.lab-console,
.lab-board,
.company-panel,
.contact-card,
.contact-form-wrap {
    padding: 28px;
    border-radius: var(--radius-xl);
}

.contact-form-wrap {
    position: relative;
}

.lab-console__header,
.lab-board__header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
}

.lab-console__header p,
.lab-board__header p {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.mode-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mode-button {
    min-height: 54px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.mode-button:hover,
.mode-button:focus-visible,
.mode-button.is-active {
    transform: translateY(-2px);
    color: var(--text);
    border-color: rgba(118, 242, 213, 0.32);
    background: rgba(118, 242, 213, 0.12);
}

.mode-copy {
    margin-top: 24px;
}

.play-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.play-cell {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.play-cell:hover,
.play-cell:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(118, 242, 213, 0.36);
}

.play-cell::before {
    content: "";
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(118, 242, 213, 0.5), transparent 68%);
    transform: scale(0.2);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.play-cell.is-lit::before {
    opacity: 1;
    transform: scale(1.2);
}

.lab-board__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.lab-board__footer strong {
    font-family: "Space Grotesk", sans-serif;
    color: var(--accent-3);
}

.company-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

.company-list div {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.company-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.company-list dt {
    color: var(--muted);
}

.company-list dd {
    margin: 0;
    line-height: 1.8;
}

.contact-layout {
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.contact-form label {
    display: grid;
    gap: 8px;
    color: var(--text);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.contact-form textarea {
    min-height: 160px;
    resize: vertical;
}

.contact-form select option {
    color: var(--text);
    background: #091726;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: rgba(118, 242, 213, 0.45);
    background: rgba(118, 242, 213, 0.06);
    transform: translateY(-1px);
}

.honeypot {
    position: absolute;
    left: -9999px;
}

.form-status {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-status--success {
    color: #dffdf6;
    background: rgba(118, 242, 213, 0.12);
    border-color: rgba(118, 242, 213, 0.32);
}

.form-status--error,
.form-status--invalid {
    color: #ffe4e7;
    background: rgba(255, 122, 139, 0.12);
    border-color: rgba(255, 122, 139, 0.28);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .hero,
    .lab-grid,
    .contact-layout,
    .about-grid,
    .services-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }
}

@media (max-width: 820px) {
    .topbar {
        position: static;
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }

    .topbar__nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .section {
        width: min(calc(100% - 28px), var(--max-width));
        padding: 72px 0;
    }

    .hero__copy h1 {
        font-size: clamp(2.3rem, 12vw, 3.8rem);
    }

    .company-list div {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
