/* Nova AI — shared planning site styles
   Loaded by index.html, overview.html, specs.html, architecture.html, walkthrough/*.html
   Provides: design tokens, theme variables, top nav strip, theme toggle */

:root {
  --teal: #1D9E75;
  --teal-hover: #17865f;
  --teal-dim: rgba(29,158,117,0.12);
  --teal-mid: rgba(29,158,117,0.35);
  --teal-tint-soft: rgba(29,158,117,0.04);
  --teal-tint: rgba(29,158,117,0.06);
  --nav-h: 48px;
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
}

[data-theme="cream"], :root:not([data-theme]) {
  --bg: #F6F1EB;
  --bg-2: #FFFFFF;
  --bg-3: #EDE7DF;
  --bg-4: #E4DCCD;
  --border: #DDD5C9;
  --border-strong: #C9BFAF;
  --text: #1A1814;
  --text-muted: #6B6355;
  --text-dim: #A09585;
  --nav-bg: rgba(246,241,235,0.92);
  --code-bg: #1A1814;
  --code-text: #C4BDB0;
  --hover-tint: rgba(0,0,0,0.03);
  --description-tint: rgba(29,158,117,0.06);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #161616;
  --bg-4: #1c1c1c;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.18);
  --text: #e8e6e0;
  --text-muted: #6b6965;
  --text-dim: #3a3835;
  --nav-bg: rgba(10,10,10,0.92);
  --code-bg: #0f0f0f;
  --code-text: #e8e6e0;
  --hover-tint: rgba(255,255,255,0.04);
  --description-tint: rgba(29,158,117,0.04);
}

/* ── Top nav strip ─────────────────────────────────────────── */

.nova-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  gap: 4px;
}

.nova-nav-brand {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  margin-right: 18px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nova-nav-brand:hover {
  color: var(--teal-hover);
}

.nova-nav a:not(.nova-nav-brand) {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 14px 12px;
  position: relative;
  transition: color 0.15s ease;
  text-transform: lowercase;
}

.nova-nav a:not(.nova-nav-brand):hover {
  color: var(--text);
}

.nova-nav a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--teal);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.nova-nav[data-active="intro"] .nav-intro,
.nova-nav[data-active="overview"] .nav-overview,
.nova-nav[data-active="walkthrough"] .nav-walkthrough,
.nova-nav[data-active="specs"] .nav-specs,
.nova-nav[data-active="architecture"] .nav-architecture {
  color: var(--text);
}

.nova-nav[data-active="intro"] .nav-intro::after,
.nova-nav[data-active="overview"] .nav-overview::after,
.nova-nav[data-active="walkthrough"] .nav-walkthrough::after,
.nova-nav[data-active="specs"] .nav-specs::after,
.nova-nav[data-active="architecture"] .nav-architecture::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ── Theme toggle ──────────────────────────────────────────── */

.nova-theme-toggle {
  margin-left: auto;
  display: inline-flex;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  gap: 0;
}

.nova-theme-toggle button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nova-theme-toggle button:hover {
  color: var(--text);
}

[data-theme="cream"] .nova-theme-toggle button[data-theme-set="cream"],
:root:not([data-theme]) .nova-theme-toggle button[data-theme-set="cream"],
[data-theme="dark"] .nova-theme-toggle button[data-theme-set="dark"] {
  background: var(--teal);
  color: #fff;
}

/* ── Page body padding (so content clears the sticky nav) ─── */

body.nova-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

/* ── Walkthrough pages: full-viewport tour app
       The walkthrough pages have a 40px fixed `.topbar` and `.shell`
       sized to calc(100vh - 40px). The nova-nav sits above the topbar:
       pushes it down 48px and shrinks the shell accordingly. ── */

body.walkthrough-page .nova-nav {
  position: fixed;
  top: 0;
}
body.walkthrough-page .topbar {
  top: var(--nav-h) !important;
}
body.walkthrough-page .shell {
  margin-top: calc(var(--nav-h) + 40px) !important;
  height: calc(100vh - var(--nav-h) - 40px) !important;
}

/* Walkthrough pages keep their existing palette via styles.css; the nav
   strip itself uses the shared dark/cream tokens regardless. */

/* Mobile tweaks */
@media (max-width: 640px) {
  .nova-nav {
    padding: 0 12px;
  }
  .nova-nav-brand {
    margin-right: 8px;
  }
  .nova-nav a:not(.nova-nav-brand) {
    padding: 14px 8px;
  }
  .nova-theme-toggle button {
    padding: 4px 8px;
  }
}
