/* ═══════════════════════════════════════════════
   One Year — anniversary page
   Ivory paper, ink, and a single muted-gold hairline.
   Editorial and quiet; motion is limited to gentle
   fade-ins as sections scroll into view.
   ═══════════════════════════════════════════════ */

:root {
  --paper: #f6f1e9;
  --paper-deep: #efe7da;
  --ink: #1d1a16;
  --ink-soft: #5a5148;
  --ink-faint: #8f857a;
  --gold: #a8874a;
  --gold-soft: rgba(168, 135, 74, 0.35);
  --night: #171410;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

section,
footer {
  padding: 7rem 1.5rem;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.6rem;
}
.eyebrow--light { color: rgba(214, 186, 132, 0.85); }

/* ── Cover ───────────────────────────────────── */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(168, 135, 74, 0.08), transparent 62%),
    var(--paper);
}
.cover .eyebrow { margin-bottom: 2.2rem; }

.monogram {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
  padding: 0.9rem 1.6rem;
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
}
.monogram .amp {
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0;
  margin: 0 0.15em;
}

.cover-title {
  margin-top: 2.6rem;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(4.2rem, 13vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cover-sub {
  margin-top: 1.4rem;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  color: var(--ink-soft);
}
.cover-dates {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
}
.cover-dates .rule {
  display: block;
  width: 64px;
  height: 1px;
  background: var(--gold);
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  transform: translateX(-50%);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { opacity: 0.25; transform: translateX(-50%) scaleY(0.6); transform-origin: top; }
  50%      { opacity: 1;    transform: translateX(-50%) scaleY(1);   transform-origin: top; }
}

/* ── The count (the one dark band) ───────────── */
.count {
  max-width: none;
  background: var(--night);
  color: var(--paper);
}
.count-grid {
  display: flex;
  justify-content: center;
  gap: clamp(1.8rem, 6vw, 5rem);
  flex-wrap: wrap;
}
.count-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
}
.count-num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 4.4rem);
  line-height: 1;
  color: #e9dcc3;
  font-variant-numeric: lining-nums tabular-nums;
}
.count-lab {
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(233, 220, 195, 0.55);
}
.count-live {
  margin-top: var(--margin);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(233, 220, 195, 0.6);
}
.count-live span {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: #e9dcc3;
}

/* ── Letter ──────────────────────────────────── */
.letter-body {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.28rem;
  line-height: 1.85;
  color: var(--ink);
}
.letter-body p + p { margin-top: 1.3rem; }
.letter-mark {
  position: absolute;
  top: -2.2rem;
  right: 0;
  font-size: 1rem;
  color: var(--gold);
}
.letter-greeting {
  font-style: italic;
  font-size: 1.55rem;
}
.letter-cheer {
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink-soft);
}
.letter-sign {
  margin-top: 2.6rem !important;
  text-align: right;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.6;
}
.letter-sign span {
  font-style: normal;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Photo wall ──────────────────────────────
   Masonry columns: every photo keeps its natural
   shape, so nothing gets awkwardly cropped. */
.gallery { max-width: 1120px; }
.wall {
  column-count: 3;
  column-gap: 1.4rem;
}
.frame {
  break-inside: avoid;
  margin: 0 0 1.4rem;
  padding: 10px;
  background: #fffdf9;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 14px 34px rgba(29, 26, 22, 0.08);
}
.frame img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.94) contrast(1.02);
  transition: filter 0.6s ease;
}
.frame:hover img { filter: saturate(1) contrast(1.04); }

/* ── Song ────────────────────────────────────── */
.song {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.song-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease;
}
.song-btn:hover { background: var(--ink); color: var(--paper); }
.song-btn svg { width: 18px; height: 18px; fill: currentColor; }
.song-btn .i-pause { display: none; }
.song.playing .song-btn .i-play { display: none; }
.song.playing .song-btn .i-pause { display: block; }
.song-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.3;
}
.song-title { font-style: italic; font-size: 1.45rem; }

/* ── Close ───────────────────────────────────── */
.close { padding-top: 5rem; padding-bottom: 6rem; }
.close-line {
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ink);
}
.close-back {
  display: inline-block;
  margin-top: 2.2rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--gold-soft);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.close-back:hover { color: var(--ink); border-color: var(--ink); }

.song-btn:focus-visible,
.close-back:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* ── Gentle reveal ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ── Small screens ───────────────────────────── */
@media (max-width: 700px) {
  section, footer { padding: 5rem 1.25rem; }
  .wall { column-count: 2; column-gap: 0.8rem; }
  .frame { margin-bottom: 0.8rem; padding: 6px; }
  .letter-body { font-size: 1.16rem; }
  .cover-dates { gap: 0.8rem; font-size: 0.7rem; }
  .cover-dates .rule { width: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue { animation: none; }
}

/* ── "tap anywhere to play" (only if the browser blocks autoplay) ── */
.play-hint {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translate(-50%, 8px);
  padding: 0.55rem 1.2rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(246, 241, 233, 0.92);
  border: 1px solid var(--gold-soft);
  border-radius: 30px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  z-index: 50;
  white-space: nowrap;
}
.play-hint.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── Opening line (curtain before the cover) ─── */
body.veiled { overflow: hidden; }
.veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(168, 135, 74, 0.10), transparent 60%),
    var(--night);
  text-align: center;
  cursor: pointer;
  transition: opacity 1.4s ease, visibility 1.4s ease;
}
.veil.lift {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.veil-quote {
  max-width: 820px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.35;
  color: #e9dcc3;
}
.veil-line {
  display: block;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
  animation: veilIn 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.veil-line--1 { animation-delay: 0.6s; }
.veil-line--2 { animation-delay: 2.2s; }
.veil-rule {
  display: block;
  width: 0;
  height: 1px;
  margin-top: 2.6rem;
  background: var(--gold);
  animation: veilRule 1.6s ease 3.6s forwards;
}
@keyframes veilIn {
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes veilRule {
  to { width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .veil-line, .veil-rule { animation: none; opacity: 1; transform: none; filter: none; width: 72px; }
}

/* ── "watch our year, in motion" — invitation to the film ── */
.film-invite {
  display: inline-flex;
  align-items: center;
  gap: 1.3rem;
  margin: 3.2rem auto 0.4rem;
  padding: 1.1rem 1.8rem 1.1rem 1.1rem;
  text-align: left;
  text-decoration: none;
  color: var(--paper);
  background: var(--night);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(23, 20, 16, 0.18);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
.film-invite:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(23, 20, 16, 0.26);
}
.film-play {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e9dcc3;
}
.film-play::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  animation: filmRing 2.6s ease-out infinite;
}
@keyframes filmRing { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.6); opacity: 0; } }
.film-play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 3px; }
.film-text { display: flex; flex-direction: column; line-height: 1.25; }
.film-eyebrow {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}
.film-title {
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45rem;
  color: #e9dcc3;
}
.film-meta {
  margin-top: 0.15rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(233, 220, 195, 0.45);
}
.close .close-back { display: table; margin: 2rem auto 0; }
.film-invite:focus-visible { outline: 1px solid var(--gold); outline-offset: 5px; }
@media (prefers-reduced-motion: reduce) { .film-play::after { animation: none; } }
