/* ============================================================
   Greg Roesberry — YURI trilogy
   Shared stylesheet
   ============================================================ */

:root {
  --night:      #0c1116;
  --night-2:    #131e26;
  --slate:      #1d2b35;
  --parchment:  #f8f4ea;
  --parchment-2:#efe7d6;
  --ink:        #23282c;
  --ink-soft:   #4d565d;
  --gold:       #d9a441;
  --gold-soft:  #f0cd84;
  --sky:        #a9d6e0;
  --sky-deep:   #6ea9b8;
  --rule:       rgba(35,40,44,.14);

  --measure: 34rem;
  --shadow-lift: 0 18px 44px rgba(12,17,22,.18);
  --shadow-book: 0 22px 48px rgba(12,17,22,.35);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: #1c5c6b; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

h1, h2, h3, .display {
  font-family: "Cinzel", "Cinzel Decorative", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .01em;
  margin: 0;
}

.wrap { width: min(1120px, calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { width: min(var(--measure) + 8rem, calc(100% - 2.5rem)); margin-inline: auto; }

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: -9999px;
  background: var(--gold); color: var(--night);
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; top: 0; }

/* ---------- header / nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12,17,22,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(217,164,65,.22);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 74px; flex-wrap: wrap;
}
.brand {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.05rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--parchment); text-decoration: none; margin-right: auto;
  white-space: nowrap;
}
.brand span { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.nav a {
  color: rgba(248,244,234,.82); text-decoration: none;
  font-size: .95rem; letter-spacing: .06em; text-transform: uppercase;
  font-family: "Cinzel", Georgia, serif;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--parchment); border-bottom-color: var(--gold); }
.nav a.btn-amazon { border-bottom: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .95rem 1.9rem; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn-amazon {
  background: var(--gold); color: #1a1207;
  box-shadow: 0 10px 26px rgba(217,164,65,.32);
}
.btn-amazon:hover { background: var(--gold-soft); color: #1a1207; }
.btn-ghost {
  border-color: rgba(248,244,234,.45); color: var(--parchment);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-ink {
  border-color: rgba(35,40,44,.3); color: var(--ink);
}
.btn-ink:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: .7rem 1.35rem; font-size: .85rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 62% 8%, rgba(169,214,224,.18) 0%, rgba(169,214,224,0) 55%),
    linear-gradient(180deg, #0a0f14 0%, #13202a 46%, #1b2c36 100%);
  color: var(--parchment);
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(180deg, rgba(248,244,234,0), var(--parchment));
  pointer-events: none;
}
.ridge { position: absolute; inset: auto 0 0 0; width: 100%; height: auto; opacity: .9; }
.hero .wrap { position: relative; z-index: 2; }

.hero-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
}
.hero-copy { max-width: 32rem; }

.eyebrow {
  font-family: "Cinzel", Georgia, serif;
  font-size: .82rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--sky); margin: 0 0 1.1rem;
}
.hero h1 {
  font-size: clamp(3.2rem, 11vw, 6.4rem);
  letter-spacing: .12em;
  margin: 0 0 .4rem;
  text-shadow: 0 4px 30px rgba(0,0,0,.5);
}
.hero .subtitle {
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 1.6rem;
}
.hero p.lede {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: rgba(248,244,234,.88);
  max-width: 34rem; margin: 0 0 2.2rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero-note { font-size: .95rem; color: rgba(248,244,234,.6); margin-top: 1.4rem; }

/* stacked covers in hero — laid out in normal flow so the rotated footprint
   stays predictable and can never run into the copy column */
.cover-stack {
  display: flex; justify-content: center; align-items: center;
  gap: .8rem;
  padding: 1.5rem 0;
}
.cover-stack .cover {
  position: relative;
  flex: none;
  width: clamp(104px, 13.5vw, 160px);
  aspect-ratio: 2 / 3;
  border-radius: 3px 8px 8px 3px;
  box-shadow: var(--shadow-book);
  overflow: hidden;
  background: var(--slate);
}
.cover-stack .c1 { transform: rotate(-5deg); }
.cover-stack .c2 { transform: rotate(-1deg) translateY(-6px); }
.cover-stack .c3 { transform: rotate(5deg); }


/* ---------- generic sections ---------- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { text-align: center; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
.section-head .rule {
  width: 84px; height: 2px; background: var(--gold);
  margin: 1.1rem auto 0;
}
.section-head p { color: var(--ink-soft); max-width: 40rem; margin: 1.1rem auto 0; }

.band-dark {
  background: linear-gradient(180deg, #101a21, #16242e);
  color: var(--parchment);
}
.band-dark h2 { color: var(--parchment); }
.band-dark p { color: rgba(248,244,234,.82); }
.band-soft { background: var(--parchment-2); }

/* ---------- synopsis ---------- */
.synopsis p {
  font-size: clamp(1.1rem, 2.1vw, 1.32rem);
  margin: 0 0 1.4rem;
}
.dropcap::first-letter {
  font-family: "Cinzel", Georgia, serif;
  float: left; font-size: 4.1rem; line-height: .82;
  padding: .35rem .6rem 0 0; color: var(--gold);
}


/* ---------- ad posters ----------
   Greg's own campaign artwork. Each poster already carries its headline and an
   Order Now mark, so the whole tile is the link — no caption, no card chrome
   competing with the art. */
.posters {
  display: grid;
  gap: clamp(.9rem, 1.8vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.poster {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--slate);
  border: 1px solid rgba(217,164,65,.2);
  box-shadow: 0 14px 32px rgba(0,0,0,.42);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.poster img { display: block; width: 100%; height: auto; }
.poster:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(0,0,0,.58);
  border-color: rgba(217,164,65,.65);
}
.poster:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- book cards ---------- */
.books { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.book-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 2rem 1.7rem 1.9rem;
  text-align: center;
  box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; gap: 1rem;
}
.book-card .thumb {
  width: 168px; aspect-ratio: 2/3; margin: 0 auto;
  border-radius: 3px 7px 7px 3px; overflow: hidden;
  box-shadow: 0 14px 30px rgba(12,17,22,.25);
}
.book-card .bknum {
  font-family: "Cinzel", Georgia, serif; font-size: .74rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
}
.book-card h3 { font-size: 1.3rem; }
.book-card p { font-size: 1.02rem; color: var(--ink-soft); margin: 0; flex-grow: 1; }

/* ---------- detailed book rows (books page) ---------- */
.book-row {
  display: grid; gap: clamp(1.8rem, 4vw, 3.2rem);
  grid-template-columns: 1fr;
  align-items: start;
  padding: clamp(2rem, 5vw, 3.2rem) 0;
  border-bottom: 1px solid var(--rule);
}
.book-row:last-child { border-bottom: 0; }
@media (min-width: 820px) {
  .book-row { grid-template-columns: 260px 1fr; }
}
.book-row .art {
  width: 100%; max-width: 260px; aspect-ratio: 2/3;
  border-radius: 3px 9px 9px 3px; overflow: hidden;
  box-shadow: var(--shadow-book); margin-inline: auto;
}
.book-row h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin-bottom: .3rem; }
.book-row .bknum { font-family:"Cinzel",Georgia,serif; font-size:.76rem; letter-spacing:.24em; text-transform:uppercase; color: var(--gold); }
.book-row .body { max-width: var(--measure); }
.book-row .body p { margin: 0 0 1.1rem; }
.book-row .actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- videos ---------- */
.video-grid {
  display: grid;
  gap: clamp(1.6rem, 3vw, 2.4rem);
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.video-grid.is-empty { grid-template-columns: 1fr; }

.video-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
}
.video-frame {
  aspect-ratio: 16 / 9;
  background: var(--night);
}
.video-frame.is-portrait { aspect-ratio: 9 / 16; }

/* poster-and-play fallback, used where third-party frames are blocked */
.video-poster {
  position: relative; display: block; width: 100%; height: 100%;
  overflow: hidden;
}
.video-poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.video-poster:hover img { transform: scale(1.03); }
.video-play {
  position: absolute; inset: 0; margin: auto;
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(12,17,22,.62);
  border: 2px solid rgba(248,244,234,.9);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.video-play::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 19px solid var(--parchment);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  transform: translateX(3px);
}
.video-poster:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.video-frame iframe,
.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-body { padding: 1.4rem 1.5rem 1.6rem; }
.video-body h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.video-body p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.video-empty {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  text-align: center;
  max-width: 34rem; margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) 2rem;
  border: 1px dashed rgba(35,40,44,.28);
  border-radius: 12px;
  background: var(--parchment-2);
}
.video-empty p { margin: 0; color: var(--ink-soft); }
.video-empty-title {
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--ink) !important;
}

