/* Rose Window — a cathedral wedding */
:root {
  --stone: #14110F;
  --stone-2: #221D19;
  --stone-3: #2E2722;
  --sapphire: #2A5FC4;
  --ruby: #B3243A;
  --emerald: #23845C;
  --gold: #D9B25F;
  --gold-light: #F3DFA8;
  --candle: #FFD48A;
  --parchment: #F3EAD7;
  --ink: #2A2018;
  --ink-soft: #6A5A49;
  --text: #EFE6D6;
  --muted: #B9AC98;
  --deco: "Cinzel Decorative", "Cinzel", serif;
  --caps: "Cinzel", "Times New Roman", serif;
  --serif: "EB Garamond", Garamond, Georgia, serif;
  --script: "Parisienne", cursive;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --jewel: linear-gradient(90deg, var(--sapphire), var(--ruby), var(--emerald), var(--gold));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100svh; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--parchment); color: var(--ink); padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { top: 16px; }

.motes { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--caps); font-weight: 500;
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .8rem;
}
.display {
  font-family: var(--caps); font-weight: 400;
  font-size: clamp(1.9rem, 8vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 1.4rem;
}
.display em { font-family: var(--script); font-style: normal; font-size: 1.15em; color: var(--gold-light); text-transform: none; }

/* ================= Intro ================= */
.intro {
  position: fixed; inset: 0; z-index: 50;
  overflow: hidden;
  background: #000;
  transition: opacity 1.2s ease, visibility 1.2s;
}
.intro.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease .4s; }
.is-entering .intro__film { opacity: 1; }
.intro__veil {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 38%, rgba(42,95,196,.18), transparent 45%), #000;
  transition: opacity 1.6s ease .4s;
}
.is-entering .intro__veil { opacity: 0; }

.intro__window {
  position: absolute; left: 50%; top: 38%;
  width: min(84vw, 420px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: transform 2.6s cubic-bezier(.6, 0, .3, 1), opacity 1.8s ease .8s;
}
.intro__window img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  filter: brightness(.55) saturate(.8);
  animation: turn 120s linear infinite, window-in 1.6s var(--ease) backwards;
  transition: filter 1s ease;
}
.intro__window::after {
  /* coloured light pooling around the glass */
  content: ""; position: absolute; inset: -30%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(42,95,196,.35), rgba(179,36,58,.3), rgba(35,132,92,.3), rgba(217,178,95,.35), rgba(42,95,196,.35));
  filter: blur(50px);
  opacity: .35;
  z-index: -1;
  transition: opacity 1s;
  animation: turn 30s linear infinite reverse;
}
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes window-in { from { opacity: 0; transform: scale(.9); } }
.is-lit .intro__window img { filter: brightness(1.15) saturate(1.15); }
.is-lit .intro__window::after { opacity: .9; }
.is-entering .intro__window { transform: translate(-50%, -50%) scale(6); opacity: 0; }

.intro__text {
  position: absolute; left: 16px; right: 16px; bottom: max(7vh, 44px);
  text-align: center;
  transition: opacity .6s;
}
.is-lit .intro__text { opacity: 0; pointer-events: none; }
.intro__eyebrow { font-family: var(--caps); letter-spacing: .35em; text-transform: uppercase; font-size: .72rem; color: var(--gold); margin: 0; animation: up 1s var(--ease) .4s both; }
.intro__names { font-family: var(--script); font-size: clamp(2.8rem, 12vw, 3.8rem); line-height: 1.2; margin: .2rem 0 1.2rem; color: var(--parchment); animation: up 1s var(--ease) .6s both; }
.intro__names span { color: var(--gold); }
@keyframes up { from { opacity: 0; transform: translateY(14px); } }
.tap {
  border: 1px solid var(--gold); border-radius: 2px;
  padding: .85rem 2rem;
  background: transparent;
  color: var(--gold-light);
  font-family: var(--caps); font-size: .78rem; letter-spacing: .3em; text-transform: uppercase;
  position: relative;
  animation: up 1s var(--ease) .8s both;
}
.tap::before { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(217,178,95,.4); pointer-events: none; }
.tap:hover, .tap:focus-visible { background: rgba(217,178,95,.12); outline: none; }

