/* ==========================================================================
   Ghostlabb — shared site styles
   Every page links this file. Page-specific tweaks go in a <style> block
   on that page, or in a small extra CSS file next to it.
   ========================================================================== */

/* ---------- Fonts (self-hosted: no Google requests, GDPR-friendly) ---------- */
/* Brand display font is Telegraf. Manrope is the free stand-in until the
   Telegraf web-font files are added to /assets/fonts/. To switch, add the
   @font-face for Telegraf and put it first in --font-sans below. */
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto Mono"; src: url("../fonts/roboto-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto Mono"; src: url("../fonts/roboto-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- Brand tokens ---------- */
:root {
  --green: #00ffab;
  --green-deep: #00c987;      /* green that stays readable on light backgrounds */
  --ink: #3a3a3a;             /* brand dark gray */
  --ink-deep: #2b2b2b;
  --cream: #fbfbf9;           /* brand off-white */
  --cream-muted: rgba(251, 251, 249, 0.6);
  --ink-muted: rgba(58, 58, 58, 0.65);

  --font-sans: "Telegraf", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 48px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

/* ---------- Themes ----------
   Dark (default): cream ghost.  Light: black ghost.
   Put class="theme-light" on <body> for light pages. */
body {
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.theme-light { background: var(--cream); color: var(--ink); }

.logo--on-light { display: none; }
.theme-light .logo--on-dark { display: none; }
.theme-light .logo--on-light { display: block; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(56px, 10vw, 120px); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(0.72rem, 0.68rem + 0.25vw, 0.85rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}
.theme-light .eyebrow { color: var(--green-deep); }

.display {
  font-weight: 800;
  font-size: clamp(2.5rem, 1.4rem + 5.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lead { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); color: var(--cream-muted); max-width: 46ch; }
.theme-light .lead { color: var(--ink-muted); }

.mark { position: relative; white-space: nowrap; }
.mark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em;
  height: 0.14em; background: var(--green); border-radius: 99px; z-index: -1;
}

/* ---------- Buttons (ready for landing pages) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.95em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.btn--primary { background: var(--green); color: var(--ink); }
.btn--primary:hover { background: #3dffbf; }
.btn--ghost { border-color: currentColor; background: transparent; color: inherit; }

/* ---------- Footer ---------- */
.site-footer {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em;
  color: var(--cream-muted); padding: 28px var(--pad); text-align: center;
}
.theme-light .site-footer { color: var(--ink-muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--green); }

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
