:root {
    color-scheme: dark;
    --bg: #0d1d32;
    --bg-soft: #132a49;
    --surface: rgba(255, 255, 255, .075);
    --surface-strong: rgba(255, 255, 255, .12);
    --surface-solid: #173358;
    --border: rgba(255, 255, 255, .14);
    --text: #eef6ff;
    --muted: #a9bdd6;
    --muted-2: #7f96b2;
    --primary: #00aeef;
    --primary-2: #4bc8f5;
    --success: #00b26b;
    --warning: #f79009;
    --danger: #ed1a3b;
    --shadow: 0 28px 90px rgba(0, 0, 0, .35);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --max: 1180px;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #e8e6e0;
    --bg-soft: #f5f4f1;
    --surface: rgba(255, 255, 255, .78);
    --surface-strong: rgba(255, 255, 255, .95);
    --surface-solid: #ffffff;
    --border: rgba(9, 31, 66, .13);
    --text: #2b2b2b;
    --muted: #40556f;
    --muted-2: #647890;
    --primary: #007eb0;
    --primary-2: #00aeef;
    --success: #008a53;
    --warning: #a35d00;
    --danger: #b3132d;
    --shadow: 0 24px 70px rgba(20, 38, 70, .13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Myriad Pro", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 10% 5%, color-mix(in srgb, var(--primary) 24%, transparent), transparent 28%),
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--success) 16%, transparent), transparent 30%),
    radial-gradient(circle at 48% 62%, color-mix(in srgb, var(--primary-2) 15%, transparent), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-soft) 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent 72%);
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.brand img {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    box-shadow: 0 16px 50px color-mix(in srgb, var(--primary) 20%, transparent);
    background: #eef0e8;
}

.brand strong {
    display: block;
    font-size: 18px;
    line-height: 1;
    letter-spacing: -.04em;
    font-weight: 900;
}

.brand span {
    display: block;
    color: var(--muted-2);
    font-size: 12px;
    margin-top: 5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
    font-size: 14px;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform .2s ease, background .2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    background: var(--surface-strong);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    font-size: 14px;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--surface-strong);
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.btn-primary {
    color: #03111f;
    border: 0;
    background: linear-gradient(135deg, #36d6ff, #4f8cff);
    box-shadow: 0 18px 50px rgba(54, 214, 255, .22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #79e7ff, #6da3ff);
}

.hero {
    position: relative;
    padding: 92px 0 56px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    gap: 44px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--success) 32%, transparent);
    background: color-mix(in srgb, var(--success) 11%, transparent);
    color: color-mix(in srgb, var(--success) 86%, var(--text));
    font-weight: 900;
    font-size: 13px;
}

.pulse {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--success) 15%, transparent);
}

h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: .98;
    letter-spacing: -.075em;
}

.gradient {
    background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--primary) 72%, var(--text)) 45%, color-mix(in srgb, var(--success) 80%, var(--text)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    max-width: 710px;
    margin: 0 0 30px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.trust-row {
    margin-top: 28px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted-2);
    font-size: 13px;
}

.trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.appliance-card {
    position: relative;
    padding: 26px;
    border-radius: 34px;
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.appliance-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--primary) 25%, transparent), transparent 42%);
    pointer-events: none;
}

.device {
    position: relative;
    min-height: 430px;
    border-radius: 28px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface-solid) 88%, #0e3154), color-mix(in srgb, var(--bg) 84%, #091829));
    padding: 24px;
    overflow: hidden;
}

.device-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.device-monogram {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .25);
    background: linear-gradient(145deg, var(--brand-primary), #0e3154);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    display: grid;
    place-items: center;
    font-weight: 950;
    letter-spacing: .08em;
}

.chip {
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 10px;
    background: var(--surface);
}

.device-title {
    font-size: 29px;
    line-height: 1.1;
    letter-spacing: -.045em;
    font-weight: 950;
    margin-bottom: 9px;
}

.device-sub {
    color: var(--muted);
    line-height: 1.65;
    max-width: 430px;
}

.switch-panel {
    margin-top: 30px;
    display: grid;
    gap: 14px;
}

.state {
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 16px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 13px;
    align-items: center;
}

.state-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}

.state h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.state p {
    margin: 0;
    color: var(--muted-2);
    font-size: 13px;
}

.badge {
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge.safe {
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: color-mix(in srgb, var(--success) 82%, var(--text));
}

.badge.blocked {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    color: color-mix(in srgb, var(--danger) 75%, var(--text));
}

section {
    padding: 72px 0;
}

.section-head {
    max-width: 790px;
    margin-bottom: 30px;
}

.section-kicker {
    color: var(--primary);
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 12px;
}

h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.055em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 24px;
    box-shadow: 0 18px 54px rgba(0, 0, 0, .12);
}

