/* ===========================================================
   Landing Page Styles -- AuraGuardian Homepage
   =========================================================== */

:root {
    --surface-0: #151414;
    --surface-1: #181818;
    --surface-2: #222121;
    --surface-3: #2a2828;
    --accent: #f0b90b;
    --accent-hover: #f5cc3a;
    --accent-muted: rgba(240, 185, 11, 0.08);
    --accent-glow: rgba(240, 185, 11, 0.2);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --fg-100: #ffffff;
    --fg-200: #ffffff;
    --fg-300: #f0ebde;
    --fg-400: #6b7280;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--surface-0);
    color: var(--fg-200);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

code,
pre,
.mono {
    font-family: var(--mono);
}

/* --- Grid Background --- */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* --- Primitive row hover --- */
.prim-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    margin: 0 -14px 4px;
    border-radius: 8px;
    transition: background .2s;
    cursor: default;
}

.prim-row svg {
    transition: stroke .2s, fill .2s;
}

.prim-row:last-child {
    margin-bottom: 0;
}

.prim-row:hover {
    background: rgba(240, 185, 11, 0.06);
}

.prim-row:hover svg [stroke] {
    stroke: var(--accent);
}

.prim-row:hover svg {
    stroke: var(--accent);
}

/* --- Pricing CTA buttons --- */
.pricing-cta {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-radius: 8px;
    font: 600 13px/1 var(--sans);
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--fg-100);
    background: transparent;
    transition: all .2s;
}

.pricing-cta:hover {
    border-color: var(--fg-300);
    background: var(--surface-2);
}

.pricing-cta.featured {
    border-color: var(--accent);
    color: #000;
    background: var(--accent);
}

.pricing-cta.featured:hover {
    background: var(--accent-hover);
}

/* --- Billing toggle --- */
.billing-bar {
    display: inline-flex;
    align-items: center;
    position: relative;
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 4px;
    background: var(--surface-1);
}

.billing-slider {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    border-radius: 40px;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(240, 185, 11, .25);
    transition: left .4s cubic-bezier(.4, 0, .2, 1),
        width .4s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
    z-index: 0;
}

.billing-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border-radius: 40px;
    font: 600 13px/1 var(--sans);
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--fg-300);
    position: relative;
    z-index: 1;
    transition: color .3s cubic-bezier(.4, 0, .2, 1),
        transform .15s cubic-bezier(.4, 0, .2, 1);
}

.billing-tab:hover:not(.active) {
    color: var(--fg-100);
}

.billing-tab:active {
    transform: scale(.97);
}

.billing-tab.active {
    color: #000;
}

/* --- Guardrail Pair (inner at content edge, outer 108px out) --- */
.grid-line-v {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    border: none;
    background: repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.10) 0px,
            rgba(255, 255, 255, 0.10) 10px,
            transparent 10px,
            transparent 24px);
    z-index: 1;
    pointer-events: none;
}

/* Inner pair --- flush with content edges (absolute, stops at main) */
.grid-line-v.inner-left {
    left: calc(50% - 600px);
}

.grid-line-v.inner-right {
    right: calc(50% - 600px);
}

/* Outer pair --- fixed, runs full page height */
.grid-line-v.outer-left {
    position: fixed;
    left: calc(50% - 740px);
}

.grid-line-v.outer-right {
    position: fixed;
    right: calc(50% - 740px);
}

/* Subtle dot fill between each guardrail pair */
.guardrail-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 139px;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 12px 12px;
}

.guardrail-fill.left {
    left: calc(50% - 739px);
}

.guardrail-fill.right {
    right: calc(50% - 739px);
}

@media (max-width: 1480px) {
    .grid-line-v.inner-left {
        left: 24px;
    }

    .grid-line-v.inner-right {
        right: 24px;
    }

    .grid-line-v.outer-left {
        left: 0;
    }

    .grid-line-v.outer-right {
        right: 0;
    }

    .guardrail-fill.left {
        left: 1px;
        width: 22px;
    }

    .guardrail-fill.right {
        right: 1px;
        width: 22px;
    }
}

