/* ==========================================================================
   OMAR & JANA — An Invitation
   A digital rendering of a printed luxury invitation.
   Palette: deep black · warm ivory · champagne gold · soft beige
   ========================================================================== */

/* ---------- 1. TOKENS ---------------------------------------------------- */
:root {
  /* Colour */
  --ink:        #0B0B0C;
  --ink-soft:   #121214;
  --charcoal:   #18181B;
  --ivory:      #F2EDE4;
  --ivory-soft: #E7E0D4;
  --beige:      #B4A994;
  --gold:       #C6A15B;
  --gold-light: #E3CD9B;
  --gold-deep:  #8E7134;

  --line:       rgba(198, 161, 91, 0.28);
  --line-soft:  rgba(242, 237, 228, 0.12);

  /* Type */
  --serif: 'Cormorant Garamond', 'Didot', 'Bodoni MT', Garamond, 'Times New Roman', serif;
  --sans:  'Jost', 'Futura', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;

  /* Motion */
  --ease:      cubic-bezier(0.19, 1, 0.22, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* Rhythm */
  --gutter: clamp(1.5rem, 6vw, 6rem);
  --section-y: clamp(5.5rem, 14vw, 11rem);
}

/* ---------- 2. RESET ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }
fieldset { border: 0; min-width: 0; }

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

::selection { background: rgba(198, 161, 91, 0.28); color: var(--ivory); }

/* Film grain — the paper texture of the invitation */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 900;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 3. TYPOGRAPHIC PRIMITIVES ------------------------------------ */
.label {
  font-family: var(--sans);
  font-size: clamp(0.6rem, 2.1vw, 0.688rem);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--beige);
  line-height: 1.9;
}
.label--gold { color: var(--gold); }
.label--dim  { color: rgba(180, 169, 148, 0.78); letter-spacing: 0.3em; text-indent: 0.3em; }

.label__rule {
  display: inline-block;
  width: clamp(1.5rem, 6vw, 3rem);
  height: 1px;
  vertical-align: middle;
  margin: 0 0.9em 0.2em;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}

.heading {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 9vw, 4.75rem);
  line-height: 1.06;
  letter-spacing: 0.005em;
  color: var(--ivory);
}
.heading--light { color: var(--ivory); }
.heading--balance { text-wrap: balance; }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4.4vw, 1.65rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ivory-soft);
  letter-spacing: 0.012em;
}
.lede--center { max-width: 34ch; margin-inline: auto; }

.prose p {
  font-size: clamp(0.95rem, 3.4vw, 1.02rem);
  line-height: 2;
  color: rgba(231, 224, 212, 0.72);
  letter-spacing: 0.02em;
  margin-top: 1.6em;
}

