/* ForeSec design system. No inline styles are used anywhere (strict CSP). */
:root {
    --bg: #070b16;
    --bg-2: #0a1020;
    --surface: #0e1528;
    --surface-2: #131c34;
    --line: rgba(140, 160, 255, .14);
    --line-2: rgba(140, 160, 255, .26);
    --text: #e8ecff;
    --muted: #9ba7c8;
    --brand: #5b6fe0;
    --brand-2: #7c8cff;
    --accent: #36d4e4;
    --accent-2: #6fe3c4;
    --grad: linear-gradient(135deg, #5b6fe0 0%, #36d4e4 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Space Grotesk", var(--font);
    --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
    --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(900px 500px at 85% -5%, rgba(91, 111, 224, .18), transparent 60%),
        radial-gradient(700px 500px at -5% 20%, rgba(54, 212, 228, .08), transparent 60%);
    background-attachment: fixed;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(54, 212, 228, .3); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.02em; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--muted); }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.mono { font-family: var(--font-mono); letter-spacing: .08em; font-size: .72rem; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #031018; padding: .6rem 1rem; border-radius: 8px; z-index: 200; font-weight: 600; }
.skip-link:focus { left: 8px; }
.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(7, 11, 22, .72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(7, 11, 22, .9); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark-wrapper { display: inline-flex; align-items: center; gap: .5rem; }
.brand-mark-hives { height: 46px; width: auto; filter: drop-shadow(0 0 14px rgba(91, 111, 224, .45)); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .brand-mark-hives { transform: scale(1.15) translateY(-2px); }
.brand-mark-text { height: 58px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; letter-spacing: .16em; font-size: 1.1rem; }
.brand-sub { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hx-a { fill: #8ea0ff; }
.hx-b { fill: #5b6fe0; }
.hx-c { fill: #4a7fd0; }
.hx-d { fill: #36d4e4; opacity: .75; }

.primary-nav ul { display: flex; align-items: center; gap: .25rem; }
.primary-nav a:not(.btn) { color: var(--muted); padding: .55rem .9rem; border-radius: 8px; font-weight: 500; font-size: .95rem; position: relative; display: block; }
.primary-nav a:not(.btn):hover, .primary-nav a.active { color: var(--text); }
.primary-nav a.active::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem; height: 2px; background: var(--grad); border-radius: 2px; }
.nav-cta { margin-left: .5rem; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line-2); color: var(--text); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .9rem 1.5rem; border-radius: 12px; border: 1px solid transparent;
    font: 600 .98rem var(--font); cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; border-radius: 10px; }
.btn-primary { background: var(--grad); color: #031018; box-shadow: 0 10px 30px -10px rgba(54, 212, 228, .55); }
.btn-primary:hover { color: #031018; transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(54, 212, 228, .7); }
.btn-ghost { background: rgba(255, 255, 255, .03); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); background: rgba(54, 212, 228, .08); transform: translateY(-2px); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font: 500 .75rem var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.2rem; }
.tag { font: 500 .78rem var(--font-mono); letter-spacing: .06em; padding: .4rem .8rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, .02); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 380px; }
.hero-visual .hero-mark-wrapper { display: inline-flex; align-items: center; justify-content: center; gap: 1.25rem; width: min(100%, 480px); }
.hero-visual .hero-mark-hives { width: 35%; height: auto; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 0 40px rgba(91, 111, 224, .5)); }
.hero-visual .hero-mark-text { width: 62%; height: auto; }
.hero-visual::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(54, 212, 228, .22), transparent 65%); filter: blur(10px); }
.hero-chip { position: absolute; display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-radius: 12px; background: rgba(14, 21, 40, .85); border: 1px solid var(--line-2); backdrop-filter: blur(8px); font-size: .82rem; font-weight: 500; box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; z-index: 10; }
.hero-chip .icon { color: var(--accent); width: 20px; height: 20px; }
.hero-chip.c1 { top: 0; left: 0; animation-delay: -1s; }
.hero-chip.c2 { top: 8%; right: -5%; animation-delay: -3s; }
.hero-chip.c3 { bottom: 5%; left: 15%; animation-delay: -5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(14, 21, 40, .6), transparent); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.page-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(91, 111, 224, .08), transparent); }
.page-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); }
.breadcrumb { display: flex; gap: .6rem; font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    position: relative; padding: 1.75rem; border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(19, 28, 52, .9), rgba(14, 21, 40, .9));
    border: 1px solid var(--line); transition: transform .3s, border-color .3s, box-shadow .3s; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: 0; transition: opacity .3s; }
a.card { display: block; color: inherit; }
.card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card h3 { margin-bottom: .5rem; color: var(--text); }
.card p { margin: 0; font-size: .95rem; }
.card-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.2rem; background: rgba(54, 212, 228, .1); border: 1px solid rgba(54, 212, 228, .25); color: var(--accent); }
.card-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.1rem; font-weight: 600; font-size: .9rem; color: var(--accent); }
.card:hover .card-link .icon { transform: translateX(4px); }
.card-link .icon { transition: transform .25s; }

