/* =========================================================================
   ACTUALYTICS — shared stylesheet (used by index.html and about.html)
   EDIT colours and fonts in the :root block below; both pages update.
   ========================================================================= */

/* ===== DESIGN TOKENS ===== */
:root {
  --accent:#1d4ed8; --accent-hover:#1e40af; --on-accent:#fff;
  --bg:#fcfcfd; --bg-alt:#f3f5f9; --surface:#fff;
  --text:#15171c; --text-muted:#565a66; --border:#e5e7ef;
  --accent-text:#1e40af; --accent-soft:rgba(29,78,216,.09);
  --shadow-sm:0 1px 2px rgba(16,16,29,.06);
  --shadow-md:0 6px 16px rgba(16,16,29,.07), 0 2px 4px rgba(16,16,29,.05);
  --shadow-lg:0 24px 48px -12px rgba(16,16,29,.16), 0 8px 16px -8px rgba(16,16,29,.10);
  --font-serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",ui-serif,serif;
  --font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  --font-mono:ui-monospace,"SF Mono","Cascadia Code",Menlo,Consolas,monospace;
  --radius:16px; --radius-sm:10px; --maxw:780px;
}
:root[data-theme="dark"] {
  --accent:#2563eb; --accent-hover:#3b82f6;
  --bg:#0d0f14; --bg-alt:#141720; --surface:#181b24;
  --text:#eceef4; --text-muted:#9ca1b0; --border:#262a37;
  --accent-text:#8ab0f7; --accent-soft:rgba(59,130,246,.16);
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 6px 16px rgba(0,0,0,.45);
  --shadow-lg:0 24px 48px -12px rgba(0,0,0,.6), 0 8px 16px -8px rgba(0,0,0,.5);
}

/* ===== BASE ===== */
*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body {
  margin:0; font-family:var(--font-sans); font-size:17px; line-height:1.65;
  color:var(--text); background:var(--bg); -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility; transition:background-color .3s ease, color .3s ease;
}
a { color:var(--accent-text); text-decoration:none; }
a:hover { text-decoration:underline; }
h1,h2 { margin:0; font-weight:700; letter-spacing:-.015em; line-height:1.12; }
p { margin:0; }
::selection { background:var(--accent); color:var(--on-accent); }
:focus-visible { outline:3px solid var(--accent); outline-offset:2px; border-radius:4px; }

.container { width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:24px; }
.section { padding-block:clamp(48px,7vw,84px); }
.section--alt { background:var(--bg-alt); }
.eyebrow {
  display:inline-block; font-family:var(--font-mono); font-size:.78rem; font-weight:600;
  letter-spacing:.06em; color:var(--accent-text); margin-bottom:14px;
}
.lead { font-size:clamp(1.0625rem,2vw,1.24rem); color:var(--text-muted); line-height:1.55; max-width:46ch; }

/* ===== BUTTONS ===== */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; font:inherit;
  font-weight:650; line-height:1; cursor:pointer; padding:14px 26px; border-radius:999px;
  border:1px solid transparent; text-decoration:none; white-space:nowrap;
  transition:transform .15s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration:none; }
.btn:active { transform:translateY(1px); }
.btn--primary { background:var(--accent); color:var(--on-accent); box-shadow:var(--shadow-md); }
.btn--primary:hover { background:var(--accent-hover); transform:translateY(-2px); box-shadow:var(--shadow-lg); }
.btn--ghost { background:transparent; color:var(--text); border-color:var(--border); }
.btn--ghost:hover { border-color:var(--accent); color:var(--accent-text); }

