/* Feedwyre website — shared design tokens, reset, typography base, header/nav,
   buttons, and the simple footer used by every page except the home page
   (which has its own richer multi-column footer in its own <style> block).
   Change a color, font, header, or footer link style here ONCE — every page
   that links this file picks it up. Page-specific layout (hero, pricing
   cards, docs sidebar, diagrams, legal-page prose sizing, …) stays in each
   page's own <style> block below its <link> to this file, and can freely
   override anything here since it loads later in the cascade. */

:root {
  --bg: #faf8ff;
  --surface: #ffffff;
  --surface-alt: #f2ecff;
  --ink: #170f2b;
  --ink-soft: #4a4166;
  --muted: #83799b;
  --border: #e6def7;
  --brand: #7e14ff;
  --brand-ink: #38077f;
  --brand-tint: #f1e6ff;
  --accent: #1f9aff;
  --accent-ink: #ffffff;
  --accent-soft: #dcefff;
  --success: #12a678;
  --success-soft: #d9f5ea;
  --warn: #b7791f;
  --warn-soft: #fbf0d9;
  --danger: #c0392b;
  --danger-soft: #fbe4e1;
  /* Deliberately NOT redefined in the dark-mode blocks below - a terminal-style code block reads
     the same dark-bg/light-text in both themes, same as most code-focused sites. --brand-ink
     isn't safe for this: it's a text-ink token that intentionally flips to a LIGHT color in dark
     mode, which is exactly why code panels went unreadable there before this token existed. */
  --code-bg: #2c1257;
  --code-text: #dfe6f5;
  /* Also deliberately theme-invariant, for the same reason as --code-bg above: a few elements
     (the pricing CTA band, the distributor callout card) are a solid/gradient brand-color surface
     with hardcoded white text - safe in light mode where --brand/--accent are vivid and dark
     enough, but --brand/--accent turn pale in dark mode (by design, so they stay legible as
     foreground text elsewhere), which left white text on a near-pastel background. */
  --brand-vivid: #7e14ff;
  --accent-vivid: #1f9aff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(24,10,50,.05), 0 8px 24px -12px rgba(94,20,220,.18);
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0818;
    --surface: #170f2c;
    --surface-alt: #1f1440;
    --ink: #f4effe;
    --ink-soft: #cabfe8;
    --muted: #9186b3;
    --border: #34255c;
    --brand: #b98bff;
    --brand-ink: #e4d4ff;
    --brand-tint: #2a1c52;
    --accent: #5cc2ff;
    --accent-ink: #061626;
    --accent-soft: #16324a;
    --success: #4fd9a8;
    --success-soft: #113828;
    --warn: #f0b45c;
    --warn-soft: #3a2b10;
    --danger: #ff8a80;
    --danger-soft: #3a1414;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0c0818;
  --surface: #170f2c;
  --surface-alt: #1f1440;
  --ink: #f4effe;
  --ink-soft: #cabfe8;
  --muted: #9186b3;
  --border: #34255c;
  --brand: #b98bff;
  --brand-ink: #e4d4ff;
  --brand-tint: #2a1c52;
  --accent: #5cc2ff;
  --accent-ink: #061626;
  --accent-soft: #16324a;
  --success: #4fd9a8;
  --success-soft: #113828;
  --warn: #f0b45c;
  --warn-soft: #3a2b10;
  --danger: #ff8a80;
  --danger-soft: #3a1414;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 28px -14px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
p { margin: 0 0 1em; color: var(--ink-soft); max-width: 66ch; }
code, .mono { font-family: var(--font-mono); }
code { background: var(--surface-alt); padding: .15em .4em; border-radius: 5px; font-size: .88em; }
.tabular { font-variant-numeric: tabular-nums; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 1.4em; height: 1px; background: var(--accent); }

/* header */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 600; font-size: 1.50rem; text-decoration: none; color: var(--ink); }
.brand .mark { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: .93rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.current { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: .9rem; }
.nav-cta .login { text-decoration: none; font-size: .93rem; font-weight: 600; color: var(--ink); }

/* theme toggle - a 3-way switch (light / dark / system), state kept in the fw_theme cookie by
   partials/header.html's own script; see partials/theme-init.html for the FOUC-avoiding read. */
.theme-toggle { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin-left: 1.2rem; flex: none; }
.theme-btn {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 999px; border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.theme-btn svg { width: 15px; height: 15px; }
.theme-btn:hover { color: var(--ink-soft); }
.theme-btn.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.theme-btn.active:hover { color: var(--accent); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .93rem;
  padding: .68rem 1.25rem; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-block { width: 100%; }

/* footer — same markup (see partials/footer.html) on every page */
footer.site { border-top: 1px solid var(--border); padding: 3.5rem 0 2.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.1fr repeat(5, 1fr); gap: 1.75rem; margin-bottom: 2.5rem; }
.footer-grid h4 { font-family: var(--font-body); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer-grid a { text-decoration: none; color: var(--ink-soft); font-size: .9rem; }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); flex-wrap: wrap; gap: 1rem; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
