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

:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-2: #1c2333;
    --border: #30363d;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --accent: #58a6ff;
    --accent-glow: rgba(88, 166, 255, .15);
    --green: #3fb950;
    --green-dim: rgba(63, 185, 80, .15);
    --yellow: #d29922;
    --yellow-dim: rgba(210, 153, 34, .15);
    --red: #f85149;
    --red-dim: rgba(248, 81, 73, .15);
    --purple: #bc8cff;
    --radius: 12px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
    --glass: rgba(22, 27, 34, .6);
    --glass-border: rgba(48, 54, 61, .5);
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ── Animated Dot Grid Background ── */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(88, 166, 255, .07) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 100%);
    pointer-events: none;
}

/* ── Floating Glow Orbs ── */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    transition: transform .3s ease-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(88, 166, 255, .08);
    top: -150px;
    left: -100px;
    animation: orbDrift1 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(188, 140, 255, .06);
    bottom: -100px;
    right: -100px;
    animation: orbDrift2 25s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(63, 185, 80, .04);
    top: 50%;
    left: 50%;
    animation: orbDrift3 18s ease-in-out infinite;
}

@keyframes orbDrift1 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(60px, 40px);
    }

    66% {
        transform: translate(-30px, 60px);
    }
}

@keyframes orbDrift2 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(-40px, -30px);
    }

    66% {
        transform: translate(50px, -20px);
    }
}

@keyframes orbDrift3 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-40px, 30px);
    }
}

/* ── Keyframes ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .5;
        transform: scale(.8);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes typeWriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: var(--glass-border);
    }

    50% {
        border-color: rgba(88, 166, 255, .3);
    }
}

/* ── Nav ── */
nav {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    animation: fadeIn .5s ease;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: color .2s, gap .2s;
}

.back-link:hover {
    color: var(--accent);
    gap: 12px;
}

.nav-badge {
    font-family: var(--mono);
    font-size: .7rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(88, 166, 255, .2);
    font-weight: 600;
}

/* ── Hero ── */
.hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 32px 80px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--accent-glow);
    border: 1px solid rgba(88, 166, 255, .2);
    margin-bottom: 32px;
    animation: fadeUp .6s ease;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.05;
    margin-bottom: 24px;
    color: var(--text);
    animation: fadeUp .6s ease .1s backwards;
}

.accent-text {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    max-width: 520px;
    font-size: 1.1rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 40px;
    animation: fadeUp .6s ease .2s backwards;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 60px;
    animation: fadeUp .6s ease .3s backwards;
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #7c6cff);
    border: none;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .3s;
    position: relative;
    overflow: hidden;
}

.launch-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(88, 166, 255, .35), 0 0 0 1px rgba(88, 166, 255, .2);
}

.launch-btn:active {
    transform: translateY(0) scale(.97);
}

.secondary-btn {
    padding: 14px 28px;
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: color .2s, border-color .2s, background .2s;
}

.secondary-btn:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* ── Hero Preview (fake terminal) ── */
.hero-preview {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .03) inset;
    animation: fadeUp .7s ease .4s backwards, borderGlow 4s ease-in-out infinite;
}

.preview-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, .2);
    border-bottom: 1px solid var(--glass-border);
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.preview-dots span:nth-child(1) {
    background: var(--red);
    opacity: .7;
}

.preview-dots span:nth-child(2) {
    background: var(--yellow);
    opacity: .7;
}

.preview-dots span:nth-child(3) {
    background: var(--green);
    opacity: .7;
}

.preview-url {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: .78rem;
}

.preview-method {
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--green-dim);
    color: var(--green);
    font-weight: 700;
    font-size: .7rem;
}

.preview-path {
    color: var(--text-dim);
}

.preview-body {
    padding: 16px 20px;
    font-family: var(--mono);
    font-size: .82rem;
    line-height: 1.8;
}

.preview-body .line {
    display: block;
}

.preview-body .indent {
    padding-left: 20px;
}

.json-brace {
    color: var(--text-dim);
}

.json-key {
    color: #79c0ff;
}

.json-colon {
    color: var(--text-dim);
}

.json-string {
    color: #a5d6ff;
}

.json-comma {
    color: var(--text-dim);
}

/* ── Features Section ── */
.features {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 32px 60px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 48px;
}

.section-label span {
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-dim);
    white-space: nowrap;
}

.label-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* ── Feature Cards Grid ── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    position: relative;
    padding: 28px 24px;
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    transition: transform .3s, border-color .3s, box-shadow .3s;
    opacity: 0;
    transform: translateY(24px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .5s ease, transform .5s ease, border-color .3s, box-shadow .3s;
}

/* Stagger the card reveals */
.feature-card:nth-child(1).visible {
    transition-delay: 0s, 0s, 0s, 0s;
}

.feature-card:nth-child(2).visible {
    transition-delay: .08s, .08s, 0s, 0s;
}

.feature-card:nth-child(3).visible {
    transition-delay: .16s, .16s, 0s, 0s;
}

.feature-card:nth-child(4).visible {
    transition-delay: .24s, .24s, 0s, 0s;
}

.feature-card:nth-child(5).visible {
    transition-delay: .32s, .32s, 0s, 0s;
}

.feature-card:nth-child(6).visible {
    transition-delay: .4s, .4s, 0s, 0s;
}

.feature-card::before {
    content: attr(data-step);
    position: absolute;
    top: 12px;
    right: 14px;
    font-family: var(--mono);
    font-size: .65rem;
    font-weight: 700;
    color: var(--border);
    transition: color .3s;
}

.feature-card:hover {
    border-color: rgba(88, 166, 255, .3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3), 0 0 0 1px rgba(88, 166, 255, .05) inset;
    transform: translateY(-4px);
}

.feature-card:hover::before {
    color: var(--accent);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-glow);
    color: var(--accent);
    margin-bottom: 16px;
    transition: transform .3s, background .3s;
}

.feature-card:hover .card-icon {
    transform: scale(1.1);
    background: rgba(88, 166, 255, .2);
}

.feature-card h3 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: .85rem;
    color: var(--text-dim);
    line-height: 1.65;
}

.feature-card code {
    font-family: var(--mono);
    font-size: .78rem;
    padding: 2px 7px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--accent);
}

.feature-card kbd {
    font-family: var(--mono);
    font-size: .74rem;
    padding: 2px 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    box-shadow: 0 1px 0 var(--border);
}

.feature-card strong {
    color: var(--text);
    font-weight: 600;
}

/* Method tags */
.tag {
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-block;
}

.tag.get {
    background: var(--green-dim);
    color: var(--green);
}

.tag.post {
    background: var(--yellow-dim);
    color: var(--yellow);
}

.tag.put {
    background: rgba(88, 166, 255, .12);
    color: var(--accent);
}

.tag.patch {
    background: rgba(188, 140, 255, .12);
    color: var(--purple);
}

.tag.delete {
    background: var(--red-dim);
    color: var(--red);
}

/* ── CTA Section ── */
.cta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 40px 32px 100px;
}

.cta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 48px 60px;
    border-radius: 16px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .3);
}

.cta-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.cta-card p {
    font-size: .95rem;
    color: var(--text-dim);
    max-width: 360px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .cta-card {
        padding: 36px 28px;
    }
}

@media (max-width: 500px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 20px 50px;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .tagline {
        font-size: .95rem;
    }

    .features {
        padding: 50px 20px 40px;
    }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d444d;
}