:root {
  --basalt: #0b111c;        /* night sky, sampled from the cover */
  --stone: #131c2b;         /* raised night stone */
  --stone-edge: #26334a;    /* hairline carving */
  --sandstone: #ecdfc6;     /* primary text */
  --sandstone-dim: #a9a08c; /* secondary text */
  --lamp: #e59c52;          /* cover amber */
  --lamp-deep: #a76f33;
  --max: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--basalt);
  color: var(--sandstone);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lamp); text-decoration: none; }
a:hover { color: var(--sandstone); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
nav.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 17, 28, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--stone-edge);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: var(--max); margin: 0 auto;
}
.brand {
  font-family: "Marcellus", serif;
  font-size: 1.15rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sandstone);
}
a.brand:hover { color: var(--lamp); }
.nav-links { display: flex; gap: 28px; font-size: 0.95rem; letter-spacing: 0.06em; }
.nav-links a { color: var(--sandstone-dim); padding-bottom: 4px; }
.nav-links a:hover { color: var(--lamp); }
.nav-links a.active { color: var(--lamp); border-bottom: 1px solid var(--lamp); }
@media (max-width: 640px) {
  .nav-inner { flex-direction: column; gap: 12px; }
  .nav-links { gap: 18px; font-size: 0.9rem; flex-wrap: wrap; justify-content: center; }
}

/* ---------- Heroes ---------- */
header.hero {
  position: relative;
  padding: 110px 24px 90px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, rgba(229, 156, 82, 0.13), transparent 70%),
    var(--basalt);
}
header.hero.compact { padding: 80px 24px 64px; }
.eye {
  width: 130px; height: auto; margin: 0 auto 42px; display: block;
  opacity: 0.9;
}
.eyebrow {
  font-family: "Marcellus", serif;
  font-size: 0.82rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--lamp); margin-bottom: 22px;
}
h1 {
  font-family: "Marcellus", serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: 0.015em;
  max-width: 16ch; margin: 0 auto;
}
header.hero.compact h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.hero-sub {
  margin: 26px auto 0;
  max-width: 46ch;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-style: italic;
  color: var(--sandstone-dim);
}
.hero-cta { margin-top: 44px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: "Marcellus", serif;
  font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 15px 34px;
  border: 1px solid var(--lamp-deep);
  color: var(--lamp);
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--lamp); color: var(--basalt); }
.btn.solid { background: var(--lamp); color: var(--basalt); }
.btn.solid:hover { background: var(--sandstone); border-color: var(--sandstone); }

/* ---------- Section scaffolding ---------- */
section { padding: 90px 0; border-top: 1px solid var(--stone-edge); }
section.no-rule { border-top: none; }
.label {
  font-family: "Marcellus", serif;
  font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--lamp);
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 46px;
}
.label::after { content: ""; height: 1px; flex: 1; background: var(--stone-edge); }
h2 {
  font-family: "Marcellus", serif; font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.25; margin-bottom: 8px;
}
h3 { font-family: "Marcellus", serif; font-weight: 400; }

/* ---------- Book layouts ---------- */
.book-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 820px) { .book-grid { grid-template-columns: 1fr; gap: 44px; } }

.cover-img {
  width: 100%; max-width: 320px; display: block; margin: 0 auto;
  border: 1px solid var(--stone-edge);
  box-shadow: 0 0 70px rgba(229, 156, 82, 0.16), 0 30px 60px rgba(0,0,0,0.6);
}

.book-copy .subtitle { font-style: italic; color: var(--sandstone-dim); font-size: 1.2rem; margin-bottom: 30px; }
.book-copy p { margin-bottom: 20px; max-width: 62ch; }
.pull {
  border-left: 2px solid var(--lamp);
  padding-left: 22px; margin: 32px 0;
  font-style: italic; font-size: 1.22rem; color: var(--sandstone);
  max-width: 54ch;
}
.meta-row { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 34px; font-size: 0.95rem; color: var(--sandstone-dim); }
.meta-row strong { color: var(--sandstone); font-weight: 500; }

