:root {
    color-scheme: light;
    --canvas: #f7f8fa;
    --canvas-secondary: #f0f1f5;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.72);
    --ink: #181a23;
    --ink-soft: #646977;
    --line: rgba(37, 39, 52, 0.12);
    --primary: #8a4ed1;
    --primary-deep: #4b2db5;
    --primary-soft: #e9e6ff;
    --accent: #b35be8;
    --success: #4c9a72;
    --error: #c85a5a;
    --terminal-canvas: #0f1115;
    --terminal-panel: #12141b;
    --terminal-raised: #181a23;
    --terminal-line: rgba(255, 255, 255, 0.1);
    --terminal-text: #f5f3f8;
    --terminal-muted: #9995a2;
    --body: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --shadow-panel: 0 30px 72px rgba(31, 25, 43, 0.2), 0 8px 20px rgba(31, 25, 43, 0.1);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --canvas: #0f1115;
    --canvas-secondary: #12141b;
    --surface: #181a23;
    --surface-soft: rgba(24, 26, 35, 0.72);
    --ink: #f4f2f7;
    --ink-soft: #a5a1ad;
    --line: rgba(255, 255, 255, 0.1);
    --primary-soft: rgba(138, 78, 209, 0.18);
    --terminal-canvas: #12141b;
    --terminal-panel: #181a23;
    --terminal-raised: #20232d;
    --shadow-panel: 0 30px 72px rgba(0, 0, 0, 0.34), 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 14% 10%, rgba(138, 78, 209, 0.075), transparent 25rem),
        var(--canvas);
    color: var(--ink);
    font-family: var(--body);
    line-height: 1.5;
    position: relative;
    transition: background-color 180ms ease, color 180ms ease;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

.page-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 78%);
    opacity: 0.34;
}

.topbar,
main,
footer {
    width: min(1180px, calc(100% - 64px));
    margin-inline: auto;
}

