@font-face {
  font-family: "Ovo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ovo-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}

/* Palette and type carried over from the original odrin theme, so the rebuilt
   site reads as the same site. Ovo has no italic or bold cut — emphasis has to
   come from size, spacing and colour, never from a synthesised weight. */
:root {
  --cream: #faf7f2;
  --paper: #fffdfa;
  --mist: #f3f5f7;
  --night: #16182a;
  --ink: #2b2b2b;
  --ink-soft: #5f5f5f;
  --ink-faint: #6e6a66;
  /* Deepened from the theme's original salmon so small text and white-on-fill
     clear 4.5:1 — the inherited #ee6b62 measured 3.2:1 on cream. */
  --coral: #c4372c;
  --coral-press: #a72f25;
  /* Decorative only: dotted rules, the drop-cap box, and text on --night. */
  --coral-soft: #faab9f;
  --gold: #c8873c;
  --gold-deep: #8c5a20;
  /* Decorative hairlines between sections. Too faint to bound a control — see
     --btn-edge, which does that job. */
  --rule: rgba(43, 43, 43, 0.12);
  /* The ghost button's border is the only thing that marks it as a button, so
     it is held to WCAG 1.4.11's 3:1 rather than to --rule's 1.25:1. Measures
     3.2:1 on cream and 3.13:1 on mist. */
  --btn-edge: #8f8a85;

  --measure: 1180px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --gap: clamp(2rem, 5vw, 4.5rem);
  --band: clamp(3.5rem, 9vw, 8rem);

  --step-note: 0.72rem;
  --step-body: clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
  --step-lede: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  --step-quote: clamp(1.2rem, 1rem + 1vw, 1.75rem);
  --step-title: clamp(1.75rem, 1.35rem + 1.9vw, 2.9rem);
  --step-display: clamp(2.1rem, 1.5rem + 3vw, 4rem);

  --nav-h: 3.5rem;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Ovo", Georgia, "Times New Roman", serif;
  font-size: var(--step-body);
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a {
  color: var(--coral);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

/* Coral only clears 3.28:1 against the night band — technically a pass, but
   thin. The soft tint reads at 9.5:1 there. */
.band--night :focus-visible {
  outline-color: var(--coral-soft);
}

/* The skip link's landing point. It is a region, not a control, so it takes no
   focus ring of its own — outlining the whole page would read as a fault. */
#main:focus {
  outline: none;
}

/* Text for screen readers only. Used to tell four otherwise identical "Read
   more" and "Buy on Amazon" controls apart. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

h1,
h2,
h3 {
  font-weight: 400;
  line-height: 1.14;
  margin: 0;
  text-wrap: balance;
}

.wrap {
  width: min(100% - (var(--pad) * 2), var(--measure));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--coral);
  color: #fff;
  padding: 0.85rem 1.35rem;
  z-index: 100;
}
.skip:focus {
  left: 0;
}

/* ---------- Nav ----------
   Mobile is a single row — brand left, links right. Stacking it into three
   rows cost 124px of a 844px viewport, which the sticky position then held
   for the whole scroll. The symmetric three-column arrangement returns once
   there is width for it. */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  padding-inline: max(var(--pad), env(safe-area-inset-left));
}

/* The symmetric three-column arrangement is kept at every size — measured at
   320px it still fits on one row once the brand is scaled down. */
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.25rem;
  min-height: var(--nav-h);
  width: min(100%, var(--measure));
  margin-inline: auto;
}

.nav__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: clamp(1rem, 0.82rem + 0.9vw, 1.6rem);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Padding does the work so the tap area clears 44px without a tall bar. */
.nav__links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.55rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.16s ease;
}
.nav__links a:hover,
.nav__links a:active,
.nav__links a[aria-current="page"] {
  color: var(--coral);
}

.nav__links--end {
  justify-content: flex-end;
}

@media (min-width: 46rem) {
  .nav__inner {
    min-height: 4.5rem;
  }
  .nav__links {
    gap: clamp(0.5rem, 2vw, 1.5rem);
  }
  .nav__links a {
    padding-inline: 0.75rem;
  }
}

/* ---------- Shared type ---------- */