/* Fine-line dividers */
.rule {
  width: clamp(3.5rem, 14vw, 7rem);
  height: 1px;
  margin: clamp(1.6rem, 5vw, 2.4rem) auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.rule--left { margin-inline: 0; background: linear-gradient(90deg, var(--gold), transparent); }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: clamp(1.6rem, 5vw, 2.4rem) auto;
}
.ornament__line {
  display: block;
  width: clamp(2.5rem, 9vw, 4.5rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.ornament__line:last-child { background: linear-gradient(90deg, var(--line), transparent); }
.ornament__diamond {
  width: 5px; height: 5px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  flex: none;
}

/* ---------- 4. BUTTONS --------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 54px;
  padding: 1.05em 2.6em;
  border: 1px solid var(--line);
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: clamp(0.625rem, 2.2vw, 0.7rem);
  font-weight: 400;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  text-transform: uppercase;
  background: transparent;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.7s var(--ease), border-color 0.7s var(--ease);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.75s var(--ease);
}
.btn__label { display: inline-block; }
.btn__icon { width: 1.1em; height: 1.1em; flex: none; }
.btn--full { width: 100%; }

.btn--ivory { color: var(--ivory); border-color: rgba(242, 237, 228, 0.34); }
.btn--ivory::before { background: var(--ivory); }
.btn--ghost { color: var(--beige); border-color: var(--line-soft); }
.btn--ghost::before { background: rgba(242, 237, 228, 0.92); }

@media (hover: hover) {
  .btn:hover { color: var(--ink); border-color: var(--gold); }
  .btn:hover::before { transform: scaleX(1); }
  .btn--ivory:hover { border-color: var(--ivory); }
  .btn--ghost:hover { color: var(--ink); border-color: rgba(242, 237, 228, 0.6); }
}
.btn:active { transform: translateY(1px); }

.link-quiet {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(180, 169, 148, 0.8);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 3px;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.link-quiet:hover { color: var(--gold); border-color: var(--line); }

/* ---------- 5. THE NAMES ------------------------------------------------- */
.names {
  font-family: var(--serif);
  font-weight: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.92;
  margin: 0;
}
.names__name {
  display: block;
  font-size: clamp(2.6rem, min(18.5vw, 13.5vh), 10.5rem);
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  max-width: 100%;
  color: var(--ivory);
}
.names__amp {
  display: block;
  font-style: italic;
  font-size: clamp(1.75rem, min(8vw, 5.5vh), 4rem);
  color: var(--gold);
  margin: clamp(0.15rem, 1.2vw, 0.6rem) 0;
  line-height: 1;
}

/* ---------- 6. COVER ----------------------------------------------------- */
.cover {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4.5vh, 3.5rem) var(--gutter);
  background:
    radial-gradient(120% 85% at 50% 32%, rgba(198, 161, 91, 0.10), transparent 62%),
    radial-gradient(100% 60% at 50% 108%, rgba(198, 161, 91, 0.06), transparent 70%),
    var(--ink);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform-origin: center 42%;
}

.cover__frame {
  position: absolute;
  inset: clamp(0.85rem, 3.2vw, 2.1rem);
  border: 1px solid rgba(198, 161, 91, 0.22);
  pointer-events: none;
}
.cover__frame::after {
  content: '';
  position: absolute;
  inset: clamp(5px, 1vw, 9px);
  border: 1px solid rgba(198, 161, 91, 0.09);
}

.cover__inner {
  position: relative;
  width: 100%;
  max-width: 46rem;
  margin: auto;
  text-align: center;
}

.cover__crest { margin-bottom: clamp(1.5rem, 5.5vh, 3.5rem); }

.cover .ornament { margin-block: clamp(0.8rem, 2.5vh, 2rem); }
.cover__verse { margin-top: clamp(0.5rem, 2vh, 1rem); }
.cover__verse > * + * { margin-top: clamp(0.7rem, 2vh, 1.4rem); }

.verse {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 4.6vw, 1.6rem);
  color: var(--ivory-soft);
  letter-spacing: 0.02em;
}

.cover__date {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--gold-light);
  text-transform: uppercase;
  padding-top: clamp(0.6rem, 2vh, 1rem);
}

.cover__action { margin-top: clamp(1.8rem, 5.5vh, 3.4rem); }
.cover__hint {
  margin-top: clamp(0.7rem, 2vh, 1.3rem);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: rgba(180, 169, 148, 0.72);
}

/* Cinematic entrance — the ampersand first, then the names */
[data-seq] { opacity: 0; will-change: opacity, transform; }

.cover [data-seq] { animation: seq-rise 1.5s var(--ease) forwards; animation-delay: var(--d, 0s); }
.cover .names__amp { animation-name: seq-amp; animation-duration: 2s; }

.cover [data-seq="2"]  { --d: 0.35s; }
.cover [data-seq="3"]  { --d: 1.45s; }
.cover [data-seq="4"]  { --d: 1.85s; }
.cover [data-seq="1"]  { --d: 2.55s; }
.cover [data-seq="5"]  { --d: 2.75s; }
.cover [data-seq="6"]  { --d: 2.95s; }
.cover [data-seq="7"]  { --d: 3.15s; }
.cover [data-seq="8"]  { --d: 3.35s; }
.cover [data-seq="9"]  { --d: 3.55s; }
.cover [data-seq="10"] { --d: 3.9s; }

