* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #080a0f;
    --bg-soft: #0e1219;
    --panel: rgba(17, 22, 31, 0.86);
    --panel-solid: #131923;
    --text: #ffffff;
    --muted: #9ca5b3;
    --green: #39ff14;
    --line: rgba(255, 255, 255, 0.09);
    --green-line: rgba(57, 255, 20, 0.28);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
    --radius-small: 14px;
    --radius-medium: 22px;
    --radius-large: 34px;
    --max-width: 1240px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

body.lab-loading {
    overflow: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

section {
    position: relative;
    width: min(calc(100% - 40px), var(--max-width));
    margin-inline: auto;
    padding-block: 110px;
}

.eyebrow {
    margin-bottom: 14px;
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 54px;
}

.section-heading.centred {
    margin-inline: auto;
    text-align: center;
}

.section-heading h2,
.lab-statement h2,
.contact-copy h2 {
    font-size: clamp(2.3rem, 5vw, 4.8rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.section-heading h2 span,
.lab-statement h2 span,
.contact-copy h2 span {
    color: var(--green);
}

.section-heading > p:last-child,
.contact-copy > p:last-of-type {
    margin-top: 18px;
    color: var(--muted);
    font-size: 1.04rem;
}

/* Background */

.lab-background {
    position: fixed;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
}

.lab-grid {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image:
        linear-gradient(
            rgba(57, 255, 20, 0.1) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(57, 255, 20, 0.1) 1px,
            transparent 1px
        );
    background-size: 52px 52px;
    animation: gridDrift 18s linear infinite;
    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 90%
        );
}

.lab-glow {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.11;
}

.glow-one {
    top: -120px;
    left: -180px;
    background: var(--green);
}

.glow-two {
    right: -180px;
    bottom: 5%;
    background: #00d5ff;
}

.lab-noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.08) 0,
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px,
            transparent 3px
        );
}

/* Loader */

.lab-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 30px;
    background:
        radial-gradient(
            circle at center,
            rgba(57, 255, 20, 0.06),
            transparent 40%
        ),
        #05070a;
    transition:
        opacity 650ms ease,
        visibility 650ms ease;
}

.lab-loader.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.loader-content {
    width: min(100%, 520px);
}

.loader-logo {
    width: 88px;
    height: 88px;
    margin: 0 auto 22px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 22px rgba(57, 255, 20, 0.38));
    animation: logoPulse 2.2s ease-in-out infinite;
}

.terminal-label {
    margin-bottom: 10px;
    color: var(--green);
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-align: center;
}

.loader-content h1 {
    margin-bottom: 26px;
    font-size: clamp(1.8rem, 5vw, 3rem);
    text-align: center;
}

.loader-track {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.loader-track span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
    box-shadow:
        0 0 18px rgba(57, 255, 20, 0.75);
    transition: width 120ms linear;
}

.loader-details {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 12px;
    color: var(--muted);
    font-family: "Courier New", monospace;
    font-size: 0.76rem;
}

/* Header */

.lab-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: min(calc(100% - 32px), 1320px);
    margin: 16px auto 0;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(8, 10, 15, 0.8);
    box-shadow:
        0 16px 45px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-link > span {
    display: grid;
    line-height: 1.2;
}

.brand-link strong {
    font-size: 0.92rem;
}

.brand-link small {
    color: var(--green);
    font-size: 0.7rem;
}

.lab-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
}

.lab-nav a {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    transition: color 160ms ease;
}

.lab-nav a:hover {
    color: var(--green);
}

.header-button,
.primary-button,
.secondary-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 800;
    transition:
        transform 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.header-button,
.primary-button {
    color: #050705;
    background: var(--green);
    box-shadow:
        0 12px 32px rgba(57, 255, 20, 0.15);
}

.header-button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    background: #60ff42;
    box-shadow:
        0 18px 42px rgba(57, 255, 20, 0.24);
}

.secondary-button {
    border-color: var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
}

.secondary-button:hover {
    transform: translateY(-2px);
    border-color: var(--green-line);
}

/* Hero */

.lab-hero {
    display: grid;
    grid-template-columns:
        minmax(0, 0.92fr)
        minmax(480px, 1.08fr);
    align-items: center;
    gap: 76px;
    min-height: calc(100vh - 88px);
    padding-top: 82px;
}

.hero-copy h1 {
    max-width: 720px;
    margin-bottom: 26px;
    font-size: clamp(4rem, 8vw, 7.8rem);
    line-height: 0.88;
    letter-spacing: -0.07em;
}

.hero-copy h1 span {
    display: block;
    color: var(--green);
    text-shadow:
        0 0 28px rgba(57, 255, 20, 0.16);
}

.hero-description {
    max-width: 630px;
    white-space: pre-line;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-status {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    color: #d7dce5;
    font-size: 0.82rem;
}

.hero-status div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffd60a;
    box-shadow: 0 0 12px rgba(255, 214, 10, 0.65);
}

