/* ──────────────────────────────────────────────────────────────────
   Letters from the Marsh — typography-only stylesheet.
   Inherits design tokens (--paper, --serif, --sans, etc.) from
   ../styles/main.css. No backgrounds, no atmospheric video — these
   pages are quiet text. The marsh keeps its own pace; the type does
   too.
   ────────────────────────────────────────────────────────────────── */

.letters-body {
  background: var(--bg-night);
  color: var(--paper);
  min-height: 100vh;
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  /* Subtle warm-paper feel that doesn't shout */
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(232, 198, 166, 0.05), transparent 65%),
    linear-gradient(to bottom, #07090c 0%, #0a1018 100%);
}

.letters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(243, 236, 223, 0.06);
}

.letters-home {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-decoration: none;
  transition: opacity 0.4s ease;
}

.letters-home:hover { opacity: 0.7; }

.letters-home__mark {
  display: inline-flex;
  color: var(--sand);
}

.letters-back {
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.4s ease;
}

.letters-back:hover { color: var(--paper); }

/* ── Atmospheric hero (video slot) ────────────────────────────
   Sits above the dedication. Currently empty (no <source> on the
   <video> element); ready to accept a slow cinematic marsh /
   water / field clip when one is approved. Until then the
   gradient + veil carry a quiet atmospheric beat above the
   dedication so the page opens with the same dark-marsh mood
   the rest of the site holds.

   When a clip is dropped at ../assets/video/letters-marsh.mp4:
     1. Add  data-lazy-video  to the <video> attributes
     2. Add  <source src="..." type="video/mp4">  child
   The veil and gradient already handle the transition into the
   dedication beneath it. */
.letters-hero {
  position: relative;
  width: 100%;
  height: clamp(220px, 38vh, 360px);
  overflow: hidden;
  isolation: isolate;
  /* Quiet marsh gradient that reads as atmospheric mist until a
     clip is added. Slight warm hint at the top (sky) and deep
     dark at the bottom (resolving into the dedication's
     background). */
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(180, 200, 160, 0.10), transparent 70%),
    linear-gradient(to bottom, #0a1812 0%, #07090c 100%);
}

.letters-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.62;
  /* Pre-tuned for slow marsh footage. No hue-rotate, no sepia —
     trust the Sora grade when a clip is added. */
  filter: blur(3px) brightness(0.92) contrast(1.06) saturate(1.0);
}

.letters-hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Bottom-weighted dark wash so the hero resolves into the
     dedication's background without a hard edge. */
  background:
    linear-gradient(to bottom,
                    rgba(7, 9, 12, 0.30) 0%,
                    rgba(7, 9, 12, 0.10) 35%,
                    rgba(7, 9, 12, 0.55) 100%);
}

@media (max-width: 600px) {
  .letters-hero {
    height: clamp(180px, 30vh, 260px);
  }
}


/* ── Index page ─────────────────────────────────────────────── */

.letters-main {
  flex: 1;
  width: min(720px, 88vw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.letters-intro {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.letters-intro__eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.4rem;
}

.letters-intro__title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.12;
  color: var(--paper);
  margin-bottom: 1.4rem;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.letters-intro__lede {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.18rem, 1.35vw, 1.32rem);
  line-height: 1.65;
  color: var(--paper);
  max-width: 52ch;
  margin: 0 auto;
}

.letters-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 4.5vw, 4rem);
}

.letters-list__placeholder {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.22rem;
  color: var(--paper);
  padding: 3rem 0;
  border-top: 1px solid rgba(243, 236, 223, 0.18);
  border-bottom: 1px solid rgba(243, 236, 223, 0.18);
}

.letters-list__item {
  border-top: 1px solid rgba(243, 236, 223, 0.10);
  padding-top: clamp(2rem, 3.5vw, 2.6rem);
}

.letters-list__item:first-child {
  border-top: none;
  padding-top: 0;
}

.letters-list__link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.4s ease;
}

.letters-list__link:hover { opacity: 0.78; }

.letters-list__date {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 0.7rem;
}

.letters-list__title {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.65rem, 2.4vw, 2.1rem);
  line-height: 1.2;
  color: var(--paper);
  margin-bottom: 0.8rem;
}

.letters-list__excerpt {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--paper);
  max-width: 60ch;
}


/* ── Individual letter page ─────────────────────────────────── */

.letter-main {
  flex: 1;
  width: min(640px, 88vw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.letter__head {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.letter__date {
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.4rem;
}

.letter__title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.14;
  letter-spacing: -0.005em;
  color: var(--paper);
  max-width: 22ch;
  margin: 0 auto;
}

.letter__body {
  font-family: var(--serif);
  font-weight: 500;
}

.letter__body p {
  font-size: clamp(1.2rem, 1.4vw, 1.32rem);
  line-height: 1.75;
  color: var(--paper);
  margin-bottom: 1.7rem;
  max-width: 60ch;
}

.letter__signoff {
  margin-top: 2.6rem !important;
  font-style: italic;
  color: var(--paper-dim) !important;
  letter-spacing: 0.02em;
}


/* ── Footer (shared across index + individual letters) ──────── */

.letters-footer {
  border-top: 1px solid rgba(243, 236, 223, 0.06);
  padding: clamp(2.4rem, 4vw, 3.4rem) clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.letters-footer__back {
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.4s ease;
}

.letters-footer__back:hover { color: var(--paper); opacity: 0.7; }

.letters-footer__credit {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.10em;
  color: var(--paper);
  max-width: 42ch;
  text-align: right;
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 700px) {
  .letters-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .letters-footer__credit {
    text-align: left;
    max-width: none;
  }
}
