/* Cenith — site styles */
:root {
  --bg: #f7f6f2;
  --bg-alt: #efede6;
  --surface: #ffffff;
  --ink: #0d192b;
  --ink-soft: #4a525e;
  --ink-faint: #7b8390;
  --line: #dedbd2;
  --accent: #0055ff;
  --accent-ink: #ffffff;
  --accent-soft: #e2ebff;
  --glow: #0055ff;
  --brand-blue: #0055ff;
  --radius: 14px;
  --max: 1160px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f17;
    --bg-alt: #111522;
    --surface: #161b2a;
    --ink: #eef0f2;
    --ink-soft: #aeb5bf;
    --ink-faint: #7d8591;
    --line: #252c3f;
    --accent: #6d8fff;
    --accent-ink: #0a1230;
    --accent-soft: #18234a;
    --glow: #5b80ff;
    --brand-blue: #3d6bff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand-logo, .brand-logo img { display: block; height: 28px; width: auto; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: 8px; }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer; }
.menu-btn svg { width: 24px; height: 24px; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 17px; }
  .nav-cta { margin: 8px 0 0; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink-faint); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { border-color: var(--ink); }
.btn-small { padding: 8px 16px; }
.nav-links .btn-small { color: var(--bg); }

/* Hero */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 20px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 4px var(--accent-soft); }
h1 {
  font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -.035em;
  margin: 0 0 24px; font-weight: 750;
}
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(18px, 2vw, 20px); color: var(--ink-soft); max-width: 34em; margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual.edge {
  position: relative; aspect-ratio: 1 / 1; border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #121a33 0%, #0a0f1f 55%, #060914 100%);
  border: 1px solid #1f2742;
  box-shadow: 0 40px 80px -40px rgba(10, 15, 31, .6), inset 0 1px 0 rgba(255,255,255,.04);
  color: #c9d2e8;
}
.edge-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.halo { animation: halo 4s ease-in-out infinite; transform-origin: 300px 300px; }
@keyframes halo { 50% { opacity: .65; transform: scale(.94); } }

