/* Brother Pax preview. Palette is taken from the cover art.
   Sandstone, parchment, habit black, straw gold, terracotta, olive,
   Advent violet, Gaudete rose. No Google Fonts CDN. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin-opsz-normal.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;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin-opsz-italic.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;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/plus-jakarta-sans-latin-wght-normal.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;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/plus-jakarta-sans-latin-wght-italic.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 {
  --parchment: #f4e8d0;
  --parchment-deep: #e8d5b5;
  --paper: #fbf6ec;
  --stone: #c4a882;
  --stone-deep: #8b7355;
  --ink: #1a1510;
  --straw: #c9a227;
  --straw-light: #e8c547;
  --terracotta: #c45c26;
  --olive: #5c6b3a;
  --violet: #4b3b6e;
  --rose: #c47a8a;
  --measure: 38rem;
  --wrap: 1080px;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.65;
  font-synthesis: none;
}

@media (min-width: 760px) {
  body {
    background: var(--stone);
    padding: 1rem;
  }
}

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

a {
  color: var(--ink);
}

a:hover {
  color: var(--violet);
}

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

::selection {
  background: var(--straw-light);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--parchment);
  padding: 0.55rem 0.85rem;
  z-index: 5;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.page {
  max-width: var(--wrap);
  margin: 0 auto;
  background: var(--parchment);
  min-height: 100vh;
}

@media (min-width: 760px) {
  .page {
    min-height: calc(100vh - 2rem);
    box-shadow: 0 16px 40px rgba(26, 21, 16, 0.16);
  }
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* preview-banner: remove this rule with the banner element before publication */
.preview-banner {
  background: var(--violet);
  color: var(--parchment);
}

.preview-banner p {
  width: min(46rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0.7rem 0;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

.site-header {
  border-bottom: 1px solid var(--stone-deep);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.4rem;
  padding: 1rem 0 0.9rem;
}

@media (max-width: 759px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.35rem;
  }

  .wordmark {
    grid-column: 1;
    grid-row: 1;
    margin-right: 0;
  }

  .lang {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.wordmark:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.site-nav,
.lang {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

@media (max-width: 520px) {
  .site-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: start;
    gap: 0.2rem 0.75rem;
  }
}

.site-nav a,
.lang a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.2rem 0;
}

.site-nav a:hover,
.lang a:hover,
.lang a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--terracotta);
  text-underline-offset: 0.28em;
  color: var(--ink);
}

.hero {
  padding: 2.2rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 879px) {
  .hero-grid {
    display: flex;
    flex-direction: column;
  }

  .hero-figure {
    order: -1;
    max-width: 28rem;
  }
}

@media (min-width: 880px) {
  .hero {
    padding: 3.2rem 0 3.5rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.82fr);
    gap: 3rem;
  }
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--olive);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.book-title,
.wordmark,
figcaption,
.buy-link {
  font-family: var(--serif);
  font-optical-sizing: auto;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 5vw, 4.15rem);
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.lede {
  margin: 0 0 1rem;
  max-width: 38rem;
  font-size: 1.2rem;
  line-height: 1.55;
}

.prose {
  max-width: var(--measure);
}

.prose p,
.stack p {
  margin: 0 0 1rem;
}

.prose a,
.policy a,
.site-footer a,
.quiet-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.hero-figure {
  margin: 0;
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 8px 8px 0 rgba(139, 115, 85, 0.45);
}

.hero-figure figcaption,
.gallery figcaption {
  margin-top: 0.65rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 520;
  letter-spacing: -0.01em;
}

.facts {
  list-style: none;
  padding: 0.2rem 0 0;
  margin: 1.4rem 0 0;
  max-width: 34rem;
  border-top: 1px solid var(--stone-deep);
}

.facts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--stone);
}

.facts strong {
  display: block;
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.arches {
  display: block;
  width: min(100% - 2.5rem, 720px);
  height: 44px;
  margin: 0.5rem auto 0.2rem;
  color: var(--ink);
}

section[id] {
  scroll-margin-top: 1.25rem;
}

.section {
  padding: 1.5rem 0 3.2rem;
}

@media (min-width: 880px) {
  .section {
    padding: 2rem 0 4.5rem;
  }
}

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 580;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-intro {
  margin: 0 0 1.5rem;
  max-width: var(--measure);
}

.gallery {
  display: grid;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
}

.gallery figure {
  margin: 0;
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .gallery {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem 1rem;
  }

  .gallery figure {
    grid-column: span 2;
  }

  .gallery figure:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .gallery figure:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

.sheet-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ink);
  background: white;
  cursor: zoom-in;
  box-shadow: 0 10px 22px rgba(26, 21, 16, 0.08);
}

.sheet-button img {
  display: block;
  width: 100%;
  height: auto;
}

.sheet-form {
  max-width: 40rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 1.35rem 1.2rem 1.2rem;
  box-shadow: 7px 7px 0 var(--stone);
}

