/* =========================================================
   OP_BIZ — shared design system
   ========================================================= */
:root {
    --bg: #050a08;
    --bg-2: #08110d;
    --card: rgba(14, 26, 20, 0.62);
    --card-solid: #0c1712;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(52, 211, 153, 0.35);
    --green: #10b981;
    --green-2: #34d399;
    --lime: #a3e635;
    --glow: rgba(16, 185, 129, 0.28);
    --text: #eef4f1;
    --muted: #93a39b;
    --dim: #5d6d65;
    --radius: 18px;
    --max: 1200px;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--green); color: #00140c; }

:focus-visible { outline: 2px solid var(--green-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Background layers ---------- */
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(52, 211, 153, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 211, 153, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}

.bg-aurora {
    position: fixed; inset: -20% 0 auto; height: 90vh; z-index: 0; pointer-events: none;
    background:
        radial-gradient(40% 50% at 20% 20%, rgba(16, 185, 129, 0.18), transparent 70%),
        radial-gradient(35% 45% at 80% 10%, rgba(163, 230, 53, 0.09), transparent 70%);
    filter: blur(40px);
    animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora { to { transform: translate3d(0, 6%, 0) scale(1.08); } }

.page { position: relative; z-index: 2; }

/* ---------- Scroll progress ---------- */
.progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 1001;
    background: linear-gradient(90deg, var(--green), var(--lime));
    transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    transition: background .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}
.site-header.scrolled {
    background: rgba(5, 10, 8, 0.72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom-color: var(--line);
}
.nav {
    max-width: var(--max); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.5rem; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.5px; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: #fff; box-shadow: 0 0 0 1px var(--line-strong), 0 0 18px var(--glow);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.brand b { color: var(--green-2); font-weight: inherit; }

.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links a {
    text-decoration: none; color: var(--muted); font-size: .92rem; font-weight: 500;
    padding: .5rem .85rem; border-radius: 999px; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-cta { display: flex; align-items: center; gap: .6rem; }

.menu-btn {
    display: none; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
    width: 44px; height: 44px; border-radius: 12px; cursor: pointer; place-items: center;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
    display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
    position: relative; transition: transform .3s var(--ease), background .3s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
    --b: var(--green);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .85rem 1.5rem; border-radius: 999px; border: 0; cursor: pointer;
    font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap;
    color: #00170d; background: linear-gradient(135deg, var(--green-2), var(--green));
    box-shadow: 0 8px 30px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform .25s var(--ease), box-shadow .25s;
    overflow: hidden; isolation: isolate;
}
.btn::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn:hover::after { transform: translateX(120%); }
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn-ghost {
    color: var(--text); background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 10px 30px -12px var(--glow); color: var(--green-2); }
.btn-sm { padding: .6rem 1.1rem; font-size: .88rem; }
.btn-block { width: 100%; }

/* ---------- Layout ---------- */
.section { position: relative; max-width: var(--max); margin: 0 auto; padding: 6.5rem 1.5rem; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--green-2); padding: .35rem .8rem; border-radius: 999px;
    background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2);
    margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 10px var(--green-2); }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; }
.h2 { font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 700; }
.lead { color: var(--muted); font-size: 1.1rem; margin-top: 1rem; }
.grad {
    background: linear-gradient(100deg, var(--green-2) 10%, var(--lime) 60%, var(--green-2) 90%);
    background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

/* ---------- Cards ---------- */
.card {
    position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: border-color .3s, transform .4s var(--ease), box-shadow .4s;
}
/* cursor spotlight (set --mx/--my via JS) */
.spot::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(52, 211, 153, 0.12), transparent 45%);
    transition: opacity .3s;
}
.spot:hover::before { opacity: 1; }
.spot:hover { border-color: rgba(52, 211, 153, 0.28); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Toggle (pill tabs) ---------- */
.pill-tabs {
    position: relative; display: inline-flex; padding: .3rem; border-radius: 999px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.pill-tabs button {
    position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
    padding: .65rem 1.3rem; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted);
    transition: color .3s; white-space: nowrap;
}
.pill-tabs button.active { color: #00170d; }
.pill-tabs .pill-ind {
    position: absolute; z-index: 0; top: .3rem; bottom: .3rem; left: 0; border-radius: 999px;
    background: linear-gradient(135deg, var(--green-2), var(--green));
    box-shadow: 0 6px 20px -6px var(--glow);
    transition: transform .45s var(--ease), width .45s var(--ease);
}

/* ---------- Rocket toggle ---------- */
.fx-toggle {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 900;
    display: flex; align-items: center; gap: .5rem; cursor: pointer;
    padding: .55rem 1rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    background: rgba(8, 17, 13, 0.85); border: 1px solid var(--line); color: var(--muted);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: border-color .3s, color .3s, transform .3s var(--ease);
}
.fx-toggle:hover { border-color: var(--line-strong); color: var(--text); transform: translateY(-2px); }
.fx-toggle svg { width: 16px; height: 16px; stroke: var(--green-2); }
.fx-toggle.off { opacity: .6; }
.fx-toggle.off svg { stroke: var(--dim); }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--line); margin-top: 2rem; }
.footer-inner {
    max-width: var(--max); margin: 0 auto; padding: 3.5rem 1.5rem 2.5rem;
    display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem;
}
.footer-inner p { color: var(--muted); font-size: .92rem; max-width: 320px; margin-top: .9rem; }
.footer-col h4 { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; font-weight: 500; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; font-size: .92rem; padding: .25rem 0; transition: color .2s; }
.footer-col a:hover { color: var(--green-2); }
.footer-bottom {
    max-width: var(--max); margin: 0 auto; padding: 1.25rem 1.5rem 2rem; border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--dim); font-size: .82rem;
}
.status-dot { display: inline-flex; align-items: center; gap: .45rem; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 1.5rem; z-index: 2000;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    background: var(--card-solid); border: 1px solid var(--line-strong); color: var(--text);
    padding: .75rem 1.2rem; border-radius: 12px; font-size: .9rem; font-weight: 600;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7), 0 0 30px -10px var(--glow);
    transition: opacity .3s, transform .4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .menu-btn { display: grid; }
    .nav-cta .btn { display: none; }
    .nav-links {
        position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch; gap: .25rem;
        padding: 1rem 1.25rem 1.5rem; background: rgba(5, 10, 8, 0.97); border-bottom: 1px solid var(--line);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .35s var(--ease);
    }
    .nav-links a { padding: .9rem 1rem; font-size: 1.05rem; border-radius: 12px; }
    .nav-links .btn { display: flex; margin-top: .75rem; }
    .menu-open .nav-links { transform: none; opacity: 1; visibility: visible; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-inner > :first-child { grid-column: 1 / -1; }
}
@media (min-width: 901px) { .nav-links .btn { display: none; } }
@media (max-width: 640px) {
    .section { padding: 4.5rem 1rem; }
    .nav { padding: .85rem 1rem; }
    .fx-toggle { padding: 0; width: 44px; height: 44px; justify-content: center; right: 1rem; bottom: 1rem; }
    .fx-toggle span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
