/* ===============================================================
   The View from a Windowless Basement — brianmiller.org
   =============================================================== */

:root {
  --paper:      #ffffff;   /* white — matches the image backgrounds   */
  --paper-2:    #f3efe6;   /* warm cream panel — matches chairs art bg */
  --ink:        #2b2a27;   /* near-black charcoal text                */
  --ink-soft:   #4a4842;   /* body text                               */
  --muted:      #6f685a;   /* labels, meta (AA contrast on white)     */
  --line:       #d9d3c5;   /* hairlines                               */
  --amber:      #cf9636;   /* accent, from the None For Me droplet    */
  --amber-deep: #b57f25;
  --maxw:       1120px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

em { font-style: italic; }

/* ---------- Shared type ---------- */
h1, h2 {
  font-family: "ivypresto-display", Georgia, serif;
  color: var(--ink);
  font-weight: 300;
  letter-spacing: 0.01em;
  margin: 0;
}

/* All three headlines share one size, keyed to the About heading */
h1, h2 {
  font-size: clamp(1.45rem, 2.9vw, 2.05rem);
  line-height: 1.3;
}
/* Hero headline runs a touch larger with a little more leading */
h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  line-height: 1.36;
}
h1 em, h2 em { font-weight: 300; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: "EB Garamond", serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 2rem;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--amber-deep); transform: translateY(-1px); }

.btn-text {
  font-family: "EB Garamond", serif;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.btn-text:hover { border-color: var(--amber-deep); }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.8rem 2rem;
}
.wordmark {
  font-family: "ivypresto-display", serif;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.header-social {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}
.header-social a {
  color: var(--ink);
  display: inline-flex;
  transition: color 0.2s ease;
}
.header-social a:hover { color: var(--amber-deep); }
.header-social svg { height: 19px; width: auto; display: block; }
.header-social a[aria-label="Substack"] svg { height: 17px; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.5rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4rem;
  align-items: center;
}
.hero h1 { margin-bottom: 1.8rem; }
.lede {
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0 0 1.2rem;
}
.hero-body { margin: 0 0 2.2rem; max-width: 34em; }
.hero-actions { display: flex; align-items: center; gap: 1.8rem; flex-wrap: wrap; }

.hero-cover img {
  width: 100%;
}

/* ---------- Statement ---------- */
.statement {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6rem 2rem;
}
/* Section headline — matches the hero headline exactly, but centered */
.statement-head {
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  line-height: 1.36;
  text-align: center;
  text-wrap: balance;
  max-width: 15em;
  margin: 0 auto 2.5rem;
}
.statement-body {
  max-width: 40em;
  margin: 0 auto;
  font-size: 1.2rem;
}
.statement-body p { margin: 0 0 1.4rem; }
.statement-lead { font-weight: 600; color: var(--ink); }
.statement-close { color: var(--ink); }

.statement-art {
  display: block;
  width: 100%;
  max-width: 430px;
  margin: 3rem auto 0;
}

/* ---------- Layered scroll depth ----------
   The hero stays pinned while the following sections rise up and slide
   over it. Desktop only, and disabled for reduced-motion users. */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .reveal {
    position: relative;
  }
  /* Hero pins only within .reveal, so it releases once the band passes */
  .reveal .hero {
    position: sticky;
    top: 0;
    z-index: 1;
  }
  /* The band rides over the pinned hero (opaque, full-bleed) ... */
  .reveal .statement {
    position: relative;
    z-index: 2;
    box-shadow: 0 -10px 22px -12px rgba(43, 42, 39, 0.22);
  }
  .hero-cover,
  .hero-copy,
  .journal-cover img {
    will-change: transform;
  }
}

/* ---------- Review ---------- */
.review {
  max-width: 44em;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}
.stars {
  color: var(--amber);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  margin-bottom: 1.8rem;
}
.review-quote {
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.5;
  color: var(--ink);
  font-weight: 400;
  font-style: italic;
  margin: 0 0 2rem;
}
.review-attr {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  text-transform: uppercase;
  font-weight: 500;
}
.review-attr span {
  color: var(--amber-deep);
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 400;
}

