:root {
    color-scheme: dark;
    --bg: #020403;
    --bg-panel: rgba(4, 10, 7, 0.96);
    --bg-panel-strong: rgba(2, 7, 4, 0.985);
    --bg-soft: rgba(27, 78, 40, 0.14);
    --bg-soft-hover: rgba(39, 116, 60, 0.24);
    --line: rgba(69, 167, 94, 0.18);
    --line-strong: rgba(88, 214, 120, 0.38);
    --text: #d8ffe2;
    --muted: #78a182;
    --accent: #78ff8a;
    --accent-strong: #9dffab;
    --shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 20% 10%, rgba(120, 255, 138, 0.08), transparent 26%),
        radial-gradient(circle at 82% 18%, rgba(120, 255, 138, 0.04), transparent 24%),
        linear-gradient(180deg, #010201 0%, #020503 50%, #041008 100%);
    color: var(--text);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#matrix-rain,
.matrix-grid,
.matrix-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

#matrix-rain {
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: 0.52;
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(0, 0, 0, 0.98) 46%,
        rgba(0, 0, 0, 0.7) 62%,
        rgba(0, 0, 0, 0.26) 82%,
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(0, 0, 0, 0.98) 46%,
        rgba(0, 0, 0, 0.7) 62%,
        rgba(0, 0, 0, 0.26) 82%,
        rgba(0, 0, 0, 0) 100%
    );
}

.matrix-grid {
    z-index: 0;
    background:
        radial-gradient(circle at center, rgba(144, 255, 179, 0.05), transparent 55%),
        linear-gradient(rgba(120, 255, 138, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 255, 138, 0.02) 1px, transparent 1px);
    background-size: auto, 22px 22px, 22px 22px;
    opacity: 0.75;
}

.matrix-glow {
    z-index: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(120, 255, 138, 0.11), transparent 30%),
        radial-gradient(circle at 14% 18%, rgba(120, 255, 138, 0.08), transparent 20%),
        radial-gradient(circle at 85% 20%, rgba(120, 255, 138, 0.05), transparent 18%);
    opacity: 0.75;
}

.page {
    position: relative;
    z-index: 1;
    width: min(1136px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.hero-shell {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 18px;
}

.hero-main {
    border: 1px solid var(--line);
    background: var(--bg-panel);
    box-shadow:
        inset 0 0 0 1px rgba(120, 255, 138, 0.04),
        0 16px 40px rgba(0, 0, 0, 0.32);
    padding: 26px 26px 24px;
}

.hero-side {
    display: grid;
    gap: 14px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.eyebrow,
.shell-tag,
.feature-index,
.terminal-line,
.terminal-caption,
.hero-link {
    font-family: "IBM Plex Mono", Consolas, monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topline {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.status-pill {
    width: 14px;
    height: 20px;
    background: var(--accent);
    box-shadow: 0 0 18px rgba(120, 255, 138, 0.42);
}

.shell-tag {
    color: var(--accent);
    font-size: 0.68rem;
}

.eyebrow {
    margin: 18px 0 0;
    color: var(--accent);
    font-size: 0.66rem;
}

h1 {
    margin: 14px 0 14px;
    font-size: clamp(44px, 7vw, 82px);
    line-height: 0.94;
    letter-spacing: -0.05em;
    color: var(--accent-strong);
}

.lead {
    margin: 0;
    max-width: 56ch;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
}

.terminal-box {
    margin-top: 24px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.96);
    padding: 16px 18px;
    display: grid;
    gap: 10px;
}

.terminal-caption {
    color: var(--accent);
    font-size: 0.66rem;
}

.terminal-line {
    color: var(--accent-strong);
    font-size: 12px;
    line-height: 1.45;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.action i {
    font-size: 22px;
    line-height: 1;
}

.action:hover,
.action:focus-visible {
    outline: none;
    border-color: var(--line-strong);
    background: var(--bg-soft-hover);
    color: var(--accent-strong);
}

.action--primary {
    background: var(--bg-soft);
}

.footer-note {
    margin-top: 22px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.feature-card {
    border: 1px solid var(--line);
    background: var(--bg-panel-strong);
    padding: 16px;
}

.feature-index {
    color: var(--accent);
    font-size: 0.64rem;
}

.feature-title {
    margin: 10px 0 8px;
    color: var(--accent-strong);
    font-family: "IBM Plex Mono", Consolas, monospace;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    font-size: 18px;
}

.feature-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.typewriter-pending [data-typewriter] {
    visibility: hidden;
}

.typewriter-ready {
    white-space: pre-wrap;
}

.typewriter-cursor {
    display: inline-block;
    width: 0.62em;
    height: 0.9em;
    margin-left: 0.12em;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(120, 255, 138, 0.45);
    vertical-align: -0.08em;
    animation: typewriter-cursor-blink 0.9s steps(1, end) infinite;
}

@keyframes typewriter-cursor-blink {
    0%,
    48% {
        opacity: 1;
    }

    49%,
    100% {
        opacity: 0.18;
    }
}

.hero-link {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.7rem;
}

@media (max-width: 920px) {
    .page {
        padding: 18px;
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .hero-shell {
        grid-template-columns: 1fr;
    }

    .hero-main {
        padding: 22px 18px 18px;
    }

    .action {
        flex: 1 1 100%;
    }
}