@keyframes seq-rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes seq-amp {
  0%   { opacity: 0; transform: scale(1.4); filter: blur(10px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* The seal breaks — cover dissolves into the invitation */
body.is-sealed { overflow: hidden; }
body.is-sealed .invitation,
body.is-sealed .nav,
body.is-sealed .music { opacity: 0; pointer-events: none; visibility: hidden; }

body.is-opening .cover { animation: cover-out 1.5s var(--ease-soft) forwards; }
@keyframes cover-out {
  0%   { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.09); filter: blur(14px); }
}
body.is-opening .cover__inner { animation: cover-lift 1.5s var(--ease-soft) forwards; }
@keyframes cover-lift {
  to { transform: translateY(-3vh); }
}
.cover.is-gone { display: none; }

body.is-open .invitation { animation: fade-in 1.8s var(--ease-soft) 0.15s backwards; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 7. NAVIGATION ------------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: 0;
  z-index: 700;
  padding: clamp(1rem, 3.5vw, 2rem);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.nav__toggle {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 6px;
  width: 46px; height: 46px;
  padding: 0 8px;
  border: 1px solid transparent;
  transition: border-color 0.6s var(--ease);
}
.nav__bar {
  display: block;
  height: 1px;
  background: var(--ivory);
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease), background 0.6s;
}
.nav__bar:first-child { width: 100%; }
.nav__bar:last-child  { width: 60%; }
.nav.is-open .nav__bar { background: var(--gold-light); }
.nav.is-open .nav__bar:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.is-open .nav__bar:last-child  { width: 100%; transform: translateY(-3.5px) rotate(-45deg); }

.nav__panel {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  gap: clamp(1.5rem, 5vh, 2.5rem);
  padding: var(--gutter);
  text-align: center;
  background:
    radial-gradient(90% 60% at 50% 40%, rgba(198, 161, 91, 0.07), transparent 70%),
    rgba(11, 11, 12, 0.97);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s var(--ease), visibility 0.75s;
}
.nav.is-open .nav__panel { opacity: 1; visibility: visible; }

.nav__crest { opacity: 0.55; }
.nav__list { display: grid; gap: clamp(1.1rem, 3.6vh, 1.9rem); }

.nav__link {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 8vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(14px);
  transition: color 0.5s var(--ease);
}
.nav.is-open .nav__link { animation: seq-rise 0.9s var(--ease) forwards; }
.nav.is-open li:nth-child(1) .nav__link { animation-delay: 0.10s; }
.nav.is-open li:nth-child(2) .nav__link { animation-delay: 0.18s; }
.nav.is-open li:nth-child(3) .nav__link { animation-delay: 0.26s; }
.nav.is-open li:nth-child(4) .nav__link { animation-delay: 0.34s; }
.nav.is-open li:nth-child(5) .nav__link { animation-delay: 0.42s; }
.nav__link:hover { color: var(--gold-light); }
.ornament--nav { opacity: 0.5; }

/* ---------- 8. MUSIC ----------------------------------------------------- */
.music {
  position: fixed;
  top: clamp(1rem, 3.5vw, 2rem);
  right: clamp(1rem, 3.5vw, 2rem);
  z-index: 700;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(11, 11, 12, 0.35);
  backdrop-filter: blur(8px);
  transition: opacity 0.9s var(--ease), visibility 0.9s, border-color 0.6s, color 0.6s;
}
.music:hover { border-color: var(--gold); color: var(--gold); }
.music__icon { grid-area: 1 / 1; width: 19px; height: 19px; transition: opacity 0.4s; }
.music__pause { grid-area: 1 / 1; display: flex; gap: 3px; opacity: 0; transition: opacity 0.4s; }
.music__pause i { width: 2px; height: 13px; background: currentColor; display: block; }
.music[aria-pressed="true"] .music__icon { opacity: 0; }
.music[aria-pressed="true"] .music__pause { opacity: 1; }

.music__rings { position: absolute; inset: -1px; pointer-events: none; }
.music__rings i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0;
}
.music[aria-pressed="true"] .music__rings i { animation: pulse 3.2s var(--ease-soft) infinite; }
.music[aria-pressed="true"] .music__rings i:last-child { animation-delay: 1.6s; }
@keyframes pulse {
  0%   { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0;    transform: scale(1.75); }
}

/* ---------- 9. SECTION SCAFFOLD ------------------------------------------ */
.invitation { transition: opacity 1s var(--ease-soft); }

.section {
  position: relative;
  padding: var(--section-y) var(--gutter);
  max-width: 1240px;
  margin-inline: auto;
}

.section__head { text-align: center; margin-bottom: clamp(3rem, 9vw, 5rem); }
.section__head .heading { margin-top: 0.7rem; }
.section__head .lede { margin-top: 1.4rem; }

/* Scroll-triggered reveals */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1.15s var(--ease-soft) var(--rd, 0s),
    transform 1.15s var(--ease) var(--rd, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }
[data-delay="1"] { --rd: 0.12s; }
[data-delay="2"] { --rd: 0.24s; }
[data-delay="3"] { --rd: 0.36s; }
[data-delay="4"] { --rd: 0.48s; }
[data-delay="5"] { --rd: 0.60s; }
[data-delay="6"] { --rd: 0.72s; }

/* Photographic frames */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
}
.frame::after {
  content: '';
  position: absolute;
  inset: clamp(9px, 1.6vw, 16px);
  border: 1px solid rgba(198, 161, 91, 0.22);
  pointer-events: none;
  z-index: 2;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease), filter 1.6s var(--ease);
}
.frame--tall { aspect-ratio: 3 / 4; }
@media (hover: hover) {
  .frame:hover img { transform: scale(1.045); }
}

