/* Warm the shared reading surfaces and make the mobile header feel deliberate. */
:root {
  --ivory: #f4eadb;
  --paper: #e9d8c0;
  --paper-deep: #dcc5a4;
  --header-surface: #dec5a7;
  --warm-surface: #f8f0e4;
  --warm-surface-raised: #fbf6ed;
  --warm-surface-hover: #f2e7d6;
}

html,
body,
.page-main,
.biography-section,
.biography-reading,
.bio-record,
.archive-section,
.archive-catalog,
.curated-categories,
.archive-view--curated,
.archive-search-results,
.books-section,
.books-catalog,
.seminars-catalog,
.reflections-catalog,
.site-footer {
  background-color: var(--ivory);
}

.site-header {
  background-color: var(--header-surface);
  border-bottom-color: rgba(83, 55, 40, .22);
}

.free-access-notice { background-color: #e9ddca; }

/* Replace the stark white card treatment with a restrained parchment tone. */
.archive-search,
.doc-card,
.doc-card__action,
.format-card,
.folder-node__toggle,
.archive-landing,
.archive-group-request,
.review-bucket__button,
.archive-search-panel,
.archive-stepper li span,
.topic-row,
.file-row,
.archive-empty-state,
.subject-card,
.archive-search-card,
.subject-card--curated,
.work-row,
.series-section,
.archive-empty-state--curated,
.books-toolbar,
.books-page .book-card,
.books-carousel__slide,
.seminars-toolbar,
.seminar-item,
.seminars-empty,
.reflection-card,
.reflection-post,
.reflections-empty,
.reflection-comment-form,
.newsletter-form,
.request-bar,
.request-dialog,
.request-item {
  background-color: var(--warm-surface);
}

.books-catalog { background-color: var(--ivory); }
.request-item:nth-child(even) { background-color: #f3e9da; }

.field,
.select,
.books-search,
.seminars-search,
.seminars-type,
.archive-search-card .field,
.newsletter-form .field,
.request-dialog__form .field {
  background-color: var(--warm-surface-raised);
}

body.atmosphere-active .request-contact__block {
  background-color: rgba(242, 231, 213, .88) !important;
}

/* The category links sit over moving woodland footage; the warm backing keeps
   every label readable without hiding the video or changing the cover art. */
body.books-page.atmosphere-active .books-page-hero .books-index a {
  border-color: rgba(67, 21, 29, .22);
  background: rgba(248, 240, 228, .94);
  color: var(--burgundy);
  box-shadow: 0 .45rem 1.15rem rgba(35, 12, 16, .16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

body.books-page.atmosphere-active .books-page-hero .books-index a:hover,
body.books-page.atmosphere-active .books-page-hero .books-index a:focus-visible {
  border-color: var(--gold-pale);
  background: var(--gold-pale);
  color: var(--burgundy-deep);
  transform: translateY(-1px);
}

body.books-page.atmosphere-active .books-page-hero .books-index a:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 3px;
}

/* Make each book's role easy to spot below the cover, without covering artwork. */
.books-page .book-card__role {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 1.8rem;
  align-items: center;
  margin: 0 0 .65rem;
  padding: .32rem .62rem;
  border: 1px solid rgba(164, 125, 79, .52);
  border-radius: 999px;
  background: #f1e3cc;
  color: var(--burgundy);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.books-page .book-card__status {
  border-color: rgba(164, 125, 79, .62);
  background: #f1e3cc;
  color: var(--burgundy);
  font-size: .68rem;
  letter-spacing: .045em;
}

@media (max-width: 720px) {
  .site-header {
    will-change: transform, opacity;
    transition: transform .22s cubic-bezier(.2, .75, .25, 1), opacity .18s ease-out, background-color .2s ease;
  }

  .site-header.is-scroll-hidden {
    transform: translate3d(0, calc(-100% - 2px), 0);
    opacity: 0;
    pointer-events: none;
  }

  .site-header .nav-wrap {
    row-gap: .15rem;
    padding-block: .38rem;
  }

  .site-header .brand { line-height: 1.15; }

  .hero-inner {
    gap: 1.45rem;
    padding-block: 3rem 2.55rem;
  }

  .hero-strap { margin-bottom: 1.35rem; }

  .bio-intro { gap: 2rem; padding-block: 3.5rem 2.8rem; }

  .film-block { padding-block: 2.25rem 3.2rem; }

  .archive-preview { gap: 1.5rem; padding-block: 3.4rem 3.1rem; }

  .inner-page .page-hero > .container {
    padding-block: clamp(2.7rem, 9vw, 3.35rem) 2.45rem;
  }
}

@media (max-width: 360px) {
  .hero h1 { font-size: clamp(3rem, 15.5vw, 3.5rem); line-height: .94; }
}

@media (max-width: 600px) {
  .books-page .book-card__role {
    min-height: 1.75rem;
    padding: .3rem .5rem;
    font-size: .67rem;
    letter-spacing: .025em;
  }

  .books-page .book-card__status { font-size: .64rem; }
}

@media (max-width: 360px) {
  .books-page .book-card__role {
    padding-inline: .42rem;
    font-size: .63rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none !important; }
  .site-header.is-scroll-hidden { transform: none; opacity: 1; pointer-events: auto; }
  body.books-page.atmosphere-active .books-page-hero .books-index a { transition: none; }
}
