/* Shared foundation for every page: fonts, reset, layout, header, footer, heat maps.
   Each page adds its own theme file (home.css, cooling.css) that sets the color tokens. */

/* ---------- Fonts (self-hosted, latin + latin-ext subsets) ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/public-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/public-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Layout ---------- */
:root { --gutter: clamp(20px, 5.5vw, 80px); }
.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.display { font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; }
.muted { color: var(--muted); }
.source-note { font-size: 13px; color: var(--faint); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 12px; background: var(--surface); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 80px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand-name {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 900; font-stretch: 125%; font-size: 20px; letter-spacing: 0.08em;
}
.brand-sub { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { color: var(--link-hover); }

/* On narrow screens the links move under the logo and wrap as needed. */
@media (max-width: 860px) {
  .site-header .wrap { padding-block: 16px; }
  .site-nav { width: 100%; flex-wrap: wrap; gap: 12px 24px; }
  .site-nav a { white-space: nowrap; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); }
.btn-primary, .site-nav .btn-primary, .btn-primary:hover, .site-nav .btn-primary:hover { color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { border-color: var(--text); color: var(--text); background: transparent; }
.btn-outline:hover { color: var(--text); background: var(--hover-tint); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Footer ---------- */
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
  gap: 32px; padding-block: 56px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.site-footer nav a { text-decoration: none; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Heat maps (cells are filled in by assets/js/heatmap.js) ---------- */
.heat-grid { display: grid; width: 100%; height: 100%; }
.heat-grid > div { min-width: 0; min-height: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
