html {
    scroll-behavior: smooth;
}

body:has(.landing) {
    background: #070b14;
    color: #cbd5e1;
}

.landing {
    --ink: #070b14;
    --panel: #0d1424;
    --line: #1c2740;
    --text: #cbd5e1;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --amber: #fbbf24;
    min-height: 100vh;
    background: var(--ink);
    color: var(--text);
    font-family: "Inter", "Segoe UI", sans-serif;
}

.landing h1,
.landing h2,
.landing h3,
.landing p,
.landing ul {
    margin: 0;
}

.landing a {
    color: inherit;
    text-decoration: none;
}

.landing .wrap {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.landing-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: 64px;
    background: rgba(7, 11, 20, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-bar {
    height: 64px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-mark {
    display: block;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(21, 88, 176, 0.35);
}

.landing-mark img {
    display: block;
    width: 36px;
    height: 36px;
}

.landing-word {
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
}

.landing-word span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #22d3ee;
}

.landing-nav {
    display: none;
    align-items: center;
    gap: 28px;
    font-size: 0.875rem;
    color: #94a3b8;
}

.landing-nav a:hover {
    color: #fff;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-login:hover {
    background: rgba(34, 211, 238, 0.2);
    color: #a5f3fc;
}

.hero {
    position: relative;
    isolation: isolate;
    padding: 9rem 0 5rem;
}

.grid-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(to right, rgba(34, 211, 238, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(34, 211, 238, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
}

.glow {
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    filter: blur(120px);
}

.glow-cyan {
    left: 50%;
    top: 0;
    width: 900px;
    height: 520px;
    transform: translateX(-50%);
    background: rgba(6, 182, 212, 0.1);
}

.glow-amber {
    right: 0;
    top: 10rem;
    width: 400px;
    height: 300px;
    background: rgba(251, 191, 36, 0.05);
}

.hero-copy {
    max-width: 48rem;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: rgba(13, 20, 36, 0.7);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    color: #cbd5e1;
}

.pulse {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #34d399;
    animation: pulse 1.5s ease infinite;
}

.hero h1,
.section-copy h2,
.cta h2 {
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
}

.hero h1 {
    margin-top: 1.5rem;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1.05;
}

.text-gradient {
    background: linear-gradient(100deg, #67e8f9 0%, #22d3ee 35%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    margin: 1.5rem auto 0;
    max-width: 42rem;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #94a3b8;
}

.hero-actions {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn-cyan,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 500;
}

.btn-cyan {
    background: #22d3ee;
    color: #070b14;
    box-shadow: 0 10px 15px -3px rgba(34, 211, 238, 0.25);
}

.btn-cyan:hover {
    background: #67e8f9;
    color: #070b14;
}

.btn-ghost {
    border: 1px solid var(--line);
    background: rgba(13, 20, 36, 0.6);
    color: #fff;
}

.btn-ghost:hover {
    border-color: #475569;
    color: #fff;
}

.demo {
    margin-top: 4rem;
    max-width: 56rem;
    scroll-margin-top: 5rem;
}

.caption {
    margin-top: 12px;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.stats {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(13, 20, 36, 0.4);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 16px;
    padding: 40px 0;
    text-align: center;
}

.stats-grid strong {
    display: block;
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: clamp(1.5rem, 2vw, 1.875rem);
    font-weight: 600;
    color: #fff;
}

.stats-grid span {
    display: block;
    margin-top: 4px;
    font-size: 0.875rem;
    color: #64748b;
}

.tools,
.workflow,
.cta-wrap {
    scroll-margin-top: 5rem;
}

.tools {
    padding: 6rem 0;
}

.section-copy {
    max-width: 42rem;
}

.eyebrow {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #22d3ee;
}

.section-copy h2,
.cta h2 {
    margin-top: 12px;
    font-size: clamp(1.875rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.section-copy p {
    margin-top: 1rem;
    color: #94a3b8;
    line-height: 1.6;
}

.tool-grid {
    margin-top: 3rem;
    display: grid;
    gap: 20px;
}

.tool-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 20px 25px -5px rgba(34, 211, 238, 0.1);
    color: inherit;
}

.tool-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.tool-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
    font-size: 22px;
}

.tool-tag {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    color: #94a3b8;
}

.tool-card h3 {
    margin-top: 24px;
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.tool-card p {
    margin-top: 8px;
    line-height: 1.6;
    color: #94a3b8;
}

.coupling-diagram {
    display: block;
    width: 100%;
    max-width: 36rem;
    margin-top: 24px;
}

.open-tool {
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #67e8f9;
}

.workflow {
    border-top: 1px solid var(--line);
    background: rgba(13, 20, 36, 0.4);
    padding: 6rem 0;
}

.steps {
    position: relative;
    margin-top: 3rem;
    display: grid;
    gap: 24px;
}

.step-line {
    display: none;
}

.step-n {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.4);
    background: #070b14;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.875rem;
    color: #67e8f9;
}

.step h3 {
    margin-top: 20px;
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
}

.step p {
    margin-top: 8px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #94a3b8;
}

.cta-wrap {
    padding: 6rem 0;
}

.cta {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    background: linear-gradient(to bottom right, rgba(34, 211, 238, 0.15), var(--panel) 45%, var(--panel));
    padding: 40px 24px;
}

.cta-deco {
    position: absolute;
    right: -12px;
    top: -12px;
    font-size: 10rem;
    color: rgba(34, 211, 238, 0.05);
    pointer-events: none;
}

.cta-copy {
    position: relative;
    max-width: 36rem;
}

.cta ul {
    margin-top: 24px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    color: #cbd5e1;
}

.cta li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cta li i {
    color: #34d399;
}

.cta .hero-actions {
    justify-content: flex-start;
}

.landing-footer {
    border-top: 1px solid var(--line);
}

.footer-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    font-size: 0.875rem;
    color: #64748b;
}

.footer-links a:hover {
    color: #e2e8f0;
}

.footer-copy {
    margin: 0;
    padding: 0 0 28px;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
}

.plot-card {
    border: 1px solid var(--line);
    background: rgba(13, 20, 36, 0.8);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(34, 211, 238, 0.05);
}

.plot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px;
}

.plot-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.dot.red { background: rgba(248, 113, 113, 0.7); }
.dot.amber { background: rgba(251, 191, 36, 0.7); }
.dot.green { background: rgba(52, 211, 153, 0.7); }

.plot-title {
    margin-left: 8px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    color: #94a3b8;
}

.plot-legend {
    display: none;
    gap: 16px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
}

.leg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.leg i {
    display: inline-block;
    width: 16px;
    height: 2px;
}

.leg.s21 { color: #67e8f9; }
.leg.s21 i { background: #22d3ee; }
.leg.s11 { color: #fcd34d; }
.leg.s11 i { background: #fbbf24; }

.plot-svg-wrap {
    padding: 12px 8px 0;
}

.plot-svg-wrap svg {
    display: block;
    width: 100%;
    height: auto;
}

.plot-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    border-top: 1px solid var(--line);
    padding: 16px 20px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.plot-specs b {
    letter-spacing: 0;
    text-transform: none;
    color: #67e8f9;
    font-weight: 500;
}

.plot-controls {
    display: grid;
    gap: 20px;
    border-top: 1px solid var(--line);
    padding: 20px;
}

.slider-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.slider-val {
    font-size: 0.875rem;
    letter-spacing: 0;
    text-transform: none;
    color: #67e8f9;
}

.landing input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #1c2740;
    outline: none;
}

.landing input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2);
    cursor: pointer;
}

.landing input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2);
    cursor: pointer;
}

.zero-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: #1c2740;
    padding: 0;
    flex: 0 0 auto;
}

.switch span {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.15s;
}

.switch.on {
    background: #06b6d4;
}

.switch.on span {
    left: 22px;
}

.flow {
    stroke-dasharray: 4 6;
    animation: dash 1.2s linear infinite;
}

@keyframes dash {
    to { stroke-dashoffset: -40; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@media (min-width: 640px) {
    .plot-legend { display: flex; }
    .plot-svg-wrap { padding: 12px 16px 0; }
    .plot-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .zero-toggle {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }
    .cta { padding: 64px; }
    .footer-row {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 768px) {
    .landing-nav { display: flex; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .steps { grid-template-columns: repeat(4, 1fr); }
    .step-line {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 24px;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(34, 211, 238, 0.4), transparent);
    }
}

@media (min-width: 1024px) {
    .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tool-card.wide { grid-column: span 2; }
}
