/* ============================================================
   eureka·meta — shared brand layer
   Loaded by every page BEFORE its page-specific <style> block.
   Owns: design tokens, reset, base typography, header, brand
   mark, footer, eyebrow, reveal animation. Page-specific layout
   stays in each page.
   ============================================================ */

/* === DESIGN TOKENS === */
:root {
  --paper:      #f5f1e8;   /* warm ivory background */
  --paper-2:    #efe9dc;   /* slightly deeper surface */
  --card:       #fbf9f3;   /* raised card */
  --ink:        #1c1a16;   /* near-black, warm */
  --navy:       #14233b;   /* deep ink-navy for headings */
  --muted:      #6c665c;   /* secondary text */
  --clay:       #b0532b;   /* single warm accent, used sparingly */
  --clay-soft:  rgba(176, 83, 43, 0.10);
  --green:      #3f7d5e;   /* status accent (use-cases badges) */
  --green-soft: rgba(63, 125, 94, 0.12);
  --line:       rgba(28, 26, 22, 0.12);
  --line-soft:  rgba(28, 26, 22, 0.07);
  --maxw:       820px;     /* pages may override (use-cases: 1020px) */
  --serif:      "Fraunces", Georgia, "Times New Roman", serif;
  --sans:       "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* === RESET / BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1100px 620px at 80% -8%, rgba(176, 83, 43, 0.07), transparent 70%),
    radial-gradient(900px 520px at -10% 5%, rgba(20, 35, 59, 0.05), transparent 70%);
  background-attachment: fixed;
}
a { color: var(--clay); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* === HEADER / NAV === */
header.site {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(245, 241, 232, 0.78);
  border-bottom: 1px solid var(--line-soft);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-weight: 600; font-size: 1.12rem; color: var(--navy);
  letter-spacing: -0.01em;
}
.brand .dot { color: var(--clay); }
.brand a { color: inherit; display: inline-flex; align-items: center; gap: 10px; }
.brand a:hover { text-decoration: none; }
.brand .mark { width: 26px; height: 26px; border-radius: 6px; display: block; flex-shrink: 0; }
nav a {
  color: var(--muted); margin-left: 24px; font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.01em;
}
nav a:hover { color: var(--navy); text-decoration: none; }
nav a.active { color: var(--navy); }
@media (max-width: 560px) { nav a:first-child { display: none; } }

/* === SHARED ACCENTS === */
.eyebrow {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--clay);
}
.muted { color: var(--muted); }

/* === FOOTER === */
footer {
  padding: 40px 0; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 0.85rem;
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer .brand-sm { font-family: var(--serif); color: var(--navy); }
footer a { color: var(--muted); }
footer a:hover { color: var(--navy); }

/* === LOAD ANIMATION (staggered fade-up) === */
.reveal { opacity: 0; transform: translateY(16px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; }
.d3 { animation-delay: .25s; } .d4 { animation-delay: .35s; } .d5 { animation-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
