/* Site header, mobile menu and footer for the standalone pages (insights,
   articles, privacy, terms, 404). These pages are plain HTML in public/ and do
   not load the bundled stylesheet, so this file carries the same header and
   footer the homepage, About and Contact pages have. Keep the values in step
   with src/style.css. Loaded as /chrome.css?v=N - bump N when it changes. */

:root {
  --bone: #F4EFE6; --ink: #1A1A1A; --terra: #C8501E; --white: #FFFFFF;
  --terra-label: #A8410F; --terra-on-ink: #E46F3B;
  --pad-x: clamp(24px, 5vw, 80px);
}

/* some of these pages do not reset box-sizing; the header and footer need it */
.site-header, .site-header *, .mobile-menu, .mobile-menu *, .footer-band, .footer-band * { box-sizing: border-box; }

/* ---- skip link ---- */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 12px 18px; background: var(--ink); color: var(--bone);
  font-size: 15px; font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; outline: 2px solid var(--terra-on-ink); outline-offset: 2px; }
main[tabindex="-1"]:focus { outline: none; }

/* ---- header ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  box-sizing: border-box;
  padding: 22px max(var(--pad-x), calc((100% - 1440px) / 2));
  background: rgba(244, 239, 230, 0.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
  line-height: 1.2;
}
.site-header .brand { display: flex; align-items: center; gap: 12px; padding: 15px 0; margin: -15px 0; text-decoration: none; color: var(--ink); }
.site-header .brand svg rect { fill: currentColor; }
.site-header .brand svg .brand-pulse { fill: var(--terra); }
.site-header .brand-name { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; opacity: .8; transition: opacity .2s, color .2s; }
.site-nav a:hover { opacity: 1; color: var(--terra-label); }
.site-nav a[aria-current="page"]:not(.cta-link) { opacity: 1; }
.site-nav a:not(.cta-link) { padding: 13px 0; margin: -13px 0; }
.site-nav .cta-link {
  display: inline-flex; align-items: center; min-height: 44px; margin: -3px 0;
  background: var(--ink); color: var(--bone); padding: 10px 18px; opacity: 1;
  transition: background .25s, color .25s;
}
.site-nav .cta-link:hover { background: var(--terra); color: var(--white); }
@media (max-width: 900px) { .site-nav { gap: 18px; } }
@media (max-width: 760px) { .site-nav a:not(.cta-link) { display: none; } }
@media (max-width: 420px) {
  .site-header { padding: 16px 20px; }
  .site-header .brand-name { display: none; }
  .site-nav .cta-link { padding: 9px 13px; font-size: 13px; }
}

/* ---- mobile menu ---- */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0; background: transparent;
  border: 1px solid rgba(26, 26, 26, 0.2); border-radius: 2px; cursor: pointer; flex-shrink: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 0 auto; background: var(--ink); transition: transform .2s ease; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 39; background: var(--bone);
  display: flex; align-items: center; box-sizing: border-box;
  padding: 96px var(--pad-x) 40px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; width: 100%; }
.mobile-menu a {
  padding: 14px 0; border-bottom: 1px solid rgba(26, 26, 26, 0.12);
  font-size: clamp(28px, 8vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2;
  color: var(--ink); text-decoration: none;
}
html.menu-open { overflow: hidden; }
@media (max-width: 760px) { .nav-toggle { display: flex; } }
@media (min-width: 761px) { .mobile-menu { display: none; } }

.site-header a:focus-visible, .nav-toggle:focus-visible, .mobile-menu a:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }
.footer-band a:focus-visible, .footer-band button:focus-visible { outline: 2px solid var(--terra-on-ink); outline-offset: 3px; }

/* ---- the page under the fixed header ---- */
body.has-chrome main { padding-top: 132px; }
body.has-chrome main > :first-child { margin-top: 0; }
@media (max-width: 420px) { body.has-chrome main { padding-top: 112px; } }

/* ---- footer ---- */
.footer-band { background: var(--ink); padding: clamp(32px, 5vh, 64px) 0 clamp(24px, 4vh, 48px); line-height: 1.5; }
.site-footer {
  box-sizing: border-box; margin: 0 auto;
  width: min(1440px, calc(100% - 2 * clamp(16px, 3vw, 48px)));
  color: rgba(255, 255, 255, 0.7); padding: clamp(28px, 4.5vw, 56px);
}
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: clamp(28px, 5vh, 48px); }
.footer-about { display: flex; flex-direction: column; gap: 16px; max-width: 380px; }
.footer-brand { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; color: var(--white); }
.footer-brand svg rect { fill: var(--bone); }
.footer-brand svg .brand-pulse { fill: var(--terra); }
.footer-band .footer-desc { margin: 0; max-width: none; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.6); }
.footer-band .footer-email { font-size: 14px; color: rgba(255, 255, 255, 0.8); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.3); align-self: flex-start; }
.footer-band .footer-email:hover { color: var(--white); border-bottom-color: var(--white); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-links a { display: inline; padding: 0; color: rgba(255, 255, 255, 0.7); text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.footer-links a:hover { color: var(--white); border-bottom-color: rgba(255,255,255,.5); }
.footer-links .link-btn {
  padding: 0; background: none; border: 0; border-bottom: 1px solid transparent; border-radius: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: none;
  color: rgba(255, 255, 255, 0.7); cursor: pointer; transition: color .2s, border-color .2s;
}
.footer-links .link-btn:hover { color: var(--white); border-bottom-color: rgba(255,255,255,.5); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5);
}
.footer-legal { display: flex; flex-direction: column; gap: 6px; }
.footer-legal address { font-style: normal; line-height: 1.5; color: rgba(255, 255, 255, 0.55); }
.footer-socials { display: flex; align-items: center; gap: 28px; }
.footer-socials a { display: flex; color: rgba(255, 255, 255, 0.7); opacity: 0.8; transition: opacity .2s, color .2s; }
.footer-socials a:hover { opacity: 1; color: var(--white); }
/* tap size: invisible 44px-tall hit areas, as on the homepage */
.footer-email, .footer-links a, .footer-links .link-btn, .footer-socials a { position: relative; }
.footer-email::after, .footer-links a::after, .footer-links .link-btn::after { content: ""; position: absolute; inset: -14px 0; }
.footer-socials a::after { content: ""; position: absolute; inset: -14px; }
