/* Purple Helm — purplehelm.us
   Type: Cormorant Garamond (display), Lora (text, the book interior's face), Inter (labels).
   All self-hosted under /assets/fonts (SIL Open Font License; see the LICENSE files there). */

@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: italic; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/lora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/lora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 400; font-style: italic; font-display: swap; src: url("/assets/fonts/lora-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --ink: #1D1A22;
  --body: #4A4452;
  --muted: #5C5566;
  --plum: #3D2466;
  --plum-dark: #24143F;
  --teal: #0E6E6B;
  --line: #DCD6E3;
  --tint: #F6F3F9;
  --paper: #FFFFFF;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --text: Lora, Georgia, serif;
  --label: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 70rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--plum-dark); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
cite { font-style: italic; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 46rem; }
.center { text-align: center; }
section { padding: 5rem 0; }
section.flush-top { padding-top: 0; }
.tint { background: var(--tint); }

.eyebrow, .label { font-family: var(--label); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.eyebrow { color: var(--teal); margin-bottom: 1rem; }
.label { color: var(--ink); }
.muted { color: var(--muted); }
.lead { font-size: 1.2rem; color: var(--body); }
.rule { width: 48px; height: 2.5px; background: var(--teal); border: 0; margin: 1.5rem 0; }
.rule.center { margin-left: auto; margin-right: auto; }

.button { display: inline-block; background: var(--plum); color: #fff; font: 600 0.95rem/1 var(--label); padding: 1rem 1.5rem; text-decoration: none; min-height: 44px; }
.button:hover { background: var(--plum-dark); color: #fff; }
.text-link { font: 600 0.92rem/1.4 var(--label); text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }

/* Masthead */
.masthead { max-width: var(--wrap); margin: 0 auto; padding: 2.25rem 1.5rem 0; text-align: center; }
.brand { display: inline-flex; flex-direction: column; align-items: center; gap: 0.4rem; color: var(--ink); text-decoration: none; }
.brand .mark { color: var(--plum); }
.brand-name { font: 600 2.4rem/1 var(--display); letter-spacing: 0.04em; }
.brand-sub { font: 500 0.7rem/1 var(--label); letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
.menu { margin-top: 1.5rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.menu ul { list-style: none; margin: 0; padding: 0.35rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2.25rem; }
.menu a { display: inline-block; padding: 0.7rem 0.25rem; font: 500 0.8rem/1.4 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--plum); text-decoration: underline; text-underline-offset: 0.5em; }

/* Hero */
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 3.5rem; }
.hero-text { flex: 999 1 28rem; min-width: 0; }
.hero-text .lead { margin-top: 1.5rem; max-width: 34rem; }
.hero-book { flex: 0 1 18rem; margin: 0 auto; text-align: center; }
.hero-book .cover { width: 18rem; box-shadow: 0 18px 40px rgba(29, 26, 34, 0.22); }
.hero-book figcaption { margin-top: 1.1rem; }
.hero-book figcaption cite { display: block; font-size: 1.05rem; }
.hero-book figcaption span { font: 400 0.82rem/1.5 var(--label); color: var(--muted); }
.subtitle { font: italic 400 1.4rem/1.4 var(--text); color: var(--body); margin-top: 1rem; }
.byline { font: 600 0.9rem/1 var(--label); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 1.25rem; }

/* Read / Apply / Engage */
.path { padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.path-col { padding: 3rem 2rem; border-left: 1px solid var(--line); }
.path-col:first-child { border-left: 0; padding-left: 0; }
.path-col p { color: var(--body); }
.numeral { font: 500 1.4rem/1 var(--display); color: var(--plum) !important; margin-bottom: 0.4rem; }
.path-col .label { margin-bottom: 0.9rem; }

/* Epigraph */
.epigraph { padding: 6rem 0; }
.epigraph-line { font: italic 500 clamp(2.2rem, 5vw, 3.4rem)/1.15 var(--display); color: var(--ink); }

/* Split section: lead on the left, rows on the right */
.split { display: flex; flex-wrap: wrap; gap: 3.5rem; }
.split-lead { flex: 1 1 20rem; }
.split-lead h2 { margin-bottom: 1.1rem; }
.split-lead p { color: var(--body); }
.rows { flex: 999 1 30rem; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rows li { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.rows h3 { margin-bottom: 0.35rem; }
.rows p { color: var(--body); }
.narrow .rows { margin-top: 1.5rem; }

/* Book grid */
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.75rem; border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; margin-bottom: 2.5rem; }
.book-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 2.5rem 2rem; }
.book-card { display: block; max-width: 16rem; color: var(--ink); text-decoration: none; }
.book-card .cover { width: 100%; box-shadow: 0 10px 24px rgba(29, 26, 34, 0.18); }
.book-card cite { display: block; margin-top: 1rem; font-size: 1.15rem; }
.book-card span { font: 400 0.85rem/1.5 var(--label); color: var(--muted); }
.book-card:hover cite { color: var(--plum); text-decoration: underline; }

/* Trade */
.trade-grid { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; }
.trade-grid h3 { font-size: 1.45rem; margin-bottom: 0.4rem; }
.trade-grid p { color: var(--body); font-size: 0.97rem; margin-bottom: 0.5rem; }
.trade-book { margin-bottom: 2rem; }
.trade-book h3 { font-size: 1.45rem; margin-bottom: 0.3rem; }
.formats { width: 100%; border-collapse: collapse; margin-top: 1rem; font: 400 0.95rem/1.4 var(--label); }
.formats th, .formats td { text-align: left; padding: 0.75rem 0.5rem 0.75rem 0; border-bottom: 1px solid var(--line); }
.formats thead th { font-weight: 600; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.formats tbody th { font-weight: 600; }

/* Page heads and quotes */
.page-head { padding-bottom: 3rem; }
.page-head .lead { margin-top: 0.5rem; }
.quote { margin: 2rem 0; padding: 0; font: italic 500 1.7rem/1.3 var(--display); color: var(--ink); }

/* Footer */
.site-foot { border-top: 1px solid var(--ink); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.foot-letter { flex: 1 1 22rem; max-width: 30rem; }
.foot-letter h2 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.foot-letter p { color: var(--body); font-size: 0.97rem; }
.foot-letter .button { margin-top: 0.5rem; }
.foot-meta { font: 400 0.88rem/1.9 var(--label); color: var(--muted); }
.foot-meta p { margin: 0; }
.foot-meta a { color: var(--muted); }
.foot-name { font: 600 1.25rem/1.6 var(--display); color: var(--ink); }

@media (max-width: 40rem) {
  section { padding: 3.5rem 0; }
  .path-col, .path-col:first-child { border-left: 0; padding: 2rem 0; border-top: 1px solid var(--line); }
  .path-col:first-child { border-top: 0; }
  .brand-name { font-size: 2rem; }
  .menu ul { gap: 0 1.25rem; }
  .hero-book .cover { width: 14rem; }
}
