/* Shared by every page: font, colours, header, footer.
   Page-specific layout stays inline in each page. */

/* Hanken Grotesk, self-hosted (SIL Open Font License, see fonts/OFL.txt).
   One variable file per script covers weights 300-400. Self-hosting means
   visitors' browsers never contact Google. */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url("fonts/hanken-grotesk-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url("fonts/hanken-grotesk-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;
}

:root {
  color-scheme: light;
  --void:  #F3EAD8;               /* background: paper sand */
  --sand:  #1A1512;               /* text: ink */
  --muted: rgba(26,21,18,0.62);   /* secondary text */
  --spice: #A85A0C;               /* hover: darker spice stays readable on light */
  /* 0.75 x the body text size, as a fixed length so 60%-size header/footer text lines up with the body */
  --gutter: calc(0.75rem + 0.75vw);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--void);
  color: var(--sand);
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 300;
  font-size: calc(1em + 1vw);      /* text grows with the screen */
  line-height: calc(1.3em + 1vw);
  -webkit-font-smoothing: antialiased;
}

/* the self-hosted font stops at 400; anything heavier would be faked by the browser */
strong, b { font-weight: 400; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--spice); }
:focus-visible { outline: 1px solid var(--spice); outline-offset: 0.2em; }

header, main, footer { padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 64em) {
  header, main, footer { padding-left: calc(var(--gutter) * 2); padding-right: calc(var(--gutter) * 2); }
}

/* --- header: small line at the top --- */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.5em 1.5em;
  padding-top: 0.5em;
  padding-bottom: 1em;
  font-size: 60%;
  font-weight: 400;
  letter-spacing: 0.04em;
}
header a { text-decoration: none; }

/* --- footer: one tiny line of facts, bottom right, lined up with the header email --- */
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 0.6em;
  padding-top: 0.5em;
  padding-bottom: 0.8em;          /* a little air under the line */
  font-size: max(0.65rem, 40%);   /* 40% of the body text, never under ~10px so phones can read it */
  line-height: 1.4;               /* the body's line height is a fixed ~50px; this one follows the small text */
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}
