/* Ropilot design system ----------------------------------------
 * Shared tokens, typography, buttons, pills, section scaffolding.
 * Each page imports this then layers its own page-specific styles.
 * -------------------------------------------------------------- */

:root {
    --bg:           #08080A;
    --bg-raised:    #0E0E11;
    --bg-elev:      #131318;
    --line:         rgba(255, 255, 255, 0.07);
    --line-strong:  rgba(255, 255, 255, 0.12);
    --ink:          #F7F7F2;
    --ink-muted:    #A1A1AA;
    --ink-subtle:   #71717A;
    --ink-faint:    #52525B;
    --accent:       #F97316;
    --accent-hover: #FB8531;
    --accent-soft:  rgba(249, 115, 22, 0.14);
    --live:         #22C55E;
    --danger:       #F87171;
    --radius-sm:    8px;
    --radius:       12px;
    --radius-lg:    16px;
    --radius-pill:  999px;
    --ease:         cubic-bezier(.2, .7, .3, 1);
    --z-nav:        100;
    --z-modal:      200;
    --z-toast:      300;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "ss02", "cv11", "tnum" 0;
    position: relative;
}

::selection { background: rgba(249, 115, 22, 0.35); color: #fff; }

:focus-visible {
    outline: 2px solid rgba(249, 115, 22, 0.7);
    outline-offset: 3px;
    border-radius: 3px;
}

h1, h2, h3, .section-title, .final-title { text-wrap: balance; }
p, .section-lede { text-wrap: pretty; }

a { color: inherit; }

/* Background layers ------------------------------------- */
.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 0%, transparent 75%);
}

.bg-hero-glow {
    position: fixed; z-index: 0; pointer-events: none;
    top: -10%; left: 50%; transform: translateX(-50%);
    width: 960px; height: 560px;
    background: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.18) 0%, rgba(249, 115, 22, 0.06) 35%, transparent 70%);
    filter: blur(60px);
}

.bg-noise {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main, footer { position: relative; z-index: 1; }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Eyebrow / labels --------------------------------------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 28px;
}

.eyebrow .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 0 12px rgba(34, 197, 94, 0.5);
}

.eyebrow .sep { color: var(--ink-faint); }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.kicker::before,
.kicker::after {
    content: '';
    width: 18px; height: 1px; background: currentColor; opacity: 0.4;
}

/* Section scaffolding ---------------------------------- */
.section-divider { border-top: 1px solid var(--line); }

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.section-title {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 12px;
}

.section-title em,
.serif-italic {
    font-family: inherit;
    font-weight: inherit;
    font-style: normal;
    letter-spacing: inherit;
    color: inherit;
}

.section-lede {
    color: var(--ink-muted);
    font-size: 1rem;
    line-height: 1.65;
}

/* Buttons ---------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
    font-weight: 550;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.2s var(--ease);
    white-space: nowrap;
}

.btn:active { transform: translateY(0) scale(0.985); transition-duration: 0.08s; }
.btn svg { width: 16px; height: 16px; flex: 0 0 16px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--ink);
    color: #0A0A0A;
    border-color: var(--ink);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 10px 40px -12px rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 16px 46px -12px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 10px 40px -12px rgba(249, 115, 22, 0.6);
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.24) inset,
        0 16px 46px -10px rgba(249, 115, 22, 0.7);
}

.btn-ghost {
    background: transparent;
    color: var(--ink-muted);
    border-color: transparent;
}

.btn-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }

.btn-sm { padding: 9px 14px; font-size: 0.82rem; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }

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

/* Pills ------------------------------------------------ */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.pill:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.pill svg { width: 14px; height: 14px; color: #D4D4D8; transition: color 0.15s var(--ease); }
.pill:hover svg { color: var(--ink); }

.pill-row {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Surfaces --------------------------------------------- */
.surface {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.surface:hover {
    border-color: var(--line-strong);
    background: var(--bg-elev);
}

.surface-flat {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* Link micro -------------------------------------------- */
.ltr-link {
    display: inline-block;
    color: var(--ink-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.15s var(--ease);
}

.ltr-link:hover { color: var(--ink); }

.ltr-link::after {
    content: '→';
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.15s var(--ease);
}

.ltr-link:hover::after { transform: translateX(3px); }

/* Reveal animations ------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(8px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); filter: blur(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }
.reveal.d6 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; filter: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* Typography helpers ----------------------------------- */
.mono {
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    font-variant-numeric: tabular-nums;
}

.tnum { font-variant-numeric: tabular-nums; }