.parallax img { will-change: transform; }

/* ---------- 10. HERO ----------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  /* minmax(0, 1fr) stops the implicit column from being sized to the names'
     max-content width, which pushed the whole block off-centre. */
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  /* Symmetric padding keeps the block optically centred; the scroll cue is
     absolutely positioned and sits inside the lower padding. */
  padding: clamp(4.5rem, 12vh, 7rem) var(--gutter);
}
.hero__media { position: absolute; inset: -8% 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.04) brightness(0.86);
}
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,12,0.72) 0%, rgba(11,11,12,0.18) 34%, rgba(11,11,12,0.72) 78%, var(--ink) 100%),
    radial-gradient(120% 80% at 50% 60%, transparent 40%, rgba(11,11,12,0.55) 100%);
}
.hero__content {
  position: relative;
  text-align: center;
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
}
.names--hero {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 0.4em;
  margin-top: 1.1rem;
}
.names__script {
  font-size: clamp(3.4rem, 15.5vw, 7rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.names__amp--sm {
  font-size: clamp(1.9rem, 7vw, 3.2rem);
  margin: 0;
}
.hero__date {
  color: var(--ivory-soft);
  font-size: clamp(0.72rem, 2.9vw, 0.85rem);
}
.hero__content > .label { font-size: clamp(0.66rem, 2.5vw, 0.75rem); }

/* The same countdown as the section below, sized down to sit under the date. */
.countdown__grid--hero {
  max-width: 30rem;
  margin-top: clamp(1.6rem, 4.5vh, 2.4rem);
  gap: clamp(0.3rem, 1.6vw, 1rem);
}
.countdown__grid--hero .unit { gap: 0.5rem; }
.countdown__grid--hero .unit__value {
  font-size: clamp(1.8rem, 8.5vw, 2.7rem);
  color: var(--ivory-soft);
}
.countdown__grid--hero .unit__label {
  font-size: clamp(0.48rem, 1.9vw, 0.6rem);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}
.hero__scroll {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(1.4rem, 4vh, 2.4rem);
  display: grid;
  justify-items: center;
  gap: 0.6rem;
}
/* Not a .reveal: the observer's -12% bottom margin meant the cue only
   appeared after the guest had already scrolled. It fades in on its own. */
body.is-open .hero__scroll { animation: cue-in 1.1s var(--ease) 0.9s backwards; }
@keyframes cue-in { from { opacity: 0; transform: translateY(14px); } }

.hero__scroll-line {
  width: 2px; height: clamp(2.6rem, 7vh, 3.6rem);
  background: linear-gradient(180deg, transparent, var(--gold));
  animation: drift 3.4s var(--ease-soft) infinite;
  transform-origin: top;
}
@keyframes drift {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
.hero__scroll-word {
  font-size: clamp(0.62rem, 2.2vw, 0.7rem);
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--gold-light);
}
/* A chevron under the word — the clearest possible "keep going". */
.hero__scroll::after {
  content: '';
  width: 10px; height: 10px;
  margin-top: 0.1rem;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  animation: nudge 3.4s var(--ease-soft) infinite;
}
@keyframes nudge {
  0%, 100% { transform: rotate(45deg) translate(0, 0);       opacity: 0.55; }
  50%      { transform: rotate(45deg) translate(3px, 3px);   opacity: 1; }
}

/* ---------- 11. SPLIT (STORY / DRESS) ------------------------------------ */
.split { display: grid; gap: clamp(3rem, 8vw, 5rem); }
.split__media figcaption { margin-top: 1.2rem; text-align: center; }
.split__media .frame { aspect-ratio: 4 / 5; }
.story .lede { margin-top: 1.8rem; max-width: 30ch; }

/* ---------- 12. DETAILS -------------------------------------------------- */
.details__list {
  max-width: 46rem;
  margin-inline: auto;
  border-top: 1px solid var(--line-soft);
}
.detail {
  display: grid;
  gap: 0.65rem;
  padding: clamp(1.7rem, 5.5vw, 2.4rem) 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}
.detail__value {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 5.6vw, 2rem);
  font-weight: 300;
  line-height: 1.35;
  color: var(--ivory);
  letter-spacing: 0.02em;
}
.detail__value--sm {
  font-size: clamp(1rem, 4vw, 1.25rem);
  color: var(--ivory-soft);
  font-style: italic;
}
.details__action { text-align: center; margin-top: clamp(2.6rem, 7vw, 3.6rem); }

/* ---------- 13. COUNTDOWN ------------------------------------------------ */
.countdown { text-align: center; }
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: clamp(0.4rem, 2vw, 1.5rem);
  max-width: 52rem;
  margin: clamp(2.4rem, 7vw, 3.6rem) auto 0;
}
.unit { display: grid; gap: 0.7rem; justify-items: center; }
.unit__value {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.3rem, 12vw, 5rem);
  line-height: 1;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.unit__value.is-ticking { animation: tick 0.75s var(--ease); }
