/* Wisdom Classic Books — site styles
   Palette taken from the Meditations cover and A+ content. */

@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --green: #09291D;
  --green-deep: #031B13;
  --gold: #D5B974;
  --gold-soft: #E6D3A3;
  --cream: #F1E8D3;
  --paper: #F7F1E3;
  --ink: #16271F;
  --ink-soft: #4B5B52;
  --rule: #CDBF9C;

  --serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --titling: "Cinzel", "Trajan Pro", Georgia, serif;

  --measure: 36rem;
  --wide: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0 0 0.5em; }
em, i { font-style: italic; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.on-paper :focus-visible, main :focus-visible { outline-color: var(--green); }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--green-deep); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---------- Header ---------- */
.site-header { background: var(--green-deep); color: var(--cream); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--gold); text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font-family: var(--titling); font-weight: 600; font-size: clamp(.9rem, .8rem + .4vw, 1.05rem); letter-spacing: .08em; }
.nav { display: flex; gap: 1.5rem; }
.nav a { color: var(--cream); text-decoration: none; font-size: 1.05rem; }
.nav a:hover { color: var(--gold); }
@media (max-width: 26rem) { .brand span { font-size: .8rem; letter-spacing: .05em; } .nav { gap: 1rem; } }
@media (max-width: 21rem) { .brand span { display: none; } }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(ellipse 70% 90% at 78% 55%, #12402E 0%, var(--green) 55%, var(--green-deep) 100%); color: var(--cream); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr; align-items: center; gap: 2rem; padding-block: clamp(3rem, 8vw, 6.5rem); }
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4.5vw, 4.75rem); font-weight: 500; letter-spacing: -.01em; color: var(--gold); max-width: 11ch; margin-bottom: .45em; }
.hero p { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); line-height: 1.55; max-width: 30rem; color: var(--cream); margin: 0; }
.hero figure { margin: 0; justify-self: center; width: min(78vw, 22rem); }
.hero figure img { filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }
@media (min-width: 52rem) {
  .hero .wrap { grid-template-columns: 1.15fr 1fr; }
  .hero figure { width: min(32vw, 27rem); justify-self: end; }
}

/* ---------- Sections ---------- */
section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-title { font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); color: var(--green); }
.lede { font-size: 1.15em; }

/* Book */
.book .wrap { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (min-width: 52rem) { .book .wrap { grid-template-columns: minmax(16rem, 22rem) 1fr; } }
.book figure { margin: 0; width: min(100%, 17rem); justify-self: center; }
@media (min-width: 52rem) { .book figure { width: auto; justify-self: stretch; } }
.book figure img { box-shadow: 0 1px 2px rgba(22,39,31,.18), 0 18px 40px -18px rgba(22,39,31,.45); }
.book figcaption { font-size: .95rem; color: var(--ink-soft); margin-top: .8rem; font-style: italic; }
.book-title { font-family: var(--titling); font-weight: 600; font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); letter-spacing: .06em; color: var(--green); margin-bottom: .2em; }
.book-meta { margin: 0 0 1.6rem; color: var(--ink-soft); font-size: 1.1em; line-height: 1.45; }
.book-meta span { display: block; }
.book-meta .credit { font-style: italic; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.guide-link { font-size: 1.05em; margin: 0; }
.over { font-size: 1.25rem; font-weight: 400; font-style: italic; color: var(--ink-soft); margin-bottom: .4rem; }

.button {
  display: inline-block; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; letter-spacing: .02em;
  background: var(--green); color: var(--gold); text-decoration: none; border: 1px solid var(--green);
  padding: .7rem 1.4rem; border-radius: 3px; line-height: 1.3;
}
.button:hover { background: var(--green-deep); text-decoration: none; }
.button.secondary { background: transparent; color: var(--green); }
.button.secondary:hover { background: var(--cream); }
[hidden] { display: none !important; }

/* Moments */
.moments { background: var(--cream); border-block: 1px solid var(--rule); }
.moments ul { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 2.25rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .moments ul { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.moments li img { width: 100%; max-width: 16rem; border-radius: 2px; }
.moments h3 { font-size: 1.4rem; color: var(--green); margin: 1rem 0 .35rem; }
.moments p { margin: 0; color: var(--ink); }

/* Quote band */
.quote-band { position: relative; padding: 0; background: var(--green-deep); color: var(--cream); }
.quote-band picture img { width: 100%; height: clamp(22rem, 38vw, 34rem); object-fit: cover; object-position: right center; }
.quote-band blockquote { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; background: linear-gradient(90deg, rgba(3,27,19,.72) 0%, rgba(3,27,19,.35) 45%, rgba(3,27,19,0) 70%); }
.quote-band blockquote .wrap { padding-block: 2rem; }
.quote-band blockquote p { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.3rem); line-height: 1.3; max-width: 22ch; color: var(--cream); text-shadow: 0 1px 12px rgba(0,0,0,.55); margin-bottom: .6rem; }
.quote-band cite { font-style: normal; color: var(--gold); font-size: 1.1rem; letter-spacing: .03em; }
@media (max-width: 40rem) {
  .quote-band picture img { height: auto; aspect-ratio: 1 / 1; object-position: center; }
  .quote-band blockquote { align-items: flex-start; background: linear-gradient(180deg, rgba(3,27,19,.85) 0%, rgba(3,27,19,.55) 55%, rgba(3,27,19,0) 85%); }
  .quote-band blockquote p { max-width: 20ch; font-size: 1.35rem; }
}

/* About */
.about { border-top: 1px solid var(--rule); }
.about .wrap > div { max-width: var(--measure); }

/* ---------- Guide page ---------- */
.guide { padding-block: clamp(3rem, 7vw, 5.5rem); }
.guide h1 { font-size: clamp(2.5rem, 1.7rem + 3.5vw, 4rem); color: var(--green); margin-bottom: .15em; }
.guide .subtitle { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.65rem); font-style: italic; color: var(--ink-soft); margin-bottom: 1.6rem; line-height: 1.35; }
.guide .rule { width: 4rem; height: 2px; background: var(--gold); border: 0; margin: 0 0 2rem; }
.downloads { display: grid; gap: 1rem; margin: 2.25rem 0 1.5rem; padding: 0; list-style: none; }
.downloads li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; }
.downloads .hint { color: var(--ink-soft); font-size: 1rem; }
.note { font-size: 1rem; color: var(--ink-soft); border-left: 2px solid var(--gold); padding-left: 1rem; }

/* ---------- Text page (privacy) ---------- */
.text-page { padding-block: clamp(3rem, 6vw, 5rem); }
.text-page h1 { font-size: clamp(2.3rem, 1.7rem + 2.5vw, 3.3rem); color: var(--green); }
.text-page h2 { font-size: 1.5rem; color: var(--green); margin-top: 2.2rem; }
.text-page ul { padding-left: 1.2rem; }
.text-page li { margin-bottom: .6rem; }
.updated { color: var(--ink-soft); font-style: italic; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: var(--cream); padding-block: 2.75rem; font-size: 1rem; }
.site-footer .wrap { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 46rem) { .site-footer .wrap { grid-template-columns: auto 1fr; gap: 2rem; } }
.site-footer img { width: 88px; height: 88px; }
.site-footer a { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; }
.site-footer .credit { color: #B9C2B6; font-size: .9rem; margin: 0; }