/* ---------- about / autobiography ---------- */
.prose { max-width: var(--measure); margin-inline: auto; }
.prose p { margin: 0 0 1.5rem; }
.prose h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin: 3rem 0 1.1rem;
}
.prose h2:first-child { margin-top: 0; }

.pullquote {
  margin: 2.6rem 0;
  padding: 1.6rem 0 1.6rem 1.8rem;
  border-left: 3px solid var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink);
}

.figure { margin: 2.6rem 0; }
.figure .frame {
  border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--parchment-2);
  width: fit-content; margin-inline: auto;
}
.figure figcaption {
  font-size: .95rem; color: var(--ink-soft);
  margin-top: .8rem; text-align: center; font-style: italic;
}


/* ---------- page hero (interior pages) ---------- */
.page-hero {
  background: linear-gradient(180deg, #0a0f14, #17252f);
  color: var(--parchment);
  padding: clamp(3rem, 7vw, 4.8rem) 0 clamp(2.6rem, 6vw, 4rem);
  text-align: center;
}
.page-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: .06em; }
.page-hero p { color: rgba(248,244,234,.8); max-width: 38rem; margin: 1.2rem auto 0; }


/* ---------- final CTA ---------- */
.cta-band {
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(217,164,65,.18), rgba(217,164,65,0) 60%),
    linear-gradient(180deg, #0e181f, #0a1116);
  color: var(--parchment);
  text-align: center;
}
.cta-band h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.cta-band p { max-width: 36rem; margin: 1.2rem auto 2rem; color: rgba(248,244,234,.85); }