@keyframes tick {
  0%   { opacity: 0.15; transform: translateY(-7px); filter: blur(3px); }
  100% { opacity: 1;    transform: none;             filter: blur(0); }
}
.unit__label {
  font-size: clamp(0.5rem, 2vw, 0.625rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
}
.unit__sep { display: none; }
.countdown__note {
  margin-top: clamp(2rem, 6vw, 2.8rem);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 4vw, 1.2rem);
  color: rgba(231, 224, 212, 0.6);
}

/* ---------- 14. VENUE ---------------------------------------------------- */
.venue {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(5rem, 14vw, 8rem) var(--gutter);
  text-align: center;
}
.venue__media { position: absolute; inset: -8% 0; }
.venue__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.55) contrast(1.05);
}
.venue__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--ink), rgba(11,11,12,0.45) 26%, rgba(11,11,12,0.5) 70%, var(--ink)),
    radial-gradient(78% 62% at 50% 50%, rgba(11,11,12,0.55), rgba(11,11,12,0.88));
}
.venue__content { position: relative; max-width: 40rem; }
.venue__content .heading { margin-top: 1.1rem; }
.venue__address {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  color: var(--ivory-soft);
  margin-bottom: clamp(2.2rem, 6vw, 3rem);
}

/* ---------- 15. DRESS CODE ----------------------------------------------- */
.dress__inner { display: grid; gap: clamp(2.8rem, 8vw, 5rem); align-items: center; }
.dress__value {
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  margin-top: 0.4rem;
}
.dress__note {
  margin-top: 1.5rem;
  max-width: 34ch;
  font-size: 0.95rem;
  line-height: 2;
  color: rgba(231, 224, 212, 0.62);
  letter-spacing: 0.02em;
}
.dress__media .frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(11,11,12,0.1), rgba(11,11,12,0.45));
}

