/* WHAT: shared styles for the ASTGL Field Guides companion pages, in the series' Editorial Glow look
   (SERIES-LOOK.md): navy gradient masthead with an orange glow, light reading area below.
   WHY: the fonts are served from this site (fonts/, SIL OFL 1.1), never a font CDN, so a page
   makes no third-party request; the _headers CSP allows fonts from 'self' only.
   Contrast ratios in the comments were computed for this change (WCAG AA needs 4.5:1 for body text). */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  --navy: #1e3a5f;       /* ASTGL deep blue */
  --navy-deep: #142844;  /* gradient end and code blocks */
  --orange: #e9724c;     /* ASTGL warm orange: borders and glow only; 2.88:1 on paper is below AA for text */
  --hot: #ffaa6e;        /* glow core; text on navy at 6.15:1 */
  --paper: #f9fafb;
  --ink: #1f2937;        /* 14.05:1 on paper */
  --muted: #4b5563;      /* 7.23:1 on paper */
  --on-navy: #d1d5db;    /* 7.81:1 on navy */
  --rule: #e5e7eb;
  --link: #1f5f99;       /* 6.37:1 on paper: links and the focus ring */
  --measure: 40rem;
  --display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--body);
}
a { color: var(--link); text-underline-offset: 0.15em; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
header.masthead {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 80%);
  color: var(--paper);
  padding: 3rem 1.25rem 2.5rem;
}
/* The glow sits in the top-right corner, mostly off the edge, so it never sits under the text. */
header.masthead::before {
  content: "";
  position: absolute;
  right: -110px;
  top: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hot) 0%, var(--orange) 30%, rgba(233, 114, 76, 0) 70%);
}
header.masthead::after {
  content: "";
  position: absolute;
  right: -150px;
  top: -150px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: rgba(255, 170, 110, 0.6);
  border-left-color: rgba(255, 170, 110, 0.35);
  transform: rotate(-20deg);
}
.masthead .inner { position: relative; }
.masthead .inner, main, footer .inner { max-width: var(--measure); margin: 0 auto; }
.series {
  margin: 0 0 1rem;
  font: 0.75rem/1.4 var(--mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hot);
}
.masthead h1 {
  margin: 0;
  max-width: 32rem;
  font-family: var(--display);
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.twist { color: var(--hot); }
.subtitle { margin: 0.75rem 0 0; font-size: 1.1rem; color: var(--on-navy); }
.byline { margin: 1.5rem 0 0; font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
main { padding: 2.25rem 1.25rem 3rem; }
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--navy);
  margin: 2.5rem 0 0.75rem;
}
h2:first-child { margin-top: 0; }
.note {
  border-left: 4px solid var(--orange);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.75rem;
}
pre {
  background: var(--navy-deep);
  color: var(--paper);
  padding: 1rem 1.15rem;
  border-radius: 7px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}
code { font-family: var(--mono); }
.volumes { list-style: none; padding: 0; }
.volumes li { margin: 0 0 1rem; }
footer { border-top: 1px solid var(--rule); padding: 1.5rem 1.25rem 2.5rem; color: var(--muted); font-size: 0.9rem; }
footer p { margin: 0.25rem 0; }
@media (max-width: 40rem) {
  header.masthead::before { right: -130px; top: -150px; width: 240px; height: 240px; }
  header.masthead::after { display: none; }
}