/* ---------- Themes ---------- */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--stone-edge); border: 1px solid var(--stone-edge); }
@media (max-width: 820px) { .themes { grid-template-columns: 1fr; } }
.theme { background: var(--basalt); padding: 36px 30px; }
.theme h3 { font-size: 1.2rem; margin-bottom: 12px; color: var(--lamp); }
.theme p { font-size: 1.02rem; color: var(--sandstone-dim); }

/* ---------- Store links ---------- */
.store-note { max-width: 62ch; color: var(--sandstone-dim); margin-bottom: 44px; }
.stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.store {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--stone-edge);
  padding: 18px 22px;
  color: var(--sandstone);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.store:hover { border-color: var(--lamp-deep); background: var(--stone); color: var(--sandstone); }
.store .flag { font-size: 1.3rem; margin-right: 4px; }
.store .country { font-family: "Marcellus", serif; font-size: 0.98rem; letter-spacing: 0.05em; }
.store .domain { font-size: 0.85rem; color: var(--sandstone-dim); }

/* ---------- Author ---------- */
.author-grid {
  display: grid; grid-template-columns: 300px 1fr;
  gap: 56px; align-items: start;
}
@media (max-width: 820px) { .author-grid { grid-template-columns: 1fr; gap: 36px; } }
.author-photo-frame {
  padding: 10px;
  border: 1px solid var(--stone-edge);
  background: var(--stone);
  max-width: 300px;
  margin: 0 auto;
}
.author-photo-frame img { width: 100%; display: block; }
.author-photo-frame figcaption {
  font-family: "Marcellus", serif;
  font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--sandstone-dim); text-align: center; padding: 14px 4px 6px;
}
.author-copy p { margin-bottom: 20px; max-width: 62ch; }

/* ---------- Home teasers ---------- */
.teaser-grid {
  display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: center;
}
@media (max-width: 820px) { .teaser-grid { grid-template-columns: 1fr; gap: 40px; } }
.teaser-grid .cover-img, .teaser-grid .author-photo-frame { max-width: 260px; }
.teaser-copy p { margin-bottom: 20px; max-width: 60ch; color: var(--sandstone-dim); }
.teaser-copy p.lead { color: var(--sandstone); }
.text-link {
  font-family: "Marcellus", serif;
  font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.text-link::after { content: " \2192"; }

/* ---------- Page CTA band ---------- */
.cta-band {
  text-align: center;
  padding: 80px 24px;
  border-top: 1px solid var(--stone-edge);
  background:
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(229, 156, 82, 0.10), transparent 70%),
    var(--basalt);
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--sandstone-dim); max-width: 50ch; margin: 0 auto 34px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--stone-edge);
  padding: 54px 24px;
  text-align: center;
  color: var(--sandstone-dim);
  font-size: 0.95rem;
}
footer .brand { display: block; margin-bottom: 14px; }
.footer-nav { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; font-size: 0.92rem; }
.footer-nav a { color: var(--sandstone-dim); }
.footer-nav a:hover { color: var(--lamp); }

/* ---------- Intercognix ----------
   The Intercognix mark is brown + gold on transparency, built for the
   parchment ground of intercognix.com. On this night-stone palette the
   brown half would disappear, so the mark always sits on its own
   parchment plate rather than being recoloured. */
.ix-plate {
  background: #efe6d0;
  border: 1px solid var(--stone-edge);
  padding: 34px 26px 20px;
  max-width: 260px; margin: 0 auto;
  text-align: center;
  box-shadow: 0 0 70px rgba(229, 156, 82, 0.12), 0 30px 60px rgba(0,0,0,0.55);
}
a.ix-plate-link { display: block; }
.ix-plate img { width: 100%; max-width: 190px; height: auto; display: block; margin: 0 auto; }
.ix-plate figcaption {
  font-family: "Marcellus", serif;
  font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: #6f5f4b; padding-top: 18px;
}
.ix-hero-mark {
  display: inline-block;
  background: #efe6d0;
  padding: 14px 20px;
  margin-bottom: 36px;
  box-shadow: 0 0 50px rgba(229, 156, 82, 0.18);
}
.ix-hero-mark img { width: 104px; height: auto; display: block; }

