/* ============================================================
   Wally Rudolph — Multidisciplinary Site
   styles/main.css
   ------------------------------------------------------------
   Principles:
   - Generous whitespace; the site obeys the same rule as the work
   - Type-driven; restrained palette
   - Serif body for literary tone (EB Garamond, with serif fallback)
   - Monospace for visual fields (Courier-class), preserved whitespace
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500&display=swap');

/* === Reset & base ============================================ */

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

html {
  font-size: 18px;
}

body {
  margin: 0;
  background: #fafaf7;            /* soft off-white, paper feel */
  color: #1a1a1a;                 /* near-black, not pure black */
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Layout container ======================================== */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

/* === Home name =============================================== */
/* HTML provides the manual letter-spacing via spaces in the text;
   CSS just keeps it lowercase and sized tastefully. */

.home-name {
  font-weight: 400;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: 0;
  margin: 0;
  text-transform: lowercase;
  color: #1a1a1a;
}

/* === Artwork scrolling window ================================ */
/* The pre is duplicated in HTML so the loop is seamless: animating
   from translateY(0) to translateY(-50%) lands the second copy
   exactly where the first started. Hover to pause. */

.artwork-window {
  height: 88vh;
  min-height: 620px;
  max-height: none;
  overflow: hidden;
  position: relative;
  /* Soft fade at top and bottom so the scroll doesn't look hard-cut */
  -webkit-mask-image: linear-gradient(to bottom,
      transparent 0%, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(to bottom,
      transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.artwork-scroll {
  font-family: 'Courier New', Menlo, Monaco, 'Lucida Console', monospace;
  font-size: clamp(1rem, 1.6vw, 1.5rem);
  line-height: 1.18;
  margin: 0;
  padding: 0;
  text-align: center;
  white-space: pre;
  color: #1a1a1a;
  animation: scroll-up 55s linear infinite;
}

.artwork-window:hover .artwork-scroll,
.artwork-window:focus-within .artwork-scroll {
  animation-play-state: paused;
}

@keyframes scroll-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* === Statement =============================================== */

.statement {
  max-width: 36rem;
  margin: 0 auto;
}

.statement p {
  font-size: 0.95rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
  margin: 0;
  color: #555;
}

/* === Footer ================================================== */

.site-footer {
  text-align: center;
  padding: 3rem 2rem 4rem;
  border-top: 1px solid #e8e5dd;
  margin-top: 2rem;
}

.site-footer nav {
  margin-bottom: 1.25rem;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: #1a1a1a;
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #777;
  outline: none;
}

.site-footer p {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #888;
  margin: 0;
}

/* === Inner page header ======================================= */
/* Small "wally rudolph" name at the top of every inner page,
   acting as the home link. Same hand-spaced typography as the
   homepage h1, smaller scale. */

.page-header {
  text-align: center;
  padding: 2.5rem 2rem 0;
}

.page-name {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1rem;
  text-transform: lowercase;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: 0;
  display: inline-block;
  transition: color 0.2s ease;
}

.page-name:hover,
.page-name:focus-visible {
  color: #777;
  outline: none;
}

/* === Page intro (writing, about, etc.) ======================= */
/* Small eyebrow label + dramatic lede. */

.page-intro {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
  text-align: center;
}

.page-eyebrow {
  font-size: 0.85rem;
  color: #888;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  margin: 0 0 1.5rem;
}

.page-lede {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: 0.005em;
}

/* === Book spread (cinematic per-book layout) ================= */
/* Two columns at desktop. Cover gets equal weight to text.
   Variants control which side the cover sits on. */

.book-spread {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.book-spread--cover-right .book-spread__cover {
  order: 2;
}

.book-spread__cover {
  display: flex;
  justify-content: center;
}

.book-spread__cover a {
  display: block;
  width: 100%;
  max-width: 380px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.book-spread__cover a:hover {
  transform: translateY(-4px);
}

.book-cover {
  display: block;
  width: 100%;
  height: auto;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 12px 24px rgba(0, 0, 0, 0.10),
    0 28px 60px rgba(0, 0, 0, 0.10);
}

.book-spread__text {
  max-width: 30rem;
}

.book-eyebrow {
  font-size: 0.85rem;
  color: #888;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  margin: 0 0 0.75rem;
}

.book-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  color: #1a1a1a;
  margin: 0 0 1rem;
}

.book-meta {
  font-size: 0.85rem;
  color: #888;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  margin: 0 0 2.5rem;
}

/* === Pull quote (featured per-book quote) ==================== */
/* Large italic quote with oversized hanging opening mark. */

.pull-quote {
  position: relative;
  margin: 0 0 2.5rem;
  padding-left: 1.5rem;
}

.pull-quote::before {
  content: "\201C";
  position: absolute;
  left: -1rem;
  top: -1.5rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 6rem;
  line-height: 1;
  color: #d4d0c4;
  pointer-events: none;
}

.pull-quote blockquote {
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
}

.pull-quote blockquote p {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.5;
  color: #1a1a1a;
  margin: 0;
}

.pull-quote figcaption {
  font-size: 0.85rem;
  color: #777;
  font-style: normal;
  letter-spacing: 0.02em;
}

/* === Buy link ================================================ */

.book-buy { margin: 0; }

.buy-link {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border: 1px solid #1a1a1a;
  color: #1a1a1a;
  background: transparent;
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: lowercase;
  letter-spacing: 0.14em;
  transition: background 0.25s ease, color 0.25s ease;
}

.buy-link:hover,
.buy-link:focus-visible {
  background: #1a1a1a;
  color: #fafaf7;
  outline: none;
}

/* === Section divider (sacred mark between books) ============= */

.section-divider {
  text-align: center;
  padding: 4rem 1rem;
  color: #b8b3a5;
  user-select: none;
}

.section-divider pre {
  font-family: 'Courier New', Menlo, Monaco, monospace;
  font-size: 0.95rem;
  margin: 0;
  letter-spacing: 0.4em;
}

/* === Book praise section (rest of the quotes, denser column) = */

.book-praise-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.book-praise blockquote {
  margin: 0 0 2.25rem;
  padding: 0;
  border: none;
}

.book-praise blockquote p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
  margin: 0 0 0.5rem;
}

.book-praise cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: #777;
  line-height: 1.5;
}

/* Praise-lead — for short, punchy headline quotes like
   "A brilliant novel." — give it center-stage treatment. */
.praise-lead {
  text-align: center;
  margin: 0 0 3rem !important;
}

.praise-lead p {
  font-style: italic;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem) !important;
  color: #1a1a1a !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.4 !important;
}

.praise-lead cite {
  font-size: 0.9rem !important;
}

/* === Contact page (form) ===================================== */
/* Single column, type-driven, bottom-border-only inputs to match
   the restraint of the rest of the site. */

.contact {
  max-width: 580px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.contact-intro {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #555;
  margin: 0 0 3.5rem;
  text-align: center;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: #888;
}

.field input,
.field textarea {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #1a1a1a;
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
  padding: 0.5rem 0;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: #1a1a1a;
}

.field textarea {
  resize: vertical;
  min-height: 6rem;
}

.submit-wrap {
  margin-top: 1.5rem;
  text-align: center;
}

.contact-submit {
  display: inline-block;
  padding: 0.75rem 2.25rem;
  border: 1px solid #1a1a1a;
  color: #1a1a1a;
  background: transparent;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.85rem;
  text-transform: lowercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  background: #1a1a1a;
  color: #fafaf7;
  outline: none;
}

/* === Thank-you page after form submit ======================== */

.thanks {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.thanks-message {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0 0 2.5rem;
  text-transform: lowercase;
}

.thanks-back a {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.thanks-back a:hover,
.thanks-back a:focus-visible {
  color: #1a1a1a;
  outline: none;
}

/* === Building / placeholder page ============================= */
/* Quiet "[[building]]" mark, monospaced, centered in the viewport.
   Used for sections not yet ready to show. */

.building {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.building-mark {
  font-family: 'Courier New', Menlo, Monaco, 'Lucida Console', monospace;
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  color: #999;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: lowercase;
}

/* === Press list ============================================== */
/* Quiet editorial list: source eyebrow + title + meta. Each row
   slides slightly right on hover to signal interactivity without
   coloring the link. */

.press {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.press-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: none;
}

.press-item {
  border-bottom: 1px solid #e8e5dd;
}

.press-item:last-child {
  border-bottom: none;
}

.press-item a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding: 1.75rem 0.25rem;
  text-decoration: none;
  color: #1a1a1a;
  transition: padding-left 0.3s ease, background 0.3s ease;
}

.press-item a:hover,
.press-item a:focus-visible {
  padding-left: 0.9rem;
  background: rgba(0,0,0,0.015);
  outline: none;
}

.press-source {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 0.18em;
  text-transform: lowercase;
}

.press-title {
  grid-column: 1;
  grid-row: 2;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.45;
  color: #1a1a1a;
}

.press-meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 0.8rem;
  color: #888;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  align-self: center;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .press { padding: 3rem 1.5rem 4rem; }
  .press-item a {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding: 1.4rem 0.25rem;
  }
  .press-meta {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    margin-top: 0.25rem;
  }
  .press-title { font-size: 1.15rem; }
}

/* === About spread (photo + bio) ============================== */

.about-spread {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 3rem 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-photo {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.portrait {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 12px 24px rgba(0, 0, 0, 0.08);
}

.photo-caption {
  font-style: italic;
  font-size: 0.95rem;
  color: #777;
  margin: 1.25rem 0 0;
  letter-spacing: 0.02em;
}

.about-bio {
  max-width: 32rem;
  padding-top: 0.5rem;
}

.about-bio p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0 0 1.25rem;
  color: #1a1a1a;
}

.about-bio p:last-child {
  margin-bottom: 0;
}

/* === Tablet & mobile for spread layout ======================= */

@media (max-width: 900px) {
  .book-spread {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 2rem;
    text-align: center;
  }
  .book-spread__cover { order: 1 !important; }
  .book-spread__text { order: 2; max-width: 100%; margin: 0 auto; }
  .pull-quote { text-align: left; max-width: 32rem; margin-left: auto; margin-right: auto; }
  .book-spread__cover a { max-width: 300px; }

  .about-spread {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 2rem 4rem;
  }
  .about-photo {
    align-items: center;
  }
  .portrait {
    max-width: 100%;
  }
  .photo-caption {
    align-self: center;
  }
  .about-bio {
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  html { font-size: 17px; }
  .container { padding: 0 1.5rem; }
  .artwork-window {
    min-height: 380px;
    height: 55vh;
  }
  .artwork-scroll {
    font-size: 0.75rem;
    line-height: 1.15;
  }
  .nav-links { gap: 1.25rem; }
  .statement p { font-size: 0.9rem; }

  /* Writing page on small screens */
  .page-intro { padding: 3rem 1.5rem 3.5rem; }
  .page-lede { font-size: clamp(1.5rem, 6vw, 2rem); }
  .book-spread { padding: 2rem 1.5rem; gap: 2.5rem; }
  .book-title { font-size: clamp(2.25rem, 11vw, 3rem); line-height: 1; }
  .book-praise-section { padding: 0 1.5rem 4rem; }
  .pull-quote::before { font-size: 4.5rem; left: -0.5rem; top: -1rem; }
  .section-divider { padding: 2.5rem 1rem; }
}

/* === Reduced-motion preference =============================== */
/* Anyone who has reduced-motion turned on at the OS level gets
   a still field instead of the loop. */

@media (prefers-reduced-motion: reduce) {
  .artwork-scroll {
    animation: none;
  }
}