/* ================= Controls ================= */
.controls {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; gap: 10px; align-items: center;
}
.controls[hidden], .ctl[hidden] { display: none; }
.ctl {
  border: 1px solid rgba(217,178,95,.6); border-radius: 999px;
  background: rgba(20,17,15,.75); color: var(--gold-light);
  padding: .5rem 1rem;
  font-family: var(--caps); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.ctl--round { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
.ctl svg { width: 20px; height: 20px; fill: currentColor; }
.ctl .ico-off { display: none; }
.ctl[aria-pressed="false"] .ico-on { display: none; }
.ctl[aria-pressed="false"] .ico-off { display: block; }

/* ================= Hero ================= */
.hero { position: relative; min-height: 100svh; overflow: hidden; display: flex; justify-content: center; text-align: center; }
.hero__bg { position: absolute; inset: 0; background: url("media/aisle-end.webp") center / cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,17,15,.88) 0%, rgba(20,17,15,.6) 40%, rgba(20,17,15,.1) 65%, rgba(20,17,15,.7) 100%);
}
.hero__text { position: relative; z-index: 2; padding: max(11svh, 70px) 16px 0; max-width: 560px; }
.hero__names {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(3.6rem, 17vw, 5.8rem);
  line-height: 1.05;
  margin: 0 0 .8rem;
  display: flex; flex-direction: column; align-items: center;
  color: var(--parchment);
  text-shadow: 0 2px 24px rgba(0,0,0,.6);
}
.hero__names em { font-family: var(--deco); font-style: normal; font-size: .42em; color: var(--gold); margin: .1em 0; }
.hero__line { font-style: italic; font-size: 1.15rem; color: var(--text); margin: 0 auto 1.1rem; max-width: 20em; }
.hero__date {
  display: inline-block; margin: 0;
  font-family: var(--caps); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-light);
  padding: .55rem 1.2rem;
  border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  background: rgba(20,17,15,.4);
}

