/* Self-hosted fonts (SIL OFL). Latin subset. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2?v=4") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-sans-3-latin.woff2?v=4") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-italic.woff2?v=4") format("woff2");
}

/* Preview A — Above the Clouds: cinematic hero, cream editorial column, gold/ink. */
:root {
  --ink: #1c1914;
  --muted: #5c564c;
  --cream: #f4efe6;
  --paper: #fbf8f2;
  --gold: #a67c2d;
  --gold-soft: #c4a15a;
  --link: #7a4e16;
  --hero-fg: #f7f1e6;
  --header-h: 3.5rem;
  --measure: 50rem; /* was 40rem (640px); now 50rem (800px) at a 16px root */
  --sage: #d2dac6;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Source Sans 3", "Source Sans Pro", Helvetica, sans-serif;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a.esv-crossref-link { color: var(--link) !important; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .5rem 1rem; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h);
  display: flex; align-items: center; padding: 0 1.5rem;
  z-index: 40;
  background: transparent;
  color: var(--hero-fg);
  text-shadow: 0 1px 10px rgba(0,0,0,.65);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, text-shadow .25s ease;
}
.site-header.is-solid {
  background: #f4efe6;
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 1px 0 rgba(28,25,20,.08);
}
.site-header a {
  color: inherit; text-decoration: none;
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  display: inline-flex; align-items: center;
  min-height: 44px;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2rem 1.5rem 4.5rem;
  color: var(--hero-fg);
  background-color: #14110c;
  background-image:
    linear-gradient(180deg, rgba(10,9,7,.28) 0%, rgba(10,9,7,.2) 35%, rgba(10,9,7,.72) 100%),
    url("images/banner.jpg?v=4");
  background-size: cover;
  background-position: 40% 40%; /* slightly left so the sun and left ridge stay in frame */
  position: relative;
}
.hero-inner { max-width: 42rem; margin: 0 auto; text-align: center; }
.site-title {
  position: relative;
  display: inline-block;
  margin: 0 0 1.75rem;
  padding: 0.45rem 0.15rem;
  font-family: Fraunces, Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  animation: titleIn 2.1s ease both;
}
.site-title::before, .site-title::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 0;
  background: var(--gold-soft);
  animation: lineDraw 2.55s ease 0.75s forwards;
}
.site-title::before { top: 0; left: 0; }
.site-title::after { bottom: 0; right: 0; }
.shimmer-text {
  display: inline-block;
  background: linear-gradient(105deg, #f7f1e6 0 40%, #ffe9b0 50%, #f7f1e6 60% 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out 3.6s infinite;
}
.hero-intro { font-size: 1.15rem; line-height: 1.65; margin: 0 auto 2rem; max-width: 34rem; color: #f3ecdf; }
.hero-intro p { margin: 0 0 1rem; }
.hero-intro p:last-child { margin-bottom: 0; }
.read-more {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--hero-fg); text-decoration: none;
  letter-spacing: .16em; text-transform: uppercase;
  font-size: .78rem; font-weight: 600;
  min-height: 44px; padding: .4rem .2rem;
}
.read-more::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -6px; }

@keyframes titleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes lineDraw { to { width: 100%; } }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  40% { background-position: -100% 0; } /* 2.4s sweep, then rest for the remainder of the 6s cycle */
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .site-title, .site-title::before, .site-title::after, .shimmer-text { animation: none !important; }
  .site-title::before, .site-title::after { width: 100%; }
  .shimmer-text { color: #f7f1e6; -webkit-text-fill-color: #f7f1e6; background: none; }
  html { scroll-behavior: auto; }
}

#one, .gallery { scroll-margin-top: 1rem; }

/* Essay + gallery sit on a soft sage tint; the hero photo is unchanged. */
.essay {
  background: var(--sage);
  padding: 4.5rem 1.5rem 3rem;
}
.essay-inner { max-width: var(--measure); margin: 0 auto; }
.essay h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  text-align: center;
  margin: 0 0 2.2rem;
  letter-spacing: -0.01em;
}
.essay h2::after {
  content: ""; display: block; width: 3.5rem; height: 2px;
  background: var(--gold-soft); margin: 1rem auto 0;
}
.essay p { margin: 0 0 1.2rem; }
.note { font-style: italic; color: var(--muted); }
.more-reading {
  margin: 2rem 0 0;
  padding: 1.25rem 1.35rem;
  background: var(--paper);
  border-left: 3px solid var(--gold-soft);
}
.more-reading p { margin: 0; }
.social {
  list-style: none; display: flex; flex-wrap: nowrap; gap: 1.25rem;
  justify-content: center; margin: 2rem 0 0; padding: 0;
}
.social li { display: flex; flex: 0 0 auto; }
.social a {
  display: flex; align-items: center; justify-content: center;
  width: 128px; height: 128px; min-width: 128px; min-height: 128px;
  flex: 0 0 auto;
  padding: 0;
  background: var(--paper); color: var(--ink); text-decoration: none;
  border-radius: 50%; border: 1px solid rgba(28,25,20,.1);
}
.social img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }

/* Gallery A: generous 3-col, slightly rounded */
.gallery { padding: 1rem 1.5rem 4rem; background: var(--sage); }
.gallery-toolbar { display: none; }
.gallery-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; max-width: 72rem; margin: 0 auto; }
.gallery-slide {
  margin: 0; padding: 0; border: 0; background: #ddd6c8; cursor: zoom-in;
  display: block; width: 100%; overflow: hidden; border-radius: 4px;
}
.gallery-slide img { width: 100%; height: 100%; aspect-ratio: 748 / 529; object-fit: cover; transition: transform .35s ease; }
.gallery-slide:hover img, .gallery-slide:focus-visible img { transform: scale(1.04); }

@media (max-width: 799px) {
  .gallery { padding: 0.75rem 0 3rem; background: var(--sage); }
  .gallery-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem; max-width: 40rem; margin: 0 auto; padding: 0 1rem 0.75rem;
  }
  .gallery-toolbar button {
    min-width: 48px; min-height: 48px; border-radius: 50%;
    border: 1px solid rgba(28,25,20,.18); background: var(--paper); color: var(--ink);
    font-size: 1.3rem; cursor: pointer;
  }
  .gallery-status { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; font-size: .95rem; }
  .gallery-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
    gap: 0; scrollbar-width: none;
  }
  .gallery-track::-webkit-scrollbar { display: none; }
  .gallery-slide {
    flex: 0 0 100%; scroll-snap-align: start; border-radius: 0; cursor: default;
  }
  .gallery-slide img { aspect-ratio: 748 / 529; transform: none !important; }
}

/* Quote band */
.verse-band {
  position: relative; color: #f7f1e6; text-align: center;
  padding: 5.5rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(10,9,7,.55), rgba(10,9,7,.55)),
    url("images/banner.jpg?v=4") center 30% / cover no-repeat;
}
.verse-band h2 {
  font-family: Fraunces, Georgia, serif; font-weight: 500;
  font-size: 1rem; letter-spacing: .2em; text-transform: uppercase;
  margin: 0 0 1rem; color: var(--gold-soft);
}
.verse-band p {
  font-family: Fraunces, Georgia, serif; font-style: italic; font-weight: 500;
  font-size: clamp(1.25rem, 3.6vw, 2rem); line-height: 1.45;
  margin: 0 auto; max-width: none;
}
.verse-line {
  display: block;
  white-space: nowrap;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10,9,7,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 1rem 2rem; gap: .75rem;
}
.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: min(100%, 1100px); max-height: calc(100vh - 7rem); object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.lightbox-bar { display: flex; align-items: center; gap: .5rem; }
.lightbox button {
  min-width: 48px; min-height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff;
  font-size: 1.3rem; cursor: pointer;
}
.lightbox-close { position: absolute; top: .75rem; right: .75rem; }
.lightbox-status { color: #ddd; margin: 0 .5rem; font-variant-numeric: tabular-nums; }
body.lightbox-open { overflow: hidden; }

@media (max-width: 799px) {
  /* Tall phone/tablet viewports crop this wide photo heavily; bias right
     so a little of the cloud sea shows, while title/text stay on the dark ridge. */
  .hero { background-position: 54% 40%; }
}

@media (max-width: 600px) {
  .hero { padding-bottom: 3.2rem; }
  .hero-intro { font-size: 1.05rem; }
  .essay p { margin-bottom: 1.5rem; } /* was 1.2rem; +0.3rem on small screens */
  /* 128px buttons cannot sit three-across on a 360px screen with essay padding.
     Shrink just enough to fit, still larger than the previous 96px / 64px size. */
  .social {
    gap: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }
  .social li {
    flex: 1 1 0;
    max-width: 128px;
    min-width: 0;
  }
  .social a {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 44px;
    aspect-ratio: 1;
  }
  .social img {
    width: 68.75%; /* 88/128 — same inner-to-button ratio */
    height: auto;
    aspect-ratio: 1;
  }
}