.status-light.active {
    background: var(--green);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.75);
}

/* Terminal */

.hero-terminal {
    position: relative;
}

.terminal-window {
    overflow: hidden;
    border: 1px solid var(--green-line);
    border-radius: var(--radius-medium);
    background: rgba(3, 5, 7, 0.94);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(57, 255, 20, 0.06);
}

.terminal-bar {
    display: grid;
    grid-template-columns: 70px 1fr 70px;
    align-items: center;
    min-height: 46px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    background: #0d1117;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c8c8c8;
}

.terminal-dots span:first-child {
    background: #ff5f57;
}

.terminal-dots span:nth-child(2) {
    background: #febc2e;
}

.terminal-dots span:nth-child(3) {
    background: #28c840;
}

.terminal-bar p {
    color: #68717e;
    font-family: "Courier New", monospace;
    font-size: 0.72rem;
    text-align: center;
}

.terminal-body {
    min-height: 520px;
    padding: 30px;
    color: #cfd8d3;
    font-family: "Courier New", monospace;
    font-size: 0.88rem;
}

.terminal-user {
    color: var(--green);
}

.terminal-symbol {
    color: #68717e;
}

.terminal-location {
    color: #00d5ff;
}

.terminal-output {
    margin: 24px 0 18px;
    color: #7f8995;
}

.terminal-experiments {
    display: grid;
    gap: 8px;
}

.terminal-experiments button {
    width: fit-content;
    padding: 5px 0;
    border: 0;
    color: #cbd3dd;
    background: transparent;
    font-family: inherit;
    text-align: left;
    transition:
        color 160ms ease,
        transform 160ms ease;
}

.terminal-experiments button:hover {
    transform: translateX(8px);
    color: var(--green);
}

.terminal-command {
    margin-top: 26px;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    margin-left: 4px;
    vertical-align: -2px;
    background: var(--green);
    animation: cursorBlink 850ms steps(2, start) infinite;
}

.floating-reading {
    position: absolute;
    display: grid;
    gap: 3px;
    min-width: 140px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(13, 17, 23, 0.92);
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
}

.floating-reading span {
    color: #727c89;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.floating-reading strong {
    color: var(--green);
    font-size: 0.84rem;
}

.reading-one {
    top: 18%;
    left: -42px;
}

.reading-two {
    right: -30px;
    bottom: 16%;
}

/* Statement */

.lab-statement {
    width: min(calc(100% - 40px), 1000px);
    text-align: center;
}

.lab-statement > p {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 1.15rem;
}

/* Experiments */

.experiments-section {
    width: min(calc(100% - 40px), 1320px);
}

.experiment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.experiment-card {
    --experiment-colour: var(--green);

    position: relative;
    display: flex;
    min-height: 510px;
    flex-direction: column;
    padding: 30px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background:
        radial-gradient(
            circle at top right,
            color-mix(
                in srgb,
                var(--experiment-colour) 11%,
                transparent
            ),
            transparent 35%
        ),
        var(--panel);
    box-shadow: var(--shadow);
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.experiment-card::before {
    position: absolute;
    top: 0;
    left: 30px;
    width: 90px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--experiment-colour);
    box-shadow:
        0 0 20px
        color-mix(
            in srgb,
            var(--experiment-colour) 55%,
            transparent
        );
    content: "";
}

.experiment-card:hover {
    transform: translateY(-8px);
    border-color:
        color-mix(
            in srgb,
            var(--experiment-colour) 40%,
            transparent
        );
    box-shadow:
        0 32px 90px rgba(0, 0, 0, 0.48),
        0 0 44px
        color-mix(
            in srgb,
            var(--experiment-colour) 7%,
            transparent
        );
}

.featured-experiment {
    grid-column: 1 / -1;
    min-height: 440px;
}

.experiment-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.experiment-number {
    color: #707987;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.experiment-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
}

.experiment-status.active {
    color: var(--green);
    background: rgba(57, 255, 20, 0.08);
}

.experiment-status.available {
    color: #ffd60a;
    background: rgba(255, 214, 10, 0.08);
}

.experiment-status.research {
    color: #c78cff;
    background: rgba(183, 108, 255, 0.08);
}

.experiment-icon {
    margin: 46px 0 30px;
    font-size: 3rem;
    filter:
        drop-shadow(
            0 0 18px
            color-mix(
                in srgb,
                var(--experiment-colour) 20%,
                transparent
            )
        );
}

.experiment-card h3 {
    margin-bottom: 14px;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.05;
}

.experiment-card > p {
    max-width: 650px;
    color: var(--muted);
}

.experiment-card ul {
    display: grid;
    gap: 8px;
    margin: 26px 0 34px;
    list-style: none;
    color: #d9dee5;
    font-size: 0.9rem;
}

