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

:root {
    /* palette — dark (default / brand) */
    --bg: #070d16;
    --bg-2: #0b1420;
    --panel: #0e1a29;
    --line: #1c2c40;
    --line-2: #263a54;
    --ink: #eaf1fa;
    --ink-soft: #8ba2bd;
    --ink-dim: #5f7591;
    --blue: #2f9bee;
    --blue-bright: #4fb0fb;
    --cyan: #37e0d0;
    --brand: #187AC0;
    /* semantic tokens (theme-swapped) */
    --nav-bg: rgba(7,13,22,.72);
    --card-bg: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
    --card-hover-shadow: 0 20px 44px rgba(0,0,0,.5);
    --surface-soft: rgba(255,255,255,.02);
    --btn-ghost-bg: rgba(255,255,255,.02);
    --modal-close-bg: rgba(255,255,255,.05);
    --on-accent: #04101d;
    --spot: rgba(79,176,251,.14);
    --scrim: rgba(4,9,16,.72);
    --glow-1: rgba(47,155,238,.16);
    --glow-2: rgba(55,224,208,.09);
    --error-fg: #fca5a5;
    --error-bg: rgba(239,68,68,.12);
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --radius: 14px;
}

/* palette — light (opt-in via toggle; dark stays the default) */
:root[data-theme="light"] {
    --bg: #f6f9fc;
    --bg-2: #eef3f9;
    --panel: #ffffff;
    --line: #e0e8f1;
    --line-2: #cbd8e6;
    --ink: #10233a;
    --ink-soft: #4c6379;
    --ink-dim: #7189a1;
    --blue: #1569a5;
    --blue-bright: #187AC0;
    --cyan: #0e8f88;
    --brand: #187AC0;
    --nav-bg: rgba(246,249,252,.82);
    --card-bg: #ffffff;
    --card-hover-shadow: 0 16px 40px rgba(20,50,74,.12);
    --surface-soft: #f2f6fb;
    --btn-ghost-bg: #ffffff;
    --modal-close-bg: #eef3f9;
    --on-accent: #ffffff;
    --spot: rgba(24,122,192,.10);
    --scrim: rgba(16,35,58,.42);
    --glow-1: rgba(24,122,192,.10);
    --glow-2: rgba(14,143,136,.07);
    --error-fg: #b91c1c;
    --error-bg: rgba(239,68,68,.10);
}

html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--ink);
    line-height: 1.65;
    background:
        radial-gradient(900px 500px at 78% -8%, var(--glow-1), transparent 60%),
        radial-gradient(700px 500px at 5% 8%, var(--glow-2), transparent 55%),
        var(--bg);
    transition: background-color .25s ease, color .25s ease;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
h1, h2, h3, h4 { font-family: 'Rubik', sans-serif; margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 20px; height: 1px; background: var(--cyan); }

/* ── NAV ── */
nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 1.05rem; }
.brand .badge { width: 30px; display: block; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a.link { font-size: .88rem; color: var(--ink-soft); font-weight: 500; }
.nav-links a.link:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .88rem; padding: 10px 20px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; transition: .18s; }
.btn-primary { background: linear-gradient(180deg, var(--blue-bright), var(--blue)); color: var(--on-accent); box-shadow: 0 6px 20px rgba(47,155,238,.32), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(47,155,238,.42); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: var(--btn-ghost-bg); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-bright); }
.btn-lg { padding: 14px 26px; font-size: .96rem; }
.hamb { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 4px; }
.hamb svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── HERO ── */
.hero { padding: 104px 0 90px; }
.hero-in { max-width: 860px; }
.status { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: .76rem; color: var(--ink-soft); border: 1px solid var(--line-2); background: var(--surface-soft); padding: 7px 14px; border-radius: 100px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); font-weight: 700; margin: 26px 0 22px; text-wrap: balance; }
.hero h1 .g { background: linear-gradient(100deg, var(--blue-bright), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 32em; margin: 0 0 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── SECTIONS ── */
section { padding: 96px 0; position: relative; z-index: 1; }
.sec-head { max-width: 42em; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 700; margin: 16px 0 14px; }
.sec-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* ── SERVICE CARDS ── */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 30px; background: var(--card-bg); overflow: hidden; transition: border-color .22s, transform .22s, box-shadow .22s; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), transparent); opacity: 0; transition: .3s; z-index: 2; }
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.card:hover::before { opacity: 1; }
/* cursor spotlight */
.card .ic, .card .num, .card h3, .card > p, .card ul { position: relative; z-index: 1; }
.spotlight::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .3s ease; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 62%); }
.spotlight:hover::after { opacity: 1; }
.terminal.spotlight { position: relative; }
.terminal .term-bar, .terminal .term-body { position: relative; z-index: 1; }

