/* ============================================================
   MWAZVITA & SHARON — Wedding Invitation
   A single-document, vanilla build. Typography carries the
   design; colour is used sparingly; motion is calm.
   ============================================================ */

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

:root{
  /* Palette */
  --bg:#F7F3EE;          /* primary background */
  --ivory:#FAF7F2;       /* warm ivory */
  --gold:#C9A96E;        /* orthodox gold */
  --olive:#A08860;       /* warm bronze */
  --forest:#3D3120;      /* dark bronze */
  --charcoal:#2B2B2B;    /* charcoal text */
  --iron:#1f1f1f;        /* wrought iron */

  --ink:var(--charcoal);
  --muted:#6f6a60;       /* soft secondary text */

  /* Type */
  --serif:'Cormorant Garamond',Georgia,'Times New Roman',serif;
  --sans:'Jost','Helvetica Neue',Arial,sans-serif;

  /* Rhythm */
  --pad-x:clamp(1.5rem,6vw,7rem);
  --section-y:clamp(5.5rem,13vh,11rem);
  --measure:38rem;

  /* Motion */
  --ease:cubic-bezier(.22,.61,.36,1);
  --slow:1.1s var(--ease);
}

html{font-size:clamp(16px,1vw + 14px,19px);-webkit-text-size-adjust:100%}