/* ===== HEADER ===== */
.site-header {
  position:sticky; top:0; z-index:100;
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter:saturate(180%) blur(12px); -webkit-backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid transparent; transition:border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { border-bottom-color:var(--border); box-shadow:var(--shadow-sm); }
.nav { display:flex; align-items:center; justify-content:space-between; height:64px; gap:16px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:600; font-size:1.05rem; letter-spacing:-.01em; color:var(--text); }
.brand:hover { text-decoration:none; }
.brand__mark { width:30px; height:30px; border-radius:8px; flex:none; background:var(--accent); color:var(--on-accent); display:grid; place-items:center; font-weight:800; font-size:14px; }
.nav__links { display:flex; align-items:center; gap:24px; }
.nav__links a { color:var(--text-muted); font-size:.95rem; font-weight:550; }
.nav__links a:hover { color:var(--text); text-decoration:none; }
.nav__links a.is-current { color:var(--text); }
.nav__actions { display:flex; align-items:center; gap:12px; }
.theme-toggle { width:40px; height:40px; flex:none; border-radius:10px; border:1px solid var(--border); background:var(--surface); color:var(--text); display:grid; place-items:center; cursor:pointer; transition:border-color .2s ease; }
.theme-toggle:hover { border-color:var(--accent); }
.theme-toggle .icon-sun { display:none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display:block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display:none; }

/* ===== HERO ===== */
.hero { padding-block:clamp(52px,8vw,96px); }
.hero__title { font-family:var(--font-serif); white-space:nowrap; font-size:clamp(1rem,3.2vw,1.55rem); line-height:1.12; letter-spacing:-.02em; }
@media (max-width:430px) { .hero__title { white-space:normal; font-size:1.7rem; } }
.hero__tagline { font-family:var(--font-serif); font-size:clamp(1.15rem,2.4vw,1.5rem); font-style:italic; color:var(--text-muted); line-height:1.4; margin-top:18px; max-width:36rem; }
.hero__lead { margin-top:20px; }
.hero__cta { margin-top:30px; display:flex; flex-wrap:wrap; gap:14px; }
.hero__meta { margin-top:26px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:var(--text-muted); font-size:.9rem; font-family:var(--font-mono); }
.hero__meta .dot { width:4px; height:4px; border-radius:999px; background:var(--text-muted); opacity:.5; }

/* ===== SMALL PARTS ===== */
.badge { display:inline-block; background:var(--accent-soft); color:var(--accent-text); font-family:var(--font-mono); font-size:.72rem; letter-spacing:.04em; padding:5px 12px; border-radius:999px; }
.note-line { margin-top:22px; color:var(--text-muted); }
.note-line code { font-family:var(--font-mono); font-size:.9em; color:var(--text); }

/* ===== PROSE + CALLOUT (about) ===== */
.subhead { font-family:var(--font-serif); font-weight:700; font-size:clamp(1.25rem,2.6vw,1.5rem); letter-spacing:-.01em; line-height:1.2; color:var(--text); margin-bottom:14px; }
.prose { max-width:38rem; }
.prose p + p { margin-top:18px; }
.callout {
  max-width:38rem; margin-top:22px; padding:18px 22px; border-left:3px solid var(--accent);
  background:var(--accent-soft); border-radius:var(--radius-sm);
  font-family:var(--font-serif); font-style:italic; font-size:1.18rem; line-height:1.45; color:var(--text);
}

/* ===== LINK CARDS ===== */
.link-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:18px; }
.link-card {
  display:flex; flex-direction:column; gap:6px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:22px 24px; text-decoration:none; color:var(--text);
  transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.link-card:hover { transform:translateY(-4px); border-color:color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow:var(--shadow-md); text-decoration:none; }
.link-card__top { display:flex; align-items:center; justify-content:space-between; }
.link-card__title { font-weight:650; font-size:1.08rem; }
.link-card__arrow { font-family:var(--font-mono); color:var(--accent-text); transition:transform .2s ease; }
.link-card:hover .link-card__arrow { transform:translateX(4px); }
.link-card__desc { color:var(--text-muted); font-size:.95rem; }

/* ===== FOOTER ===== */
.site-footer { border-top:1px solid var(--border); padding-block:34px; }
.footer__inner { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:14px; }
.footer__inner p { color:var(--text-muted); font-size:.86rem; font-family:var(--font-mono); }
.footer__links { display:flex; gap:22px; }
.footer__links a { color:var(--text-muted); font-size:.88rem; }
.footer__links a:hover { color:var(--text); text-decoration:none; }

/* ===== REVEAL ===== */
.reveal { opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity:1; transform:none; }

/* ===== RESPONSIVE ===== */
@media (max-width:600px) {
  body { font-size:16px; }
  .container { padding-inline:18px; }
  .nav__links { display:none; }
  .hero__cta .btn { width:100%; }
  .footer__inner { flex-direction:column; align-items:flex-start; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition-duration:.001ms !important; scroll-behavior:auto !important; }
  .reveal { opacity:1; transform:none; }
}
