/* ────────────────────────────────────────────────────────────────────────
   MooseQuest — shared site stylesheet
   Rules here are the ones that were duplicated, byte-for-byte, across two
   or more of the five pages (index, about, contact, products, services).
   Anything that differs even slightly between pages — sizes, positions,
   colors that vary per page — stays in that page's own inline <style>
   block instead of being forced together here.
   ──────────────────────────────────────────────────────────────────────── */

/* ─── Design tokens — Silverstone + Geist, locked in ────────────────────── */
:root {
  --font-display: 'Geist', sans-serif;
  --font-body: 'Geist', sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --display-weight: 800;
  --display-weight-sm: 700;
  --display-tracking: -0.04em;
  --display-leading: 0.98;
  --accent: #a78bfa; --accent-strong: #8b5cf6;
  --accent2: #c0c4cc; --accent3: #7c3aed;
  --accent-rgb: 167,139,250; --accent2-rgb: 192,196,204; --accent3-rgb: 124,58,237;
  --bg: #0b0b0f; --bg-rgb: 11,11,15; --on-accent: #0b0b0f;
}

/* ─── Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: #f1f5f9;
  font-family: var(--font-body), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Grain overlay ──────────────────────────────────────────────────── */
.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .22;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Eyebrow ────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono), monospace;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

/* ─── Glow divider ───────────────────────────────────────────────────── */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),0.4) 40%, rgba(var(--accent2-rgb),0.3) 60%, transparent);
}

/* ─── Nav ────────────────────────────────────────────────────────────── */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease;
}
nav.site-nav.scrolled {
  /* scrolled: the banner dissolves entirely; the wordmark folds to MQ */
  background: transparent;
  border-bottom: 1px solid transparent;
}
.nav-inner {
  max-width: 88rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--font-mono), monospace;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.125rem;
}
nav .wordmark { text-shadow: 0 2px 14px rgba(11,11,15,0.9); }
/* MOOSEQUEST -> MQ: OOSE/UEST fold away on scroll, unfurl at top */
.wordmark .fold {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  max-width: 5ch;
  opacity: 1;
  transition: max-width 0.5s cubic-bezier(0.22,1,0.36,1), opacity 0.35s ease;
}
nav.site-nav.scrolled .wordmark .fold { max-width: 0; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .wordmark .fold { transition: none; }
}
.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(241,245,249,0.65);
  text-decoration: none;
  transition: color 0.2s;
  font-family: var(--font-mono), monospace;
  padding: 0.6rem 0.25rem;
  display: inline-block;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a:focus-visible,
.nav-cta:focus-visible,
.wordmark:focus-visible,
.footer-email a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.25rem;
}
/* scoped to beat `.nav-links a` (0,1,1) so the pill keeps its
   flex centering + padding instead of falling back to a text link */
.nav-links a.nav-cta {
  font-family: var(--font-mono), monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--on-accent);
  background: var(--accent);
  padding: 0 1.1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.2s;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-links a.nav-cta:hover { background: var(--accent-strong); color: var(--on-accent); }

/* ─── Page hero (about / products / services) ───────────────────────── */
.page-hero {
  padding: 9rem 1.5rem 5rem;
  max-width: 88rem;
  margin: 0 auto;
  position: relative;
}
.page-h1 {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(2.6rem, 1rem + 6vw, 5rem);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
  color: #f1f5f9;
}
.page-lead {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
  line-height: 1.7;
  color: rgba(241,245,249,0.65);
  max-width: 52ch;
}
.page-glow {
  position: absolute;
  top: 4rem; left: -6rem;
  width: 550px; height: 450px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--accent3-rgb),0.09), transparent 70%);
  pointer-events: none;
}

.section-h2 {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(1.4rem, 0.8rem + 2vw, 1.9rem);
  font-weight: var(--display-weight);
  letter-spacing: calc(var(--display-tracking) * 0.7);
  line-height: 1.15;
  color: #f1f5f9;
}

/* ─── Fade-up reveal ─────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1), transform 0.55s cubic-bezier(0.22,1,0.36,1);
}
.fade-up.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 2.5rem 1.5rem; }
.footer-inner {
  max-width: 88rem; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;
}
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-copy {
  font-size: 0.75rem; color: rgba(241,245,249,0.3);
  font-family: var(--font-mono), monospace; letter-spacing: 0.04em;
}
.footer-email a {
  font-size: 0.75rem; font-family: var(--font-mono), monospace;
  color: rgba(241,245,249,0.4); text-decoration: none; transition: color 0.2s;
  padding: 0.5rem 0; display: inline-block;
}
.footer-email a:hover { color: var(--accent); }