@media (max-width: 768px) {

    .grid-line-v,
    .guardrail-fill {
        display: none;
    }
}

/* --- Shell --- */
.shell {
    position: relative;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

/* --- Nav --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(21, 20, 20, 0.92);
    backdrop-filter: blur(16px) saturate(1.6);
    border-bottom: none;
    background-image: repeating-linear-gradient(to right,
            rgba(255, 255, 255, 0.10) 0px,
            rgba(255, 255, 255, 0.10) 10px,
            transparent 10px,
            transparent 24px);
    background-size: 100% 1px;
    background-position: bottom;
    background-repeat: no-repeat;
}

.site-header .shell {
    width: min(1480px, calc(100% - 48px));
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: clamp(72px, 5vw, 88px);
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    height: clamp(32px, 1vw, 42px);
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-300);
}

.nav-links a {
    transition: color .2s ease;
}

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

/* Nav dropdown */
.nav-drop {
    position: relative;
}

.nav-drop>a {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-drop>a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: .5;
    transition: transform .2s;
}

.nav-drop:hover>a::after {
    transform: rotate(180deg);
}

.nav-drop-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    padding: 8px 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s, transform .2s;
    transform: translateX(-50%) translateY(8px);
    z-index: 100;
}

.nav-drop:hover .nav-drop-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-drop-menu a {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    color: var(--fg-300) !important;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.nav-drop-menu a:hover {
    background: var(--surface-1);
    color: var(--fg-100) !important;
}

.nav-drop-menu a svg {
    flex-shrink: 0;
    display: inline-block !important;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 20px;
    border: 1px solid var(--border-hover);
    border-radius: 999px;
    background: transparent;
    color: var(--fg-200);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all .25s ease;
}

.btn:hover {
    border-color: var(--accent);
    color: var(--fg-100);
    background: var(--accent-muted);
}

.btn.primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #151414;
}

.btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn.on-accent {
    border-color: rgba(255, 255, 255, .3);
    background: #fff;
    color: #151414;
}

.btn.on-accent:hover {
    box-shadow: 0 4px 20px rgba(244, 129, 32, .3);
}

.btn.on-accent-ghost {
    border-color: rgba(255, 255, 255, .25);
    background: transparent;
    color: #fff;
}

.btn.on-accent-ghost:hover {
    background: rgba(255, 255, 255, .1);
}

/* --- Toggle switches --- */
.cmd-toggle { background: var(--border-hover); }
.cmd-toggle > div { left: 2px; right: auto; }
.cmd-toggle--on { background: var(--accent) !important; }
.cmd-toggle--on > div { left: auto !important; right: 2px !important; }

/* --- Section --- */
.section {
    position: relative;
    padding: 48px 0;
}

.section-head {
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: center;
}