.topbar {
    min-height: 80px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 1.04rem;
    font-weight: 760;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 32px;
    border-radius: 7px;
    background: var(--primary);
    box-shadow: 0 7px 20px rgba(138, 78, 209, 0.2);
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: -0.055em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-link {
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    font-size: 0.76rem;
    font-weight: 650;
    text-decoration: none;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.product-link:hover {
    border-color: rgba(138, 78, 209, 0.38);
    background: var(--primary-soft);
    color: var(--primary-deep);
    transform: translateY(-1px);
}

.panel-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.panel-status i,
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--ink);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.theme-toggle:hover {
    border-color: rgba(138, 78, 209, 0.38);
    background: var(--primary-soft);
    color: var(--primary-deep);
    transform: translateY(-1px);
}

.theme-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-sun,
:root[data-theme="dark"] .theme-icon-moon {
    display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
    display: block;
}

.hero {
    min-height: calc(100vh - 150px);
    padding: clamp(64px, 7vw, 96px) 0 80px;
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(620px, 1.22fr);
    align-items: center;
    gap: clamp(48px, 5.5vw, 76px);
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.eyebrow {
    width: fit-content;
    min-height: 32px;
    margin-bottom: 28px;
    padding: 0 12px;
    border: 1px solid rgba(138, 78, 209, 0.2);
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-dot {
    color: var(--accent);
    box-shadow: 0 0 0 4px rgba(179, 91, 232, 0.12);
}

h1 {
    max-width: 630px;
    font-size: clamp(3.5rem, 5vw, 4.75rem);
    font-weight: 790;
    letter-spacing: -0.055em;
    line-height: 1;
}

.headline-line {
    display: block;
    white-space: nowrap;
}

.headline-accent {
    color: var(--primary);
}

.hero-description {
    max-width: 530px;
    margin-top: 28px;
    color: var(--ink-soft);
    font-size: clamp(0.98rem, 1.2vw, 1.06rem);
    line-height: 1.85;
}

.capability-list {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.capability-list li {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 560;
}

.capability-list li::before {
    content: "✓";
    margin-right: 7px;
    color: var(--success);
    font-family: var(--mono);
    font-weight: 800;
}

.platform-summary {
    margin-top: 20px;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 650;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.platform-summary span {
    margin: 0 6px;
    color: var(--primary);
}

.install-panel {
    position: relative;
}

.install-panel::before {
    content: "";
    position: absolute;
    inset: 18px -16px -16px 18px;
    z-index: -1;
    border: 1px solid rgba(138, 78, 209, 0.18);
    border-radius: 16px;
    background: rgba(138, 78, 209, 0.055);
}

.panel-surface {
    overflow: hidden;
    border: 1px solid var(--terminal-line);
    border-radius: 16px;
    background: var(--terminal-panel);
    box-shadow: var(--shadow-panel);
    color: var(--terminal-text);
}

.panel-header {
    min-height: 108px;
    padding: 26px 28px 23px;
    border-bottom: 1px solid var(--terminal-line);
    background: var(--terminal-panel);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.panel-kicker {
    margin-bottom: 8px;
    color: #c8a4f1;
    font-family: var(--mono);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.panel-header h2 {
    font-size: clamp(1.75rem, 2.6vw, 2.25rem);
    font-weight: 730;
    letter-spacing: -0.045em;
    line-height: 1;
}

.panel-status {
    padding-bottom: 2px;
    color: #75c79b;
    font-family: var(--mono);
    font-size: 0.64rem;
    white-space: nowrap;
}

.process-rail {
    min-height: 86px;
    padding: 18px 28px 16px;
    border-bottom: 1px solid var(--terminal-line);
    background: var(--terminal-canvas);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
}

.process-rail li {
    position: relative;
    color: var(--terminal-muted);
    display: grid;
    justify-items: start;
    gap: 7px;
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.02em;
}

.process-rail li:not(:last-child)::after {
    content: "";
    position: absolute;
    width: calc(100% - 26px);
    height: 1px;
    left: 22px;
    top: 11px;
    background: linear-gradient(90deg, rgba(138, 78, 209, 0.82), rgba(138, 78, 209, 0.18));
}

.process-node {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(138, 78, 209, 0.55);
    border-radius: 50%;
    background: var(--terminal-raised);
    color: #d6baf4;
    display: inline-grid;
    place-items: center;
    font-size: 0.5rem;
    font-weight: 800;
}

.process-node-ready {
    border-color: rgba(76, 154, 114, 0.72);
    color: #75c79b;
    box-shadow: 0 0 0 4px rgba(76, 154, 114, 0.1);
}

.platform {
    padding: 23px 28px 25px;
}

.platform + .platform {
    border-top: 1px solid var(--terminal-line);
}

.platform-heading {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-heading h3 {
    font-size: 0.92rem;
    font-weight: 690;
    line-height: 1.2;
}

.platform-heading p {
    margin-top: 3px;
    color: var(--terminal-muted);
    font-family: var(--mono);
    font-size: 0.64rem;
}

.platform-icon {
    height: 36px;
    min-width: 42px;
    padding: 0 10px;
    border: 1px solid var(--terminal-line);
    border-radius: 7px;
    background: var(--terminal-raised);
    color: var(--terminal-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.platform-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.icon-divider {
    width: 1px;
    height: 14px;
    background: var(--terminal-line);
}

.windows-icon {
    color: #c8a4f1;
}

.command-box {
    min-height: 72px;
    padding: 10px 10px 10px 16px;
    border: 1px solid var(--terminal-line);
    border-radius: 12px;
    background: var(--terminal-canvas);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.command-prompt {
    color: #c188eb;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 800;
}

.command-box code {
    min-width: 0;
    color: #d7c7e8;
    font-family: var(--mono);
    font-size: clamp(0.67rem, 0.8vw, 0.73rem);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.copy-button {
    height: 44px;
    min-width: 86px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    background: var(--terminal-raised);
    color: var(--terminal-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 650;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.copy-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.copy-button:hover {
    border-color: rgba(179, 91, 232, 0.52);
    background: rgba(138, 78, 209, 0.16);
    color: #e2cafa;
    transform: translateY(-1px);
}

.copy-button.is-copied {
    border-color: rgba(76, 154, 114, 0.68);
    background: rgba(76, 154, 114, 0.14);
    color: #8cd0aa;
}

.copy-button.copy-error {
    border-color: var(--error);
    background: rgba(200, 90, 90, 0.12);
    color: #e58e8e;
}

.install-note {
    padding: 16px 28px;
    border-top: 1px solid var(--terminal-line);
    color: var(--terminal-muted);
    font-family: var(--mono);
    font-size: 0.62rem;
    line-height: 1.65;
}

.install-note::before {
    content: "i";
    width: 18px;
    height: 18px;
    margin-right: 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #c8c4cf;
    display: inline-grid;
    place-items: center;
    font-family: Georgia, serif;
    font-size: 0.68rem;
    font-weight: 700;
}

footer {
    min-height: 70px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.footer-line {
    width: 30px;
    height: 1px;
    background: var(--line);
}

.copy-announcement {
    position: fixed;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

:focus-visible {
    outline: 3px solid rgba(138, 78, 209, 0.58);
    outline-offset: 4px;
}

@media (max-width: 1080px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 68px;
    }

    .hero-copy {
        max-width: 720px;
    }

    .install-panel {
        max-width: 760px;
    }
}

@media (max-width: 640px) {
    .topbar,
    main,
    footer {
        width: min(100% - 28px, 1180px);
    }

    .topbar {
        min-height: 72px;
        gap: 14px;
    }

    .brand {
        gap: 9px;
        font-size: 0.96rem;
    }

    .brand-mark {
        width: 40px;
        height: 30px;
    }

    .product-link {
        height: 40px;
        padding: 0 9px;
        font-size: 0.7rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .hero {
        min-height: auto;
        padding: 52px 0 72px;
        gap: 56px;
    }

    .eyebrow {
        margin-bottom: 23px;
        font-size: 0.61rem;
    }

    h1 {
        font-size: clamp(2.9rem, 12.8vw, 3.2rem);
        letter-spacing: -0.045em;
        line-height: 1.01;
    }

    .hero-description {
        margin-top: 25px;
        font-size: 0.94rem;
        line-height: 1.8;
    }

    .capability-list {
        gap: 6px;
    }

    .capability-list li {
        font-size: 0.72rem;
    }

    .install-panel::before {
        inset: 10px -7px -9px 9px;
    }

    .panel-header {
        min-height: 104px;
        padding: 22px 19px 20px;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .panel-header h2 {
        font-size: 1.95rem;
    }

    .process-rail {
        min-height: 82px;
        padding: 17px 19px 15px;
    }

    .process-rail li {
        font-size: 0.52rem;
    }

    .process-rail li:not(:last-child)::after {
        width: calc(100% - 24px);
    }

    .platform {
        padding: 21px 19px 23px;
    }

    .command-box {
        min-height: 124px;
        padding: 14px;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .command-box code {
        padding-top: 1px;
        font-size: 0.68rem;
    }

    .copy-button {
        grid-column: 2;
        min-width: 90px;
        justify-self: end;
    }

    .install-note {
        padding: 15px 19px;
    }

    footer {
        min-height: 80px;
        line-height: 1.5;
    }

    .footer-line {
        width: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