/* Carousel */
.review-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.review-track::-webkit-scrollbar { display: none; }
.review-slide {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0.25rem;
}
.review-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 2.25rem;
}
.rev-arrow {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--muted);
  padding: 0.1rem 0.55rem;
  border-radius: 2px;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.rev-arrow:hover:not(:disabled) { color: var(--ink); }
.rev-arrow:disabled { opacity: 0.28; cursor: default; }
.review-dots { display: flex; align-items: center; gap: 0.55rem; }
.review-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s ease;
}
.review-dots button:hover { background: var(--muted); }
.review-dots button.active { background: var(--amber-deep); }

/* ---------- About ---------- */
.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem 2rem 7rem;
  display: grid;
  grid-template-columns: 232px minmax(0, 600px);
  gap: 1.75rem;
  justify-content: center;
  align-items: start;
  border-top: 1px solid var(--line);
}
.about-portrait img {
  width: 100%;
  max-width: 232px;
  position: sticky;
  top: 2rem;
}
.about-copy h2 { margin-bottom: 1.8rem; }
.about-copy p { margin: 0 0 1.35rem; max-width: 36em; }

/* ---------- Journal (companion) ---------- */
.journal {
  position: relative;
  overflow: hidden;
  background: #efebe0;
  border-top: 1px solid var(--line);
  padding: 5.5rem 2rem;
}
/* Coffee-ring stain, lower-right, sitting behind the type */
.journal::after {
  content: "";
  position: absolute;
  right: -1rem;
  bottom: -1rem;
  width: 320px;
  height: 320px;
  background: url("images/coffee-stain.png") no-repeat center / contain;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}
.journal-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 4rem;
  align-items: center;
}
.journal-cover img {
  width: 100%;
}
.journal-head {
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  line-height: 1.36;
  margin-bottom: 1.8rem;
}
.journal-body { margin: 0 0 1.4rem; max-width: 34em; }
.journal-actions { margin-top: 2.2rem; }

/* ---------- Coda (closing image) ---------- */
.coda {
  background: var(--paper);
  text-align: center;
  margin-top: -3rem;
  padding: 0 2rem 5.5rem;
}
.coda img {
  width: 100%;
  max-width: 730px;
  margin: 0 auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 3.5rem 2rem;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-name {
  font-family: "ivypresto-display", serif;
  font-size: 1.3rem;
  margin: 0;
  color: var(--paper);
}
.footer-links { display: flex; align-items: center; gap: 1.8rem; flex-wrap: wrap; }
.footer-links a {
  color: var(--paper);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.03em;
  opacity: 0.82;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.footer-links a:hover { opacity: 1; border-color: var(--amber); }

/* Get the Book button in the footer */
.footer-links a.footer-cta {
  background: var(--paper);
  color: var(--ink);
  opacity: 1;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--paper);
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.footer-links a.footer-cta:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}
.footer-meta {
  width: 100%;
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(243,240,232,0.5);
  border-top: 1px solid rgba(243,240,232,0.12);
  padding-top: 1.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 1rem;
    text-align: left;
  }
  .hero-cover { order: -1; max-width: 300px; }
  .journal-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .journal-cover { max-width: 300px; }
  .journal::after { width: 210px; height: 210px; right: -0.75rem; bottom: -0.75rem; }
  .about {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-portrait img { position: static; max-width: 232px; margin: 0 auto; }
}

@media (max-width: 560px) {
  body { font-size: 1.1rem; }
  .site-header { padding: 1.3rem 1.3rem; }
  .hero, .statement, .review, .about, .journal { padding-left: 1.3rem; padding-right: 1.3rem; }
  .statement, .review, .about, .journal { padding-top: 4rem; padding-bottom: 4rem; }
  .footer-inner { justify-content: flex-start; }
}