.section-label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 14px;
    border: 1px solid var(--accent-glow);
    border-radius: 999px;
    background: var(--accent-muted);
    color: var(--accent);
    font: 600 11px/1.6 var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.section-head h2 {
    margin: 0 0 10px;
    color: var(--fg-100);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-head p {
    margin: 0;
    color: var(--fg-300);
    font-size: 16px;
    line-height: 1.6;
    max-width: 640px;
    margin-inline: auto;
}

/* --- Hero --- */
.hero {
    padding: 140px 0 0;
    text-align: center;
}

.hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    margin: 0 0 24px;
    color: var(--fg-100);
    font-size: clamp(40px, 5.5vw, 68px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero h1 .accent-text {
    color: var(--accent);
}

.hero-desc {
    max-width: 680px;
    margin: 0 auto 36px;
    color: var(--fg-300);
    font-size: 18px;
    line-height: 1.7;
}

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

/* --- Interactive Card Grid (Enterprise bento) --- */
.bento-wrap {
    position: relative;
}

.card-grid {
    position: relative;
    display: grid;
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Stack adjacent grids seamlessly */
.card-grid+.card-grid {
    margin-top: -1px;
}

.card-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

.card-grid>.card {
    padding: 32px;
    background: var(--surface-1);
}

.bento-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 2px;
    background: var(--surface-0);
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}

/* --- Card Content --- */
.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: var(--accent-muted);
    color: var(--accent);
}

.card-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card h3 {
    margin: 0 0 8px;
    color: var(--fg-100);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.card p {
    margin: 0;
    color: var(--fg-300);
    font-size: 14px;
    line-height: 1.65;
}

/* --- Bento Illustration Cards --- */
.hero-cards {
    margin-top: 40px;
}

.illust-card {
    position: relative;
    overflow: hidden;
    cursor: default;
    padding: 0 !important;
}

#card-hivemind {
    padding: 72px 16px 72px !important;
}

@keyframes hivemind-float {

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

    50% {
        transform: translateY(-4px);
    }
}

.visitor-float {
    animation: hivemind-float 3s ease-in-out infinite;
}

.pipeline-node {
    cursor: pointer;
}

.pipeline-node .node-tooltip {
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.pipeline-node:hover .node-tooltip {
    opacity: 1;
}

#card-hivemind .card-illustration {
    height: auto;
    overflow: visible;
    padding: 0;
}

#card-hivemind .card-illustration>svg {
    width: auto;
    height: auto;
}

.card-illustration {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    overflow: hidden;
    padding: 32px;
}

.card-illustration>svg:not(.globe-bg):not(.node-bg):not(.risk-bg) {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.globe-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.node-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.illust-card .card-text {
    padding: 24px 28px 28px;
    border-top: 1px solid var(--border);
    text-align: left;
}

.hero-cards .illust-card .card-text {
    background: var(--surface-0);
}

/* SVG illustration animations */
@keyframes dash-flow {
    to {
        stroke-dashoffset: -24;
    }
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: .15;
        r: 3;
    }

    50% {
        opacity: .6;
        r: 4;
    }
}

.anim-dash {
    animation: dash-flow 2s linear infinite;
}

.anim-pulse {
    animation: pulse-dot 2.5s ease-in-out infinite;
}

/* --- Card 1 (Obsidian) hover animations --- */
/* Shield+Key: hidden by default, fade in on hover */
#card-obsidian .shield-key {
    opacity: 0;
    transition: opacity .4s ease;
}

#card-obsidian:hover .shield-key {
    opacity: 1;
}

/* Document pages: subtle grow on hover */
#card-obsidian .doc-page {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform .35s ease;
}

#card-obsidian:hover .doc-page {
    transform: scale(1.04);
}

/* Dashed arrow: static by default, animate on hover */
#card-obsidian .scramble-dash {
    animation: none;
    transition: opacity .3s ease;
}

#card-obsidian:hover .scramble-dash {
    animation: dash-flow 1.2s linear infinite;
}

#card-obsidian .scramble-arrow {
    transition: opacity .3s ease;
}

#card-obsidian:hover .scramble-arrow {
    opacity: 1;
}

/* Source lines: fill transition grey  ->  accent on hover, line by line */
#card-obsidian .src-line {
    transition: fill .4s ease;
}

#card-obsidian:hover .src-line {
    fill: var(--accent);
}

/* Output lines (strokes): stroke transition grey  ->  accent on hover */
#card-obsidian .out-line {
    transition: stroke .4s ease;
}

#card-obsidian:hover .out-line {
    stroke: var(--accent);
}

/* Staggered delays --- source lines */
#card-obsidian:hover .src-line-1 {
    transition-delay: 0s;
}

#card-obsidian:hover .src-line-2 {
    transition-delay: .07s;
}

#card-obsidian:hover .src-line-3 {
    transition-delay: .14s;
}

#card-obsidian:hover .src-line-4 {
    transition-delay: .21s;
}

#card-obsidian:hover .src-line-5 {
    transition-delay: .28s;
}

