/* SpatialSense programmatic landing pages — shared stylesheet.
   System font stack, no webfonts, mobile-first. Palette sourced from the
   live app's src/theme/designSystem.js (Kodifly/ss-apex, website-v3). */

:root {
  --blue: #3064ff;
  --blue-hover: #1848cc;
  --blue-shadow: rgba(48, 100, 255, 0.25);
  --blue-muted: #F0F4FF;
  --bg: #ffffff;
  --heading: #0c0a09;
  --body: #57534e;
  --muted: #78716c;
  --subtle: #a8a29e;
  --border: #e7e5e4;
  --border-medium: #d6d3d1;
  --radius: 10px;
  --content-width: 720px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

img, svg { max-width: 100%; display: block; }

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────────────────
   Matches the live app's Navigation.jsx: same logo lockup (spatial-wordmark
   + sense-wordmark, "by Kodifly"), same link set and CTA styling. Sticky
   instead of fixed+blur, and no theme toggle/mobile drawer, since these
   static pages carry zero JS by design (CLAUDE.md §8). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}
.logo-block {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-block:hover { text-decoration: none; opacity: 0.85; }
.logo-marks {
  position: relative;
  width: 142px;
  height: 36px;
  flex-shrink: 0;
}
.logo-marks img { position: absolute; left: 0; top: 0; display: block; }
.mark-spatial { width: 68px; height: 24px; filter: brightness(0); }
.mark-sense { width: 66px; height: 12.5px; left: 72px; top: 5.75px; }
.logo-by {
  position: absolute;
  left: 72px; top: 19px; width: 66px; height: 17px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 14px;
  flex: 1;
  justify-content: center;
}
.site-nav a { color: var(--body); white-space: nowrap; }
.site-nav a:hover { color: var(--heading); text-decoration: none; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-login {
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 8px 16px;
  white-space: nowrap;
}
.nav-login:hover { text-decoration: none; background: var(--blue-muted); border-color: var(--blue); color: var(--heading); }
.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff !important;
  background: var(--blue);
  border-radius: 8px;
  padding: 8px 16px;
  white-space: nowrap;
  box-shadow: 0 0 20px var(--blue-shadow);
}
.nav-cta:hover { text-decoration: none; background: var(--blue-hover); }

@media (max-width: 860px) {
  .nav-optional { display: none; }
}
@media (max-width: 600px) {
  .site-header .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; justify-content: flex-start; gap: 14px; }
  .nav-login { display: none; }
}

/* ── Typography ─────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--heading);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  font-weight: 700;
}
h2 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  line-height: 1.25;
  color: var(--heading);
  margin: 40px 0 14px;
  font-weight: 700;
}
h3 {
  font-size: 1.125rem;
  color: var(--heading);
  margin: 24px 0 10px;
  font-weight: 600;
}
p { margin: 0 0 16px; }
.subhead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 28px;
}
.lede { font-size: 1.0625rem; }

main .wrap { padding-top: 48px; padding-bottom: 64px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--blue-shadow);
}
.btn-primary:hover { background: var(--blue-hover); }
.btn-secondary {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--border-medium);
}
.btn-secondary:hover { border-color: var(--blue); background: var(--blue-muted); }

/* ── CTA block ──────────────────────────────────────────────────────── */
.cta-block {
  background: var(--blue-muted);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 28px 0 40px;
}
.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}
.cta-note {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 0;
}
.cta-secondary-line {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 0;
}

/* ── Steps ──────────────────────────────────────────────────────────── */
.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Feature grid ───────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0 0 32px;
}
@media (min-width: 560px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.feature-card h3 { margin-top: 0; }
.feature-card p { margin-bottom: 0; font-size: 14px; }

/* ── FAQ ────────────────────────────────────────────────────────────── */
.faq-item {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item h3 { margin: 0 0 8px; font-size: 1rem; }
.faq-item p { margin: 0; font-size: 15px; }

/* ── Comparison table ───────────────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 14px;
}
.compare-table th, .compare-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.compare-table th { background: #FAFAF9; color: var(--heading); }
.table-scroll { overflow-x: auto; margin: 0 0 32px; }
.table-scroll .compare-table { margin: 0; }

/* ── Definition box (GUIDE template) ───────────────────────────────── */
.definition-box {
  border-left: 3px solid var(--blue);
  background: var(--blue-muted);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 32px;
  font-size: 1.0625rem;
  color: var(--heading);
}

/* ── Disclosure note (COMPARE template) ────────────────────────────── */
.disclosure {
  font-size: 13px;
  color: var(--subtle);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 32px;
}

/* ── Related links ──────────────────────────────────────────────────── */
.related-links {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 40px;
}
.related-links h2 { margin-top: 0; }
.related-links ul { padding-left: 20px; margin: 0; }
.related-links li { margin-bottom: 8px; }

/* ── Footer ─────────────────────────────────────────────────────────────
   Matches the live app's Footer.jsx: dark stone-900 ground, logo lockup,
   tagline, quick links, social icons, copyright bar. The app's footer has
   no sitemap section (it doesn't need one — the app only has a handful of
   routes); these programmatic pages do, per CLAUDE.md §6, so a dark-themed
   .footer-sitemap block is added between the brand row and the bottom bar
   rather than bolted on in a different visual language. */
.site-footer {
  background: #1c1917;
  color: #ffffff;
  margin-top: 24px;
}
.site-footer .wrap { max-width: 1200px; }
.site-footer a { color: inherit; }

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 0 24px;
}
.footer-brand { max-width: 460px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: 14px;
}
.footer-logo:hover { text-decoration: none; opacity: 0.85; }
.footer-logo img:first-child { height: 24px; width: 68px; }
.footer-logo img:last-child { height: 13px; width: 66px; }
.footer-tagline {
  font-size: 14px;
  font-weight: 300;
  color: #a8a29e;
  margin: 0 0 20px;
}
.footer-quicklinks { display: flex; gap: 20px; font-size: 14px; flex-wrap: wrap; }
.footer-quicklinks a { color: #d6d3d1; }
.footer-quicklinks a:hover { color: #ffffff; text-decoration: none; }

.footer-social-block { display: flex; flex-direction: column; gap: 12px; }
.footer-social-label { font-size: 16px; font-weight: 700; color: #ffffff; margin: 0; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #a8a29e;
}
.footer-social a:hover { color: #ffffff; border-color: rgba(255,255,255,0.25); text-decoration: none; }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

.footer-sitemap {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 28px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  font-size: 14px;
}
@media (min-width: 640px) {
  .footer-sitemap { grid-template-columns: repeat(3, 1fr); }
}
.footer-sitemap h4 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-sitemap ul { list-style: none; padding: 0; margin: 0; }
.footer-sitemap li { margin-bottom: 8px; }
.footer-sitemap a { color: #a8a29e; }
.footer-sitemap a:hover { color: #ffffff; text-decoration: none; }

.footer-bottom-bar {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #78716c;
}
.footer-bottom-bar a:hover { color: #d6d3d1; text-decoration: none; }