.card:hover {
    background: var(--surface-strong);
}

.icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, transparent), color-mix(in srgb, var(--success) 11%, transparent));
    border: 1px solid var(--border);
    color: var(--primary);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 19px;
    letter-spacing: -.025em;
}

.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.72;
    font-size: 15px;
}

.diagram {
    border-radius: 34px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.flow {
    display: grid;
    grid-template-columns: 1fr auto 1.2fr auto 1fr;
    gap: 14px;
    align-items: center;
}

.flow-box {
    min-height: 160px;
    border-radius: 22px;
    padding: 20px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 54%, transparent);
}

.flow-box strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.flow-box small {
    color: var(--muted);
    line-height: 1.6;
    display: block;
    font-size: 14px;
}

.arrow {
    color: var(--primary);
    opacity: .9;
    font-size: 24px;
    font-weight: 900;
}

.gate {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 13%, transparent), color-mix(in srgb, var(--success) 8%, transparent));
    position: relative;
}

.gate::after {
    content: "Layer-1 Hardware Switch";
    position: absolute;
    bottom: 16px;
    left: 20px;
    color: var(--success);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.state-diagram {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.mini-state {
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 22px;
}

.mini-state h3 {
    margin: 0 0 16px;
}

.line-visual {
    display: grid;
    grid-template-columns: 1fr 56px 1fr;
    gap: 14px;
    align-items: center;
    color: var(--muted);
}

.node {
    border-radius: 18px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    text-align: center;
    font-weight: 850;
    color: var(--text);
}

.switch {
    height: 4px;
    border-radius: 99px;
    background: var(--success);
    box-shadow: 0 0 24px color-mix(in srgb, var(--success) 36%, transparent);
}

.switch.off {
    background: var(--danger);
    box-shadow: 0 0 24px color-mix(in srgb, var(--danger) 28%, transparent);
    position: relative;
}

.switch.off::after {
    content: "×";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%);
    color: #fff;
    font-size: 28px;
    font-weight: 950;
}

.feature-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--muted);
    line-height: 1.6;
}

.check {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
    margin-top: 1px;
    font-weight: 950;
}

.comparison {
    overflow-x: auto;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th, td {
    padding: 17px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--text);
    background: var(--surface);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

td {
    color: var(--muted);
}

tr:last-child td {
    border-bottom: 0;
}

.yes {
    color: var(--success);
    font-weight: 950;
}

.no {
    color: var(--danger);
    font-weight: 950;
}

.usecase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.usecase {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 20px;
    padding: 18px;
    min-height: 110px;
}

.usecase strong {
    display: block;
    margin: 10px 0 6px;
}

.usecase span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.cta {
    padding: 42px;
    border-radius: 36px;
    background: radial-gradient(circle at 15% 0, color-mix(in srgb, var(--primary) 24%, transparent), transparent 40%),
    linear-gradient(135deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 28px;
    align-items: center;
}

.cta h2 {
    margin-bottom: 12px;
}

.cta p {
    color: var(--muted);
    line-height: 1.75;
    margin: 0;
}

.cta-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

footer {
    padding: 36px 0 50px;
    color: var(--muted-2);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

svg {
    width: 22px;
    height: 22px;
    display: block;
}

@media (max-width: 980px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding-top: 58px;
    }

    .hero-grid, .grid-2, .cta {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .flow {
        grid-template-columns: 1fr;
    }

    .arrow {
        transform: rotate(90deg);
        justify-self: center;
    }

    .state-diagram {
        grid-template-columns: 1fr;
    }

    .usecase-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 660px) {
    .container {
        width: min(100% - 28px, var(--max));
    }

    .nav-inner {
        height: 70px;
    }

    .brand {
        min-width: 0;
    }

    .brand span {
        display: none;
    }

    .nav-actions .btn {
        display: none;
    }

    .hero-actions, .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .grid-3, .usecase-grid {
        grid-template-columns: 1fr;
    }

    .device {
        min-height: auto;
    }

    .state {
        grid-template-columns: 44px 1fr;
    }

    .badge {
        grid-column: 1 / -1;
        width: fit-content;
    }

    .line-visual {
        grid-template-columns: 1fr;
    }

    .switch {
        height: 36px;
        width: 4px;
        justify-self: center;
    }

    .cta {
        padding: 28px;
    }
}