#card-obsidian:hover .src-line-6 {
    transition-delay: .35s;
}

#card-obsidian:hover .src-line-7 {
    transition-delay: .42s;
}

#card-obsidian:hover .src-line-8 {
    transition-delay: .49s;
}

/* Staggered delays --- output lines */
#card-obsidian:hover .out-line-1 {
    transition-delay: .15s;
}

#card-obsidian:hover .out-line-2 {
    transition-delay: .22s;
}

#card-obsidian:hover .out-line-3 {
    transition-delay: .29s;
}

#card-obsidian:hover .out-line-4 {
    transition-delay: .36s;
}

#card-obsidian:hover .out-line-5 {
    transition-delay: .43s;
}

#card-obsidian:hover .out-line-6 {
    transition-delay: .50s;
}

#card-obsidian:hover .out-line-7 {
    transition-delay: .57s;
}

#card-obsidian:hover .out-line-8 {
    transition-delay: .64s;
}

/* --- Card 2 (Multi-Runtime) hover animations --- */
@keyframes spin-ring {
    to {
        transform: rotate(360deg);
    }
}

@keyframes icon-grow-pulse {
    0% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1.06);
    }
}

@keyframes orbit-pulse {

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

    50% {
        transform: scale(1.04);
    }
}

/* Whole SVG subtle scale on hover */
#card-multiruntime .card-illustration svg:not(.node-bg) {
    transition: transform .4s ease;
}

#card-multiruntime:hover .card-illustration svg:not(.node-bg) {
    transform: scale(1.04);
}

/* Inner circle: always rotating */
#card-multiruntime .inner-ring {
    transform-origin: 160px 100px;
    animation: spin-ring 12s linear infinite;
}

/* Center icon: pulse once on hover, then hold (stage 1) */
#card-multiruntime .center-icon {
    transform-origin: 160px 100px;
}

#card-multiruntime:hover .center-icon {
    animation: icon-grow-pulse .6s ease-out forwards;
}

/* Orbit group (ring + dots): fade in + continuous pulse (stage 1) */
#card-multiruntime .orbit-group {
    transform-origin: 160px 100px;
    opacity: 0;
    transition: opacity .4s ease;
}

#card-multiruntime:hover .orbit-group {
    opacity: 1;
    animation: orbit-pulse 3s ease-in-out .1s infinite;
}

/* Connector lines: dashed with arrows, fade in (stage 2) */
#card-multiruntime .conn-line {
    opacity: 0;
    transition: opacity .4s ease;
}

#card-multiruntime:hover .conn-line {
    opacity: .5;
}

#card-multiruntime:hover .conn-line-1 {
    transition-delay: .2s;
}

#card-multiruntime:hover .conn-line-2 {
    transition-delay: .25s;
}

#card-multiruntime:hover .conn-line-3 {
    transition-delay: .3s;
}

#card-multiruntime:hover .conn-line-4 {
    transition-delay: .35s;
}

/* Agent boxes: full opacity from the start, no jitter */
#card-multiruntime .agent-box {
    opacity: 1;
}

/* Content swap: simultaneous crossfade (lines  ->  shield) */
#card-multiruntime .box-lines {
    transition: opacity .35s ease-in;
}

#card-multiruntime .box-shield {
    opacity: 0;
    transition: opacity .35s ease-out;
}

#card-multiruntime:hover .box-lines {
    opacity: 0;
    transition-delay: .7s;
}

#card-multiruntime:hover .box-shield {
    opacity: 1;
    transition-delay: .7s;
}

/* --- Card 3 (Risk Scoring) --- */
#card-riskscore .card-illustration {
    padding: 16px;
}

#card-riskscore .card-illustration svg:not(.risk-bg) {
    transition: transform .4s ease;
}

#card-riskscore:hover .card-illustration svg:not(.risk-bg) {
    transform: scale(1.04);
}

.risk-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

/* Block bar glow on hover (driven by JS) */
#card-riskscore:hover .bar-block-fill {
    filter: drop-shadow(0 0 8px var(--accent));
}