/* ── THEME TOGGLE ── */
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-2); background: var(--btn-ghost-bg); color: var(--ink-soft); border-radius: 9px; cursor: pointer; transition: .18s; }
.theme-toggle:hover { color: var(--blue-bright); border-color: var(--blue); }
.theme-toggle svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.card .num { font-family: var(--mono); font-size: .76rem; color: var(--blue); }
.card .ic { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; color: var(--cyan); margin: 16px 0 18px; background: radial-gradient(circle at 30% 25%, rgba(55,224,208,.18), rgba(47,155,238,.08)); border: 1px solid var(--line-2); }
.card .ic svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.card > p { color: var(--ink-soft); font-size: .92rem; margin: 0 0 16px; }
.card ul { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.card li { font-size: .83rem; color: var(--ink-soft); display: flex; gap: 9px; align-items: flex-start; }
.card li svg { width: 15px; height: 15px; stroke: var(--blue); fill: none; stroke-width: 3; flex: none; margin-top: 3px; }

/* ── APPROACH BAND ── */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.band h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 700; margin: 16px 0; }
.band p { color: var(--ink-soft); margin: 0 0 14px; }
.terminal { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--bg-2); font-family: var(--mono); font-size: .84rem; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #2b3d55; flex: none; }
.term-bar .dot:nth-child(1) { background: #e06c5a; }
.term-bar .dot:nth-child(2) { background: #e0b24a; }
.term-bar .dot:nth-child(3) { background: #4aae6a; }
.term-bar .t { margin-left: 8px; color: var(--ink-soft); font-size: .78rem; }
.term-body { padding: 22px 24px; font-size: .9rem; line-height: 2.05; overflow-x: auto; }
.term-body > div { white-space: nowrap; }
.term-body .c { color: var(--ink-dim); font-style: italic; }
.term-body .k { color: var(--cyan); }
.term-body .v { color: var(--ink); }
.term-body .p { color: var(--blue-bright); }

/* ── PRODUCT TEASER ── */
.teaser { text-align: center; }
.teaser .box { max-width: 760px; margin: 0 auto; border: 1px solid var(--line-2); border-radius: 22px; padding: 56px 40px; position: relative; overflow: hidden; background: radial-gradient(600px 300px at 50% -30%, rgba(47,155,238,.18), transparent), var(--panel); }
.teaser h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700; margin: 16px 0 12px; }
.teaser p { color: var(--ink-soft); max-width: 34em; margin: 0 auto 28px; }
.mini { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.mini input { flex: 1; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: inherit; }
.mini input:focus { outline: none; border-color: var(--blue); }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; }
.contact-info h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); font-weight: 700; margin: 16px 0 14px; }
.contact-info p { color: var(--ink-soft); margin: 0 0 30px; }
.cinfo { display: flex; flex-direction: column; gap: 14px; }
.cinfo a { display: flex; gap: 13px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; background: var(--surface-soft); transition: .18s; }
.cinfo a:hover { border-color: var(--blue); }
.cinfo .ic { width: 40px; height: 40px; border-radius: 10px; background: rgba(47,155,238,.12); color: var(--blue-bright); display: grid; place-items: center; flex: none; }
.cinfo .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.cinfo .k { font-family: var(--mono); font-size: .7rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .08em; }
.cinfo .v { font-weight: 600; }
form.full { border: 1px solid var(--line-2); border-radius: 20px; padding: 32px; background: var(--panel); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fg { margin-bottom: 14px; }
.fg.col { grid-column: 1 / -1; }
label { display: block; font-size: .78rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.fld { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: inherit; font-size: .92rem; }
.fld:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,155,238,.2); }
select.fld { appearance: none; }
select.fld option { background: var(--bg-2); color: var(--ink); }
textarea.fld { min-height: 104px; resize: vertical; }
form.full .btn { width: 100%; justify-content: center; margin-top: 4px; }
/* honeypot — hidden from humans, tempting to bots */
.hp { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--line); padding: 40px 0; position: relative; z-index: 1; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot .brand { font-size: 1rem; }
.foot p { font-size: .82rem; color: var(--ink-dim); margin: 0; font-family: var(--mono); }
.foot-links { display: flex; gap: 22px; list-style: none; }
.foot-links a { font-size: .82rem; color: var(--ink-soft); }
.foot-links a:hover { color: var(--blue-bright); }

/* ── FLASH ── */
.flash-messages { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: 90vw; }
.flash-msg { padding: 12px 22px; border-radius: 10px; font-size: .85rem; font-weight: 500; animation: flashIn .3s ease; }
.flash-msg.success { background: rgba(55,224,208,.12); color: var(--cyan); border: 1px solid rgba(55,224,208,.3); }
.flash-msg.error { background: var(--error-bg); color: var(--error-fg); border: 1px solid rgba(239,68,68,.3); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── LOGIN MODAL ── */
.overlay { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: none; place-items: center; z-index: 100; padding: 24px; }
.overlay.on { display: grid; }
.modal { border: 1px solid var(--line-2); border-radius: 20px; padding: 40px; width: 100%; max-width: 400px; background: radial-gradient(500px 240px at 50% -20%, rgba(47,155,238,.2), transparent), var(--panel); box-shadow: 0 40px 90px rgba(0,0,0,.6); animation: pop .22s ease; position: relative; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border: none; background: var(--modal-close-bg); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.modal-close svg { width: 18px; height: 18px; stroke: var(--ink-soft); fill: none; stroke-width: 2; }
.modal .badge { width: 44px; margin-bottom: 18px; }
.modal h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.modal .sub { color: var(--ink-soft); font-size: .9rem; margin-bottom: 24px; }
.modal .fg { margin-bottom: 14px; }
.modal .opts { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--ink-soft); margin: 4px 0 20px; }
.modal .opts label { display: flex; gap: 7px; align-items: center; font-weight: 500; color: var(--ink-soft); margin: 0; cursor: pointer; }
.modal .opts input[type="checkbox"] { accent-color: var(--blue); }
.modal .opts a { color: var(--blue-bright); font-weight: 600; }
.modal .btn { width: 100%; justify-content: center; }
.modal .foot-note { text-align: center; font-size: .82rem; color: var(--ink-soft); margin-top: 18px; }
.modal .foot-note a { color: var(--blue-bright); font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .grid2, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .cards { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--bg-2); flex-direction: column; padding: 20px 24px; gap: 16px; border-bottom: 1px solid var(--line); }
    .nav-links.open { display: flex; }
    .hamb { display: grid; }
    .frow { grid-template-columns: 1fr; }
    .mini { flex-direction: column; }
    .foot { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { *, ::before { animation: none !important; } }