.trace { fill: none; stroke: #2a3558; stroke-width: 2; stroke-linejoin: round; }
.trace.dim { stroke: #2a3558; }
.pulse { fill: none; stroke: #7ea0ff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 18 600; animation: flow var(--dur) var(--delay) linear infinite; }
.pulses-glow .pulse { stroke: #4c7dff; stroke-width: 6; opacity: .7; }
@keyframes flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 618; } }

.cloud { fill: none; stroke: #3a4568; stroke-width: 2; }
.cut { fill: #0a0f1f; stroke: #3a4568; stroke-width: 1.5; }
.cut-x { stroke: #e0607e; stroke-width: 1.8; stroke-linecap: round; }
.cloud-label { font: 600 11px var(--mono); letter-spacing: .14em; fill: #56628a; }


.orbit { fill: none; stroke: #2c3963; stroke-width: 1.2; }
.orbit-inner { stroke-dasharray: 2 5; }
.orbit-arc { fill: none; stroke: url(#arc); stroke-width: 2.2; stroke-linecap: round; }
.orbit-dot { fill: #b9caff; }
.spin { transform-origin: 300px 300px; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin-a { animation: spin 14s linear infinite; }
.spin-b { animation: spin 9s linear infinite reverse; }
.core-glow { animation: halo 3s ease-in-out infinite; transform-origin: 300px 300px; }
.nn-links path { stroke: #dbe5ff; stroke-opacity: .35; stroke-width: 1; }
.nn-nodes circle { fill: #ffffff; fill-opacity: .55; animation: fire 1.8s var(--ld) ease-in-out infinite; }
@keyframes fire { 0%, 100% { fill-opacity: .45; } 25% { fill-opacity: 1; } }
.model-name { font: 700 12px var(--font); letter-spacing: .36em; fill: #c3d1f5; }
.model-sub { font: 600 9px var(--mono); letter-spacing: .2em; fill: #6c7aa6; }

.node-bg { fill: #0f1630; stroke: #34416b; stroke-width: 1.5; }
.node-ring { fill: none; stroke: #4c7dff; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.node-icon { fill: none; stroke: #b8c6ef; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.node-label { font: 600 11.5px var(--mono); letter-spacing: .14em; fill: #7d89b0; }
.node.hit .node-ring { animation: ping 1.2s ease-out; }
.node.hit .node-bg { stroke: #6d8fff; }
.node.hit .node-icon { stroke: #ffffff; }
@keyframes ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }

.hud { position: absolute; font-family: var(--mono); font-size: 11px; line-height: 1.5; }
.hud span { display: block; text-transform: uppercase; letter-spacing: .14em; color: #56628a; font-size: 10px; margin-bottom: 2px; }
.hud b { font-weight: 600; color: #dbe3f7; display: inline-flex; align-items: center; gap: 7px; }
.hud b.accent { color: #7ea0ff; }
.hud-tl { top: 20px; left: 22px; } .hud-tr { top: 20px; right: 22px; text-align: right; }
.hud-bc { bottom: 20px; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7d89b0; }
.live { width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 3px rgba(61, 220, 151, .18); animation: live 2s infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 6px rgba(61, 220, 151, 0); } }

@media (max-width: 520px) {
  .hero-visual.edge { border-radius: 20px; aspect-ratio: 4 / 5; }
  .edge-svg { top: 9%; bottom: 9%; height: 82%; }
  .node-label { font-size: 15px; } .cloud-label { font-size: 14px; }
  .hud { font-size: 10px; } .hud span { font-size: 9px; }
  .hud-tl { left: 14px; top: 14px; } .hud-tr { right: 14px; top: 14px; }
  .hud-bc { bottom: 16px; font-size: 10px; }
  .model-name { font-size: 15px; } .model-sub { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .halo, .pulse, .live, .spin, .core-glow, .nn-nodes circle { animation: none; }
  .pulses-glow { display: none; }
  .pulse { stroke-dasharray: none; opacity: .35; }
}

@media (max-width: 900px) {
  .hero { padding: 40px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; width: 100%; margin: 0 auto; }
}

/* Facts strip */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 26px 24px; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts strong { display: block; font-size: 22px; letter-spacing: -.02em; }
.facts span { color: var(--ink-faint); font-size: 14px; }
@media (max-width: 820px) {
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li { padding: 20px 16px; border-left: 0; }
  .facts li:first-child { padding-left: 16px; }
  .facts li:nth-child(odd) { padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Sections */
section.block { padding: 104px 0; }
section.block.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 18px; font-weight: 720; }
h3 { font-size: 21px; letter-spacing: -.015em; margin: 0 0 10px; line-height: 1.3; }
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 0; }
@media (max-width: 600px) { section.block { padding: 72px 0; } .section-head { margin-bottom: 40px; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px;
}
.card p { color: var(--ink-soft); margin: 0 0 18px; }
.card ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.card li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15px; color: var(--ink-soft); }
.card li:last-child { border-bottom: 0; padding-bottom: 0; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 22px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.icon svg { width: 24px; height: 24px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* Why on-device */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pillar {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 40px 36px;
}
.pillar-label { font-family: var(--mono); font-size: 13px; color: var(--accent); margin: 0 0 10px; }
.pillar h3 { font-size: 28px; letter-spacing: -.025em; margin-bottom: 14px; }
.pillar > p { color: var(--ink-soft); margin: 0 0 24px; }
.pillar .checks { margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { flex: none; width: 20px; height: 20px; color: var(--accent); margin-top: 3px; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } .pillar { padding: 32px 24px; } }

.compare {
  margin-top: 20px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: var(--surface); font-size: 16px;
}
.compare-row { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; }
.compare-row > span { padding: 16px 24px; border-top: 1px solid var(--line); }
.compare-row > span + span { border-left: 1px solid var(--line); }
.compare-head > span { border-top: 0; font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.compare-head > span:last-child { color: var(--accent); }
.compare [role="rowheader"] { font-weight: 600; }
.compare [role="cell"] { color: var(--ink-soft); }
.compare .good { color: var(--ink); font-weight: 600; background: var(--accent-soft); }
@media (max-width: 700px) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-row > span[role="rowheader"] { grid-column: 1 / -1; border-left: 0; padding-bottom: 6px; }
  .compare-row > span[role="cell"] { border-top: 0; padding-top: 6px; font-size: 15px; }
  .compare-row > span[role="cell"]:first-of-type { border-left: 0; }
  .compare-row > span[role="cell"]::before { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 2px; }
  .compare-row > span[role="cell"]:nth-child(2)::before { content: "Cloud AI"; }
  .compare-row > span[role="cell"]:nth-child(3)::before { content: "On-device"; color: var(--accent); }
}

/* Principle band */
.principle { background: #0d192b; color: #f3f5fa; padding: 112px 0; }
.principle .kicker { color: #8aa4ff; }
.principle-statement {
  font-size: clamp(32px, 5vw, 60px); line-height: 1.08; letter-spacing: -.035em; font-weight: 720;
  margin: 0 0 24px; max-width: 16em;
}
.principle-statement em { font-style: normal; color: #7d9bff; }
.principle-sub { color: #b4bdd0; font-size: 19px; max-width: 38em; margin: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .principle { background: #18213a; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); } }
@media (max-width: 600px) { .principle { padding: 80px 0; } }

/* Focus areas */
.focus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.focus {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px 32px; transition: border-color .2s, transform .2s;
}
.focus:hover { border-color: var(--accent); transform: translateY(-2px); }
.focus-n {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
  background: var(--brand-blue); color: #fff; font-family: var(--mono); font-size: 14px; font-weight: 600;
  margin-bottom: 40px;
}
.focus p { color: var(--ink-soft); margin: 0; font-size: 16px; }
@media (max-width: 1000px) { .focus-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .focus-grid { grid-template-columns: 1fr; } }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.steps li::before {
  counter-increment: s; content: "0" counter(s);
  font-family: var(--mono); font-size: 13px; color: var(--accent); display: block; margin-bottom: 18px;
}
.steps p { margin: 0; color: var(--ink-soft); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.contact-list { display: grid; gap: 14px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.contact-item .icon { margin: 0; flex: none; }
.contact-item small { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.contact-item a, .contact-item address { font-style: normal; font-size: 18px; font-weight: 600; text-decoration: none; }
.contact-item a:hover { color: var(--accent); }
.copy-btn {
  margin-left: auto; align-self: center; font: inherit; font-size: 13px; color: var(--ink-soft);
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.copy-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .copy-btn { display: none; } .contact-item a, .contact-item address { font-size: 16px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--ink-faint); font-size: 14px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0 0 6px; }

/* Legal / simple pages */
.page { padding: 72px 0 104px; }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(36px, 5vw, 52px); }
.prose h2 { font-size: 24px; margin-top: 44px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose a { color: var(--accent); }
.muted { color: var(--ink-faint); font-size: 15px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