body{
  font-family:var(--serif);
  background:var(--bg);
  color:var(--ink);
  line-height:1.65;
  font-weight:400;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img{display:block;max-width:100%;height:auto}

/* ---------- Shared type helpers ---------- */
.label{
  font-family:var(--sans);
  font-weight:400;
  text-transform:uppercase;
  letter-spacing:.34em;
  font-size:.72rem;
  color:var(--gold);
  margin-left:.34em; /* optical balance for tracking */
}
.label--muted{color:var(--muted)}

.display{
  font-family:var(--serif);
  font-weight:300;
  line-height:1.02;
  letter-spacing:.01em;
}

.amp{
  font-style:italic;
  font-weight:300;
  color:var(--gold);
}

.divider{
  display:flex;align-items:center;justify-content:center;
  gap:1.1rem;margin:2.4rem auto;
}
.divider .rule{width:clamp(40px,9vw,84px);height:1px;background:var(--gold);opacity:.6}
.divider .mark{
  width:7px;height:7px;transform:rotate(45deg);
  border:1px solid var(--gold);opacity:.85;
}

/* Generic on-scroll reveal */
.fade{opacity:0;transform:translateY(26px);transition:opacity 1.1s var(--ease),transform 1.1s var(--ease)}
.fade.in{opacity:1;transform:none}
.fade.d1{transition-delay:.12s}
.fade.d2{transition-delay:.24s}
.fade.d3{transition-delay:.36s}

/* ============================================================
   NAVIGATION — hidden through the intro, fades in after
   ============================================================ */
.nav{
  position:fixed;top:0;left:0;width:100%;z-index:60;
  display:flex;align-items:center;justify-content:space-between;
  padding:1.15rem var(--pad-x);
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .8s var(--ease),background .5s var(--ease),padding .5s var(--ease);
}
.nav.show{opacity:1;visibility:visible;pointer-events:auto}
/* NB: deliberately NO backdrop-filter here. A filter on .nav makes it the
   containing block for its position:fixed child menu, trapping the mobile
   overlay inside the ~60px bar. A solid background keeps the menu fixed to
   the viewport so it hides correctly. */
.nav.solid{
  background:rgba(247,243,238,.96);
  padding-top:.85rem;padding-bottom:.85rem;
  box-shadow:0 1px 0 rgba(43,43,43,.06);
}
.nav__brand{
  font-family:var(--serif);font-size:1.15rem;letter-spacing:.18em;
  color:var(--ink);text-decoration:none;
}
.nav__brand .star{color:var(--gold);font-size:.78em;vertical-align:.08em;margin:0 .18em}
.nav__links{display:flex;gap:clamp(1.2rem,2.4vw,2.6rem);list-style:none;align-items:center}
.nav__links a{
  font-family:var(--sans);font-size:.7rem;font-weight:400;
  text-transform:uppercase;letter-spacing:.2em;
  color:var(--ink);text-decoration:none;position:relative;
  padding:.3rem 0;transition:color .3s var(--ease);
}
.nav__links a::after{
  content:'';position:absolute;left:0;bottom:0;height:1px;width:0;
  background:var(--gold);transition:width .4s var(--ease);
}
.nav__links a:hover,.nav__links a:focus-visible{color:var(--gold)}
.nav__links a:hover::after,.nav__links a:focus-visible::after{width:100%}

.nav__toggle{
  display:none;background:none;border:none;cursor:pointer;
  font-family:var(--sans);font-size:.68rem;letter-spacing:.24em;
  text-transform:uppercase;color:var(--ink);padding:.4rem;
}

@media(max-width:760px){
  .nav__toggle{display:block;z-index:62}
  .nav__links{
    position:fixed;inset:0;background:rgba(247,243,238,.98);
    flex-direction:column;justify-content:center;gap:2.2rem;
    transform:translateY(-100%);opacity:0;visibility:hidden;pointer-events:none;
    transition:transform .6s var(--ease),opacity .4s var(--ease),visibility .4s;
    z-index:61;
  }
  .nav__links.open{transform:none;opacity:1;visibility:visible;pointer-events:auto}
  .nav__links a{font-size:1rem;letter-spacing:.24em}
}

/* ============================================================
   CINEMATIC INTRO
   A tall wrapper provides scroll distance; the stage is pinned.
   JS maps scroll progress to opacity / transforms.
   ============================================================ */
.intro{position:relative;height:380vh;z-index:1}
.intro__stage{
  position:sticky;top:0;height:100vh;height:100svh;
  overflow:hidden;background:var(--forest);
}

/* Garden beyond the gates */
.intro__bg{
  position:absolute;inset:-4%;
  background:url('images/010A2766.JPG') center 38%/cover no-repeat;
  filter:brightness(.5) blur(6px);
  transform:scale(1.08);
  will-change:filter,transform;
}
/* Reverent veil over the scene (deepens for scripture, lifts as gates open) */
.intro__veil{
  position:absolute;inset:0;
  background:
    radial-gradient(120% 90% at 50% 42%,rgba(61,49,32,.25) 0%,rgba(45,38,28,.7) 70%,rgba(28,22,16,.9) 100%);
  opacity:.45;will-change:opacity;
}
/* Warm light bloom that grows from the centre as the gates open */
.intro__bloom{
  position:absolute;left:50%;top:44%;
  width:min(120vw,1100px);aspect-ratio:1;transform:translate(-50%,-50%) scale(.6);
  background:radial-gradient(circle,rgba(255,243,214,.85) 0%,rgba(201,169,110,.35) 32%,rgba(201,169,110,0) 66%);
  opacity:0;pointer-events:none;will-change:opacity,transform;mix-blend-mode:screen;
}
/* Soft top/bottom vignette for editorial depth */
.intro__frame{
  position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(28,22,16,.42),transparent 22%,transparent 74%,rgba(28,22,16,.5));
}

/* The pinned content layers */
.layer{
  position:absolute;inset:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:0 var(--pad-x);
  will-change:opacity,transform;
}

/* --- Crest slot (top-left, over the opening) --- */
.crest{
  position:absolute;z-index:11;
  top:clamp(1.3rem,3vw,2.4rem);left:clamp(1.3rem,3vw,2.4rem);
  width:clamp(64px,7vw,108px);height:auto;
  opacity:0;pointer-events:none;
  transition:opacity .6s var(--ease);
  filter:drop-shadow(0 6px 18px rgba(28,22,16,.45));
}

/* --- Emblem with graceful text fallback ---
   Drop images/emblem.png to use the artwork; until then (or on load
   error) the text monogram shows. onerror adds .no-emblem to the wrapper. */
.has-emblem .emblem-fallback{display:none}
.has-emblem .emblem-img{display:block}
.has-emblem.no-emblem .emblem-img{display:none}
.has-emblem.no-emblem .emblem-fallback{display:inline-block}