.cap {
  color: var(--coral);
  border: 1px solid var(--coral-soft);
  padding: 0.08em 0.16em 0.02em;
  margin-right: 0.06em;
  font-size: 1.3em;
  line-height: 1;
  display: inline-block;
}

.title {
  font-size: var(--step-title);
}

.display {
  font-size: var(--step-display);
  letter-spacing: -0.015em;
  line-height: 1.06;
}

/* The kicker is the book-tagline device inherited from odrin. It marks a
   tagline and the hero's standfirst — not every section heading. */
.eyebrow {
  display: inline-block;
  margin: 1rem 0 0;
  padding-bottom: 0.4rem;
  border-bottom: 2px dotted var(--coral-soft);
  font-size: var(--step-note);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--ink-soft);
}

.lede {
  font-size: var(--step-lede);
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}

.btn--solid {
  background: var(--coral);
  color: #fff;
}
.btn--solid:hover,
.btn--solid:active {
  background: var(--coral-press);
}

.btn--ghost {
  border-color: var(--btn-edge);
  color: var(--ink);
}
.btn--ghost:hover,
.btn--ghost:active {
  border-color: var(--coral);
  color: var(--coral);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---------- Bands ---------- */

.band {
  padding-block: var(--band);
}
.band--mist {
  background: var(--mist);
}
.band--night {
  background: var(--night);
  color: #f0eee9;
}

/* ---------- Hero ---------- */

/* Top padding is kept modest so the whole shelf — covers and captions — clears
   the fold on a 900px-tall laptop, which is where the client will see it. */
.hero {
  padding-block: clamp(1.75rem, 4vw, 3.25rem) clamp(2rem, 5vw, 4rem);
  text-align: center;
}

/* Hidden on phones so all four covers clear the fold — the shelf and the
   kicker already say what the standfirst says. */
.hero__lede {
  display: none;
  margin: 1.5rem auto 0;
}

@media (min-width: 46rem) {
  .hero__lede {
    display: block;
  }
}

/* Short laptop viewports (1366x768 and similar) get the same treatment as
   phones: the four covers matter more than the standfirst. */
@media (min-width: 46rem) and (max-height: 820px) {
  .hero {
    padding-block: 1.5rem 2rem;
  }
  .hero__lede {
    display: none;
  }
  .shelf {
    margin-top: 1.75rem;
  }
}

.shelf {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.85rem, 3vw, 2.5rem) clamp(0.85rem, 2.5vw, 2rem);
  margin-top: clamp(1.5rem, 4vw, 3.5rem);
}

.shelf__item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

/* The four covers ship at slightly different aspect ratios; a fixed ratio
   keeps the shelf tidy so the titles beneath it line up. */
.shelf__art {
  position: relative;
  aspect-ratio: 5 / 8;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.shelf__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) {
  .shelf__item:hover .shelf__art {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.26);
  }
}
.shelf__item:active .shelf__art {
  transform: translateY(-2px);
}

/* Anchored to the top edge — at the bottom it sits over the author's name. */
.shelf__flag {
  position: absolute;
  inset-inline: 0;
  top: 0;
  background: var(--gold-deep);
  color: #fff;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.4rem;
  text-align: center;
  line-height: 1.4;
}

.shelf__name {
  font-size: clamp(0.95rem, 0.88rem + 0.3vw, 1.25rem);
  line-height: 1.25;
}

