/* ═══════════════════════════════════════════════════════════════════════
   variant-vigilia — moody & candlelit
   A night chapel. Carved Roman capitals, one pool of candlelight that follows
   you down the page, and a single cold note of azulejo cobalt against the gold.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --chapel: #0e0c0f;
  --beeswax: #ede3d2;
  --flame: #c08a3e;
  --plum: #5b2a3e;
  --azulejo: #2e4a6b;

  --fg: var(--beeswax);
  /* both carry real copy, so both have to clear 4.5:1 on the chapel dark */
  --fg-soft: color-mix(in oklab, var(--beeswax), transparent 26%);
  --fg-faint: color-mix(in oklab, var(--beeswax), transparent 45%);
  --hair: color-mix(in oklab, var(--beeswax), transparent 86%);

  --focus: var(--flame);
  --skip-bg: var(--beeswax);
  --skip-fg: var(--chapel);

  --display: 'Marcellus', 'Trajan Pro', Georgia, serif;
  --caps: 'Marcellus SC', 'Marcellus', Georgia, serif;
  --body: 'Cardo', Georgia, 'Times New Roman', serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --stack: clamp(4.5rem, 12vh, 9rem);
  --measure: 56ch;
}

body {
  background: var(--chapel);
  color: var(--fg);
  font-family: var(--body);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
  line-height: 1.72;
}

/* ── the signature: one pool of candlelight ────────────────────────────── */

.candle {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(
    circle at var(--lx, 50%) var(--ly, 42%),
    color-mix(in oklab, var(--flame), transparent 72%) 0%,
    color-mix(in oklab, var(--flame), transparent 86%) 16%,
    color-mix(in oklab, var(--plum), transparent 92%) 36%,
    transparent 62%
  );
  animation: flicker 5.5s ease-in-out infinite;
}

/* Candlelight is never steady */
@keyframes flicker {
  0%, 100% { opacity: 0.93; }
  21% { opacity: 1; }
  44% { opacity: 0.85; }
  67% { opacity: 0.97; }
  86% { opacity: 0.89; }
}

/* Keeps the edges of the room dark */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(
    ellipse 125% 95% at 50% 45%,
    transparent 40%,
    color-mix(in oklab, var(--chapel), transparent 45%) 74%,
    color-mix(in oklab, var(--chapel), transparent 8%) 100%
  );
}

/* ── parallax + reveal primitives ──────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 1100ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1100ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ── shared type ───────────────────────────────────────────────────────── */

.over {
  font-family: var(--caps);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  color: var(--flame);
}

.rule {
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: clamp(1.25rem, 3vh, 2rem) auto;
  background: linear-gradient(90deg, transparent, var(--flame), transparent);
}

.section {
  position: relative;
  z-index: 2;
  max-width: 70rem;
  margin-inline: auto;
  padding: var(--stack) var(--gutter);
  text-align: center;
}

.section-tight {
  padding-block: clamp(3rem, 8vh, 5rem);
}

.section-head {
  margin-bottom: clamp(2.5rem, 7vh, 4.5rem);
}

.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.section-lead {
  max-width: 44ch;
  margin-inline: auto;
  color: var(--fg-soft);
  font-style: italic;
}

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(2.5rem, 8vh, 5rem);
  padding: clamp(6rem, 14vh, 9rem) var(--gutter) clamp(4rem, 10vh, 6rem);
  text-align: center;
}

.hero-plate {
  position: absolute;
  inset: -14% 0;
  z-index: 0;
}

.hero-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
  filter: brightness(0.62) saturate(0.72) contrast(1.05);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, var(--chapel), color-mix(in oklab, var(--chapel), transparent 55%) 38%, var(--chapel));
}

.hero-inner {
  position: relative;
  z-index: 3;
}

