/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    --color-bg:        #0a0e1a;
    --color-bg-alt:    #0d1120;
    --color-surface:   rgba(255, 255, 255, 0.04);
    --color-border:    rgba(255, 255, 255, 0.08);
    --color-cyan:      #00d4ff;
    --color-cyan-dim:  #0099cc;
    --color-cyan-glow: rgba(0, 212, 255, 0.15);
    --color-text:      #e2e8f0;
    --color-text-muted:#94a3b8;
    --color-white:     #ffffff;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --nav-height: 64px;
    --max-width:  1200px;
    --section-py: 96px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ============================================================
   Utility
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: 24px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-cyan);
    color: #000e1a;
}

.btn-primary:hover {
    background: #33ddff;
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
    transform: translateY(-1px);
}

/* ============================================================
   Navigation
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--color-border);
}

.nav-inner {
    max-width: var(--max-width);
    height: 100%;
    margin-inline: auto;
    padding-inline: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--color-white);
}

.logo-dot {
    color: var(--color-cyan);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links li a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.nav-links li a:hover {
    color: var(--color-white);
}

.nav-links .nav-cta {
    padding: 8px 20px;
    background: var(--color-cyan);
    color: #000e1a;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-left: 8px;
}

.nav-links .nav-cta:hover {
    background: #33ddff;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('images/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 14, 26, 0.55) 0%,
        rgba(10, 14, 26, 0.70) 60%,
        rgba(10, 14, 26, 0.95) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    padding: 0 24px;
    animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.08);
    color: var(--color-cyan);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(226, 232, 240, 0.78);
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   Features
   ============================================================ */
.features {
    padding: var(--section-py) 0;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--color-white);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 520px;
    margin-inline: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.08);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--color-cyan-glow);
    border: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-cyan);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 10px;
}

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

/* ============================================================
   Code Section
   ============================================================ */
.code-section {
    padding: var(--section-py) 0;
    background: var(--color-bg);
}

.code-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 64px;
    align-items: center;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-cyan);
    margin-bottom: 16px;
}

.code-text p {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-top: 16px;
}

.code-cta {
    margin-top: 32px;
}

.code-block-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.code-block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #111827;
    border-bottom: 1px solid var(--color-border);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green  { background: #28c840; }

.code-filename {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.code-block {
    margin: 0;
    padding: 28px;
    background: #0d1117;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.75;
    tab-size: 2;
}

/* YAML syntax highlight tokens */
.y-key    { color: #79c0ff; }
.y-colon  { color: #8b949e; }
.y-string { color: #a5d6ff; }
.y-dash   { color: #8b949e; }
.y-expr   { color: #ffa657; font-style: italic; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-white);
}

/* ============================================================
   Responsive — Tablet (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
    :root {
        --section-py: 72px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .code-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .code-text {
        text-align: center;
    }

    .code-cta {
        justify-content: center;
    }
}

/* ============================================================
   Responsive — Mobile (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {
    :root {
        --section-py: 56px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(10, 14, 26, 0.97);
        border-bottom: 1px solid var(--color-border);
        padding: 16px 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li a {
        display: block;
        padding: 12px 24px;
    }

    .nav-links .nav-cta {
        margin: 8px 24px 0;
        text-align: center;
    }

    .nav-toggle {
        display: block;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        letter-spacing: -0.5px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