/* --- Pipeline Section --- */
.pipeline-stage {
    border: 1px solid var(--border);
    background: var(--surface-1);
    padding: 48px;
    overflow: hidden;
}

.pipeline-flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-bottom: 40px;
    background: var(--border);
    overflow: hidden;
}

.pipeline-node {
    text-align: center;
    padding: 24px 16px;
    background: var(--surface-0);
    transition: all .3s ease;
    cursor: default;
}

.pipeline-node:hover {
    background: var(--surface-2);
}

.pipeline-node .node-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--accent-muted);
    border: 1px solid var(--accent-glow);
    color: var(--accent);
    font: 600 12px/1 var(--mono);
}

.pipeline-node .node-label {
    display: block;
    margin-bottom: 6px;
    color: var(--accent);
    font: 600 11px/1 var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pipeline-node .node-title {
    display: block;
    color: var(--fg-200);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.pipeline-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
}

.connector-line {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--accent) 0, var(--accent) 6px, transparent 6px, transparent 12px);
    opacity: .4;
}

.connector-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .5;
    transition: opacity .3s ease, transform .3s ease;
}

.pipeline-stage:hover .connector-dot {
    opacity: 1;
    transform: scale(1.3);
}

.pipeline-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border);
    overflow: hidden;
}

.pipeline-stat {
    padding: 20px;
    background: var(--surface-0);
    text-align: center;
}

.pipeline-stat strong {
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 22px;
    font-weight: 700;
}

.pipeline-stat span {
    color: var(--fg-300);
    font-size: 13px;
}

/* --- Defense Matrix --- */
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    overflow: hidden;
}

.matrix-card {
    padding: 32px;
    background: var(--surface-1);
    transition: background .3s ease;
}

.matrix-card:hover {
    background: var(--surface-2);
}

.matrix-card .matrix-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.matrix-card .matrix-title h3 {
    margin: 0;
    color: var(--fg-100);
    font-size: 15px;
    font-weight: 600;
}

.matrix-card .matrix-title .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.matrix-card p {
    margin: 0;
    color: var(--fg-300);
    font-size: 14px;
    line-height: 1.6;
}

/* --- Deploy Section --- */
.deploy-layout {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    border: 1px solid var(--border);
    background: var(--surface-1);
    overflow: hidden;
}

.deploy-steps {
    padding: 36px;
    border-right: 1px solid var(--border);
}

.deploy-steps h3 {
    margin: 0 0 28px;
    color: var(--fg-100);
    font-size: 20px;
    font-weight: 600;
}

.step {
    position: relative;
    padding: 0 0 24px 28px;
}

.step:last-child {
    padding-bottom: 0;
}

.step::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--surface-1);
}

.step::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 20px;
    bottom: 4px;
    width: 2px;
    background: var(--border-hover);
}

.step:last-child::after {
    display: none;
}

.step strong {
    display: block;
    margin-bottom: 4px;
    color: var(--fg-100);
    font-size: 14px;
    font-weight: 600;
}

.step span {
    color: var(--fg-300);
    font-size: 13px;
    line-height: 1.5;
}

.deploy-code {
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* --- Tabs --- */
.tabset {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tabset input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.tabs label {
    cursor: pointer;
    padding: 12px 20px;
    color: var(--fg-400);
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all .2s ease;
}

.tabs label:hover {
    color: var(--fg-200);
}

#tab-php:checked~.tabs label[for="tab-php"],
#tab-node:checked~.tabs label[for="tab-node"],
#tab-python:checked~.tabs label[for="tab-python"],
#tab-wordpress:checked~.tabs label[for="tab-wordpress"],
#tab-shopify:checked~.tabs label[for="tab-shopify"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.pane {
    display: none;
}

#tab-php:checked~.code-area .php-pane,
#tab-node:checked~.code-area .node-pane,
#tab-python:checked~.code-area .python-pane,
#tab-wordpress:checked~.code-area .wordpress-pane,
#tab-shopify:checked~.code-area .shopify-pane {
    display: block;
}