.names {
  display: grid;
  justify-items: center;
  gap: 0.16em;
  margin-top: clamp(1.75rem, 5vh, 3rem);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.3rem, 8.5vw, 5.75rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  /* uppercase tracking pushes the last letter off-centre */
  text-indent: 0.15em;
}

.amp {
  font-size: 0.26em;
  color: var(--flame);
  letter-spacing: 0;
  text-indent: 0;
}

.hero-meta {
  display: grid;
  gap: 0.5rem;
  font-family: var(--caps);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--fg-soft);
}

.scroll-cue {
  position: relative;
  z-index: 3;
  font-family: var(--caps);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--fg-faint);
  text-decoration: none;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* ── full-bleed plates ─────────────────────────────────────────────────── */

.plate {
  position: relative;
  z-index: 0;
  height: clamp(280px, 62vh, 620px);
  overflow: hidden;
}

.plate-layer {
  position: absolute;
  inset: -16% 0;
}

.plate-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
  filter: brightness(0.52) saturate(0.68);
}

.plate::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--chapel), transparent 32%, transparent 68%, var(--chapel));
}

/* ── countdown ─────────────────────────────────────────────────────────── */

.countdown {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 6vw, 4rem);
  margin-top: 1.75rem;
}

.cd-unit {
  display: grid;
  gap: 0.5rem;
  min-width: 4rem;
}

.cd-num {
  font-family: var(--display);
  font-size: clamp(2.1rem, 6vw, 3.75rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--flame);
}

.cd-label {
  font-family: var(--caps);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--fg-faint);
}

.countdown-passed {
  font-family: var(--display);
  font-size: clamp(1.3rem, 4vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ── story ─────────────────────────────────────────────────────────────── */

.moments {
  display: grid;
  gap: clamp(2.75rem, 7vh, 4.5rem);
  max-width: 46rem;
  margin-inline: auto;
}

.moment-year {
  display: block;
  font-family: var(--caps);
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  color: var(--flame);
  margin-bottom: 0.85rem;
}

.moment-place {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.moment-text {
  max-width: var(--measure);
  margin-inline: auto;
  color: var(--fg-soft);
}

/* ── schedule ──────────────────────────────────────────────────────────── */

.slots {
  display: grid;
  gap: clamp(1.75rem, 4vh, 2.5rem);
  max-width: 40rem;
  margin-inline: auto;
}

.slot {
  display: grid;
  gap: 0.3rem;
  padding-bottom: clamp(1.5rem, 3.5vh, 2.25rem);
  border-bottom: 1px solid var(--hair);
}

.slot:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.slot-time {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  color: var(--flame);
}

.slot-label {
  font-family: var(--caps);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.slot-note {
  color: var(--fg-soft);
  font-style: italic;
  font-size: 0.95rem;
}

/* ── location ──────────────────────────────────────────────────────────── */

.loc-venue {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.loc-addr {
  margin-top: 0.75rem;
  font-family: var(--caps);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
}

.loc-dir {
  max-width: var(--measure);
  margin: 1.5rem auto 0;
  color: var(--fg-soft);
}

.btn-line {
  display: inline-block;
  margin-top: 1.75rem;
  padding-bottom: 0.3rem;
  font-family: var(--caps);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--flame);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--flame), transparent 55%);
  transition: border-color 200ms ease;
}

.btn-line:hover {
  border-bottom-color: var(--flame);
}

.loc-map {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hair);
  overflow: hidden;
}

.loc-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  /* the one cold note — the map reads as azulejo blue against the gold */
  filter: invert(0.9) hue-rotate(175deg) saturate(0.65) brightness(0.92);
}

/* ── gallery ───────────────────────────────────────────────────────────── */

.shots {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 620px) {
  .shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 940px) {
  .shots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.shot-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.shot-frame img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
  filter: brightness(0.66) saturate(0.72);
  transition: filter 500ms ease;
}

.shot:hover .shot-frame img {
  filter: brightness(0.92) saturate(0.85);
}

/* ── practical info ────────────────────────────────────────────────────── */

