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

:root {
    --bg: #050b12;
    --bg-deep: #02060b;
    --panel: rgba(9, 17, 26, 0.82);
    --panel-strong: rgba(7, 13, 21, 0.94);
    --text: #edf3f7;
    --muted: #97a8b9;
    --accent: #b7ff68;
    --accent-2: #6be7ff;
    --accent-3: #dff4ff;
    --border: rgba(107, 231, 255, 0.18);
    --border-strong: rgba(183, 255, 104, 0.28);
    --shadow: rgba(0, 0, 0, 0.38);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 18%, rgba(107, 231, 255, 0.18), transparent 24%),
        radial-gradient(circle at 84% 10%, rgba(183, 255, 104, 0.16), transparent 20%),
        linear-gradient(135deg, #04111b 0%, #08110f 42%, #03060b 100%);
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.35;
}

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

button {
    font: inherit;
    color: inherit;
}

p {
    margin: 0 0 1rem;
}

ul {
    list-style: none;
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--accent-3);
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3.35rem, 8vw, 6rem);
    line-height: 0.94;
    letter-spacing: -0.07em;
    max-width: 12.5ch;
}

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.9rem;
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.08rem;
    margin-bottom: 0.4rem;
}

.ambient-grid,
.ambient-orb {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.ambient-grid {
    inset: 0;
    background:
        linear-gradient(180deg, transparent, rgba(107, 231, 255, 0.03)),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 62%);
}

.ambient-orb {
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.4;
}

.orb-one {
    top: -10rem;
    right: -8rem;
    background: rgba(107, 231, 255, 0.18);
}

.orb-two {
    bottom: -12rem;
    left: -10rem;
    background: rgba(183, 255, 104, 0.15);
}

#neural-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.hidden {
    display: none;
}

.container {
    position: relative;
    z-index: 1;
    width: min(100%, 1220px);
    margin: 0 auto;
    padding: 1.75rem 1.25rem 4rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-mark {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow:
        0 0 0 8px rgba(107, 231, 255, 0.07),
        0 0 26px rgba(183, 255, 104, 0.32);
}

.brand-name,
.brand-role {
    margin: 0;
}

.brand-name {
    color: var(--accent-3);
    font-weight: 700;
}

.brand-role {
    color: var(--muted);
    font-size: 0.85rem;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.nav-trigger,
.ghost-cta,
.preview-card {
    appearance: none;
    border: 1px solid var(--border);
    background: rgba(9, 17, 26, 0.72);
}

.nav-trigger,
.ghost-cta,
.primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.nav-trigger:hover,
.ghost-cta:hover,
.primary-cta:hover,
.preview-card:hover {
    transform: translateY(-2px);
}

.nav-trigger:hover,
.ghost-cta:hover,
.preview-card:hover {
    border-color: rgba(107, 231, 255, 0.34);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.primary-cta {
    background: linear-gradient(135deg, var(--accent), #efffc3);
    color: #07110a;
    font-weight: 700;
    box-shadow: 0 18px 34px rgba(183, 255, 104, 0.2);
}

.ghost-cta {
    color: var(--accent-3);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.92fr);
    gap: 1.1rem;
    align-items: stretch;
}

.hero-card,
.signal-panel,
.preview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(10, 18, 28, 0.95), rgba(7, 13, 21, 0.98));
    box-shadow: 0 30px 70px var(--shadow);
    /* Removed backdrop-filter to prevent browser bugs flattening 3D transforms */
}

.hero-card::before,
.signal-panel::before,
.preview-card::before {
    content: "";
    position: absolute;
    inset: -30% auto auto -5%;
    width: 65%;
    height: 65%;
    background: radial-gradient(circle, rgba(107, 231, 255, 0.12), transparent 65%);
    pointer-events: none;
}

.hero-card {
    padding: 2.2rem;
}

.section-label,
.panel-kicker,
.card-kicker,
.signal-index,
.status-label {
    color: var(--accent);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.subtitle {
    color: var(--accent-2);
    font-size: 1.08rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.hero-summary {
    max-width: 64ch;
    color: #d7e3ed;
    font-size: 1rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 1.6rem 0;
}

.hero-tags li {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(107, 231, 255, 0.18);
    background: rgba(107, 231, 255, 0.07);
    color: #eaf7ff;
    font-size: 0.88rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.8rem;
}

.proof-card {
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(183, 255, 104, 0.15);
    background:
        linear-gradient(180deg, rgba(183, 255, 104, 0.1), rgba(107, 231, 255, 0.05)),
        rgba(255, 255, 255, 0.02);
}

.proof-value {
    margin: 0 0 0.3rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.95rem;
    line-height: 1;
    color: var(--accent);
}

.proof-label {
    margin: 0;
    color: #d3dee8;
    font-size: 0.84rem;
}

.signal-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.6rem;
}

.signal-stack {
    display: grid;
    gap: 0.8rem;
}

.signal-card,
.status-card,
.timeline-item,
.info-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(107, 231, 255, 0.14);
    background: rgba(255, 255, 255, 0.035);
}

.signal-card h3,
.status-value {
    color: var(--accent-3);
}

.signal-card p:last-child,
.status-copy,
.role,
.timeline-heading span,
.terminal-note {
    color: var(--muted);
    margin-bottom: 0;
}

.status-card {
    margin-top: auto;
    border-color: var(--border-strong);
    background:
        linear-gradient(135deg, rgba(183, 255, 104, 0.1), rgba(107, 231, 255, 0.06)),
        rgba(255, 255, 255, 0.03);
}

.status-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.1rem;
}

