/* KernelDX marketing site */

:root {
    --ink: #070d1f;
    --ink-2: #0d1730;
    --ink-3: #16234a;
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --accent: #22d3ee;
    --accent-2: #a78bfa;
    --text: #0f172a;
    --muted: #5b6784;
    --line: #e3e8f2;
    --bg: #ffffff;
    --tint: #f5f7fc;
    --on-dark: #e6ecff;
    --on-dark-muted: #9aa8cc;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .18);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Sora', var(--font);
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); font-size: .95rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 640px; }
.center .lead, .section-head .lead { margin-left: auto; margin-right: auto; }

.eyebrow {
    display: inline-block;
    font-family: var(--mono);
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
}

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .65rem 1.15rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font: 600 .95rem/1.2 var(--font);
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
    white-space: nowrap;
}
.btn .icon { width: 1.05em; height: 1.05em; transition: transform .15s ease; }
.btn:hover .icon { transform: translateX(3px); }
.btn-lg { padding: .9rem 1.4rem; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(37, 99, 235, .7);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(37, 99, 235, .8); }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-1px); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .04); }
.btn-outline-light:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: background .25s ease, border-color .25s ease;
}
.site-header.on-dark { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; }
.site-header.on-dark.menu-open { background: var(--ink); }
.site-header.on-dark.scrolled { background: rgba(7, 13, 31, .82); border-color: rgba(255, 255, 255, .08); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.brand b { color: var(--primary); font-weight: 700; }
.on-dark .brand { color: #fff; }
.on-dark .brand b { color: var(--accent); }

.nav-menu { display: flex; align-items: center; gap: 2rem; }
.nav-menu > a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .15s ease; }
.nav-menu > a:hover { color: var(--text); }
.on-dark .nav-menu > a { color: var(--on-dark-muted); }
.on-dark .nav-menu > a:hover { color: #fff; }
.on-dark .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .25); }
.on-dark .btn-ghost:hover { border-color: #fff; }
.nav-actions { display: flex; gap: .6rem; }

.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.on-dark .nav-toggle span { background: #fff; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 500px at 85% 10%, rgba(37, 99, 235, .35), transparent 60%),
        radial-gradient(700px 500px at 10% 90%, rgba(34, 211, 238, .14), transparent 60%),
        linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    color: var(--on-dark);
    padding: 150px 0 110px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-arcs {
    position: absolute;
    top: -40px; left: 50%;
    width: 1400px; height: 1400px;
    transform: translateX(-30%);
    color: rgba(125, 211, 252, .09);
    stroke-width: 1;
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 75%);
    mask-image: linear-gradient(180deg, #000 30%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.grad {
    background: linear-gradient(90deg, #7dd3fc, var(--accent) 40%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lead { color: var(--on-dark-muted); font-size: 1.2rem; }
.pill {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .4rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    font-size: .85rem;
    color: var(--on-dark);
    margin-bottom: 1.6rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(34, 211, 238, .6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); } }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 1.6rem; }
.hero-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: .92rem; color: var(--on-dark-muted); }
.hero-checks li { display: flex; align-items: center; gap: .4rem; }
.hero-checks .icon { color: var(--accent); }

/* Mock app */
.hero-visual { position: relative; }
.mock {
    border-radius: 18px;
    background: rgba(13, 23, 48, .85);
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .03) inset;
    overflow: hidden;
    transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.mock-bar > span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.mock-url { margin-left: 12px; flex: 1; font-family: var(--mono); font-size: .72rem; color: var(--on-dark-muted); background: rgba(255, 255, 255, .05); padding: 4px 10px; border-radius: 6px; }
.mock-body { display: grid; grid-template-columns: 190px 1fr; min-height: 330px; }
.mock-list { border-right: 1px solid rgba(255, 255, 255, .07); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.mock-search { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--on-dark-muted); background: rgba(255, 255, 255, .05); padding: 7px 9px; border-radius: 8px; margin-bottom: 4px; }
.mock-search .icon { width: 14px; height: 14px; }
.mock-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 8px; font-size: .75rem; border: 1px solid transparent; }
.mock-row strong { display: block; color: #fff; font-weight: 500; font-size: .78rem; }
.mock-row small { color: var(--on-dark-muted); }
.mock-row .mono { font-size: .68rem; color: var(--on-dark-muted); }
.mock-row.active { background: rgba(37, 99, 235, .22); border-color: rgba(96, 165, 250, .35); }
.mock-viewer { position: relative; background: #000; display: flex; align-items: center; justify-content: center; }
.us-image { width: 100%; height: 100%; }
.us-measure { stroke: #facc15; fill: #facc15; stroke-width: 1.2; }
.us-measure line { stroke-dasharray: 4 3; }
.us-measure text { stroke: none; font: 500 10px var(--mono); }
.mock-hud { position: absolute; left: 10px; right: 10px; top: 8px; display: flex; justify-content: space-between; font-size: .66rem; color: rgba(255, 255, 255, .55); }

.float-card {
    position: absolute;
    left: -28px; bottom: -26px;
    display: flex; align-items: center; gap: .75rem;
    padding: .85rem 1.1rem;
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .45);
    animation: float 5s ease-in-out infinite;
}
.float-card > .icon { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: #e0f2fe; color: var(--primary); }
.float-card strong { display: block; font-size: .88rem; }
.float-card small { color: var(--muted); font-size: .78rem; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Strip */
.strip { background: var(--ink-2); border-top: 1px solid rgba(255, 255, 255, .06); color: var(--on-dark); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-grid > div { padding: 26px 20px; border-left: 1px solid rgba(255, 255, 255, .07); }
.strip-grid > div:first-child { border-left: 0; padding-left: 0; }
.strip strong { display: block; font-family: var(--display); font-size: 1.25rem; color: #fff; }
.strip span { font-size: .88rem; color: var(--on-dark-muted); }

/* Sections */
.section { padding: 110px 0; }
.section-tint { background: var(--tint); }
.section-head { text-align: center; margin: 0 auto 56px; max-width: 720px; }
.section-dark {
    background: radial-gradient(800px 400px at 50% 0%, rgba(37, 99, 235, .25), transparent 70%), var(--ink);
    color: var(--on-dark);
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lead { color: var(--on-dark-muted); }
.section-dark .eyebrow { color: var(--accent); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; position: relative; }
.step { position: relative; padding: 32px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.step-num { position: absolute; top: 26px; right: 26px; font-size: .8rem; color: #b4bfd6; }
.step-icon, .feature-icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(34, 211, 238, .12));
    color: var(--primary);
    margin-bottom: 20px;
}
.step-icon .icon, .feature-icon .icon { width: 24px; height: 24px; }
.step p, .feature p { color: var(--muted); margin: 0; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
    padding: 30px 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfd8ea; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: .8rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; }
.checklist .icon { color: #fff; background: var(--primary); border-radius: 50%; padding: 3px; width: 22px; height: 22px; margin-top: 1px; }

.viewer-card { background: var(--ink); border-radius: 20px; padding: 14px; box-shadow: 0 30px 60px -20px rgba(7, 13, 31, .5); }
.viewer-tools { display: flex; gap: 6px; margin-bottom: 12px; }
.viewer-tools span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--on-dark-muted); background: rgba(255, 255, 255, .05); }
.viewer-tools span:first-child { color: #fff; background: var(--primary); }
.viewer-tools .icon { width: 16px; height: 16px; }
.viewer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.viewer-tile {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: #000;
    position: relative;
    overflow: hidden;
}
.viewer-tile::before {
    content: '';
    position: absolute;
    inset: 8% 6% -20%;
    clip-path: polygon(50% 0, 100% 75%, 85% 100%, 15% 100%, 0 75%);
    background:
        radial-gradient(ellipse 30% 22% at var(--x, 50%) var(--y, 55%), #000 60%, transparent 62%),
        radial-gradient(circle at 50% 0, #4b5568, #a3acbd 45%, #3f4658 75%, #11151f);
    opacity: .9;
}
.viewer-tile::after {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1.2px);
    background-size: 3px 3px;
    mix-blend-mode: overlay;
}
.viewer-tile.t1 { --x: 40%; --y: 60%; }
.viewer-tile.t2 { --x: 60%; --y: 45%; }
.viewer-tile.t3 { --x: 50%; --y: 70%; }
.viewer-timeline { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: var(--on-dark-muted); font-size: .75rem; }
.play { width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.track { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.progress { height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, var(--primary), var(--accent)); animation: cine 6s linear infinite; }
@keyframes cine { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Security */
.security-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.sec-item { padding: 28px 24px; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .03); }
.sec-item > .icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: 18px; }
.sec-item p { color: var(--on-dark-muted); margin: 0; font-size: .95rem; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 500; }
.chip .icon { color: var(--primary); width: 18px; height: 18px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 24px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--primary); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* CTA */
.cta { padding: 0 0 110px; background: var(--tint); }
.cta-box {
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    padding: 56px;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(500px 300px at 100% 0%, rgba(34, 211, 238, .35), transparent 70%),
        linear-gradient(135deg, var(--primary-600), var(--ink-3));
    max-width: 1132px;
}
.cta-box h2 { color: #fff; margin-bottom: .3em; }
.cta-box p { color: rgba(255, 255, 255, .78); margin: 0; }
.cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 72px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand b { color: var(--accent); }
.footer-brand p { max-width: 340px; }
.site-footer h4 { color: #fff; font-family: var(--font); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a:not(.brand) { display: block; color: var(--on-dark-muted); margin-bottom: .55rem; }
.site-footer a:not(.brand):hover { color: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }

/* Demo page */
.demo { background: linear-gradient(180deg, var(--tint), #fff); padding-top: 80px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.demo h1 { font-size: clamp(2rem, 4vw, 3rem); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 18px; }
.field > span:first-child { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%;
    font: inherit;
    font-size: .95rem;
    color: var(--text);
    padding: .7rem .85rem;
    border: 1px solid #d3dae8;
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.has-error input { border-color: #dc2626; }
.field-error { display: block; color: #dc2626; font-size: .82rem; margin-top: 5px; }
.form-alert { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 10px; padding: .75rem 1rem; margin-bottom: 18px; font-size: .92rem; }
.form-note { font-size: .82rem; color: var(--muted); text-align: center; margin: 14px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { text-align: center; padding: 30px 10px; }
.success-icon { width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: #dcfce7; color: #16a34a; }
.success-icon .icon { width: 30px; height: 30px; }
.form-success p { color: var(--muted); }

.page-404 { padding: 160px 0; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid, .split, .demo-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-visual { max-width: 620px; }
    .mock { transform: none; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .security-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-box { flex-direction: column; align-items: flex-start; padding: 40px; }
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: absolute;
        top: 72px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 24px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .25);
        display: none;
    }
    .nav-menu.open { display: flex; }
    .nav-menu > a, .on-dark .nav-menu > a { color: var(--text); padding: 14px 0; border-bottom: 1px solid var(--line); }
    .nav-actions { padding-top: 16px; }
    .nav-actions .btn { flex: 1; }
    .on-dark .nav-menu .btn-ghost { color: var(--text); border-color: var(--line); }
    .steps { grid-template-columns: 1fr; }
    .strip-grid { grid-template-columns: repeat(2, 1fr); }
    .strip-grid > div:nth-child(odd) { border-left: 0; padding-left: 0; }
    .strip-grid > div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .07); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .section { padding: 80px 0; }
    .hero { padding: 120px 0 80px; }
    .feature-grid, .security-grid, .form-row { grid-template-columns: 1fr; }
    .form-row { gap: 0; }
    .mock-body { grid-template-columns: 1fr; }
    .mock-list { display: none; }
    .float-card { left: 8px; bottom: -22px; }
    .cta-box { padding: 32px 24px; }
    .form-card { padding: 24px 20px; }
    .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}
