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

:root {
    /* ── Brand ── */
    --accent: #d24441;
    --background: #473335;
    --success: #3ccd6c;

    /* ── Derived surfaces ── */
    --bg: #1a1113;
    --bg-2: #221618;
    --bg-3: #2c1b1d;
    --surface: #3a2224;
    --border: #5a2e31;

    /* ── Accent aliases ── */
    --red: var(--accent);
    --red-bright: var(--accent);
    --red-muted: #a63331;
    --red-dim: #7a2725;

    /* ── Pixel corner ── */
    --pixel-color: var(--accent);
    --pixel-opacity-hi: 0.75;
    --pixel-opacity-mid: 0.35;
    --pixel-opacity-lo: 0.15;

    /* ── Text ── */
    --text: #e8d4d0;
    --text-2: #b89894;
    --text-3: #7a5450;

    /* ── Fonts ── */
    --mono: "JetBrains Mono", monospace;
    --sans: "Instrument Sans", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── PIXEL CORNER DECORATION ── */
.pixel-corner {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}
.pixel-corner--tl {
    top: 0;
    left: 0;
}
.pixel-corner--tr {
    top: 0;
    right: 0;
    transform: scaleX(-1);
}
.pixel-corner--bl {
    bottom: 0;
    left: 0;
    transform: scaleY(-1);
}
.pixel-corner--br {
    bottom: 0;
    right: 0;
    transform: scale(-1);
}

@media (max-width: 640px) {
    .pixel-corner--bl,
    .pixel-corner--br {
        display: none;
    }
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    border-bottom: 1px solid transparent;
    transition:
        border-color 0.3s,
        background 0.3s;
}
nav.scrolled {
    background: rgba(30, 18, 19, 0.92);
    backdrop-filter: blur(12px);
    border-color: var(--border);
}
.nav-logo {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--red-bright);
    letter-spacing: 0.04em;
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--text);
}
.nav-cta {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--red-bright);
    text-decoration: none;
    border: 1px solid var(--red-dim);
    padding: 7px 16px;
    letter-spacing: 0.06em;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-cta:hover {
    background: var(--red-dim);
    border-color: var(--red);
    color: var(--text);
}

@media (max-width: 640px) {
    nav {
        padding: 14px 20px;
    }
    .nav-links {
        display: none;
    }
    .nav-cta {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 60px;
    position: relative;
}

.hero-label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards 0.1s;
}

.hero-title {
    font-family: var(--mono);
    font-size: clamp(52px, 9vw, 108px);
    font-weight: 700;
    color: var(--red-bright);
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.2s;
}

.hero-sub {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    color: var(--text-2);
    text-align: center;
    max-width: 500px;
    line-height: 1.55;
    margin-bottom: 44px;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.35s;
}
.hero-sub strong {
    color: var(--text);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 0.7s ease forwards 0.5s;
}

@media (max-width: 640px) {
    .hero {
        padding: 96px 24px 60px;
        justify-content: flex-start;
    }
    .hero-sub {
        font-size: 16px;
        max-width: 100%;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 340px;
    }
}

/* ── BUTTONS ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--bg);
    background: var(--red-bright);
    padding: 12px 24px;
    border: 1px solid var(--red-bright);
    transition: all 0.2s;
}
.btn-primary:hover {
    background: var(--red);
    border-color: var(--red);
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--text-2);
    background: transparent;
    padding: 12px 24px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.btn-secondary:hover {
    color: var(--text);
    border-color: var(--text-3);
}

/* ── TERMINAL ── */
.terminal-wrap {
    width: 100%;
    max-width: 720px;
    margin: 60px auto 0;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.65s;
}
.terminal {
    background: #0e0a0b;
    border: 1px solid var(--border);
    box-shadow:
        0 0 0 1px rgba(217, 79, 67, 0.08),
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(217, 79, 67, 0.06);
    overflow: hidden;
}
.terminal-bar {
    background: var(--bg-3);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.terminal-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface);
}
.terminal-dots span:first-child {
    background: #3a1a19;
}
.terminal-title {
    flex: 1;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    text-align: center;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.terminal-body {
    padding: 22px 28px 26px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.75;
    overflow-x: auto;
}
.t-prompt {
    color: var(--text-3);
}
.t-cmd {
    color: var(--text-2);
}
.t-blank {
    display: block;
    height: 10px;
}

.t-header-bar {
    display: inline-block;
    background: var(--surface);
    padding: 3px 12px;
    margin-bottom: 2px;
    color: var(--red-bright);
    font-weight: 700;
    letter-spacing: 0.08em;
}
.t-header-sub {
    display: inline-block;
    background: var(--surface);
    padding: 3px 12px;
    margin-bottom: 10px;
    color: var(--text-3);
}

.t-menu-box {
    border: 1px solid var(--red-dim);
    padding: 12px 16px 14px;
    display: inline-block;
    min-width: 320px;
    margin-bottom: 12px;
}
.t-menu-item {
    display: flex;
    gap: 10px;
    line-height: 1.85;
}
.t-num {
    color: var(--red);
    font-weight: 700;
    min-width: 12px;
}
.t-dot {
    color: var(--text-3);
}
.t-item {
    color: var(--text-2);
}

.t-choose {
    color: var(--text-3);
}
.t-choose strong {
    color: var(--text-2);
    font-weight: 700;
}

.t-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--red-bright);
    vertical-align: middle;
    animation: blink 1.1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@media (max-width: 640px) {
    .terminal-wrap {
        margin-top: 36px;
    }
    .terminal-body {
        padding: 16px 14px 20px;
        font-size: 11px;
    }
    .t-prompt {
        display: none;
    }
    .t-menu-box {
        min-width: 0;
        width: 100%;
        display: block;
    }
}

