/* ============================================
   HumanRail — Marketing Site Styles
   ============================================ */

:root {
    --bg: #09090b;
    --bg-elevated: #111113;
    --bg-card: #18181b;
    --bg-card-hover: #1e1e22;
    --border: #27272a;
    --border-light: #3f3f46;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --purple: #a855f7;
    --blue: #3b82f6;
    --green: #22c55e;
    --amber: #f59e0b;
    --rose: #f43f5e;
    --indigo: #6366f1;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --max-w: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---- Nav ---- */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
    border-bottom: 1px solid transparent;
}

#nav.scrolled {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.nav-cta:hover { background: var(--primary-hover); }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 24px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 32px rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- Hero ---- */
.hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 160px 24px 80px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-hover);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 50%, var(--rose) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

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

.hero-code {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: left;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.code-lang {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--mono);
}

.hero-code pre {
    padding: 20px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.7;
}

.hero-code code, .code-block code {
    font-family: var(--mono);
    color: #e4e4e7;
}

.kw { color: #c084fc; }
.fn { color: #60a5fa; }
.str { color: #4ade80; }
.num { color: #fbbf24; }
.cm { color: #52525b; }
.var { color: #f472b6; }

/* ---- Logos ---- */
.logos-section {
    text-align: center;
    padding: 40px 24px 60px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.logos-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.logos-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.logo-pill {
    padding: 8px 20px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---- Sections ---- */
.section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 100px 24px;
}

.section-dark {
    max-width: none;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-dark > * {
    max-width: var(--max-w);
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 56px;
}

/* ---- Steps (How It Works) ---- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: border-color 0.2s, transform 0.2s;
}

.step-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.step-num {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-glow);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    color: var(--primary-hover);
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon.purple { background: rgba(168, 85, 247, 0.12); color: var(--purple); }
.feature-icon.blue { background: rgba(59, 130, 246, 0.12); color: var(--blue); }
.feature-icon.green { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.feature-icon.amber { background: rgba(245, 158, 11, 0.12); color: var(--amber); }
.feature-icon.rose { background: rgba(244, 63, 94, 0.12); color: var(--rose); }
.feature-icon.indigo { background: rgba(99, 102, 241, 0.12); color: var(--indigo); }

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

/* ---- Pricing ---- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.price-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: border-color 0.2s, transform 0.2s;
}

.price-card:hover {
    transform: translateY(-2px);
}

.price-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 40px var(--primary-glow);
}

.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.price-tier {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.price-amount {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.price-unit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.price-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.price-features {
    list-style: none;
    margin-bottom: 28px;
}

.price-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* ---- SDK Tabs ---- */
.sdk-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    max-width: 360px;
    margin: 0 auto 32px;
}

.sdk-tab {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sdk-tab.active {
    background: var(--primary);
    color: white;
}

.sdk-tab:hover:not(.active) {
    color: var(--text);
}

.sdk-panels { max-width: 740px; margin: 0 auto; }

.sdk-panel { display: none; }
.sdk-panel.active { display: block; }

.code-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
}

.code-block .code-header {
    padding: 10px 16px;
}

.code-step {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
}

.code-block pre {
    padding: 16px 20px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.7;
}

/* ---- CTA ---- */
.cta-section {
    text-align: center;
    padding: 100px 24px 120px;
    max-width: var(--max-w);
    margin: 0 auto;
}

.cta-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.cta-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 36px;
}

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

/* ---- Footer ---- */
footer {
    border-top: 1px solid var(--border);
    padding: 60px 24px 32px;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-tagline {
    color: var(--text-dim);
    font-size: 0.88rem;
    margin-top: 12px;
}

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

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.footer-domains {
    display: flex;
    gap: 20px;
}

.footer-domains a {
    color: var(--text-dim);
    transition: color 0.2s;
}

.footer-domains a:hover { color: var(--text-muted); }

/* ---- Mobile ---- */
@media (max-width: 1024px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(9, 9, 11, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

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

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

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

    .hero-code { margin: 0 -4px; }

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

    .price-card.featured { order: -1; }

    .footer-inner {
        flex-direction: column;
        gap: 36px;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