.field label,
.check label {
  font-weight: 700;
}

.field {
  margin-bottom: 0.35rem;
}

input[type="email"] {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.72rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: white;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}

.help,
.form-hint,
.buy-note,
.courtesy,
.other-edition,
.status {
  color: var(--ink);
}

.help,
.form-hint {
  margin: 0.45rem 0 0;
  max-width: 38rem;
  color: var(--olive);
  font-size: 0.98rem;
  line-height: 1.5;
}

.check {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin: 1.05rem 0;
}

.check input {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0.15rem 0 0;
  accent-color: var(--violet);
}

.check label {
  font-weight: 560;
  cursor: pointer;
}

.form-hint {
  margin: 0.2rem 0 0.9rem;
}

.download-button {
  display: inline-block;
  width: 100%;
  appearance: none;
  font: inherit;
  font-weight: 750;
  font-size: 1.05rem;
  line-height: 1.3;
  text-align: center;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--parchment);
  cursor: pointer;
}

.download-button:hover:not(:disabled) {
  background: var(--violet);
  border-color: var(--violet);
  color: var(--parchment);
}

.download-button:disabled {
  background: transparent;
  color: var(--ink);
  border-color: var(--stone-deep);
  cursor: not-allowed;
}

.status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  font-weight: 650;
}

.status:empty {
  margin: 0;
}

.courtesy {
  margin: 1rem 0 0;
  max-width: 40rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--stone);
}

.candles {
  display: block;
  width: 180px;
  height: 70px;
  margin: 0 0 0.85rem;
}

.advent-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

@media (min-width: 800px) {
  .advent-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }
}

.advent-card {
  margin: 0;
  padding: 1.15rem 1.15rem 0.4rem;
  background: var(--paper);
  border: 1px solid var(--stone-deep);
  border-top: 5px solid var(--violet);
  box-shadow: 0 8px 18px rgba(26, 21, 16, 0.05);
}

.advent-card p {
  margin: 0 0 0.9rem;
}

.advent-card.rose {
  border-top-color: var(--rose);
}

.advent-card.olive {
  border-top-color: var(--olive);
}

.advent-card.terracotta {
  border-top-color: var(--terracotta);
}

.book {
  background: var(--parchment-deep);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 3rem 0 3.2rem;
}

.book-title {
  margin: 0.3rem 0 0.15rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.book-sub {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 460;
  font-size: 1.25rem;
}

.meta-line {
  margin: 0 0 1rem;
  font-weight: 700;
}

.buy-line {
  margin: 1.2rem 0 0.4rem;
}

.buy-link {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 560;
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.buy-link:hover {
  color: var(--ink);
}

.buy-note,
.other-edition {
  margin: 0.35rem 0 0;
  max-width: var(--measure);
}

.other-edition {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--stone-deep);
  font-size: 0.98rem;
}

.site-footer {
  background: var(--parchment-deep);
  padding: 2.2rem 0 1.6rem;
}

.footer-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 740px) {
  .footer-grid {
    grid-template-columns: 1.4fr 0.6fr;
    gap: 2rem;
  }
}

.site-footer p {
  margin: 0 0 0.7rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.footer-links a {
  font-weight: 700;
}

.colophon {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin: 0.4rem auto 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--stone-deep);
  font-size: 0.95rem;
}

.policy {
  padding: 2rem 0 3rem;
}

.policy-inner {
  width: min(42rem, calc(100% - 2.5rem));
  margin: 0 auto;
}

.draft-note {
  margin: 0 0 2rem;
  padding: 1rem 1.05rem 0.3rem;
  background: var(--paper);
  border: 2px dashed var(--violet);
}

.draft-kicker {
  margin: 0 0 0.6rem;
  color: var(--violet);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.policy h1 {
  font-size: clamp(2.2rem, 4vw, 3.3rem);
}

.policy h2 {
  margin-top: 2.1rem;
  font-size: 1.7rem;
}

.policy h3 {
  margin-top: 1.4rem;
  font-size: 1.25rem;
}

.policy p,
.policy li {
  font-size: 1.02rem;
}

.policy ul {
  padding-left: 1.2rem;
}

.policy li + li {
  margin-top: 0.4rem;
}

.draft-note p:last-child,
.missing p:last-child {
  margin-bottom: 0.9rem;
}

.missing {
  padding: 2.5rem 0 4rem;
}

dialog {
  width: min(42rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.85rem 0.85rem 1rem;
}

dialog::backdrop {
  background: rgba(26, 21, 16, 0.74);
}

.dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.dialog-bar p {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.25rem;
}

.dialog-close {
  font: inherit;
  font-weight: 750;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--ink);
  color: var(--parchment);
}

dialog img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(78vh, 1080px);
  height: auto;
  margin: 0 auto;
  background: white;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  body {
    background: white;
    padding: 0;
  }

  .page {
    box-shadow: none;
  }

  .preview-banner,
  .site-nav,
  .lang,
  .skip {
    display: none;
  }
}