/* Opening monogram emblem */
.mono-emblem{margin:0 auto 2.4rem}
.hero-emblem{
  width:clamp(200px,34vw,400px);height:auto;margin:0 auto;opacity:.97;
  filter:drop-shadow(0 10px 30px rgba(28,22,16,.4));
}

/* Nav brand emblem */
.nav-emblem{height:clamp(26px,3.4vw,34px);width:auto}

/* Invitation card emblem */
.invite-emblem{width:clamp(120px,18vw,184px);height:auto;margin:0 auto}

/* Footer emblem */
.footer-emblem{
  width:clamp(170px,32vw,320px);height:auto;margin:0 auto;
  filter:drop-shadow(0 8px 24px rgba(0,0,0,.25));
}

/* --- Opening monogram --- */
.monogram .mono-mark{
  font-family:var(--serif);font-weight:300;
  font-size:clamp(3.2rem,11vw,7rem);line-height:1;
  color:var(--ivory);letter-spacing:.04em;
}
.monogram .mono-mark .star{color:var(--gold);font-size:.62em;vertical-align:.18em;margin:0 .3em}
.monogram .mono-invite{
  font-family:var(--sans);text-transform:uppercase;letter-spacing:.42em;
  font-size:clamp(.7rem,1.6vw,.82rem);color:rgba(250,247,242,.86);
  /* both side margins auto = centred in the flex column;
     text-indent offsets the trailing letter-spacing so the text optically centres */
  margin:2.4rem auto .9rem;text-indent:.42em;
}
.monogram .mono-date{
  font-family:var(--serif);font-style:italic;font-weight:300;
  font-size:clamp(1.1rem,2.6vw,1.5rem);color:var(--gold);letter-spacing:.04em;
}

/* --- Scripture --- */
.scripture{opacity:0}
.scripture blockquote{max-width:24em}
.scripture .verse{
  font-family:var(--serif);font-style:italic;font-weight:300;
  font-size:clamp(1.6rem,4.4vw,2.9rem);line-height:1.32;
  color:var(--ivory);letter-spacing:.005em;
}
.scripture .cite{
  display:block;margin-top:2rem;
  font-family:var(--sans);font-style:normal;text-transform:uppercase;
  letter-spacing:.34em;font-size:.7rem;color:var(--gold);margin-left:.34em;
}

/* --- Main reveal (names beyond the gates) --- */
.reveal-names{opacity:0;z-index:6}
.reveal-names .pre{
  font-family:var(--sans);text-transform:uppercase;letter-spacing:.4em;
  font-size:.72rem;color:rgba(250,247,242,.82);margin-bottom:1.6rem;margin-left:.4em;
}
.reveal-names .names{
  font-family:var(--serif);font-weight:300;line-height:1.04;
  font-size:clamp(2.8rem,11vw,7.2rem);color:var(--ivory);
  letter-spacing:.01em;text-shadow:0 2px 40px rgba(28,22,16,.45);
}
.reveal-names .names .amp{display:block;font-size:.46em;color:var(--gold);margin:.1em 0}

