/* Shared chrome for every landing/*.html page: theme tokens, base reset, nav,
   buttons, toggle and footer. Page-specific styles (hero, forms, docs, etc.)
   stay inline in each page's own <style> block. Loaded via
   <link rel="stylesheet" href="/base.css">, referenced by nav.js/footer.js. */

:root,
html[data-theme="light"] {
  --canvas: #fdfcfc;
  --soft: #f8f7f7;
  --card: #f1eeee;
  --ink: #201d1d;
  --body: #424245;
  --mute: #646262;
  --ash: #9a9898;
  --surface-dark: #201d1d;
  --surface-dark-elevated: #302c2c;
  --on-dark: #fdfcfc;
  --hairline: rgba(15, 0, 0, 0.12);
  --hairline-strong: #646262;
  --accent: var(--ink);
  --success: #30d158;
  --danger: #ff3b30;
  --warning: #ff9f0a;
}
html[data-theme="dark"] {
  --canvas: #201d1d;
  --soft: #262323;
  --card: #302c2c;
  --ink: #fdfcfc;
  --body: #c9c7c7;
  --mute: #9a9898;
  --ash: #6e6e73;
  --surface-dark: #161313;
  --surface-dark-elevated: #262323;
  --on-dark: #fdfcfc;
  --hairline: rgba(253, 252, 252, 0.14);
  --hairline-strong: #646262;
  --accent: var(--ink);
  --success: #32d74b;
  --danger: #ff453a;
  --warning: #ffa510;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--ink);
  text-decoration: underline;
}

.wrap {
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- nav ---- */

nav {
  border-bottom: 1px solid var(--hairline);
  height: 56px;
}

nav .wrap,
footer .wrap {
  max-width: 960px;
}

nav .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.wordmark {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
}

nav .links {
  display: flex;
  gap: 16px;
  margin-left: auto;
  align-items: center;
}

/* :not(.btn) keeps these text-link rules from out-specificity-ing .btn's own
   colors below - without it, the "open app" button inherited this mute/hover
   color and matched its own background on hover (invisible text). */
nav .links a:not(.btn) {
  color: var(--mute);
  font-size: 14px;
  text-decoration: none;
}

nav .links a:not(.btn):hover {
  color: var(--ink);
}

nav .links a.active {
  color: var(--ink);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  background: var(--ink);
  color: var(--canvas);
}

.btn:hover {
  opacity: 0.85;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}

.btn.ghost:hover {
  background: var(--hairline);
  opacity: 1;
}

.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-family: inherit;
  background: transparent;
  border: none;
  color: var(--mute);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
}

.toggle:hover {
  color: var(--ink);
}

.toggle .icon {
  width: 17px;
  height: 17px;
  display: none;
}

/* Dark theme: show the sun (clicking switches TO light). */
html[data-theme="dark"] .toggle .icon-sun {
  display: block;
}

/* Light theme: show the moon (clicking switches TO dark). */
html[data-theme="light"] .toggle .icon-moon {
  display: block;
}

/* ---- footer ---- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 6px 0;
}

footer .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--mute);
  font-size: 12px;
}

footer a {
  color: var(--mute);
  text-decoration: underline;
}

footer a:hover {
  color: var(--ink);
}
