/* Site header + footer, shared by every page.
   .site-header--paper sits on the cream pages; .site-header--night on the Library. */

.site-header {
  --h-ink: #22352f; --h-muted: #5d6b65; --h-line: rgba(34, 53, 47, .14); --h-bg: rgba(246, 240, 227, .92); --h-gold: #a9823f;
  position: sticky; top: 0; z-index: 40; width: 100%;
  background: transparent; transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header--night { --h-ink: #f3e8d0; --h-muted: #b3a48d; --h-line: rgba(232, 187, 92, .18); --h-bg: rgba(17, 28, 25, .9); --h-gold: #e8bb5c; }
.site-header.is-scrolled, .site-header.is-open {
  background: var(--h-bg); border-bottom-color: var(--h-line);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
}
.sh-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
}
.sh-logo { justify-self: start; display: block; line-height: 0; }
.sh-logo img { height: 46px; width: auto; }
.sh-nav { display: flex; gap: 34px; justify-content: center; }
.sh-nav a {
  position: relative; font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; font-size: 11.5px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--h-ink); text-decoration: none; padding: 8px 0; white-space: nowrap;
}
.sh-nav a::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 2px; height: 1px; background: var(--h-gold);
  transition: left .3s ease, right .3s ease;
}
.sh-nav a:hover::after, .sh-nav a[aria-current="page"]::after { left: 0; right: 0; }
.sh-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.sh-cta {
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--h-ink); text-decoration: none; padding: 10px 16px; border: 1px solid var(--h-ink);
  outline: 1px solid var(--h-line); outline-offset: 3px; transition: background .25s ease, color .25s ease; white-space: nowrap;
}
.sh-cta:hover { background: var(--h-ink); color: var(--h-bg); }
.site-header--night .sh-cta:hover { color: #111c19; }
.sh-cta.is-soon { opacity: .6; pointer-events: none; }
.sh-keys {
  display: inline-flex; align-items: center; gap: 7px; color: var(--h-ink); text-decoration: none;
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  padding: 9px 12px; border-radius: 999px; border: 1px solid var(--h-line);
}
.sh-keys:hover { border-color: var(--h-gold); }
.sh-keys svg { width: 16px; height: 16px; fill: none; stroke: var(--h-gold); stroke-width: 1.8; stroke-linecap: round; }
.sh-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--h-line); background: transparent; border-radius: 999px;
  cursor: pointer; position: relative; color: var(--h-ink);
}
.sh-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform .3s ease, top .3s ease; }
.sh-toggle span:first-child { top: 16px; }
.sh-toggle span:last-child { top: 24px; }
.is-open .sh-toggle span:first-child { top: 20px; transform: rotate(45deg); }
.is-open .sh-toggle span:last-child { top: 20px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .sh-inner { grid-template-columns: 1fr auto; padding: 12px 16px; }
  .sh-logo img { height: 38px; }
  .sh-toggle { display: block; }
  .sh-logo, .sh-actions { grid-row: 1; }
  .sh-actions { grid-column: 2; }
  .sh-cta { display: none; }
  .sh-keys span { display: none; }
  .sh-keys { padding: 0; width: 42px; height: 42px; justify-content: center; }
  .sh-nav {
    grid-column: 1 / -1; grid-row: 2; flex-direction: column; gap: 0; align-items: stretch; text-align: center;
    max-height: 0; overflow: hidden; transition: max-height .4s ease;
  }
  .is-open .sh-nav { max-height: 360px; }
  .sh-nav a { padding: 16px 0; border-top: 1px solid var(--h-line); font-size: 12px; }
  .sh-nav a::after { display: none; }
  .sh-nav .sh-nav-cta { display: block; color: var(--h-gold); }
}
@media (min-width: 901px) { .sh-nav .sh-nav-cta { display: none; } }

/* ---------- footer ---------- */
.site-footer {
  background:
    radial-gradient(900px 300px at 50% 0, rgba(232, 187, 92, .08), transparent 70%),
    #13201c;
  color: #cfc4ad; font-family: 'EB Garamond', Georgia, serif;
}
.sf-inner {
  max-width: 1200px; margin: 0 auto; padding: 72px 24px 48px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start;
}
.sf-logo { width: 260px; max-width: 100%; height: auto; display: block; }
.sf-motto { margin: 22px 0 0; font-size: 18px; font-style: italic; color: #e9dfc8; }
.sf-motto span + span { font-style: normal; font-family: 'Montserrat', system-ui, sans-serif; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: #a9823f; margin-left: 8px; }
.sf-tag { margin: 6px 0 0; color: #9d927d; font-size: 16px; }
.sf-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.sf-cols h4 {
  margin: 0 0 14px; font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600; font-size: 10.5px;
  letter-spacing: .26em; text-transform: uppercase; color: #c9a25a;
}
.sf-cols ul { list-style: none; margin: 0; padding: 0; }
.sf-cols li { margin: 0 0 9px; }
.sf-cols a { color: #e9dfc8; text-decoration: none; font-size: 17px; }
.sf-cols a:hover { color: #e8bb5c; }
.sf-base {
  border-top: 1px solid rgba(232, 187, 92, .14); padding: 20px 24px 28px; text-align: center;
  font-family: 'Montserrat', system-ui, sans-serif; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #7f7766;
}
.sf-ornament { width: 200px; height: auto; display: block; margin: 0 auto 14px; opacity: .55; }
@media (max-width: 760px) {
  .sf-inner { grid-template-columns: 1fr; padding: 56px 20px 36px; gap: 36px; text-align: center; }
  .sf-logo { margin: 0 auto; width: 220px; }
  .sf-cols { text-align: center; }
}

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; color: #22352f; padding: 8px 14px; }
.skip-link:focus { left: 8px; }

/* ---------- "Be the first to know" sign-up (Home closing section and the Library) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.signup { max-width: 560px; margin: 46px auto 0; padding: 30px 28px 24px; text-align: center;
  border: 1px solid rgba(232, 187, 92, .32); border-radius: 4px; background: rgba(255, 255, 255, .03); color: #f3e8d0; }
.signup-title { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 28px; line-height: 1.15; color: #f3e8d0; }
.signup-title em { font-style: italic; color: #e8bb5c; }
.signup-lede { margin: 8px auto 18px; max-width: 440px; font-size: 17px; line-height: 1.5; color: #cfc4ad; }
.signup-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.signup-row input { flex: 1 1 240px; min-width: 0; padding: 13px 16px; border-radius: 999px; border: 1px solid rgba(243, 232, 208, .35);
  background: rgba(0, 0, 0, .18); color: #f3e8d0; font: 16px/1.2 'EB Garamond', Georgia, serif; }
.signup-row input::placeholder { color: #9d937f; }
.signup-row input:focus { outline: 2px solid #e8bb5c; outline-offset: 2px; }
.signup-row .btn { flex: none; }
.signup-msg { min-height: 1.4em; margin: 12px 0 0; font-style: italic; color: #e8bb5c; }
.signup-note { margin: 4px 0 0; font-size: 13px; color: #9d937f; }
.signup.is-done .signup-row { display: none; }
.library-signup { padding: 10px 20px 70px; }