/* --- Wrought-iron gates --- */
.gates{
  position:absolute;inset:0;z-index:8;
  display:flex;perspective:1700px;perspective-origin:50% 45%;
  opacity:0;will-change:opacity;
}
.gate{
  position:relative;width:50%;height:100%;
  display:flex;align-items:center;justify-content:center;
  will-change:transform;backface-visibility:hidden;
}
.gate svg{height:100%;width:auto;max-width:none;filter:drop-shadow(0 14px 30px rgba(0,0,0,.55))}
.gate--left{transform-origin:left center}
.gate--right{transform-origin:right center}
.gate--left svg{margin-right:-1px}
.gate--right svg{margin-left:-1px}
/* Centre seam ornament sits across both gates while closed */
.gate-iron{stroke:#141414}
.gate-fill{fill:#1c1c1c}

/* --- Scroll cue --- */
.scroll-cue{
  position:absolute;left:50%;bottom:clamp(1.6rem,5vh,3rem);transform:translateX(-50%);
  z-index:10;display:flex;flex-direction:column;align-items:center;gap:.9rem;
  transition:opacity .6s var(--ease);
}
.scroll-cue .cue-word{
  font-family:var(--sans);text-transform:uppercase;letter-spacing:.32em;
  font-size:.62rem;color:rgba(250,247,242,.7);margin-left:.32em;
}
.scroll-cue .cue-line{
  width:1px;height:46px;background:linear-gradient(rgba(201,169,110,.1),var(--gold));
  position:relative;overflow:hidden;
}
.scroll-cue .cue-line::after{
  content:'';position:absolute;left:0;top:-50%;width:100%;height:50%;
  background:var(--ivory);animation:cueRun 2.6s var(--ease) infinite;
}
@keyframes cueRun{0%{top:-50%}60%,100%{top:100%}}

/* ============================================================
   SHARED SECTION LAYOUT
   ============================================================ */
.section{
  position:relative;z-index:2;background:var(--bg);
  padding:var(--section-y) var(--pad-x);
}
.section--ivory{background:var(--ivory)}
.section--bronze{background:var(--forest)}

/* Countdown timer */
.countdown-grid{display:flex;align-items:center;justify-content:center;gap:clamp(.8rem,2vw,1.6rem);margin-top:2.4rem;flex-wrap:wrap}
.cd-item{display:flex;flex-direction:column;align-items:center;min-width:clamp(70px,14vw,110px)}
.cd-num{font-family:var(--serif);font-weight:300;font-size:clamp(2.6rem,7vw,5rem);color:var(--gold);line-height:1;transition:transform .15s var(--ease)}
.cd-num.tick{transform:scale(1.06)}
.cd-label{font-family:var(--sans);text-transform:uppercase;letter-spacing:.2em;font-size:.68rem;color:rgba(250,247,242,.7);margin-top:.5rem;margin-left:.2em}
.cd-sep{font-family:var(--serif);font-weight:300;font-size:clamp(2rem,5vw,4rem);color:var(--gold);opacity:.5;align-self:flex-start;padding-top:.3rem}
.wrap{max-width:1080px;margin:0 auto}
.wrap--narrow{max-width:var(--measure)}
.center{text-align:center}

.section-title{
  font-family:var(--serif);font-weight:300;
  font-size:clamp(2.1rem,5.2vw,3.4rem);line-height:1.08;
  letter-spacing:.01em;color:var(--ink);
}
.eyebrow{display:block;margin-bottom:1.4rem}

.prose p{
  font-size:clamp(1.12rem,2.1vw,1.32rem);
  line-height:1.7;color:#403c34;margin:0 auto 1.5rem;
  max-width:var(--measure);
}
.prose p:last-child{margin-bottom:0}
.prose .lede{font-size:clamp(1.25rem,2.6vw,1.6rem);font-style:italic;font-weight:300;color:var(--olive)}

/* ============================================================
   HERO INVITATION (formal card after the reveal)
   ============================================================ */
#invitation{padding-top:clamp(6rem,16vh,12rem);padding-bottom:clamp(6rem,16vh,12rem)}
.invite{text-align:center}
.invite__mono{
  font-family:var(--serif);font-weight:300;font-size:1.6rem;
  letter-spacing:.2em;color:var(--gold);
}
.invite__mono .star{font-size:.78em;vertical-align:.08em;margin:0 .22em}
.invite__pre{margin:2.4rem auto 1.4rem}
.invite__names{
  font-family:var(--serif);font-weight:300;line-height:1.05;
  font-size:clamp(3rem,10vw,6rem);color:var(--ink);letter-spacing:.012em;
}
.invite__names .amp{display:block;font-size:.4em;margin:.08em 0;color:var(--gold)}
.invite__meta{
  font-family:var(--sans);text-transform:uppercase;letter-spacing:.28em;
  font-size:clamp(.74rem,1.5vw,.86rem);color:var(--muted);line-height:2.2;
}
.invite__meta strong{color:var(--ink);font-weight:500}
.invite__blessing{
  font-family:var(--serif);font-style:italic;font-weight:300;
  font-size:clamp(1.18rem,2.5vw,1.5rem);line-height:1.62;
  color:var(--olive);max-width:30rem;margin:0 auto;
}

/* ============================================================
   OUR STORY
   ============================================================ */
.story-fragments{
  font-family:var(--serif);font-style:italic;font-weight:300;
  font-size:clamp(1.3rem,3vw,1.9rem);line-height:1.9;color:var(--olive);
  margin:0 0 1.6rem;
}

/* ============================================================
   DETAILS — editorial definition list, hairline rules
   ============================================================ */
.details{max-width:780px;margin:0 auto}
.detail-row{
  display:grid;grid-template-columns:minmax(8rem,12rem) 1fr;
  gap:clamp(1rem,5vw,3rem);align-items:baseline;
  padding:clamp(1.7rem,3.6vw,2.4rem) 0;
  border-top:1px solid rgba(43,43,43,.13);
}
.detail-row:last-child{border-bottom:1px solid rgba(43,43,43,.13)}
.detail-row dt{
  font-family:var(--sans);text-transform:uppercase;letter-spacing:.24em;
  font-size:.74rem;color:var(--gold);padding-top:.35rem;
}
.detail-row dd{font-size:clamp(1.06rem,2vw,1.22rem);line-height:1.6;color:#3c3830}
.detail-row dd .d-lead{display:block;font-size:1.2em;color:var(--ink);margin-bottom:.15rem}
.detail-row dd .d-sub{display:block;color:var(--muted);font-style:italic;font-size:.96em;margin-top:.3rem}

@media(max-width:560px){
  .detail-row{grid-template-columns:1fr;gap:.6rem}
  .detail-row dt{padding-top:0}
}

/* ============================================================
   PHOTOGRAPHS — full-bleed cinematic imagery
   ============================================================ */
.photo-band{position:relative;width:100%;overflow:hidden;background:var(--forest)}
.photo-band--tall{height:clamp(60vh,80vh,820px)}
.photo-band img{
  width:100%;height:100%;object-fit:cover;
  transform:scale(1.06);transition:transform 1.4s var(--ease);
}
.photo-band__caption{
  position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;text-align:center;
  padding:0 var(--pad-x);
  background:linear-gradient(180deg,rgba(28,22,16,.15),rgba(28,22,16,.42));
}
.photo-band__caption .label{color:rgba(250,247,242,.85)}
.photo-band__caption .line{
  font-family:var(--serif);font-style:italic;font-weight:300;
  font-size:clamp(1.6rem,4vw,2.8rem);line-height:1.4;color:var(--ivory);
  margin-top:1rem;max-width:20em;
}
.photo-duo{display:grid;grid-template-columns:1fr 1fr;gap:clamp(4px,1vw,10px);background:var(--bg)}
.photo-duo figure{position:relative;overflow:hidden;aspect-ratio:1/1}
.photo-duo img{width:100%;height:100%;object-fit:cover;transition:transform 1.4s var(--ease)}
.photo-duo figure:hover img{transform:scale(1.05)}
@media(max-width:680px){.photo-duo{grid-template-columns:1fr}.photo-duo figure{aspect-ratio:4/3}}

/* ============================================================
   RSVP
   ============================================================ */
.form{max-width:30rem;margin:2.8rem auto 0;text-align:left}
.field{margin-bottom:1.7rem}
.field label{
  display:block;font-family:var(--sans);text-transform:uppercase;
  letter-spacing:.2em;font-size:.66rem;color:var(--muted);margin-bottom:.6rem;
}
.field input,.field select,.field textarea{
  width:100%;background:transparent;border:none;
  border-bottom:1px solid rgba(43,43,43,.25);
  font-family:var(--serif);font-size:1.15rem;color:var(--ink);
  padding:.55rem .1rem;outline:none;border-radius:0;
  transition:border-color .35s var(--ease);
}
.field textarea{resize:vertical;min-height:3.2rem;line-height:1.5}
.field select{appearance:none;cursor:pointer;background-image:none}
.field input:focus,.field select:focus,.field textarea:focus{border-bottom-color:var(--gold)}
.field input::placeholder,.field textarea::placeholder{color:#b3ada1}
.field--inline{display:grid;grid-template-columns:1fr 1fr;gap:1.4rem}
@media(max-width:520px){.field--inline{grid-template-columns:1fr}}

.btn{
  display:inline-block;margin-top:1rem;cursor:pointer;
  font-family:var(--sans);text-transform:uppercase;letter-spacing:.24em;
  font-size:.72rem;color:var(--ink);
  background:transparent;border:1px solid var(--gold);
  padding:1.05rem 2.6rem;border-radius:0;
  transition:background .4s var(--ease),color .4s var(--ease);
}
.btn:hover,.btn:focus-visible{background:var(--gold);color:var(--ivory)}
.btn[disabled]{opacity:.5;cursor:default}

.form-note{
  font-family:var(--sans);font-size:.74rem;letter-spacing:.06em;
  color:var(--muted);margin-top:1.2rem;text-align:center;
}
.rsvp-thanks{display:none;text-align:center;padding-top:1rem}
.rsvp-thanks.show{display:block;animation:fadeUp 1s var(--ease)}
@keyframes fadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
.rsvp-thanks .thanks-mark{font-family:var(--serif);font-size:2rem;color:var(--gold)}

/* ============================================================
   GIFTS
   ============================================================ */
.gifts{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(1.6rem,4vw,3.4rem);margin-top:3rem}
.gift{text-align:center;padding:0 .5rem}
.gift__name{
  font-family:var(--serif);font-weight:400;font-size:1.5rem;color:var(--ink);
  letter-spacing:.02em;margin-bottom:.7rem;
}
.gift__num{
  font-family:var(--serif);font-style:italic;font-size:1.05rem;color:var(--gold);
  display:block;margin-bottom:.9rem;
}
.gift p{font-size:1.02rem;line-height:1.55;color:var(--muted)}
@media(max-width:720px){.gifts{grid-template-columns:1fr;gap:2.4rem;max-width:24rem;margin-inline:auto}}

/* ============================================================
   FOOTER
   ============================================================ */
.footer{
  background:var(--forest);color:var(--ivory);text-align:center;
  padding:clamp(6rem,14vh,10rem) var(--pad-x);
}
.footer__mono{
  font-family:var(--serif);font-weight:300;
  font-size:clamp(3rem,10vw,6rem);line-height:1;color:var(--ivory);letter-spacing:.04em;
}
.footer__mono .star{color:var(--gold);font-size:.6em;vertical-align:.2em;margin:0 .3em}
.footer__line{
  font-family:var(--serif);font-style:italic;font-weight:300;
  font-size:clamp(1.2rem,2.6vw,1.6rem);color:rgba(250,247,242,.92);
  margin-top:2.4rem;letter-spacing:.02em;
}
.footer .divider .rule{opacity:.4}
.footer .divider .mark{border-color:rgba(201,169,110,.8)}

/* ============================================================
   REDUCED MOTION — calm crossfades, gates removed,
   garden held bright. The narrative survives without movement.
   ============================================================ */
html.reduced-motion .intro__bg{filter:brightness(.78);transform:none}
html.reduced-motion .gates{display:none}
html.reduced-motion .scroll-cue .cue-line::after{animation:none}
html.reduced-motion .fade{transition-duration:.001ms}
html.reduced-motion .photo-band img,
html.reduced-motion .photo-duo img{transition:none}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}

/* Focus visibility */
:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* Selection */
::selection{background:rgba(201,169,110,.28);color:var(--charcoal)}

/* Skip link */
.skip{
  position:absolute;left:-9999px;top:0;z-index:200;
  background:var(--ivory);color:var(--ink);padding:.8rem 1.2rem;
  font-family:var(--sans);font-size:.8rem;letter-spacing:.1em;
}
.skip:focus{left:1rem;top:1rem}