/* ── DIVIDER ── */
.divider {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border: none;
    border-top: 1px solid var(--surface);
}

/* ── SECTIONS ── */
section {
    padding: 100px 40px;
    max-width: 960px;
    margin: 0 auto;
}

.section-label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-body {
    font-size: 17px;
    color: var(--text-2);
    max-width: 560px;
    line-height: 1.7;
}

@media (max-width: 640px) {
    section {
        padding: 64px 24px;
    }
    .section-body {
        font-size: 15px;
        max-width: 100%;
    }
}

/* ── FEATURES GRID ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--surface);
    border: 1px solid var(--surface);
    margin-top: 60px;
}
.feature-card {
    background: var(--bg);
    padding: 32px 28px;
    transition: background 0.2s;
}
.feature-card:hover {
    background: var(--bg-2);
}

.feature-icon {
    font-family: var(--mono);
    font-size: 20px;
    color: var(--red);
    margin-bottom: 14px;
    display: block;
}
.feature-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.feature-desc {
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.65;
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
        margin-top: 40px;
    }
    .feature-card {
        padding: 24px 20px;
    }
}

/* ── HOW IT WORKS ── */
.steps {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid var(--surface);
    align-items: start;
}
.step:first-child {
    border-top: 1px solid var(--surface);
}
.step-num {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--red);
    padding-top: 2px;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.step-desc {
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.65;
}
.step-code {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--red-bright);
    background: var(--bg-3);
    border: 1px solid var(--border);
    padding: 2px 8px;
    margin-top: 8px;
    word-break: break-all;
}

@media (max-width: 640px) {
    .steps {
        margin-top: 40px;
    }
    .step {
        grid-template-columns: 36px 1fr;
        gap: 16px;
        padding: 22px 0;
    }
    .step-num {
        font-size: 12px;
    }
    .step-code {
        font-size: 11px;
    }
}

/* ── DATA SECTION ── */
.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 60px;
}

.data-card {
    border: 1px solid var(--surface);
    padding: 28px;
    background: var(--bg-2);
}
.data-card-head {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 14px;
    font-weight: 700;
}
.data-card-body {
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.7;
}
.data-card-body strong {
    color: var(--text-2);
    font-weight: 600;
}

@media (max-width: 640px) {
    .data-grid {
        grid-template-columns: 1fr;
        gap: 1px;
        background: var(--surface);
        margin-top: 40px;
    }
    .data-card {
        padding: 22px 20px;
    }
}

/* ── INSTALL ── */
.install-section {
    background: var(--bg-2);
    border-top: 1px solid var(--surface);
    border-bottom: 1px solid var(--surface);
}
.install-section section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.code-block {
    background: #0e0a0b;
    border: 1px solid var(--border);
    padding: 20px 22px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 2;
    margin-top: 24px;
    overflow-x: auto;
}
.code-line {
    display: flex;
    gap: 12px;
}
.code-prompt {
    color: var(--red-dim);
    user-select: none;
    flex-shrink: 0;
}
.code-text {
    color: var(--text-2);
    word-break: break-all;
}
.code-comment {
    color: var(--text-3);
}

@media (max-width: 768px) {
    .install-section section {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 640px) {
    .install-section section {
        padding: 64px 24px;
    }
    .code-block {
        font-size: 11.5px;
        padding: 16px;
    }
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--surface);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-logo {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--red-dim);
    text-decoration: none;
}
.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
    flex-wrap: wrap;
}
.footer-links a {
    font-size: 13px;
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--text-2);
}
.footer-note {
    font-size: 12px;
    font-family: var(--mono);
    color: var(--text-3);
}

@media (max-width: 640px) {
    footer {
        padding: 28px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .footer-links {
        gap: 16px;
    }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.65s ease,
        transform 0.65s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── BADGES ── */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.badge {
    font-family: var(--mono);
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    color: var(--text-3);
    letter-spacing: 0.06em;
    background: var(--bg-3);
}
.badge-red {
    border-color: var(--red-dim);
    color: var(--red);
    background: rgba(217, 79, 67, 0.06);
}

/* scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border);
}