.experiment-card li::before {
    margin-right: 9px;
    color: var(--experiment-colour);
    content: "✓";
}

.experiment-link {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    color: var(--experiment-colour);
    font-weight: 800;
}

.experiment-link span {
    transition: transform 160ms ease;
}

.experiment-link:hover span {
    transform: translateX(6px);
}

/* Process */

.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.process-grid article {
    min-height: 260px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.025);
    transition:
        transform 180ms ease,
        border-color 180ms ease;
}

.process-grid article:hover {
    transform: translateY(-5px);
    border-color: var(--green-line);
}

.process-grid article > span {
    display: grid;
    width: 40px;
    height: 40px;
    margin-bottom: 52px;
    place-items: center;
    border-radius: 50%;
    color: #050705;
    background: var(--green);
    font-size: 0.72rem;
    font-weight: 900;
}

.process-grid h3 {
    margin-bottom: 10px;
}

.process-grid p {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Contact */

.lab-contact {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 70px;
    align-items: start;
    margin-bottom: 70px;
    padding: 56px;
    border: 1px solid var(--green-line);
    border-radius: var(--radius-large);
    background:
        radial-gradient(
            circle at top left,
            rgba(57, 255, 20, 0.08),
            transparent 34%
        ),
        var(--panel);
    box-shadow: var(--shadow);
}

.contact-copy > p {
    white-space: pre-line;
}

.contact-details {
    display: grid;
    gap: 8px;
    margin-top: 30px;
}

.contact-details a {
    width: fit-content;
    color: var(--green);
    font-weight: 700;
}

.experiment-form {
    display: grid;
    gap: 16px;
}

.experiment-form label {
    display: grid;
    gap: 7px;
    color: #dce2ea;
    font-size: 0.84rem;
    font-weight: 700;
}

.experiment-form input,
.experiment-form textarea,
.experiment-form select {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    color: var(--text);
    background: rgba(4, 6, 9, 0.72);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.experiment-form select option {
    color: #ffffff;
    background: #10151d;
}

.experiment-form input:focus,
.experiment-form textarea:focus,
.experiment-form select:focus {
    border-color: var(--green);
    box-shadow:
        0 0 0 3px rgba(57, 255, 20, 0.08);
}

.experiment-form textarea {
    resize: vertical;
}

/* Footer */

.lab-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 48px 0 34px;
    border-top: 1px solid var(--line);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.footer-brand p {
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 20px;
    color: var(--muted);
    font-size: 0.84rem;
}

.footer-links a:hover {
    color: var(--green);
}

.lab-footer small {
    grid-column: 1 / -1;
    color: #68717e;
}

/* Reveal animation */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 700ms ease,
        transform 700ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */

@keyframes logoPulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.07);
    }
}

@keyframes cursorBlink {
    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

@keyframes gridDrift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 52px 52px;
    }
}

/* Responsive */

@media (max-width: 1080px) {
    .lab-nav {
        display: none;
    }

    .lab-header {
        grid-template-columns: 1fr auto;
    }

    .lab-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-copy {
        max-width: 840px;
    }

    .hero-terminal {
        width: min(100%, 840px);
        margin-inline: auto;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lab-contact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    section {
        width: min(calc(100% - 28px), var(--max-width));
        padding-block: 78px;
    }

    .lab-header {
        width: calc(100% - 20px);
        margin-top: 10px;
    }

    .brand-link small {
        display: none;
    }

    .header-button {
        min-height: 42px;
        padding: 9px 13px;
        font-size: 0.75rem;
    }

    .lab-hero {
        gap: 52px;
        padding-top: 70px;
    }

    .hero-copy h1 {
        font-size: clamp(3.6rem, 17vw, 6.2rem);
    }

    .floating-reading {
        display: none;
    }

    .terminal-body {
        min-height: 450px;
        padding: 22px;
        font-size: 0.78rem;
    }

    .experiment-grid {
        grid-template-columns: 1fr;
    }

    .featured-experiment {
        grid-column: auto;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .lab-contact {
        width: min(calc(100% - 20px), var(--max-width));
        padding: 30px 20px;
    }

    .lab-footer {
        grid-template-columns: 1fr;
        width: calc(100% - 28px);
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .hero-actions {
        display: grid;
    }

    .hero-actions a {
        width: 100%;
    }

    .hero-status {
        display: grid;
        gap: 10px;
    }

    .terminal-bar {
        grid-template-columns: 54px 1fr 20px;
    }

    .terminal-experiments button {
        font-size: 0.76rem;
    }

    .experiment-card {
        min-height: 0;
        padding: 24px 20px;
    }

    .experiment-icon {
        margin-top: 36px;
    }

    .section-heading h2,
    .lab-statement h2,
    .contact-copy h2 {
        font-size: 2.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}