/* ==========================================================================
   Simply Elemental - Lynne Christine Ridden
   Design intent (from Lynne, 23 July 2026):
   "simple, authentic, natural and understated ... Nothing too fancy"
   ========================================================================== */

:root {
  --paper: #fbf9f4;
  --paper-warm: #f5f1e8;
  --paper-cool: #eef1ed;
  --ink: #22302a;
  --ink-soft: #4d5c54;
  /* ink-muted and moss are tuned to clear WCAG AA (4.5:1) on every
     background in this palette - paper, paper-warm and paper-cool. */
  --ink-muted: #5d6b63;
  --moss: #56705c;
  --water: #4f6b74;
  --line: rgba(34, 48, 42, 0.13);
  --line-soft: rgba(34, 48, 42, 0.07);
  --night: #1b2622;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --measure: 34rem;
  --gutter: clamp(20px, 5vw, 40px);
  --shell: 1080px;
  --radius: 6px;

  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
}

h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.4rem);
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
}

p {
  margin: 0 0 1.35em;
}

::selection {
  background: rgba(95, 122, 99, 0.18);
}

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* --------------------------------------------------------------------------
   Header + menu trigger
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  width: 100%;
  min-height: var(--header-h);
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  transition: background 300ms ease, box-shadow 300ms ease;
}

/* Dark ink is the default so the header is readable on every light page.
   Only the home hero (a photograph) flips it to paper-white. */