.code-area {
    flex: 1;
    background: #151414;
    overflow: auto;
}

pre {
    margin: 0;
    padding: 24px;
    color: #d4d4d4;
    font: 500 13px/1.8 var(--mono);
    white-space: pre-wrap;
}

.k {
    color: #c792ea;
}

.s {
    color: #c3e88d;
}

.n {
    color: #82aaff;
}

.c {
    color: #546e7a;
}

.h {
    color: #ffcb6b;
}

.p {
    color: #c792ea;
}

/* --- Quote Band --- */
.quote-band {
    padding: 80px 0;
    background: var(--surface-1);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.quote-inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: center;
}

.quote-text {
    color: var(--fg-100);
    font-size: clamp(24px, 3.2vw, 36px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.metric-stack {
    display: grid;
    gap: 2px;
    background: var(--border);
    overflow: hidden;
}

.metric {
    padding: 20px;
    background: var(--surface-0);
}

.metric strong {
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 22px;
    font-weight: 700;
}

.metric span {
    color: var(--fg-300);
    font-size: 13px;
}

/* --- Primitives --- */
.primitives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    overflow: hidden;
}

.primitive-col {
    padding: 32px;
    background: var(--surface-1);
}

.primitive-col h3 {
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.prim-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prim-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--fg-300);
    font-size: 14px;
    transition: color .15s ease;
}

.prim-item:hover {
    color: var(--fg-100);
}

.prim-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- CTA Band --- */
.cta-band {
    padding: 80px 32px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    text-align: center;
    color: #fff;
}

.cta-band h2 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.cta-band p {
    max-width: 600px;
    margin: 0 auto 28px;
    color: var(--fg-300);
    font-size: 16px;
    line-height: 1.6;
}

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

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.333%);
    }
}

@keyframes ctaFloat {

    0%,
    100% {
        transform: var(--_r) translateY(0);
    }

    50% {
        transform: var(--_r) translateY(-10px);
    }
}

.cta-float {
    animation: ctaFloat 4s ease-in-out infinite;
}

/* --- Trust Bar --- */
.trust-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px 0;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    color: var(--fg-300);
    font-size: 13px;
    font-weight: 500;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

/* --- Footer --- */
.footer {
    padding: 0;
    border-top: 1px solid;
    border-image: repeating-linear-gradient(to right, rgba(255, 255, 255, .10) 0px, rgba(255, 255, 255, .10) 10px, transparent 10px, transparent 24px) 1;
    background: #0e0e0e;
}

.footer-inner {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.footer-logo {
    padding: 56px 0 44px;
}

.footer-logo img {
    height: 22px;
    width: auto;
    display: block;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 40px;
    padding-bottom: 56px;
}

.footer-group {
    padding: 0 0 32px;
}

.footer-group h5 {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.footer-chevron {
    display: none;
    width: 16px;
    height: 16px;
    stroke: var(--fg-400);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s;
    flex-shrink: 0;
}

/* Desktop: always show footer links regardless of Alpine x-show/x-cloak */
@media (min-width: 769px) {
    .footer-links {
        display: block !important;
    }

    .footer-accordion .footer-group h5 {
        cursor: default;
        pointer-events: none;
    }
}

.footer-links a,
.footer-group > a {
    display: block;
    padding: 4px 0;
    color: var(--fg-300);
    font-size: 13px;
    text-decoration: none;
    transition: color .15s;
}

.footer-links a:hover,
.footer-group > a:hover {
    color: var(--fg-100);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid;
    border-image: repeating-linear-gradient(to right, rgba(255, 255, 255, .10) 0px, rgba(255, 255, 255, .10) 10px, transparent 10px, transparent 24px) 1;
    margin: 0 calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.footer-bottom span,
.footer-bottom a {
    color: var(--fg-400);
    font-size: 12px;
}

.footer-bottom a {
    text-decoration: none;
    transition: color .15s;
}

.footer-bottom a:hover {
    color: var(--fg-100);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-legal .sep {
    color: var(--fg-400);
    opacity: .4;
}

.footer-legal a:first-child {
    font-weight: 700;
    color: var(--fg-200);
}

/* --- Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: reveal .7s cubic-bezier(.22, 1, .36, 1) forwards;
}

.d1 {
    animation-delay: .08s;
}

.d2 {
    animation-delay: .16s;
}

.d3 {
    animation-delay: .24s;
}

.d4 {
    animation-delay: .32s;
}

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

/* --- Hamburger button --- */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    color: var(--fg-400);
    transition: color .2s;
}

.nav-hamburger:hover {
    color: var(--fg-100);
}

.nav-hamburger svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* --- Mobile nav drawer --- */
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: rgba(21, 20, 20, 0.97);
    backdrop-filter: blur(20px);
    padding: 80px 32px 40px;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--fg-300);
    border-bottom: 1px solid var(--border);
    transition: color .2s;
}

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

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.mobile-nav-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 15px;
}

