/* Finn brand system — shared stylesheet for every page (landing, docs, legal,
   admin mocks, future surfaces). Design tokens here are the single source of
   truth; the guide at /brand documents when to use each one.

   Extracted from prototypes/landing.html on 2026-04-21. Keep in sync with
   docs/mocks/* and prototypes/*.
*/

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-page:          #F8F6F1;  /* warm cream — default page bg          */
  --bg-surface:       #FFFFFF;  /* cards, panels                          */
  --bg-elevated:      #F0EDE8;  /* inset code blocks, subtle fills        */
  --bg-dark:          #1C1917;  /* dark cards on light page (and dark mode bg) */
  --bg-dark-surface:  #292524;  /* elevated on dark                       */

  /* Text */
  --text-primary:       #1C1917;
  --text-secondary:     #44403C;
  --text-muted:         #78716C;
  --text-faint:         #A8A29E;
  --text-on-dark:       #FAF9F6;
  --text-on-dark-muted: #A8A29E;

  /* Borders */
  --border:         #E7E5E4;
  --border-subtle:  #EDEAE6;

  /* Accent — teal (primary action + highlight) */
  --accent:        #0F766E;
  --accent-hover:  #0D9488;
  --accent-light:  #CCFBF1;

  /* Semantic */
  --ok:    #16A34A; --ok-light:   #DCFCE7;
  --warn:  #CA8A04; --warn-light: #FEF9C3;
  --bad:   #DC2626; --bad-light:  #FEE2E2;

  /* Typography stacks — Google Fonts loaded via <link> in page <head> */
  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', Menlo, 'SF Mono', Consolas, ui-monospace, monospace;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
}

[data-theme="dark"] {
  --bg-page:          #1C1917;
  --bg-surface:       #292524;
  --bg-elevated:      #44403C;
  --bg-dark:          #0C0A09;
  --bg-dark-surface:  #1C1917;
  --text-primary:       #FAF9F6;
  --text-secondary:     #D6D3D1;
  --text-muted:         #A8A29E;
  --text-faint:         #78716C;
  --border:         #44403C;
  --border-subtle:  #3A3633;
  --accent:        #2DD4BF;
  --accent-hover:  #5EEAD4;
  --accent-light:  rgba(45, 212, 191, 0.12);
}

/* ── Base reset + typography ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
code, pre, kbd, samp { font-family: var(--mono); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Nav strip (used on every content page) ─────────────────────────── */
.brand-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-page) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.brand-nav .wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5em; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand-nav a.logo { font-family: var(--serif); font-size: 22px; color: var(--text-primary); text-decoration: none; letter-spacing: -0.01em; }
.brand-nav a.logo:hover { text-decoration: none; color: var(--text-primary); }
.brand-nav nav { display: flex; gap: 1.75em; font-size: 14px; }
.brand-nav nav a { color: var(--text-muted); }
.brand-nav nav a:hover { color: var(--text-primary); text-decoration: none; }

/* ── Footer (used on every content page) ────────────────────────────── */
.brand-footer { border-top: 1px solid var(--border-subtle); padding: 2.5em 0 3em; color: var(--text-muted); font-size: 13px; }
.brand-footer .wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5em; display: flex; justify-content: space-between; gap: 2em; flex-wrap: wrap; align-items: baseline; }
.brand-footer .tag { font-family: var(--serif); font-size: 16px; color: var(--text-secondary); }
.brand-footer nav { display: flex; gap: 1.5em; flex-wrap: wrap; }
.brand-footer nav a { color: var(--text-muted); }
.brand-footer nav a:hover { color: var(--text-primary); text-decoration: none; }

/* ── .doc shell (markdown-rendered pages: docs, legal, brand guide) ──── */
.doc { max-width: 760px; margin: 0 auto; padding: 2.5em 1.5em 4em; }
.doc h1 { font-size: 2.5em; margin: 0 0 0.5em; color: var(--text-primary); }
.doc h2 { font-size: 1.5em; margin: 1.75em 0 0.5em; color: var(--text-primary); border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.3em; }
.doc h3 { font-size: 1.15em; margin: 1.5em 0 0.4em; color: var(--text-primary); }
.doc p  { margin: 0 0 1em; color: var(--text-secondary); }
.doc ul, .doc ol { color: var(--text-secondary); padding-left: 1.5em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.3em; }
.doc code { background: var(--bg-elevated); padding: 2px 6px; border-radius: var(--radius-sm); font-size: 0.9em; color: var(--text-primary); }
.doc pre { background: var(--bg-dark); color: var(--text-on-dark); padding: 1.1em 1.4em; border-radius: var(--radius-md); overflow-x: auto; margin: 1em 0; font-size: 0.9em; line-height: 1.55; }
.doc pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }
.doc a { color: var(--accent); }
.doc a:hover { color: var(--accent-hover); }
.doc table { border-collapse: collapse; margin: 1em 0; font-size: 0.95em; }
.doc th, .doc td { border: 1px solid var(--border); padding: 8px 14px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-elevated); font-weight: 600; }
.doc blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: 0.3em 1em; background: var(--accent-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-secondary); }
.doc blockquote p { margin: 0.3em 0; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* ── Shared Google Fonts import reminder ──
   Pages using this stylesheet must also include:
     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
*/