/* ---------- 16. RSVP ----------------------------------------------------- */
.rsvp { max-width: 1000px; }
.rsvp__card {
  position: relative;
  max-width: 34rem;
  margin-inline: auto;
  padding: clamp(1.9rem, 7vw, 3.2rem);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(198, 161, 91, 0.05), transparent 60%),
    var(--ink-soft);
}
.rsvp__card::after {
  content: '';
  position: absolute;
  inset: clamp(6px, 1.2vw, 10px);
  border: 1px solid rgba(198, 161, 91, 0.10);
  pointer-events: none;
}
.form { display: grid; gap: clamp(1.5rem, 5vw, 2rem); position: relative; z-index: 1; }
.field { display: grid; gap: 0.7rem; }
.field legend { padding: 0; margin-bottom: 0.7rem; }

.input {
  width: 100%;
  padding: 0.95rem 0.2rem;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  transition: border-color 0.6s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: rgba(180, 169, 148, 0.5); font-style: italic; }
.input:focus { outline: none; border-bottom-color: var(--gold); }
.input--area { resize: vertical; min-height: 5.5rem; line-height: 1.7; }
.input:-webkit-autofill { -webkit-text-fill-color: var(--ivory); transition: background-color 5000s; }

.select { position: relative; }
.select select { padding-right: 2rem; cursor: pointer; }
.select option { background: var(--ink-soft); color: var(--ivory); }
.select__caret {
  position: absolute;
  right: 4px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.choice { display: grid; gap: 0.75rem; }
.choice__option { position: relative; display: block; cursor: pointer; }
.choice__option input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.choice__box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-soft);
  transition: border-color 0.6s var(--ease), background 0.6s var(--ease), color 0.6s var(--ease);
}
.choice__text {
  font-size: clamp(0.62rem, 2.3vw, 0.7rem);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: var(--beige);
  transition: color 0.6s var(--ease);
}
.choice__option:hover .choice__box { border-color: var(--line); }
.choice__option input:checked + .choice__box {
  border-color: var(--gold);
  background: rgba(198, 161, 91, 0.08);
}
.choice__option input:checked + .choice__box .choice__text { color: var(--gold-light); }
.choice__option input:focus-visible + .choice__box { outline: 1px solid var(--gold); outline-offset: 3px; }

.field__error {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: #C98B7A;
}
.form__status {
  min-height: 1.2em;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--beige);
}
.form__divider {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: rgba(180, 169, 148, 0.62);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
}
.form__divider::before,
.form__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.thanks { text-align: center; padding: clamp(1.5rem, 5vw, 2.5rem) 0; }
.thanks__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  letter-spacing: 0.06em;
  color: var(--ivory);
}
.thanks__text {
  margin: 1.2rem auto 0;
  max-width: 26ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 4.2vw, 1.3rem);
  color: var(--ivory-soft);
}
.thanks__sign { margin-top: 2rem; }
.thanks .link-quiet { margin-top: 2rem; }