.fade { opacity: 0; }
.is-open .fade { animation: fade-up 1.2s var(--ease) var(--d, 0s) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ================= Illuminated page ================= */
.page { padding: 4.5rem 16px; background: linear-gradient(180deg, var(--stone), var(--stone-2)); }
.page__sheet {
  position: relative;
  max-width: 34rem; margin: 0 auto;
  padding: 2.6rem 1.6rem 2.2rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.5), transparent 60%),
    var(--parchment);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
}
.page__sheet::before {
  /* a gold rule with jewel corners */
  content: ""; position: absolute; inset: 10px;
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--parchment), inset 0 0 0 4px rgba(217,178,95,.5);
  pointer-events: none;
}
.page__drop { text-align: left; font-size: 1.1rem; margin: 0 0 1.4rem; }
.drop {
  float: left;
  font-family: var(--deco); font-weight: 700;
  font-size: 4.4rem; line-height: .8;
  margin: .3rem .6rem 0 0;
  padding: .35rem .45rem .45rem;
  color: var(--gold-light);
  background: linear-gradient(135deg, var(--ruby), #6E1022);
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 3px rgba(243,223,168,.35);
}
.page__name { font-family: var(--script); font-size: clamp(2.3rem, 10vw, 3rem); line-height: 1.15; color: #4A1A1F; margin: .3rem 0 0; clear: both; }
.page__and { font-family: var(--caps); font-size: .78rem; letter-spacing: .4em; text-transform: uppercase; color: var(--ink-soft); margin: .2rem 0; }
.page__copy { font-style: italic; color: var(--ink-soft); margin: 1.2rem 0 0; }
.rule { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 1.6rem 0 1.2rem; }
.rule span { width: 70px; height: 1px; background: var(--gold); }
.rule i { width: 14px; height: 14px; transform: rotate(45deg); background: var(--jewel); border: 1px solid var(--gold); }
.verse { margin: 0; }
.verse p { font-style: italic; font-size: 1.3rem; margin: 0; }
.verse cite { display: block; font-style: normal; font-family: var(--caps); font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--ink-soft); margin-top: .3rem; }

/* ================= Lancet window + countdown ================= */
.lancet { padding: 4.5rem 16px; display: grid; gap: 2.2rem; justify-items: center; text-align: center; background: var(--stone-2); }
.lancet__frame {
  width: min(78vw, 320px); aspect-ratio: 9 / 15;
  border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  overflow: hidden;
  border: 6px solid #0D0B0A;
  outline: 2px solid var(--gold); outline-offset: 4px;
  box-shadow: 0 0 60px rgba(42,95,196,.35), 0 0 120px rgba(179,36,58,.2);
}
.lancet__film { width: 100%; height: 100%; object-fit: cover; }
.lancet__text { max-width: 30rem; }
.lancet__text p:not(.eyebrow) { color: var(--muted); }

.panes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 30rem; }
.pane {
  position: relative;
  padding: 1rem 0 .7rem;
  border: 3px solid #0D0B0A;
  border-radius: 40px 40px 4px 4px;
  outline: 1px solid rgba(217,178,95,.5);
  text-align: center;
  overflow: hidden;
}
.pane::before {
  /* lead lines crossing the glass */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(35deg, transparent 48%, rgba(13,11,10,.7) 49% 51%, transparent 52%),
    linear-gradient(-50deg, transparent 58%, rgba(13,11,10,.6) 59% 61%, transparent 62%),
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 50%);
}
.pane--sapphire { background: linear-gradient(160deg, #4C82E6, #173A80); }
.pane--ruby { background: linear-gradient(160deg, #E0465C, #6E1022); }
.pane--emerald { background: linear-gradient(160deg, #3DB07F, #0F4F35); }
.pane--gold { background: linear-gradient(160deg, #F2CD72, #8F6A1E); }
.pane b, .pane small { position: relative; display: block; }
.pane b { font-family: var(--caps); font-weight: 500; font-size: 1.7rem; line-height: 1.1; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.pane small { font-family: var(--caps); font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.85); }

/* ================= Order of service ================= */
.order { padding: 4.5rem 16px; text-align: center; background: var(--parchment); color: var(--ink); }
.order .eyebrow { color: #8A6A2A; }
.order .display em { color: var(--ruby); }
.order__list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 30rem;
  counter-reset: svc;
  text-align: left;
}
.order__list li {
  counter-increment: svc;
  display: grid; grid-template-columns: 2.2rem 1fr; column-gap: .6rem;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(138,106,42,.25);
}
.order__list li::before {
  content: counter(svc, upper-roman);
  grid-row: span 2;
  font-family: var(--caps); font-size: .85rem; color: var(--ruby);
  padding-top: .25rem;
}
.order__list span { font-family: var(--caps); font-size: .95rem; letter-spacing: .06em; }
.order__list i { font-size: 1rem; color: var(--ink-soft); }
.order__list i:empty { display: none; }

/* ================= The day ================= */
.day { padding: 4.5rem 16px; text-align: center; background: linear-gradient(180deg, var(--stone-2), var(--stone)); }
.day__list { display: grid; gap: 1.4rem; max-width: 34rem; margin: 0 auto; text-align: left; }
.event {
  position: relative;
  padding: 1.5rem 1.4rem 1.3rem;
  background: rgba(46,39,34,.7);
  border: 1px solid rgba(217,178,95,.3);
  border-radius: 4px;
}
.event::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent, var(--gold)); box-shadow: 0 0 18px var(--accent, var(--gold)); }
.event__time { font-family: var(--caps); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0; }
.event__name { font-family: var(--script); font-weight: 400; font-size: 2.3rem; line-height: 1.15; margin: .1rem 0 .3rem; color: var(--parchment); }
.event__place { font-weight: 500; margin: 0; }
.event__note { color: var(--muted); margin: .3rem 0 0; font-size: 1.02rem; }
.event__dress { font-style: italic; color: var(--gold-light); margin: .4rem 0 0; font-size: 1rem; }
.event__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1.2rem;
  border: 1px solid var(--gold); border-radius: 2px;
  background: transparent; color: var(--gold-light);
  font-family: var(--caps); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none;
  transition: background .25s, color .25s;
}
.btn:hover, .btn:focus-visible { background: rgba(217,178,95,.15); outline: none; }
.btn--solid { background: var(--gold); color: var(--stone); }
.btn--solid:hover, .btn--solid:focus-visible { background: var(--gold-light); }

/* ================= RSVP ================= */
.rsvp { padding: 4.5rem 16px; text-align: center; }
.rsvp__form { max-width: 28rem; margin: 0 auto; display: grid; gap: 1.1rem; text-align: left; }
.field { display: grid; gap: .35rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field > span, .choice legend { font-family: var(--caps); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.field small { text-transform: none; letter-spacing: 0; font-family: var(--serif); color: var(--muted); }
.field input, .field select {
  width: 100%;
  font: inherit; font-size: 1.05rem;
  padding: .65rem .9rem;
  border-radius: 2px;
  border: 1px solid rgba(217,178,95,.4);
  background: rgba(46,39,34,.6);
  color: var(--text);
}
.field select option { background: var(--stone-2); }
.field input:focus, .field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.choice legend { margin-bottom: .4rem; }
.choice label {
  display: flex; align-items: center; gap: .7rem;
  min-height: 44px; padding: .6rem .9rem;
  border: 1px solid rgba(217,178,95,.3); border-radius: 2px;
  cursor: pointer;
}
.choice input { accent-color: var(--gold); width: 18px; height: 18px; margin: 0; }
.choice label:has(input:checked) { border-color: var(--gold); background: rgba(217,178,95,.1); }
.rsvp__actions { display: grid; gap: .6rem; margin-top: .3rem; }

/* ================= Footer ================= */
.foot { text-align: center; padding: 2rem 16px calc(5.5rem + env(safe-area-inset-bottom)); }
.foot__bouquet {
  width: 200px; margin: 0 auto;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 45%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 45%, #000 55%, transparent 100%);
}
.verse--foot { max-width: 24rem; margin: 0 auto 1.2rem; }
.verse--foot p { color: var(--parchment); }
.verse--foot cite { color: var(--gold); }
.foot__names { font-family: var(--script); font-size: 2.6rem; color: var(--gold-light); margin: 0 0 1.4rem; }

/* ================= Reveal + toast ================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 70;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: .7rem 1.1rem;
  background: var(--parchment); color: var(--ink);
  border-radius: 4px;
  font-size: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 820px) {
  .lancet { grid-template-columns: auto minmax(0, 30rem); align-items: center; justify-content: center; column-gap: 4rem; text-align: left; }
  .panes { grid-column: 1 / -1; justify-self: center; }
  .hero__bg { background-size: auto 100%; background-repeat: no-repeat; background-color: var(--stone); }
  .intro__film { object-fit: contain; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fade, .reveal { opacity: 1; transform: none; }
}