/* ---------- footer ---------- */
.site-foot {
  background: #080d11; color: rgba(248,244,234,.62);
  padding: 3rem 0 2.4rem; font-size: .95rem;
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.site-foot a { color: rgba(248,244,234,.82); text-decoration: none; }
.site-foot a:hover { color: var(--gold); }
.foot-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.stack-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .poster:hover { transform: none; }
}

/* ---------- real artwork, dropped into assets/images/ ----------
   Each cover/photo placeholder has a real <img> layered on top of it.
   If the file isn't there yet the <img> removes itself and the styled
   placeholder shows through. Drop the file in, refresh, done. */
.cover-stack .cover,
.book-card .thumb,
.book-row .art,
.teaser .portrait,
.figure .frame { position: relative; }

.over {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* photos that set their own height (no crop) */
/* Source photos are modest resolution, so cap how large they render —
   past this width a screen just magnifies the softness. */
.photo { display: block; width: 100%; max-width: 400px; height: auto; margin-inline: auto; }


/* ---------- mobile header ----------
   Scoped to max-width:899px so the desktop header (>=900px, where the nav sits
   inline to the right of the wordmark) is untouched. */
@media (max-width: 899px) {
  .site-head .wrap {
    flex-direction: column;
    justify-content: center;
    gap: .6rem;
    padding-block: 1rem;
  }
  .brand { margin-right: 0; }
  .nav {
    width: 100%;
    justify-content: center;
    gap: .2rem 1.4rem;
  }

  /* Bigger tap targets. The links wrap onto two rows at phone widths and were
     only 39px tall, below the 44px minimum for a reliable touch target. */
  .nav a:not(.btn-amazon) {
    padding: .62rem .3rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Keep the Amazon button off the links entirely. It used to wrap onto the row
     directly under "Videos" with a 25px gap, so a slightly low tap on Videos
     opened Amazon instead. Now it always takes a row of its own, centred, with
     a clear rule above it. */
  .nav a.btn-amazon {
    flex: 0 0 100%;
    max-width: 260px;
    margin: 1.35rem auto .15rem;
    padding-block: .9rem;
  }
  .nav::after {
    content: "";
    order: 98;
    flex: 0 0 100%;
    height: 1px;
    margin-top: 1rem;
    background: rgba(217,164,65,.22);
  }
  .nav a.btn-amazon { order: 99; }
}
