/* ============================================================
   Advera Labs — site styles
   Built on top of tokens.css. Every colour and spacing value
   comes from a token — no hardcoded hex, no arbitrary pixels
   (typographic tracking excepted, matching the tokens file).
   ============================================================ */

/* ─── 1. Self-hosted fonts (no CDN) ───────────────────────── */
/* Fraunces */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/fraunces-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/fraunces-italic.woff2') format('woff2');
}
/* Source Serif 4 */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-serif-4-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-serif-4-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/source-serif-4-600.woff2') format('woff2');
}
/* Inter */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-600.woff2') format('woff2');
}
/* JetBrains Mono */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-regular.woff2') format('woff2');
}

/* ─── 2. Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── 3. Base ─────────────────────────────────────────────── */
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--ink-soft);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
a { color: inherit; }

/* ─── 4. Typography ───────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 400;
}
h1 { font-size: var(--t-h1); line-height: var(--lh-display); letter-spacing: -1.4px; }
h2 { font-size: var(--t-h2); line-height: var(--lh-heading); letter-spacing: -0.8px; }
h3 { font-size: var(--t-h3); line-height: var(--lh-heading); letter-spacing: -0.4px; font-weight: 500; }
h4 { font-size: var(--t-h4); line-height: var(--lh-heading); font-weight: 600; }
p { color: var(--ink-soft); }

/* ─── 5. Brand patterns ───────────────────────────────────── */
/* Italic-cobalt emphasis — the brand's signature device.
   One meaningful word per heading. Not decorative. */
h1 em, h2 em, h3 em, .emphasis {
  font-style: italic;
  color: var(--cobalt);
  font-weight: inherit;
}
/* Wordmark em is cobalt italic but scoped separately from headings */
.nav-wordmark em,
.footer-wordmark em {
  font-style: italic;
  font-weight: 400;
  color: var(--cobalt);
}
/* Eyebrow */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cobalt);
  display: block;
  margin-bottom: var(--s-3);
}

/* ─── 6. Layout utilities ─────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.container--narrow    { max-width: 720px; }
.container--editorial { max-width: 680px; }
.section { padding: var(--s-9) 0; }
.section--paper { background: var(--paper); }
.section h2 { margin-bottom: var(--s-5); }
.block-center { text-align: center; }

/* ─── 7. Components ───────────────────────────────────────── */

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.nav-links { display: flex; gap: var(--s-5); }
.nav-links a {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--ink); }

/* Footer */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: var(--s-7) 0;
  flex-shrink: 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.footer-wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.footer-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-mute);
}

/* Hero */
.hero {
  background: var(--cream);
  padding: var(--s-9) 0;
  text-align: center;
}
.subhead {
  font-family: var(--font-body);
  font-size: var(--t-body-lg);
  line-height: var(--lh-body);
  color: var(--ink-soft);
  margin-top: var(--s-5);
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-6);
}
.card h3 { margin-bottom: var(--s-3); }
.card p { margin-bottom: var(--s-5); flex-grow: 1; }
.card .btn { align-self: flex-start; }
.card-note {
  font-family: var(--font-ui);
  font-size: var(--t-body-sm);
  color: var(--ink-mute);
}

/* Tag */
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: var(--s-3);
  align-self: flex-start;
}

/* Buttons */
.btn {
  font-family: var(--font-ui);
  font-size: var(--t-body-sm);
  font-weight: 500;
  padding: 11px 24px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; }
.btn-accent { background: var(--cobalt); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--cobalt);
  text-decoration: underline;
  padding: 0;
  border: none;
}

/* Prose blocks (Providence sections) */
.prose h2 { margin-bottom: var(--s-5); }
.prose p { margin-bottom: var(--s-4); }
.prose p:last-child { margin-bottom: 0; }

/* Feature list (Providence "who it's for") */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-5);
  margin: var(--s-6) 0;
}
.feature h4 {
  font-family: var(--font-ui);
  font-size: var(--t-body-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.feature p {
  font-family: var(--font-ui);
  font-size: var(--t-body-sm);
  line-height: var(--lh-ui);
  color: var(--ink-soft);
}
.lines-covered {
  font-family: var(--font-ui);
  font-size: var(--t-body-sm);
  color: var(--ink-soft);
}
.lines-covered strong { color: var(--ink); font-weight: 600; }

/* CTA + privacy note */
.cta-block { margin-top: var(--s-6); }
.privacy-note {
  font-family: var(--font-ui);
  font-size: var(--t-caption);
  line-height: var(--lh-ui);
  color: var(--ink-mute);
  margin-top: var(--s-4);
  max-width: 460px;
}
.block-center .privacy-note { margin-left: auto; margin-right: auto; }

/* Editorial (About) */
.editorial { padding: var(--s-9) 0; }
.editorial h1 { margin-bottom: var(--s-6); }
.editorial p {
  font-family: var(--font-body);
  font-size: var(--t-body-lg);
  line-height: var(--lh-body);
  margin-bottom: var(--s-5);
}
.editorial-contact { margin-top: var(--s-7); }
.editorial-contact h2 { margin-bottom: var(--s-5); }

/* ─── 9. Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: var(--t-h2); }
  h2 { font-size: var(--t-h3); }
  .section { padding: var(--s-7) 0; }
  .hero { padding: var(--s-7) 0; }
  .editorial { padding: var(--s-7) 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .nav-links { gap: var(--s-4); }
}