body.is-home .site-header:not(.is-stuck):not(.on-light) .wordmark,
body.is-home .site-header:not(.is-stuck):not(.on-light) .menu-toggle {
  color: var(--paper);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.site-header.is-stuck {
  background: rgba(251, 249, 244, 0.92);
  box-shadow: 0 1px 0 var(--line-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header.is-stuck .wordmark,
.site-header.is-stuck .menu-toggle {
  color: var(--ink);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-inline-start: -4px;
  padding: 0 4px;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--ink);
  transition: color 300ms ease, opacity 300ms ease;
}

.wordmark.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.menu-toggle {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  margin-inline-end: -6px;
  padding: 12px 6px;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 300ms ease;
}

.menu-toggle-bars {
  display: grid;
  width: 24px;
  gap: 5px;
}

.menu-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 260ms ease, opacity 260ms ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Full-screen menu
   -------------------------------------------------------------------------- */

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 24px) var(--gutter)
    calc(32px + env(safe-area-inset-bottom));
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 320ms ease, transform 320ms ease, visibility 320ms;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-inner {
  width: min(var(--shell), 100%);
  margin: 0 auto;
}

.menu-nav {
  display: grid;
  gap: 2px;
  margin-bottom: clamp(34px, 6vw, 58px);
}

.menu-nav a {
  display: block;
  padding: clamp(7px, 1.4vw, 11px) 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  line-height: 1.2;
  color: var(--ink);
  transition: color 220ms ease, padding-left 260ms ease;
}

.menu-nav a:hover,
.menu-nav a:focus-visible {
  color: var(--moss);
  padding-left: 10px;
}

.menu-nav a[aria-current="page"] {
  color: var(--ink-muted);
}

.menu-contact {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

.menu-contact .label {
  margin-bottom: 4px;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.menu-contact a {
  color: var(--ink-soft);
  transition: color 200ms ease;
}

.menu-contact a:hover {
  color: var(--moss);
}

/* --------------------------------------------------------------------------
   Home hero
   -------------------------------------------------------------------------- */

.home-hero {
  position: relative;
  display: grid;
  /* vh first as a fallback: browsers without svh (iOS < 15.4) drop the
     whole declaration, so each svh rule is preceded by a vh equivalent. */
  min-height: 100vh;
  min-height: 100svh;
  /* The text sits high, over the sky. It is the only part of the
     photograph dark enough to carry white type - the hawthorn blossom
     below is pure white, so nothing readable can sit on top of it. */
  align-content: start;
  isolation: isolate;
  padding: max(calc(var(--header-h) + env(safe-area-inset-top) + 44px), 15vh)
    var(--gutter) clamp(70px, 12vh, 120px);
  padding: max(calc(var(--header-h) + env(safe-area-inset-top) + 44px), 16svh)
    var(--gutter) clamp(70px, 12vh, 120px);
  color: var(--paper);
  text-align: center;
}

.home-hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.home-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Weighted to the top so the sky carries the type, then lifted through
     the middle so the tree and grass stay bright, then a soft foot so the
     scroll cue stays legible. Values verified against the actual pixels. */
  background: linear-gradient(
    180deg,
    rgba(14, 24, 26, 0.66) 0%,
    rgba(14, 24, 26, 0.62) 40%,
    rgba(14, 24, 26, 0.48) 60%,
    rgba(14, 24, 26, 0.36) 78%,
    rgba(14, 24, 26, 0.62) 100%
  );
  content: "";
}

.home-hero h1 {
  margin-bottom: 0.22em;
  font-size: clamp(3rem, 10vw, 6.2rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.home-hero .tagline {
  margin: 0 auto 1.6em;
  max-width: 26ch;
  text-wrap: balance;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.9vw, 1.75rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(251, 249, 244, 0.94);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.32);
}

.home-hero .author-name {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(251, 249, 244, 0.88);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

/* Short, wide windows (laptops at 720p): pull the hero block up so the
   name does not drift down onto the sunlit blossom. */
@media (min-width: 700px) and (max-height: 800px) {
  .home-hero {
    padding-top: max(calc(var(--header-h) + 26px), 10vh);
    padding-top: max(calc(var(--header-h) + 26px), 11svh);
  }

  .home-hero h1 {
    font-size: clamp(2.8rem, 6.4vw, 4.6rem);
  }

  .home-hero .tagline {
    margin-bottom: 1.1em;
  }
}

/* Landscape phones. Very little height, so the whole block is compressed
   to stay inside the sky. */
@media (max-height: 540px) {
  .home-hero {
    padding-top: max(calc(var(--header-h) + 14px), 8vh);
    padding-top: max(calc(var(--header-h) + 14px), 9svh);
    padding-bottom: 54px;
  }

  /* Type lands lower down the frame here, so the scrim carries further. */
  .home-hero::after {
    background: linear-gradient(
      180deg,
      rgba(14, 24, 26, 0.7) 0%,
      rgba(14, 24, 26, 0.66) 55%,
      rgba(14, 24, 26, 0.5) 78%,
      rgba(14, 24, 26, 0.64) 100%
    );
  }

  .home-hero h1 {
    margin-bottom: 0.12em;
    font-size: clamp(2rem, 5.2vw, 2.8rem);
  }

  .home-hero .tagline {
    margin-bottom: 0.7em;
    font-size: 0.98rem;
  }

  .home-hero .author-name {
    font-size: 0.64rem;
  }

}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(64px, 10vw, 118px) var(--gutter);
}

.section-warm {
  background: var(--paper-warm);
}

.section-cool {
  background: var(--paper-cool);
}

.shell {
  width: min(var(--shell), 100%);
  margin: 0 auto;
}

.prose {
  width: min(var(--measure), 100%);
  margin: 0 auto;
}

.prose p {
  color: var(--ink-soft);
  font-size: 1.03rem;
  line-height: 1.82;
}

.prose p.lead {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  font-weight: 300;
  line-height: 1.42;
}

.prose h2 {
  margin-top: 1.6em;
}

.prose h2:first-child {
  margin-top: 0;
}

.eyebrow {
  margin: 0 0 1.1em;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.rule {
  width: 46px;
  height: 1px;
  margin: clamp(38px, 6vw, 58px) auto;
  border: 0;
  background: var(--line);
}

/* --------------------------------------------------------------------------
   Page header (inner pages, no photograph)
   -------------------------------------------------------------------------- */

.page-header {
  padding: calc(var(--header-h) + clamp(56px, 11vw, 104px)) var(--gutter)
    clamp(34px, 6vw, 58px);
  background: linear-gradient(180deg, var(--paper-warm), var(--paper));
  text-align: center;
}

.page-header h1 {
  margin: 0 auto;
  max-width: 20ch;
  font-weight: 300;
}

.page-header .standfirst {
  margin: 1.1em auto 0;
  max-width: 44ch;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 300;
  line-height: 1.45;
}

/* When Lynne has chosen a photograph to replace the quotation beneath a
   page title, bring that image close enough to read as part of the opening. */
.page-opening {
  padding-top: clamp(24px, 5vw, 52px);
}

.page-opening > .page-figure:first-child {
  margin-top: 0;
}

.page-opening > .publication-book:first-child {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Index of pages (home)
   -------------------------------------------------------------------------- */

.page-index {
  display: grid;
  gap: 0;
  width: min(var(--shell), 100%);
  margin: 0 auto;
  border-top: 1px solid var(--line-soft);
}

.page-index a {
  display: grid;
  gap: 4px 40px;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(20px, 3vw, 28px) 0;
  border-bottom: 1px solid var(--line-soft);
  transition: padding-left 300ms ease;
}

.page-index a:hover,
.page-index a:focus-visible {
  padding-left: 12px;
}

.page-index .title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  line-height: 1.2;
  color: var(--ink);
  transition: color 220ms ease;
}

.page-index a:hover .title {
  color: var(--moss);
}

.page-index .note {
  color: var(--ink-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Poems
   -------------------------------------------------------------------------- */

.poem {
  margin: clamp(42px, 7vw, 68px) auto;
  text-align: center;
}

.poem-title {
  margin: 0 0 1.15em;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.poem-body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.1vw, 1.7rem);
  font-weight: 300;
  font-style: normal;
  line-height: 1.68;
}

.poem-body p {
  margin: 0;
}

/* Stanza break */
.poem-body p + p {
  margin-top: 1.15em;
}

/* --------------------------------------------------------------------------
   Pull quote
   -------------------------------------------------------------------------- */

.pullquote {
  width: min(38rem, 100%);
  margin: clamp(40px, 7vw, 66px) auto;
  text-align: center;
}

.pullquote blockquote {
  margin: 0 0 1em;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  font-weight: 300;
  line-height: 1.55;
}

.pullquote cite {
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Buttons + inline links
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.button:hover {
  background: transparent;
  color: var(--ink);
}

.button.outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.button.outline:hover {
  border-color: var(--ink);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2em;
}

.prose a:not(.button) {
  color: var(--moss);
  border-bottom: 1px solid rgba(95, 122, 99, 0.32);
  transition: border-color 200ms ease;
}

.prose a:not(.button):hover {
  border-color: var(--moss);
}

/* --------------------------------------------------------------------------
   Book
   -------------------------------------------------------------------------- */

.book-layout {
  display: grid;
  gap: clamp(32px, 6vw, 64px);
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  width: min(var(--shell), 100%);
  margin: 0 auto;
}

.book-cover img {
  width: min(280px, 100%);
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 18px 40px rgba(27, 38, 34, 0.16), 0 3px 10px rgba(27, 38, 34, 0.1);
}

.book-copy p {
  color: var(--ink-soft);
  font-size: 1.03rem;
  line-height: 1.82;
}

.book-meta {
  display: grid;
  gap: 0;
  margin: 1.8em 0 0;
  border-top: 1px solid var(--line-soft);
}

.book-meta div {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.book-meta dt {
  color: var(--ink-muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.95rem;
  text-align: right;
}

.publication-book {
  margin-top: clamp(44px, 7vw, 72px);
}

.publication-order {
  margin-top: clamp(48px, 8vw, 76px);
  padding-top: clamp(38px, 6vw, 54px);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.publication-order .button-row {
  justify-content: center;
}

.publication-order .book-meta {
  text-align: left;
}

/* Reviews stay in one quiet reading column rather than becoming sales cards. */
.review-heading {
  width: min(var(--measure), 100%);
  margin: 0 auto clamp(36px, 6vw, 54px);
  text-align: center;
}

.review-list {
  width: min(var(--measure), 100%);
  margin: 0 auto;
  border-top: 1px solid var(--line-soft);
}

.review-list .testimonial {
  padding: clamp(34px, 6vw, 52px) 0;
  border-bottom: 1px solid var(--line-soft);
}

/* --------------------------------------------------------------------------
   Fees
   -------------------------------------------------------------------------- */

.fees {
  margin: 2em 0 0;
  border-top: 1px solid var(--line-soft);
}

.fees div {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.fees dt {
  color: var(--ink);
  font-size: 0.98rem;
}

.fees dd {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.2rem;
}

/* --------------------------------------------------------------------------
   Page figures (Lynne's photographs)
   -------------------------------------------------------------------------- */

.page-figure {
  width: min(44rem, 100%);
  margin: clamp(38px, 6vw, 60px) auto;
}

.page-figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(27, 38, 34, 0.12);
}

.page-figure.narrow {
  width: min(var(--measure), 100%);
}

.page-figure figcaption {
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-align: center;
}

/* --------------------------------------------------------------------------
   About portrait and actions
   -------------------------------------------------------------------------- */

.about-portrait {
  width: min(360px, 100%);
  margin: 0 auto clamp(42px, 7vw, 68px);
}

.about-portrait img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(27, 38, 34, 0.14);
}

.centered-actions {
  justify-content: center;
  width: min(var(--measure), 100%);
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 760px) {
  .about-portrait img {
    width: min(320px, 78vw);
    margin: 0 auto;
  }
}

/* --------------------------------------------------------------------------
   Course list
   -------------------------------------------------------------------------- */

.course-list {
  display: grid;
  gap: 0 clamp(24px, 4vw, 48px);
  margin: 1.6em 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
}

.course-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 0.98rem;
}

@media (min-width: 620px) {
  .course-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Testimonial
   -------------------------------------------------------------------------- */

.testimonial {
  width: min(var(--measure), 100%);
  margin: 0 auto;
}

.testimonial blockquote {
  margin: 0 0 1.1em;
  padding-left: clamp(18px, 3vw, 28px);
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.42rem);
  font-weight: 300;
  line-height: 1.6;
}

.testimonial blockquote p {
  margin: 0 0 1em;
}

.testimonial blockquote p:last-child {
  margin-bottom: 0;
}

.testimonial cite {
  display: block;
  padding-left: clamp(18px, 3vw, 28px);
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-lines {
  display: grid;
  gap: clamp(22px, 4vw, 34px);
  width: min(var(--measure), 100%);
  margin: 0 auto;
  text-align: center;
}

.contact-lines .item .label {
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.contact-lines .item a,
.contact-lines .item .value {
  display: inline-block;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  font-weight: 300;
  line-height: 1.3;
  transition: color 200ms ease;
}

.contact-lines .item .value {
  color: var(--ink-soft);
}

.contact-lines .item a:hover {
  color: var(--moss);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: clamp(46px, 7vw, 72px) var(--gutter)
    calc(clamp(30px, 5vw, 44px) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 40px;
  align-items: flex-start;
  justify-content: space-between;
  width: min(var(--shell), 100%);
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.footer-brand span {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.footer-nav {
  display: grid;
  gap: 2px;
}

.footer-nav a {
  display: block;
  padding: 5px 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  transition: color 200ms ease;
}

.footer-nav a:hover {
  color: var(--moss);
}

.footer-meta {
  display: grid;
  gap: 2px;
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.footer-meta > a {
  display: inline-block;
  align-self: start;
  padding: 5px 0;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer-meta > span {
  padding: 3px 0;
}

.footer-meta a:hover {
  color: var(--moss);
}

/* --------------------------------------------------------------------------
   Reveal
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Printing and "Save as PDF" never fire the scroll observer, so anything
   below the fold would come out blank. Force everything visible. */
@media print {
  .js .reveal,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .site-header,
  .menu-panel {
    display: none !important;
  }

  body {
    background: #fff;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 700px) {
  .page-index a {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    align-items: baseline;
  }
}

/* Enough room for the tagline to sit on a single line. */
@media (min-width: 1000px) {
  .home-hero .tagline {
    max-width: 44ch;
  }
}

@media (max-width: 860px) {
  .book-layout {
    grid-template-columns: 1fr;
  }

  .book-cover img {
    width: min(220px, 62vw);
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: 60px;
  }

  body {
    font-size: 0.98rem;
  }

  /* Hide the word visually but keep it in the accessibility tree, so the
     button still announces as "Menu" / "Close". display:none would strip
     the button's accessible name entirely. */
  .menu-toggle span.label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .book-meta div,
  .fees div {
    flex-direction: column;
    gap: 3px;
  }

  .book-meta dd {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    gap: 26px;
  }

  .button {
    width: 100%;
  }

  .button-row {
    width: 100%;
  }
}

/* A shorter phone or landscape browser must be able to reach the first and
   last menu links now that Latest Publication has been added. */
@media (max-height: 700px) {
  .menu-panel {
    justify-content: flex-start;
  }

  .menu-inner {
    margin-block: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
