/* Hidden History of the Sacred. Palette from scriptorium docs/art-direction.md section 2.
   Ground #0a0705, series text #e8e4dc, title gold #d4a850, vellum #dcc8a2, ink #1d120b,
   rubric: lava mid #ff6a1a (lava deep #c23a08 fails 4.5:1 on this ground, so it is not used for text). */

/* The family is given a site-only name so an installed EB Garamond is never used instead. */
@font-face {
  font-family: "HHS Garamond";
  src: url("/fonts/ebgaramond-roman.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HHS Garamond";
  src: url("/fonts/ebgaramond-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ground: #0a0705;
  --text: #e8e4dc;
  --muted: #b3ada3;
  --gold: #d4a850;
  --rubric: #ff6a1a;
  --vellum: #dcc8a2;
  --ink: #1d120b;
  --rule: #3a2a1c;
  --measure: 40rem;
}

* { box-sizing: border-box; }

html {
  background: var(--ground);
  color: var(--text);
  font-family: "HHS Garamond", Georgia, "Times New Roman", serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-size: 1.1875rem; /* 19px */
  line-height: 1.55;
  font-variant-numeric: oldstyle-nums proportional-nums;
}

@media (min-width: 48rem) {
  body { font-size: 1.25rem; } /* 20px */
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--rubric);
  outline-offset: 3px;
}

/* Header */
.masthead {
  text-align: center;
  padding: 2.5rem 1.25rem 1.5rem;
  max-width: var(--measure);
  margin: 0 auto;
}
.seal {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  /* the seal sits on pure black; lighten lets the warm ground show through it */
  mix-blend-mode: lighten;
}
h1 {
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.9rem;
}
@media (min-width: 48rem) {
  h1 { font-size: 2.6rem; }
  .masthead { padding-top: 4rem; }
}
.tagline {
  font-style: italic;
  font-size: 1.25rem;
  margin: 0 auto;
  max-width: 26em;
}

/* Sections */
main { padding: 0 1.25rem; }
.block {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}
h2 {
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
h3 {
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--gold);
  margin: 0 0 0.4rem;
}
p { margin: 0 0 1rem; }

/* Rubric labels: small caps, tracked, in the lava red */
.label, .film-no, .status, .later li::marker {
  font-variant-caps: all-small-caps;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.14em;
  color: var(--rubric);
}
.label { margin: 0 0 0.25rem; font-size: 1.1875rem; }

/* Book One */
.book { margin: 0 0 2rem; }
.cover {
  width: 13rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(212, 168, 80, 0.18);
}
.subtitle { font-style: italic; color: var(--muted); margin-bottom: 1.25rem; }
.lede { font-style: italic; color: var(--gold); font-size: 1.3rem; line-height: 1.4; }
@media (min-width: 48rem) {
  .book { display: grid; grid-template-columns: 15rem 1fr; gap: 2rem; align-items: start; }
  .cover { width: 15rem; margin: 0.4rem 0 0; }
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.2;
  color: var(--ground);
  background: var(--gold);
  border: 0;
  border-radius: 3px;
  padding: 0.85rem 1.4rem;
  min-height: 48px;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #e2bb68; }

/* The rest of the series */
.later {
  margin: 0;
  padding: 1.25rem 0 0 1.6em;
  border-top: 1px solid var(--rule);
  list-style: decimal;
}
.later li { padding: 0.35rem 0; color: var(--muted); }
.later-title { color: var(--text); }
.status { white-space: nowrap; font-size: 1.05rem; margin-left: 0.35rem; }

/* Films */
.films { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.75rem; }
.film a { display: block; color: var(--text); text-decoration: none; }
.film img {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 0.6rem;
  background: #1d120b;
  box-shadow: 0 0 0 1px rgba(212, 168, 80, 0.18);
}
.film-no { display: block; font-size: 1.05rem; }
.film-title { display: block; font-size: 1.3rem; line-height: 1.3; color: var(--gold); }
.film a:hover .film-title { text-decoration: underline; text-underline-offset: 0.18em; }

/* Signup, set on a vellum leaf in dark ink */
.signup {
  border-top: 0;
  margin: 2.25rem auto;
  padding: 1.75rem 0 1.25rem;
  background: var(--vellum);
  color: var(--ink);
  border-radius: 3px;
}
.signup h2, .signup form { padding-left: 1.25rem; padding-right: 1.25rem; }
.signup h2 { color: var(--ink); }
.signup a { color: var(--ink); }
.field-label { display: block; font-weight: 600; margin: 0.25rem 0 0.35rem; }
.field {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1.1875rem;
  color: var(--ink);
  background: #fbf6ec;
  border: 2px solid #6b4423;
  border-radius: 3px;
  padding: 0.7rem 0.75rem;
  min-height: 48px;
  margin-bottom: 0.9rem;
}
.signup :focus-visible { outline-color: var(--ink); }
.signup .button { background: var(--ink); color: var(--vellum); width: 100%; }
.signup .button:hover { background: #3a2417; }
@media (min-width: 30rem) { .signup .button { width: auto; } }
.small { font-size: 1.05rem; margin: 0.9rem 0 0; }

/* Honeypot: off screen, out of the tab order, hidden from assistive tech */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The line after The Films that leads back up to the signup */
.back-up { margin: 1.75rem 0 0; }

/* Thank-you page (thanks.html): the source sheets, one per film */
.sheets { list-style: none; margin: 1.5rem 0 2rem; padding: 0; border-top: 1px solid var(--rule); }
.sheets li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.sheets .film-no { display: block; font-size: 1.05rem; }
.sheets .film-title { display: block; font-size: 1.3rem; line-height: 1.3; color: var(--gold); margin-bottom: 0.3rem; }
.sheets .pending { font-style: italic; color: var(--muted); }

/* Footer */
.footer {
  /* same column edge as the sections: 1.25rem gutter on phones, centred measure on wide screens */
  margin: 0 max(1.25rem, calc((100% - var(--measure)) / 2));
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 1.1875rem;
}
.footer p { margin: 0 0 0.75rem; }

/* Privacy page */
.page { max-width: var(--measure); margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.page h1 { font-size: 1.75rem; text-align: left; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