.stats { display: flex; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { flex: 1; background: var(--surface); padding: 2rem 1rem; text-align: center; }
.stat-num { font: 700 clamp(1.4rem, 2.8vw, 2.4rem) var(--font-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; white-space: nowrap; }
.stat-label { margin-top: .6rem; font-size: .85rem; color: var(--muted); }

/* Steps / timeline */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; position: relative; }
.step { position: relative; padding: 1.5rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.step p { font-size: .88rem; margin: 0; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 2.1rem; right: -1rem; width: 1rem; height: 1px; background: var(--grad); }

/* Layers diagram */
.layers { display: grid; gap: .75rem; }
.layer { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: center; padding: 1.25rem 1.5rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: linear-gradient(90deg, rgba(91, 111, 224, .12), rgba(14, 21, 40, .6)); transition: border-color .3s, transform .3s; }
.layer:hover { border-color: var(--accent); transform: translateX(6px); }
.layer-name { display: flex; align-items: center; gap: .8rem; font: 600 1rem var(--font-head); color: var(--text); }
.layer-name .icon { color: var(--accent); }
.layer-items { display: flex; flex-wrap: wrap; gap: .5rem; }
.layer-items span { font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted); }

/* Feature list */
.checklist { display: grid; gap: .85rem; }
.checklist li { display: flex; gap: .8rem; align-items: flex-start; color: var(--muted); }
.checklist .icon { color: var(--accent); margin-top: .15rem; width: 20px; height: 20px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.panel { padding: 2rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.panel .mono { color: var(--accent); display: block; margin-bottom: 1rem; }

/* Pillars */
.pillar-letter { font: 700 3rem var(--font-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: .6rem; }

/* CTA */
.cta-band { padding: 0 0 clamp(3.5rem, 7vw, 6rem); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(2rem, 4vw, 3.2rem); border-radius: 24px; border: 1px solid var(--line-2); background: radial-gradient(600px 300px at 90% 0%, rgba(54, 212, 228, .18), transparent 60%), linear-gradient(135deg, rgba(91, 111, 224, .2), rgba(14, 21, 40, .9)); }
.cta-inner h2 { margin-bottom: .4rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-inner p { margin: 0; }

/* ---------- Forms ---------- */
.form-card { padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: 20px; border: 1px solid var(--line-2); background: linear-gradient(160deg, rgba(19, 28, 52, .95), rgba(14, 21, 40, .95)); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .45rem; color: var(--text); }
.field input, .field select, .field textarea {
    width: 100%; padding: .85rem 1rem; border-radius: 10px; border: 1px solid var(--line-2);
    background: rgba(7, 11, 22, .7); color: var(--text); font: 400 1rem var(--font); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field select option { background: #0e1528; color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(54, 212, 228, .18); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: .35rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-bottom: 1.2rem; padding: .9rem 1.1rem; border-radius: 10px; font-size: .92rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(111, 227, 196, .1); border: 1px solid rgba(111, 227, 196, .4); color: #b9f5e3; }
.form-status.err { background: rgba(255, 107, 129, .1); border: 1px solid rgba(255, 107, 129, .4); color: #ffc1cb; }

/* Prose (legal pages) */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.prose li { color: var(--muted); margin-bottom: .5rem; padding-left: 1.2rem; position: relative; }
.prose li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand p { margin-top: 1.2rem; font-size: .9rem; max-width: 38ch; }
.footer-title { font: 600 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--text); margin-bottom: 1.1rem; }
.site-footer li { margin-bottom: .6rem; }
.site-footer li a { color: var(--muted); font-size: .92rem; }
.site-footer li a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* ---------- Reveal animation (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .step:not(:last-child)::after { display: none; }
    .stats { display: grid; grid-template-columns: repeat(2, 1fr); }
    .hero-grid, .split { grid-template-columns: 1fr; }
    .hero-visual { min-height: 300px; order: -1; }
    .hero-visual .hero-mark { width: min(70%, 300px); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .layer { grid-template-columns: 1fr; gap: .8rem; }
}
@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }
    .primary-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: rgba(7, 11, 22, .97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; }
    .primary-nav.open { opacity: 1; transform: none; visibility: visible; }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: .15rem; }
    .primary-nav a:not(.btn) { padding: .9rem .5rem; font-size: 1.05rem; }
    .primary-nav a.active::after { display: none; }
    .nav-cta { margin: .8rem 0 0; }
    .nav-cta .btn { width: 100%; padding: .9rem; }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4, .steps, .stats, .form-row, .footer-grid { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .hero-chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* Utilities */
.sr-only-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
ol { margin: 0; padding: 0; list-style: none; }