/* ---------- 17. GALLERY -------------------------------------------------- */
.masonry {
  columns: 2;
  column-gap: clamp(0.6rem, 2.2vw, 1.4rem);
}
.tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: clamp(0.6rem, 2.2vw, 1.4rem);
  overflow: hidden;
  background: var(--charcoal);
  break-inside: avoid;
  cursor: pointer;
}
.tile img {
  width: 100%;
  transition: transform 1.5s var(--ease), filter 1.2s var(--ease);
  filter: saturate(0.82) brightness(0.92);
}
.tile::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(242, 237, 228, 0);
  transition: border-color 0.9s var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  .tile:hover img { transform: scale(1.06); filter: saturate(1) brightness(1); }
  .tile:hover::after { border-color: rgba(198, 161, 91, 0.45); }
}

/* ---------- 18. KEEPSAKE / QR -------------------------------------------- */
.keepsake { text-align: center; }
.keepsake .heading { margin: 0.8rem 0 clamp(2.2rem, 7vw, 3rem); }
.keepsake__card {
  display: inline-block;
  padding: clamp(1rem, 3.5vw, 1.4rem);
  border: 1px solid var(--line);
  background: var(--ivory);
  margin-bottom: clamp(1.8rem, 6vw, 2.4rem);
}
.qr { width: clamp(150px, 44vw, 208px); height: clamp(150px, 44vw, 208px); }
.qr svg { width: 100%; height: 100%; display: block; }
.keepsake__url {
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(180, 169, 148, 0.78);
  letter-spacing: 0.06em;
  word-break: break-word;
}

/* ---------- 19. FINALE --------------------------------------------------- */
.finale {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(3rem, 10vh, 5rem);
  padding: clamp(5rem, 14vh, 8rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
  text-align: center;
  background:
    radial-gradient(100% 70% at 50% 42%, rgba(198, 161, 91, 0.075), transparent 65%),
    var(--ink);
}
.finale__inner > * + * { margin-top: clamp(1.1rem, 3.5vh, 1.8rem); }
.finale__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 11vw, 5rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--ivory);
}
.finale__title em { color: var(--gold-light); font-style: italic; }
.finale__names {
  font-family: var(--sans);
  font-size: clamp(0.7rem, 2.6vw, 0.8rem);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--ivory);
}
.finale__line {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 4.2vw, 1.35rem);
  color: rgba(231, 224, 212, 0.72);
  padding-top: clamp(1rem, 4vh, 2rem);
}
.finale__sign {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-style: italic;
  color: rgba(180, 169, 148, 0.75);
  line-height: 2.2;
  padding-top: clamp(1.5rem, 5vh, 2.5rem);
}
.finale__sign-names {
  display: block;
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  font-style: normal;
  color: var(--ivory);
  letter-spacing: 0.04em;
}
.footer { position: relative; }

