/* ============================================================
   Sanomatic — base primitives shared across pages
   Reset · layout · typography · nav/header · buttons · footer
   Depends on theme.css for tokens. Page-specific CSS lives per page.
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 28px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0;
}

/* ---------- Header / nav ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 249, 250, 0.82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; gap: 24px;
  padding-top: 16px; padding-bottom: 16px;
}
.wordmark {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--mono);
  font-size: 14px; letter-spacing: 0.2em;
  color: var(--ink); font-weight: 500;
}
.wordmark:hover { text-decoration: none; color: var(--ink); }
.beat {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(18, 165, 111, 0.16);
  animation: beat 1.05s ease-in-out infinite;
}
@keyframes beat {
  0%, 68%, 100% { transform: scale(1); }
  76% { transform: scale(1.4); }
  84% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .beat { animation: none; } }

nav.links { display: flex; gap: 26px; margin-left: auto; }
nav.links a { color: var(--muted); font-size: 14px; }
nav.links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 720px) { nav.links { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.05em;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.btn:hover {
  background: var(--accent-wash);
  color: var(--accent-deep);
  text-decoration: none;
}
.btn.solid {
  background: var(--accent); color: var(--paper-2);
  box-shadow: 0 1px 2px rgba(9, 95, 68, 0.24);
}
.btn.solid:hover {
  background: var(--accent-deep); color: #fff;
  box-shadow: 0 6px 20px rgba(9, 95, 68, 0.22);
  transform: translateY(-1px);
}
.nav .btn { margin-left: 8px; }
@media (max-width: 720px) { .nav .btn { margin-left: auto; } }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 28px 0; }
footer.site .wrap {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 12px;
  color: var(--faint); letter-spacing: 0.06em;
}
footer.site a { color: var(--faint); }
footer.site a:hover { color: var(--muted); text-decoration: none; }