/* Ceremonial content is centred; instructions are left-aligned to be read. */
.facts {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  text-align: left;
}

.fact-q {
  font-family: var(--caps);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--flame);
  margin-bottom: 0.8rem;
}

.fact-a {
  color: var(--fg-soft);
  font-size: 0.98rem;
}

/* ── rsvp ──────────────────────────────────────────────────────────────── */

.rsvp-shell {
  max-width: 38rem;
  margin-inline: auto;
}

.rsvp {
  display: grid;
  gap: 1.5rem;
  text-align: left;
}

.demo-notice {
  justify-self: center;
  font-family: var(--caps);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--fg-faint);
}

.field {
  display: grid;
  gap: 0.5rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field > label,
.field legend {
  font-family: var(--caps);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--fg-faint);
  padding: 0;
}

.field input[type='text'],
.field input[type='email'],
.field input[type='number'],
.field textarea {
  width: 100%;
  padding: 0.7rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1.02rem;
  transition: border-color 200ms ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in oklab, var(--beeswax), transparent 78%);
  font-style: italic;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--flame);
}

.field textarea {
  resize: vertical;
}

.field-half {
  max-width: 9rem;
}

.field-choice {
  gap: 0.6rem;
}

.choice,
.check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.98rem;
}

.choice input,
.check input {
  accent-color: var(--flame);
  width: 1.05rem;
  height: 1.05rem;
}

.err {
  min-height: 1.1rem;
  font-size: 0.82rem;
  font-style: italic;
  color: color-mix(in oklab, var(--flame), white 30%);
}

.field [aria-invalid='true'] {
  border-bottom-color: color-mix(in oklab, var(--flame), white 30%);
}

.btn {
  justify-self: start;
  margin-top: 0.5rem;
  padding: 0.9rem 2.5rem;
  background: transparent;
  border: 1px solid var(--flame);
  color: var(--flame);
  font-family: var(--caps);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  transition:
    background-color 240ms ease,
    color 240ms ease;
}

.btn:hover:not(:disabled) {
  background: var(--flame);
  color: var(--chapel);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.rsvp-done h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--flame);
  margin-bottom: 0.75rem;
}

.rsvp-done p {
  color: var(--fg-soft);
  max-width: 38ch;
  margin-inline: auto;
}

/* ── footer ────────────────────────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 8vh, 5rem) var(--gutter);
  text-align: center;
  display: grid;
  gap: 0.85rem;
  border-top: 1px solid var(--hair);
  color: var(--fg-faint);
}

.footer-mark {
  font-family: var(--display);
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg);
}

.amp-small {
  color: var(--flame);
  font-size: 0.6em;
  vertical-align: 0.15em;
}

.footer-note {
  font-family: var(--caps);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}

.footer-credits {
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer-credits a {
  color: inherit;
}

/* ── music toggle ──────────────────────────────────────────────────────── */

.music {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--hair);
  background: color-mix(in oklab, var(--chapel), transparent 15%);
  color: var(--flame);
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 13px;
}

.music-bars i {
  width: 2px;
  height: 40%;
  background: var(--flame);
  transition: height 200ms ease;
}

.music[data-playing='true'] .music-bars i {
  animation: bars 900ms ease-in-out infinite alternate;
}

.music[data-playing='true'] .music-bars i:nth-child(2) { animation-delay: 150ms; }
.music[data-playing='true'] .music-bars i:nth-child(3) { animation-delay: 300ms; }

@keyframes bars {
  from { height: 30%; }
  to { height: 100%; }
}

.music-hint {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--caps);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0;
  transition:
    max-width 300ms ease,
    opacity 200ms ease;
}

.music[data-empty='true'] .music-hint {
  max-width: 15rem;
  opacity: 0.85;
}

/* ── reduced motion ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .candle {
    animation: none;
  }

  .scroll-cue {
    animation: none;
    opacity: 0.75;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