/* ---------- 20. LIGHTBOX ------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  padding: clamp(3.5rem, 9vw, 5rem) clamp(0.75rem, 3vw, 3rem);
  background: rgba(8, 8, 9, 0.97);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.6s var(--ease-soft);
}
.lightbox.is-visible { opacity: 1; }
.lightbox__figure {
  grid-column: 2;
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  min-width: 0;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: 78svh;
  object-fit: contain;
  border: 1px solid rgba(198, 161, 91, 0.2);
  animation: fade-in 0.7s var(--ease-soft);
}
.lightbox__close {
  position: absolute;
  top: clamp(0.8rem, 3vw, 1.8rem);
  right: clamp(0.8rem, 3vw, 1.8rem);
  width: 46px; height: 46px;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--beige);
  transition: color 0.4s;
}
.lightbox__close:hover { color: var(--gold); }
.lightbox__nav {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
}
.lightbox__nav::before {
  content: '';
  width: 11px; height: 11px;
  border-top: 1px solid var(--beige);
  border-left: 1px solid var(--beige);
  transition: border-color 0.4s;
}
.lightbox__nav--prev::before { transform: rotate(-45deg); }
.lightbox__nav--next::before { transform: rotate(135deg); }
.lightbox__nav:hover::before { border-color: var(--gold); }
.lightbox__count { grid-column: 2; }

/* ---------- 21. RESPONSIVE ----------------------------------------------- */
@media (min-width: 600px) {
  .choice { grid-template-columns: 1fr 1fr; }
  .detail {
    grid-template-columns: 13rem 1fr;
    align-items: baseline;
    text-align: left;
    gap: 1.5rem;
  }
  .detail dt { padding-top: 0.55rem; }
}

@media (min-width: 900px) {
  .masonry { columns: 3; }

  .split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(3rem, 7vw, 6rem);
  }
  .split__media { margin-top: clamp(2rem, 6vw, 4rem); }
  .split__media figcaption { text-align: left; }

  .dress__inner { grid-template-columns: 0.85fr 1fr; }
  .dress__media { order: -1; }

  .countdown__grid {
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: clamp(1rem, 3vw, 2.5rem);
  }
  .unit__sep {
    display: block;
    width: 1px;
    height: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(180deg, transparent, var(--line), transparent);
    justify-self: center;
  }
  .countdown__grid--hero { gap: clamp(0.9rem, 2.2vw, 1.6rem); }
  .countdown__grid--hero .unit__sep { height: clamp(1.5rem, 3vw, 2.2rem); }

  .nav { top: 0; left: 0; right: 0; padding: clamp(1.5rem, 3vw, 2.2rem) clamp(2rem, 5vw, 4rem); }
  .nav__toggle { display: none; }
  .nav__panel {
    position: static;
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0;
    background: none;
    backdrop-filter: none;
    opacity: 1;
    visibility: visible;
  }
  .nav__crest, .ornament--nav { display: none; }
  .nav__list {
    display: flex;
    gap: clamp(1.5rem, 3.6vw, 3rem);
    padding: 0.9rem clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid transparent;
    background: rgba(11, 11, 12, 0.4);
    backdrop-filter: blur(10px);
    transition: border-color 0.8s var(--ease), background 0.8s var(--ease);
  }
  body.is-scrolled .nav__list { border-color: var(--line-soft); }
  .nav__link {
    position: relative;
    opacity: 1;
    transform: none;
    font-family: var(--sans);
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
    text-transform: uppercase;
    color: rgba(242, 237, 228, 0.72);
    animation: none !important;
  }
  .nav__link::after {
    content: '';
    position: absolute;
    left: 0; right: 0.3em; bottom: -7px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.7s var(--ease);
  }
  .nav__link:hover::after,
  .nav__link.is-active::after { transform: scaleX(1); }
  .nav__link.is-active { color: var(--gold-light); }
}

@media (min-width: 700px) {
  .names__name { letter-spacing: 0.13em; text-indent: 0.13em; }
}

@media (min-width: 1280px) {
  .hero__content { max-width: 52rem; }
}

/* Landscape phones — keep the cover readable */
@media (max-height: 560px) and (orientation: landscape) {
  .cover { align-items: start; }
  .names__name { font-size: clamp(2.4rem, 11vh, 4rem); }
  .cover__crest { margin-bottom: 1.2rem; }
}

/* ---------- 22. ACCESSIBILITY -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  [data-seq] { opacity: 1; }
  .parallax img { transform: none !important; }
}

@media print {
  .cover, .nav, .music, .lightbox, .hero__scroll { display: none !important; }
  body { background: #fff; color: #111; }
}

/* ---------- 23. UTILITIES ------------------------------------------------ */
.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
