/* Essentia Tech — shared site chrome.
   Fonts, color tokens, reset, and the header/footer partials all live here
   so they're defined once instead of once per page. Page-specific layout
   (hero, content columns, forms, etc.) stays in that page's own <style>
   block — this file only owns things every page shares.

   .shell-wrap is a fixed-width container used only inside <header> and
   <footer>, so the site chrome never resizes when navigating between pages
   with different content-column widths. Each page's own .wrap (defined in
   its own <style> block) controls its <main> content width independently. */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #f7f4ee;
  --paper-raised: #ffffff;
  --ink: #2b1c12;
  --ink-soft: #8a7362;
  --line: rgba(64, 42, 24, 0.14);
  --accent: #e2962c;
  --accent-deep: #b9740f;
  --accent-tint: rgba(226, 150, 44, 0.16);
  --cardkeeper: #2e6b36;
  --cardkeeper-tint: rgba(46, 107, 54, 0.12);
  --warrantykeeper: #f57c00;
  --warrantykeeper-tint: rgba(245, 124, 0, 0.12);
  --renewornot: #3949ab;
  --renewornot-tint: rgba(57, 73, 171, 0.12);
  --recipeclipper: #d84315;
  --recipeclipper-tint: rgba(216, 67, 21, 0.12);
  --notekeeper: #f9a825;
  --notekeeper-tint: rgba(249, 168, 37, 0.12);
  --watchagenda: #37618e;
  --watchagenda-tint: rgba(55, 97, 142, 0.12);
  --shadow: rgba(64, 42, 20, 0.16);
  --error: #b3392c;
  --error-tint: rgba(179, 57, 44, 0.1);

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #3d3226;
    --paper-raised: #493d2e;
    --ink: #f6ede0;
    --ink-soft: #cdb99e;
    --line: rgba(246, 237, 224, 0.16);
    --accent: #f2a93c;
    --accent-deep: #f8c66a;
    --accent-tint: rgba(242, 169, 60, 0.18);
    --cardkeeper: #7ecb86;
    --cardkeeper-tint: rgba(126, 203, 134, 0.16);
    --warrantykeeper: #ffb74d;
    --warrantykeeper-tint: rgba(255, 183, 77, 0.16);
    --renewornot: #bac3ff;
    --renewornot-tint: rgba(186, 195, 255, 0.16);
    --recipeclipper: #ffb59d;
    --recipeclipper-tint: rgba(255, 181, 157, 0.16);
    --notekeeper: #ffd95a;
    --notekeeper-tint: rgba(255, 217, 90, 0.16);
    --watchagenda: #a9c7ff;
    --watchagenda-tint: rgba(169, 199, 255, 0.16);
    --shadow: rgba(0, 0, 0, 0.35);
    --error: #e0796c;
    --error-tint: rgba(224, 121, 108, 0.14);
  }
}

:root[data-theme="dark"] {
  --paper: #3d3226;
  --paper-raised: #493d2e;
  --ink: #f6ede0;
  --ink-soft: #cdb99e;
  --line: rgba(246, 237, 224, 0.16);
  --accent: #f2a93c;
  --accent-deep: #f8c66a;
  --accent-tint: rgba(242, 169, 60, 0.18);
  --cardkeeper: #7ecb86;
  --cardkeeper-tint: rgba(126, 203, 134, 0.16);
  --warrantykeeper: #ffb74d;
  --warrantykeeper-tint: rgba(255, 183, 77, 0.16);
  --renewornot: #bac3ff;
  --renewornot-tint: rgba(186, 195, 255, 0.16);
  --recipeclipper: #ffb59d;
  --recipeclipper-tint: rgba(255, 181, 157, 0.16);
  --notekeeper: #ffd95a;
  --notekeeper-tint: rgba(255, 217, 90, 0.16);
  --watchagenda: #a9c7ff;
  --watchagenda-tint: rgba(169, 199, 255, 0.16);
  --shadow: rgba(0, 0, 0, 0.35);
  --error: #e0796c;
  --error-tint: rgba(224, 121, 108, 0.14);
}

* { box-sizing: border-box; }

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

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Shell (header + footer container) ---------- */

.shell-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- Masthead ---------- */

header.masthead {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}

.masthead-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.masthead-copy { max-width: 640px; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.01em;
  margin: 0;
}

.wordmark a { color: inherit; text-decoration: none; }
.wordmark .dash { color: var(--accent); }

/* Tagline only makes sense on the homepage - hidden everywhere else, shown
   when the header partial's home link carries the active-page marker. */
.tagline {
  display: none;
  margin: 10px 0 0;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 16.5px;
}

.masthead-row:has(.sitenav a[href="/"][aria-current="page"]) .tagline {
  display: block;
}

nav.sitenav {
  display: flex;
  gap: 22px;
  flex: none;
  margin-top: 8px;
  flex-wrap: wrap;
}

nav.sitenav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

nav.sitenav a:hover,
nav.sitenav a[aria-current="page"] {
  color: var(--cardkeeper);
  border-bottom-color: var(--cardkeeper);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px 32px;
  padding-bottom: 36px;
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 12px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px;
}

.footer-col a:hover { color: var(--cardkeeper); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
}

.footer-bottom .shell-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.footer-bottom .fmark { font-family: var(--font-mono); }

@media (max-width: 860px) {
  .shell-wrap { padding: 0 24px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .shell-wrap { padding: 0 18px; }
  header.masthead { padding: 40px 0 32px; }
  .masthead-row { gap: 20px; }
  .footer-bottom .shell-wrap { flex-direction: column; align-items: flex-start; }
}
