/* Burnt & Toast: "The Toast Room" site chrome. The header, the newsletter band and the footer.

   Loaded by EVERY page. Every rule here is scoped to .site-head, .nl-band or .site-foot, and the
   tokens live on those elements as well as on :root (in site.css), so the chrome also works on a
   page that brings its own styling, such as an advert served verbatim. Keep the token values in
   step with :root in site.css.

   Fonts are self-hosted under the SIL Open Font Licence (see fonts/*-OFL.txt). Nothing here loads
   from another origin. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url(fonts/bricolage-grotesque-latin.woff2) format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Nothing You Could Do";
  src: url(fonts/NothingYouCouldDo-Regular.ttf) format("truetype");
  font-display: swap;
}

.site-head, .nl-band, .site-foot {
  --paper: #FBF4E6;
  --paper-2: #F4EAD6;
  --card: #FFFCF5;
  --ink: #2B1D14;
  --ink-soft: #4A382C;
  --muted: #5E4B3E;
  --crust: #7A3E1D;
  --burnt: #B5471B;
  --butter: #F4C95D;
  --marmalade: #E8742C;
  --jam: #C23B3B;
  --hedge: #3C6B47;
  --display: "Bricolage Grotesque", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Nothing You Could Do", "Bradley Hand", "Segoe Print", cursive;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 4vw, 40px);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
  letter-spacing: normal;
}

/* A defensive reset, scoped: the older pages style bare h2, p, ul, li and a. */
:is(.site-head, .nl-band, .site-foot) :where(h2, h3, p, ul, li, nav, form, label, input, button, img, svg) {
  margin: 0; padding: 0; list-style: none; letter-spacing: normal; text-transform: none; font-family: inherit; box-sizing: border-box;
}
:is(.site-head, .nl-band, .site-foot) :where(img, svg) { display: block; max-width: 100%; }
:is(.site-head, .nl-band, .site-foot) :where(a) { color: inherit; }
:is(.site-head, .nl-band, .site-foot) :where(h2) { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
:is(.site-head, .nl-band, .site-foot) :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.hand { font-family: "Nothing You Could Do", "Bradley Hand", "Segoe Print", cursive; font-weight: 400; letter-spacing: 0; line-height: 1.1; }
.skip { display: inline-flex; align-items: center; min-height: 44px; position: absolute; left: 12px; top: -60px; background: #2B1D14; color: #FBF4E6; padding: 10px 16px; border-radius: 999px; z-index: 50; text-decoration: none; font-family: "Bricolage Grotesque", system-ui, sans-serif; }
.skip:focus { top: 12px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============ Header: one compact menu on phones ============ */
.site-head { position: relative; z-index: 20; }
.site-head .head-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1320px; margin-inline: auto; padding: 10px var(--gutter);
}
.site-head .brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; white-space: nowrap; color: var(--ink); }
.site-head .brand svg { flex: none; width: 44px; height: 44px; margin: -4px -2px -4px -6px; }
.site-head .brand:hover .mark-slice { transform: translateY(-4px) rotate(-4deg); }
.site-head .mark-slice { transition: transform .35s var(--spring); transform-origin: 50% 90%; transform-box: fill-box; }
.site-head .nav { display: flex; align-items: center; flex: none; }
.site-head .nav-wide { display: none; align-items: center; gap: 2px; }
.site-head .nav-wide a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 650; white-space: nowrap; color: var(--ink); }
.site-head .nav-wide a:hover { background: var(--paper-2); }
.site-head .nav-wide a[aria-current] { background: var(--butter); box-shadow: inset 0 0 0 2px var(--ink); }
.site-head .nav-wide .nav-play { background: var(--marmalade); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); margin-left: 8px; }
.site-head .nav-wide .nav-play:hover { background: #EE8540; }
.site-head .nav-wide .nav-hello { border: 2.5px solid var(--ink); margin-left: 8px; }
.site-head .menu { position: relative; }
.site-head .menu summary {
  list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px 6px 12px; border: 2.5px solid var(--ink); border-radius: 999px; font-weight: 700; background: var(--card); color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.site-head .menu summary::-webkit-details-marker { display: none; }
.site-head .menu summary::marker { content: ""; }
.site-head .menu[open] summary { background: var(--butter); }
.site-head .menu ul {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(260px, calc(100vw - 32px));
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 4px 5px 0 var(--ink); padding: 8px;
}
.site-head .menu li a { display: flex; min-height: 44px; align-items: center; padding: 4px 12px; border-radius: 10px; text-decoration: none; font-weight: 650; color: var(--ink); }
.site-head .menu li a:hover { background: var(--paper-2); }
.site-head .menu li a[aria-current] { background: var(--paper-2); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.site-head .menu .menu-play { background: var(--marmalade); border: 2px solid var(--ink); margin-bottom: 6px; font-weight: 750; }
.site-head .menu .menu-play:hover { background: #EE8540; }

/* On the older, dark pages the header sits on its own strip of paper. */
.site-head.on-dark { background: var(--paper); border-bottom: 3px solid var(--ink); }

/* ============ Newsletter band ============ */
.nl-band { background: var(--marmalade); border-block: 3px solid var(--ink); padding-block: clamp(48px, 7vw, 88px); }
.nl-band .nl-wrap { display: grid; gap: 22px; align-items: center; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.nl-band h2 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.04em; max-width: 14ch; color: var(--ink); }
.nl-band .signup { display: grid; gap: 8px; }
.nl-band .signup label { font-weight: 700; font-size: .9375rem; }
.nl-band .signup-row { display: flex; flex-wrap: wrap; gap: 10px; }
.nl-band input[type=email] {
  flex: 1 1 200px; min-width: 0; min-height: 48px; padding: 10px 18px; font: inherit;
  border: 2.5px solid var(--ink); border-radius: 999px; background: #FFFFFF; color: var(--ink);
}
.nl-band input[type=email]::placeholder { color: #75675B; }
.nl-band .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px;
  border: 2.5px solid var(--ink); border-radius: 999px; background: var(--butter); color: var(--ink); font: inherit;
  font-weight: 700; line-height: 1.15; cursor: pointer; box-shadow: 0 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.nl-band .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.nl-band .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.nl-band .small { font-size: .8125rem; color: var(--ink); }
.nl-band .small a { color: inherit; text-underline-offset: 3px; }

/* ============ Footer ============ */
.site-foot { background: var(--ink); color: #F6EEDF; padding-block: 56px 40px; }
.site-foot .foot-wrap { max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.site-foot a { color: #F6EEDF; text-underline-offset: 3px; }
.site-foot :focus-visible { outline-color: var(--butter); }
.site-foot .foot-top { display: grid; gap: 28px; }
.site-foot .foot-brand { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: center; }
.site-foot .foot-brand img { width: 84px; height: 84px; }
.site-foot .foot-brand p { font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1.05; color: #F6EEDF; }
.site-foot .signoff { font-family: var(--hand); font-weight: 400; font-size: 1.25rem; color: var(--butter); letter-spacing: 0; display: block; margin-top: 6px; }
.site-foot .foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.site-foot .foot-cols h2 { font-size: 1rem; letter-spacing: 0; color: var(--butter); margin-bottom: 8px; }
.site-foot .foot-cols a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; max-width: 100%; min-height: 44px; text-decoration: none; font-size: .9375rem; line-height: 1.25; }
.site-foot .foot-cols a:hover { text-decoration: underline; }
.site-foot .foot-cols a.foot-with-note { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }
.site-foot .foot-cols a.foot-with-note:hover { text-decoration: none; }
.site-foot .foot-cols a.foot-with-note:hover .foot-label { text-decoration: underline; text-underline-offset: 3px; }
.site-foot .foot-desc { display: block; font-size: .75rem; font-weight: 500; line-height: 1.25; color: #D9CDB9; }
.site-foot .foot-badge { display: inline-block; font-size: .6875rem; font-weight: 700; line-height: 1.2; padding: 2px 7px; border: 1.5px solid rgba(246, 238, 223, .55); border-radius: 999px; color: var(--butter); white-space: nowrap; }
/* Social icons sit under the sign-off, on the left. One link per network. */
.site-foot .foot-social { flex: 1 0 100%; }
.site-foot .foot-social ul { display: flex; flex-wrap: wrap; gap: 8px; }
.site-foot .foot-social a {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 999px;
  border: 1.5px solid rgba(246, 238, 223, .55); color: #F6EEDF; text-decoration: none;
}
.site-foot .foot-social a:hover { background: rgba(246, 238, 223, .12); }
.site-foot .foot-social svg { width: 22px; height: 22px; }
.site-foot .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.site-foot .foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(246, 238, 223, .25); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; font-size: .875rem; color: #D9CDB9; }
.site-foot .foot-bottom p { color: #D9CDB9; line-height: 1.55; }
.site-foot .foot-bottom a { display: inline-flex; min-height: 44px; align-items: center; }
.site-foot .foot-note { margin-top: 18px; font-size: .875rem; color: #D9CDB9; }

@media (min-width: 760px) {
  .site-head .nav-wide { display: flex; }
  .site-head .menu { display: none; }
  .site-head .brand { font-size: 1.3rem; gap: 10px; }
  .site-head .brand svg { width: 52px; height: 52px; }
  .site-foot .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .nl-band .nl-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-foot .foot-top { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); }
}
@media (max-width: 380px) {
  .site-head .brand { font-size: 1.05rem; gap: 6px; }
  .site-head .brand svg { width: 40px; height: 40px; }
  .site-head .menu summary { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-head *, .nl-band *, .site-foot * { transition: none !important; animation: none !important; }
}

/* ============ Signup states (signup.js and /subscribe) ============ */
/* The honeypot: invisible and unreachable for people, irresistible to bots. */
.signup-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.signup-status { min-height: 1.5em; margin: 6px 0 0; font-weight: 700; font-size: .9375rem; color: #2B1D14; }
.signup-status:empty { display: none; }
.signup-status.is-error { display: block; background: #FFF8EE; border: 2px solid #2B1D14; border-radius: 10px; padding: 8px 12px; color: #8E1F1F; }
.signup input[aria-invalid="true"] { border-color: #8E1F1F !important; box-shadow: 0 0 0 3px rgba(142, 31, 31, .25); }
.signup-done { background: #FFF8EE; border: 2.5px solid #2B1D14; border-radius: 14px; padding: 16px 18px 18px; box-shadow: 4px 5px 0 #2B1D14; color: #2B1D14; font-family: "Bricolage Grotesque", system-ui, sans-serif; line-height: 1.5; }
.signup-done p { margin: 0; }
.signup-done-title { font-family: "Nothing You Could Do", "Bradley Hand", cursive; font-size: 1.5rem; line-height: 1.1; color: #B5471B; margin-bottom: 4px !important; }
.signup-done:focus { outline: none; }
.signup-done:focus-visible { outline: 3px solid #2B1D14; outline-offset: 3px; }
