/* A. S. Tiefenbach — shared styles. Mobile-first: base rules are for phones,
   the media queries at the bottom widen things for larger screens. */

:root {
  --bg: #000;
  --surface: #0b0b0b;
  --text: #e9e7e3;
  --muted: #a3a09b;
  --line: #fff;
  --line-dim: rgba(255, 255, 255, 0.22);
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --max: 68rem;
  --gutter: 1.25rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--text); text-decoration-color: var(--line-dim); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--line); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--text); color: var(--bg); padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line-dim); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem;
}
.site-name {
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.12em;
  text-decoration: none; text-transform: uppercase;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.site-nav a {
  text-decoration: none; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 0.25rem 0;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); border-bottom: 1px solid var(--line); }

/* ---------- Line-art divider ---------- */
.divider {
  display: flex; align-items: center; gap: 1rem; margin: 3rem auto; max-width: 22rem;
  color: var(--line);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-dim); }
.divider span {
  width: 0.6rem; height: 0.6rem; border: 1px solid var(--line); transform: rotate(45deg);
}

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: 4rem 0 2rem; overflow: hidden; }
.hero-motif {
  width: min(22rem, 80vw); margin: 0 auto 2rem; opacity: 0.9;
}
.hero .kicker {
  font-family: var(--font-display); color: var(--muted); letter-spacing: 0.25em;
  text-transform: uppercase; font-size: 0.85rem;
}
.hero p.lede { color: var(--muted); max-width: 34rem; margin: 0 auto; }

.page-head { padding: 3rem 0 1rem; text-align: center; }
.page-head p { color: var(--muted); }

/* ---------- Books ---------- */
.book {
  display: grid; gap: 1.5rem; padding: 2rem 0;
  border-top: 1px solid var(--line-dim);
}
.book:first-child { border-top: 0; }
.book-cover { width: min(16rem, 70vw); margin: 0 auto; }
.book-cover img { border: 1px solid var(--line-dim); }

.cover-placeholder {
  aspect-ratio: 2 / 3; border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 1.5rem; text-align: center;
  font-family: var(--font-display); letter-spacing: 0.08em;
  outline: 1px solid var(--line-dim); outline-offset: -0.6rem;
}
.cover-placeholder img { width: 55%; opacity: 0.85; border: 0; }
.cover-placeholder .cp-title { font-size: 1.1rem; }
.cover-placeholder .cp-author { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.2em; }

.book-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.4rem; }
.badge {
  display: inline-block; border: 1px solid var(--line); padding: 0.1rem 0.6rem;
  font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; margin-right: 0.6rem;
  color: var(--text);
}
.book-tagline { font-style: italic; font-size: 1.15rem; }

.buy-links { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button {
  display: inline-block; border: 1px solid var(--line); padding: 0.6rem 1.2rem; text-decoration: none;
  letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
}
.button:hover, .button:focus-visible { background: var(--text); color: var(--bg); }

.book-group { padding-bottom: 1rem; }
.book-group > h2 { text-align: center; margin-top: 2rem; }

.featured-label { text-align: center; }

/* ---------- About ---------- */
.about { display: grid; gap: 2rem; padding-bottom: 2rem; }
.author-photo { width: min(18rem, 75vw); margin: 0 auto; }
.author-photo img, .author-photo .photo-placeholder { border: 1px solid var(--line-dim); }
.photo-placeholder {
  aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--muted); font-size: 0.9rem; padding: 1rem; text-align: center;
}
.about-text { max-width: 38rem; }

/* ---------- Newsletter ---------- */
.newsletter {
  width: calc(100% - 2 * var(--gutter));
  border: 1px solid var(--line-dim); padding: 2rem var(--gutter); text-align: center;
  margin: 3rem auto; max-width: 40rem;
}
.newsletter p { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-dim); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 2rem; text-align: center; }
.site-footer p { margin: 0.25rem 0; }

.notice { color: var(--muted); text-align: center; padding: 2rem 0; }

/* ---------- Larger screens ---------- */
@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
  .book { grid-template-columns: 15rem 1fr; gap: 2.5rem; align-items: start; }
  .book-cover { width: 100%; }
  .book.featured { grid-template-columns: 19rem 1fr; }
  .about { grid-template-columns: 18rem 1fr; gap: 3rem; align-items: start; }
  .author-photo { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