.preview-card {
    width: 100%;
    padding: 1.25rem;
    text-align: left;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.preview-card h3 {
    margin-bottom: 0.45rem;
}

.preview-card p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.hero-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(9, 17, 26, 0.72);
}

.panel-links {
    margin-top: 0.4rem;
}

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

.cursor.typing {
    animation: none;
    opacity: 1;
}

@keyframes blink {
    from,
    to {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-list {
    display: grid;
    gap: 0.85rem;
    list-style: disc;
    padding-left: 1.35rem;
}

.timeline-item + .timeline-item {
    margin-top: 0.85rem;
}

.timeline-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.6rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.9rem;
}

.info-card p:last-child {
    margin-bottom: 0;
}

/* Card Glow Effect */
.hero-card::after,
.signal-panel::after,
.preview-card::after,
.signal-card::after,
.status-card::after,
.timeline-item::after,
.info-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(107, 231, 255, 0.12), transparent 40%);
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
    border-radius: inherit;
    mix-blend-mode: color-dodge;
    z-index: 10;
}

.hero-card:hover::after,
.signal-panel:hover::after,
.preview-card:hover::after,
.signal-card:hover::after,
.status-card:hover::after,
.timeline-item:hover::after,
.info-card:hover::after {
    opacity: 1;
}

.wb-body {
    background:
        radial-gradient(circle at top right, rgba(107, 231, 255, 0.09), transparent 28%),
        radial-gradient(circle at bottom left, rgba(183, 255, 104, 0.08), transparent 22%),
        var(--panel-strong);
    color: var(--text);
    padding: 1.2rem;
}

.hero-card,
.signal-panel,
.preview-card {
    animation: rise-in 0.65s ease both;
}

.signal-panel {
    animation-delay: 0.08s;
}

.preview-card:nth-child(1) {
    animation-delay: 0.14s;
}

.preview-card:nth-child(2) {
    animation-delay: 0.18s;
}

.preview-card:nth-child(3) {
    animation-delay: 0.22s;
}

.preview-card:nth-child(4) {
    animation-delay: 0.26s;
}

.preview-card:nth-child(5) {
    animation-delay: 0.3s;
}

.preview-card:nth-child(6) {
    animation-delay: 0.34s;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Cursor */
body, a, button, .nav-trigger, .preview-card, input, label {
    cursor: none !important;
}

.custom-cursor-dot,
.custom-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
}

.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.custom-cursor-ring {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(183, 255, 104, 0.4);
    transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.custom-cursor-ring.active {
    width: 58px;
    height: 58px;
    background: rgba(183, 255, 104, 0.08);
    border-color: rgba(183, 255, 104, 0.8);
}

/* 3D Tilt additions */
.hero-card, .preview-card {
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
    will-change: transform;
    /* Removed preserve-3d to fix browser rendering bugs with backdrop-filter */
}

/* AI Terminal */
.ai-terminal-wrapper {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 720px);
    z-index: 1000;
}

.ai-terminal {
    display: flex;
    align-items: center;
    background: rgba(4, 9, 15, 0.85);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    padding: 1rem 1.4rem;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: none !important;
}

.ai-terminal:focus-within {
    border-color: rgba(107, 231, 255, 0.5);
    box-shadow: 0 10px 40px rgba(107, 231, 255, 0.15);
}

.prompt-prefix {
    color: var(--accent);
    margin-right: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

#ai-prompt {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    outline: none;
    width: 100%;
    cursor: none !important;
}

#ai-prompt::placeholder {
    color: rgba(151, 168, 185, 0.4);
}

/* Streaming Text Cursor */
.wb-stream-target::after {
    content: '█';
    color: var(--accent);
    animation: blink 1s step-end infinite;
    display: none;
    margin-left: 4px;
}
.wb-stream-target.streaming::after {
    display: inline-block;
}

/* Agent Visualizer Graph */
.agent-visualizer {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.agent-visualizer.active {
    opacity: 1;
}

.agent-node {
    background: rgba(4, 9, 15, 0.9);
    border: 1px solid rgba(151, 168, 185, 0.2);
    backdrop-filter: blur(8px);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'IBM Plex Mono', monospace;
    text-align: center;
    width: 100%;
    position: relative;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    opacity: 0.4;
}

.agent-node.active-node {
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(107, 231, 255, 0.3);
    transform: scale(1.08);
    opacity: 1;
}

.agent-line {
    width: 2px;
    height: 30px;
    background: rgba(151, 168, 185, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.agent-line.active-line {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

@media (max-width: 1024px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .container {
        padding-top: 1.1rem;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        justify-content: flex-start;
    }

    .hero-card,
    .signal-panel,
    .preview-card {
        border-radius: 24px;
    }

    .hero-card,
    .signal-panel {
        padding: 1.35rem;
    }

    .cta-row,
    .hero-links,
    nav ul {
        width: 100%;
    }

    .nav-trigger,
    .ghost-cta,
    .primary-cta,
    .hero-links a {
        width: 100%;
        justify-content: flex-start;
    }

    .proof-grid,
    .preview-grid {
        grid-template-columns: 1fr;
    }

    .timeline-heading {
        flex-direction: column;
    }
}
