/* ============================================================
   Ambient Bible — Devotional stylesheet
   Palette: warm parchment, antique gold, aged ink
   ============================================================ */

:root {
  --parchment:  #f6f0e3;
  --parchment2: #ede4ce;
  --cream:      #faf6ec;
  --ink:        #2c2416;
  --ink-soft:   #5a4e38;
  --muted:      #9a8b72;
  --gold:       #b0894f;
  --gold-light: #d4ab6d;
  --rule:       #ddd0b4;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

:where(a, button, input) {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid #8c6a39;
  outline-offset: 3px;
}

body {
  margin: 0;
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(176, 137, 79, 0.2);
}

/* ---- A11Y HELPERS ---- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -44px;
  background: #fff;
  color: #2c2416;
  border: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  z-index: 999;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- NAV ---- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 240, 227, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 2rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .03em;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  font-size: .82rem;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--gold); }

/* ---- HERO ---- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  overflow: hidden;
}
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.28), rgba(0,0,0,0.45));
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-text {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 3rem 2rem 3.5rem;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.overline {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 247, 230, 0.9);
  margin: 0 0 .75rem;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 8vw, 6rem);
  font-weight: 500;
  line-height: 1.05;
  margin: 0 0 1.5rem;
  color: #fffaf0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  text-wrap: balance;
}
.hero-verse {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(255, 247, 230, 0.95);
  border: none;
  margin: 0 0 2rem;
  padding: 0;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.hero-verse cite {
  display: block;
  font-style: normal;
  font-size: .85rem;
  color: rgba(255, 235, 198, 0.9);
  margin-top: .5rem;
  letter-spacing: .04em;
}
.btn-listen {
  display: inline-block;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff3dd;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 235, 198, 0.9);
  padding-bottom: 2px;
}
.btn-listen:hover { color: #ffffff; border-color: #ffffff; }

/* ---- DIVIDER ---- */
.divider {
  text-align: center;
  margin: 2.5rem 0 2rem;
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: .5em;
}

/* ---- SECTIONS ---- */
.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.section-sub {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 2rem;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 500;
  margin: 0 0 .5rem;
  color: var(--ink);
  text-wrap: balance;
}

/* ---- ABOUT ---- */
.section-about {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 0;
  align-items: start;
}
.section-about .divider { grid-column: 1 / -1; }
.about-text { grid-row: 2; max-width: 760px; }
.about-text-full { margin: 0 auto; }
.about-text h2 { margin-bottom: 1rem; }
.about-text p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 1rem;
}
.pull-quote {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
  margin: 1.5rem 0 0 !important;
  padding-left: 1.2rem;
  border-left: 2px solid var(--gold);
  line-height: 1.5;
}
.pull-quote span {
  display: block;
  font-size: .82rem;
  font-style: normal;
  color: var(--muted);
  margin-top: .5rem;
  letter-spacing: .03em;
}

/* ---- REAL IMAGES ---- */
.about-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
}
.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.book-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

/* ---- PLATFORMS ---- */
.platform-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.platform-link {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  text-decoration: none;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--parchment);
  color: var(--ink);
  transition: border-color .2s;
}
.platform-link:hover { border-color: var(--gold); }
.platform-link.is-disabled {
  opacity: 0.9;
  cursor: default;
}
.platform-link small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.platform-icon {
  font-size: 1.3rem;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}
.platform-link strong {
  display: block;
  font-weight: 500;
  font-size: .95rem;
  margin-bottom: .2rem;
}
.platform-link span {
  font-size: .82rem;
  color: var(--ink-soft);
}

/* ---- LIBRARY ---- */
.book-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}
.book-info p { color: var(--ink-soft); font-size: 1rem; }
.book-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  margin: 0 0 .4rem !important;
}
.book-info h3 {
  font-family: var(--serif);
  font-size: 2rem;
  margin: 0 0 .75rem;
}
.chapter-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.2rem;
}
.chapter {
  font-size: .78rem;
  padding: .3rem .65rem;
  border-radius: 4px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}
.chapter.available {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.chapter.upcoming { color: var(--muted); }

/* ---- STAY CLOSE ---- */
.section-stay { background: var(--parchment2); border-radius: 12px; }
.stay-inner { max-width: 540px; margin: 0 auto; text-align: center; }
.stay-inner h2 { margin-bottom: .75rem; }
.stay-inner > p { color: var(--ink-soft); margin-bottom: 1.5rem; }
.email-form {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.email-form-static {
  justify-content: center;
}
.email-cta {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .7rem 1.2rem;
  font-family: var(--sans);
  font-size: .88rem;
  text-decoration: none;
}
.email-cta:hover {
  background: #9a7540;
}
.form-note {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .9rem;
}

/* ---- FAQ ---- */
.faq-list {
  margin: 1rem 0 0;
  max-width: 820px;
}
.faq-list dt {
  font-weight: 500;
  margin-top: 1rem;
  color: var(--ink);
}
.faq-list dd {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--rule);
  background: var(--parchment2);
  padding: 2.5rem 2rem;
}
.footer-inner { text-align: center; }
.footer-brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 .5rem;
}
.footer-verse {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 .5rem;
}
.footer-note {
  font-size: .78rem;
  color: var(--muted);
  margin: 0;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 720px) {
  .section-about { grid-template-columns: 1fr; }
  .section-about .about-image-wrap { grid-row: auto; }
  .section-about .about-text { grid-row: auto; }
  .book-block { grid-template-columns: 1fr; }
  h1 { font-size: 3.5rem; }
  .top-nav {
    padding: .7rem 1rem;
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }
  .nav-links {
    gap: 0.7rem;
    flex-wrap: wrap;
  }
  .nav-links a {
    font-size: 0.74rem;
  }
  .hero {
    min-height: 420px;
  }
  .hero-image {
    min-height: 420px;
    max-height: 60vh;
  }
}