.definition {
  border-left: 2px solid var(--lamp);
  padding: 4px 0 4px 22px; margin: 30px 0 10px;
  max-width: 56ch;
}
.definition .term { font-family: "Marcellus", serif; font-size: 1.35rem; letter-spacing: 0.04em; color: var(--lamp); }
.definition .pos { font-style: italic; color: var(--sandstone-dim); margin-left: 8px; }
.definition p { margin: 8px 0 0; font-size: 1.2rem; font-style: italic; color: var(--sandstone); }
.definition .etym { font-size: 0.95rem; font-style: normal; color: var(--sandstone-dim); }

.themes.four { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .themes.four { grid-template-columns: 1fr; } }
.theme .step {
  display: block;
  font-family: "Marcellus", serif;
  font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--sandstone-dim); margin-bottom: 10px;
}

.ix-specimens { display: grid; gap: 14px; margin: 10px 0 34px; max-width: 760px; }
.ix-specimen {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 6px 22px; align-items: baseline;
  border: 1px solid var(--stone-edge);
  padding: 20px 24px;
  color: var(--sandstone);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ix-specimen:hover { border-color: var(--lamp-deep); background: var(--stone); color: var(--sandstone); }
.ix-specimen .no { font-family: "Marcellus", serif; color: var(--lamp); letter-spacing: 0.06em; }
.ix-specimen .t { font-family: "Marcellus", serif; font-size: 1.12rem; }
.ix-specimen .halls { grid-column: 2; font-size: 0.95rem; font-style: italic; color: var(--sandstone-dim); }
@media (max-width: 560px) {
  .ix-specimen { grid-template-columns: 1fr; }
  .ix-specimen .halls { grid-column: 1; }
}
.link-row { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.cta-band .hero-cta { margin-top: 0; }

/* ---------- Home: person-first hero ----------
   The home page opens on the author, with his two bodies of work given
   equal weight beneath the name. The book's eye motif stays on the book
   itself; the hero carries no single work's imagery. */
header.hero.person { padding: 96px 24px 84px; }
header.hero.person h1 { max-width: none; }
.works {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px; max-width: 900px; margin: 56px auto 0; text-align: left;
}
@media (max-width: 780px) { .works { grid-template-columns: 1fr; max-width: 520px; } }
.work {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; align-items: center;
  border: 1px solid var(--stone-edge);
  background: rgba(19, 28, 43, 0.72);
  padding: 22px 24px;
  color: var(--sandstone);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.work:hover { border-color: var(--lamp-deep); background: var(--stone); color: var(--sandstone); }
.work:hover .text-link { color: var(--sandstone); }
.work-thumb {
  width: 92px; height: 138px;               /* the cover's 2:3, so both cards sit level */
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--stone-edge);
  box-shadow: 0 0 30px rgba(229, 156, 82, 0.12), 0 14px 28px rgba(0,0,0,0.5);
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-thumb.ix { background: #efe6d0; }     /* the mark needs its parchment ground */
.work-thumb.ix img { width: 74px; height: auto; object-fit: contain; }
.work-copy { display: block; }
.work-kind {
  display: block; font-family: "Marcellus", serif;
  font-size: 0.74rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--lamp); margin-bottom: 6px;
}
.work-title { display: block; font-family: "Marcellus", serif; font-size: 1.45rem; line-height: 1.25; margin-bottom: 8px; }
.work-line { display: block; font-size: 1rem; line-height: 1.55; color: var(--sandstone-dim); margin-bottom: 12px; }
.work .text-link { display: inline-block; color: var(--lamp); }
@media (max-width: 420px) {
  .work { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .work-thumb { width: 72px; height: 108px; }
  .work-thumb.ix img { width: 58px; }
}

/* NOTE — every page links this file as styles.css?v=YYYY-MM-DD.
   GitHub Pages lets browsers reuse a cached copy for 10 minutes, so a
   page can arrive with the previous stylesheet and render unstyled
   (this happened with the person-first hero). Whenever this file
   changes, bump ?v= on the <link> in every .html file. */