.shelf__note {
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (min-width: 46rem) {
  .shelf {
    grid-template-columns: repeat(4, 1fr);
  }
  .shelf__flag {
    font-size: 0.6rem;
    padding: 0.45rem 0.5rem;
  }
}

/* ---------- Press band ---------- */

.press {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  align-items: center;
}

.press__art img {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.press .eyebrow {
  color: var(--coral-soft);
  border-bottom-color: rgba(200, 135, 60, 0.7);
}

.press__quote {
  margin: 1.75rem 0 0;
  padding-left: clamp(1rem, 3vw, 1.75rem);
  border-left: 1px solid rgba(250, 171, 159, 0.5);
  font-size: var(--step-quote);
  line-height: 1.5;
  color: #f7f5f1;
}
.press__quote p {
  margin: 0;
}

.press__cite {
  display: block;
  margin-top: 1rem;
  font-size: var(--step-note);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral-soft);
  font-style: normal;
}

/* 0.42 rather than 0.3: the lighter edge clears 3:1 on --night (4.06:1). */
.band--night .btn--ghost {
  border-color: rgba(255, 255, 255, 0.42);
  color: #f0eee9;
}
.band--night .btn--ghost:hover,
.band--night .btn--ghost:active {
  border-color: var(--coral-soft);
  color: var(--coral-soft);
}

@media (min-width: 56rem) {
  .press {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

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

.book {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, var(--gap));
  align-items: start;
  padding-block: var(--band);
  border-top: 1px solid var(--rule);
}
.book:first-of-type {
  border-top: 0;
}

.book__art {
  max-width: 15rem;
}
.book__art img {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.book__body p {
  margin: 0 0 1.1rem;
  max-width: 68ch;
}

.book__intro {
  margin-top: 1.75rem;
}

.book__quote {
  margin: 1.75rem 0 0;
  padding-left: clamp(1rem, 3vw, 1.5rem);
  border-left: 1px solid var(--coral-soft);
  font-size: var(--step-quote);
  line-height: 1.5;
  color: var(--ink);
}
.book__quote p {
  margin: 0;
  max-width: 34ch;
}
.book__cite {
  display: block;
  margin-top: 0.85rem;
  font-size: var(--step-note);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-style: normal;
}

/* Progressive disclosure for the longer blurbs, collapsed at every width.
   Native <details> — no script involved, so it works with JS disabled and the
   full text stays in the document for search engines. */
.more {
  margin-top: 0.25rem;
}
.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: var(--step-note);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
}
.more > summary:hover {
  color: var(--coral-press);
}
.more > summary::-webkit-details-marker {
  display: none;
}
.more > summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}
.more[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}

/* Real text in both states rather than a CSS-generated label, so the control
   names its action to a screen reader as well as to the eye. */
.more__less {
  display: none;
}
.more[open] .more__more {
  display: none;
}
.more[open] .more__less {
  display: inline;
}

@media (min-width: 56rem) {
  .book {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
  .book--flip .book__art {
    order: 2;
  }
  .book__art {
    max-width: none;
  }
}

/* ---------- Author ---------- */

.author {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  align-items: center;
}

.author__art {
  max-width: 26rem;
}
.author__art img {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

@media (min-width: 56rem) {
  .author {
    grid-template-columns: 1fr 1fr;
  }
  .author__art {
    max-width: none;
  }
}

/* ---------- Reviews ---------- */

.reviews__head {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.reviews__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.review {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}

.review__text {
  margin: 0;
  font-size: 0.98rem;
}
.review__text p {
  margin: 0;
}

.review__by {
  font-size: var(--step-note);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-style: normal;
}
/* A plain span, not <strong>: the reviewer's name is coloured for hierarchy,
   and nothing about it is more important than the quote it signs. */
.review__who {
  color: var(--coral);
}

@media (min-width: 40rem) {
  .reviews__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 64rem) {
  .reviews__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.contact {
  text-align: center;
  max-width: 42rem;
  margin-inline: auto;
}

.contact__mail {
  display: inline-block;
  margin-top: 2rem;
  font-size: clamp(1rem, 0.85rem + 0.8vw, 1.5rem);
  color: var(--coral);
  text-decoration: none;
  border-bottom: 2px dotted var(--coral-soft);
  padding: 0.5rem 0 0.4rem;
}
.contact__mail:hover,
.contact__mail:active {
  color: var(--coral-press);
}

/* ---------- Book detail page ---------- */

.detail__meta {
  margin-top: 2rem;
  font-size: var(--step-note);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.backlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 1rem;
  font-size: var(--step-note);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-faint);
}
.backlink:hover,
.backlink:active {
  color: var(--coral);
}

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

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 2rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: var(--step-note);
}
.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.5rem;
  color: var(--ink-faint);
  text-decoration: none;
}
.foot__links a:hover,
.foot__links a:active {
  color: var(--coral);
}

.foot__mail {
  max-width: 100%;
}

/* ---------- Scroll reveal (progressive enhancement) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .shelf__art,
  .btn,
  .more > summary::after {
    transition: none;
  }
  .shelf__item:hover .shelf__art,
  .shelf__item:active .shelf__art {
    transform: none;
  }
}