/* Drawer transitions */
.mnd-enter { transition: opacity .25s ease, transform .25s ease; }
.mnd-enter-start { opacity: 0; transform: translateY(-12px); }
.mnd-enter-end { opacity: 1; transform: translateY(0); }
.mnd-leave { transition: opacity .2s ease, transform .2s ease; }
.mnd-leave-start { opacity: 1; transform: translateY(0); }
.mnd-leave-end { opacity: 0; transform: translateY(-12px); }

[x-cloak] { display: none !important; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    .nav-hamburger {
        display: flex;
        align-items: center;
    }

    .mobile-nav-drawer {
        display: flex;
    }

    .card-grid.cols-4,
    .card-grid.cols-3 {
        grid-template-columns: 1fr;
    }

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

    .deploy-layout {
        grid-template-columns: 1fr;
    }

    .deploy-steps {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .pipeline-flow {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .pipeline-stats {
        grid-template-columns: 1fr;
    }

    .quote-inner {
        grid-template-columns: 1fr;
    }

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

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

    .trust-bar {
        flex-wrap: wrap;
        gap: 16px;
        padding: 16px 24px;
    }

    /* Defense pipeline: stack at tablet */
    .defense-pipeline-card {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        padding: 32px 28px !important;
    }

    /* Affiliate: benefits 2-col at tablet */
    .aff-benefits-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* News: hero stacks */
    .news-hero-inner {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }
    .news-hero-text {
        padding: 48px 0 32px !important;
    }
    .news-hero h1 {
        font-size: 32px !important;
    }
    .news-hero-img {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: 320px !important;
        aspect-ratio: 16/9;
    }
    .news-hero-dots {
        width: 100% !important;
        mask-image: linear-gradient(to bottom, black 0%, transparent 80%) !important;
        -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 80%) !important;
    }
    /* News: grid 2-col */
    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    /* Section headings scale */
    .section-head h2 {
        font-size: clamp(24px, 6vw, 32px);
    }

    .section-head p {
        font-size: 15px;
    }

    /* Dashboard features: stack */
    .cmd-features-grid {
        grid-template-columns: 1fr !important;
    }

    /* Globe: reduce height */
    .globe-wrap {
        height: 400px !important;
        margin-bottom: -100px !important;
    }

    /* Hive Mind: hide browser mockup, full-width text */
    .hive-browser-mockup {
        display: none !important;
    }

    .hive-propagation-text {
        max-width: 100% !important;
    }

    /* Hive Mind: scale SVG to fit */
    #card-hivemind {
        padding: 40px 0 40px !important;
    }

    #card-hivemind .card-illustration svg {
        max-width: 100%;
        height: auto;
    }

    /* Deploy: stack to single column, reduce terminal padding */
    .deploy-card-grid {
        grid-template-columns: 1fr !important;
    }

    .deploy-terminal-card {
        padding: 24px 16px !important;
    }

    /* Pricing: horizontal scroll */
    .pricing-scroll {
        display: flex !important;
        grid-template-columns: unset !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-bottom: 12px;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .pricing-scroll > .card {
        min-width: 280px;
        max-width: 300px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* Hide scrollbar but keep scrollable */
    .pricing-scroll::-webkit-scrollbar {
        height: 4px;
    }

    .pricing-scroll::-webkit-scrollbar-track {
        background: rgba(255,255,255,.04);
        border-radius: 2px;
    }

    .pricing-scroll::-webkit-scrollbar-thumb {
        background: rgba(240,185,11,.25);
        border-radius: 2px;
    }

    /* Footer accordion */
    .footer-accordion {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding-bottom: 24px;
    }

    .footer-accordion .footer-group {
        padding: 0;
        border-bottom: 1px solid var(--border);
    }

    .footer-accordion .footer-group:last-child {
        display: none;
    }

    .footer-accordion .footer-group h5 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0;
        padding: 16px 0;
        cursor: pointer;
        user-select: none;
    }

    .footer-chevron {
        display: block;
    }

    .footer-accordion .footer-links {
        padding: 0 0 16px;
    }

    .footer-accordion .footer-links a {
        padding: 6px 0;
    }

    .footer-logo {
        padding: 32px 0 20px;
    }

    /* News: CTA banner tighter */
    .news-cta-banner {
        padding: 48px 24px !important;
    }
    .news-section-title {
        font-size: 26px !important;
    }

    /* Affiliate: reward matrix stack */
    .aff-reward-grid {
        grid-template-columns: 1fr !important;
    }

    .aff-reward-grid .reward-card {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Contact: inquiry type grid wraps */
    .contact-inquiry-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Contact: name/email stack */
    .contact-name-email {
        grid-template-columns: 1fr !important;
    }

    /* Contact: card padding tighter */
    .contact-inquiry-grid .inquiry-btn {
        padding: 12px 8px;
        font-size: 10px;
    }
}

@media (max-width: 640px) {
    .shell {
        width: calc(100% - 32px);
    }

    .hero {
        padding: 48px 0 32px;
    }

    .hero h1 {
        font-size: clamp(32px, 9vw, 40px);
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: min(100%, 280px);
    }

    .section {
        padding: 32px 0;
    }

    .pipeline-flow {
        grid-template-columns: 1fr;
    }

    .pipeline-stage {
        padding: 24px;
    }

    .card-grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .card-illustration {
        height: 160px;
    }

    /* Globe: even smaller on phone */
    .globe-wrap {
        height: 300px !important;
        margin-top: 20px !important;
        margin-bottom: -60px !important;
    }

    /* Defense pipeline: tighter padding */
    .defense-pipeline-card {
        padding: 24px 20px !important;
        gap: 24px !important;
    }

    /* Affiliate: benefits single column */
    .aff-benefits-grid {
        grid-template-columns: 1fr !important;
    }

    /* News: single column on phone */
    .news-grid {
        grid-template-columns: 1fr !important;
    }
    .news-hero h1 {
        font-size: 26px !important;
    }
    .news-cta-banner {
        padding: 36px 20px !important;
    }
}

@media (max-width: 480px) {
    .shell {
        width: calc(100% - 24px);
    }

    .hero h1 {
        font-size: clamp(28px, 8vw, 36px);
    }

    .hero-desc {
        font-size: 15px;
    }

    .section-head h2 {
        font-size: clamp(22px, 6vw, 28px);
    }

    .section-head p {
        font-size: 14px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 12px;
    }

    .mobile-nav-drawer {
        padding: 72px 24px 32px;
    }

    .mobile-nav-links a {
        font-size: 15px;
        padding: 14px 0;
    }

    /* Pricing cards: even smaller on tiny screens */
    .pricing-scroll > .card {
        min-width: 260px;
        max-width: 280px;
    }

    /* Contact: inquiry type 2-col on tiny phones */
    .contact-inquiry-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
