/* =====================================================================
   Sbusiso & Phindile · Umemulo, Umembeso noMkhehlo
   style.css · Tigerwalk Communications
   ---------------------------------------------------------------------
   Colours and fonts are the variables just below.
   Mobile first: the invitation is a single 460px column, centred on
   tablets and computers.
   ===================================================================== */

:root {
  /* Palette: nude, beige, warm brown, soft gold */
  --paper:      #F7F0E7;   /* beige page */
  --nude:       #EEE1D1;   /* nude panel (date section) */
  --mat:        #FCF8F2;   /* photo mat */
  --brown:      #7B5640;   /* warm brown, secondary text */
  --cocoa:      #4B3427;   /* deep brown, main text and dark panels */
  --cocoa-deep: #3A281E;   /* cover and footer */
  --cream:      #F4E9DB;   /* text on dark */
  --gold:       #C3A06A;   /* soft gold, lines and ornaments */
  --gold-light: #DCC293;   /* gold on dark */
  --gold-text:  #84612F;   /* gold for small text on light (passes contrast) */

  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  /* digits from Cormorant Infant (upright numerals), letters from Cormorant Garamond */
  --serif-num: 'Cormorant Infant', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --col:  460px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* Woven (ilala basket-weave) texture */
  --weave:       url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M0 3.5h14M0 7h14M0 10.5h14M14 17.5h14M14 21h14M14 24.5h14M17.5 0v14M21 0v14M24.5 0v14M3.5 14v14M7 14v14M10.5 14v14' stroke='%234B3427' stroke-opacity='.055' fill='none'/%3E%3C/svg%3E");
  --weave-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M0 3.5h14M0 7h14M0 10.5h14M14 17.5h14M14 21h14M14 24.5h14M17.5 0v14M21 0v14M24.5 0v14M3.5 14v14M7 14v14M10.5 14v14' stroke='%23F4E9DB' stroke-opacity='.045' fill='none'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--weave-light) var(--cocoa-deep);
  color: var(--cocoa);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
h1, h2, p, figure { margin: 0; }
h1, h2, p { text-wrap: balance; }
a { color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.invite {
  position: relative;
  background: var(--weave) var(--paper);
  overflow: hidden;
}

.section {
  position: relative;
  padding: 92px 30px;
  text-align: center;
}

/* ---------- Shared pieces ---------- */

/* Beadwork band */
.beads {
  height: 30px;
  background: url("../images/decor/beads.svg") center / auto 30px repeat-x;
}

/* Isicholo ornament with fine gold lines either side */
.ornament {
  display: block;
  width: 84px;
  height: 41px;
  margin: 0 auto 26px;
  color: var(--gold);
  overflow: visible;
}
.ornament--cover { color: var(--gold-light); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-text);
  padding-left: .32em;           /* balances the trailing letter-spacing */
}
.eyebrow--light { color: var(--gold-light); }

.dot {
  display: inline-block;
  width: 4px; height: 4px;
  margin: 0 .55em .2em;
  vertical-align: middle;
  background: var(--gold);
  transform: rotate(45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  color: var(--cocoa);
  font: 500 .74rem/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s, color .25s, border-color .25s, transform .15s;
}
.btn:hover { background: rgba(195, 160, 106, .14); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .music__btn:focus-visible, .sheet__close:focus-visible {
  outline: 2px solid var(--gold-text);
  outline-offset: 3px;
}
.btn--solid { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }
.btn--solid:hover { background: var(--cocoa-deep); }
.btn--gold { background: var(--gold-light); border-color: var(--gold-light); color: var(--cocoa-deep); }
.btn--gold:hover { background: #E7D2A9; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: .68rem; letter-spacing: .14em; width: 100%; }
.btn--block { width: 100%; }
.btn[aria-disabled="true"] { cursor: default; }   /* playlist link not added yet */

/* Photo frames: paper mat + fine gold outline */
.frame {
  position: relative;
  padding: 7px;
  background: var(--mat);
  border-radius: 6px;
  box-shadow: 0 22px 44px -24px rgba(58, 40, 30, .55);
}
.frame::before {
  content: '';
  position: absolute;
  inset: -9px;
  border: 1px solid var(--gold);
  border-radius: inherit;
  opacity: .75;
  pointer-events: none;
}
.frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  background: var(--nude);
}
/* Isicholo-inspired shallow dome top */
.frame--dome,
.frame--dome img { border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px; }


/* =====================================================================
   COVER
   ===================================================================== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;               /* very short screens (phone held sideways) can scroll to the button */
  overscroll-behavior: contain;
  background:
    radial-gradient(120% 70% at 50% 45%, rgba(220, 194, 147, .10), transparent 70%),
    var(--weave-light) var(--cocoa-deep);
  color: var(--cream);
  text-align: center;
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease);
}
.cover.is-open { transform: translateY(-100%); opacity: .4; pointer-events: none; }
.cover[hidden] { display: none; }
.no-js .cover { display: none; }

.cover__arch {
  position: relative;
  width: calc(100% - 60px);
  max-width: 420px;
  margin: auto;
  padding: 46px 22px 40px;
  border: 1px solid rgba(220, 194, 147, .45);
  border-radius: 50% 50% 10px 10px / 24% 24% 10px 10px;
}
.cover__arch::before {          /* second, finer outline */
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(220, 194, 147, .18);
  border-radius: inherit;
  pointer-events: none;
}
.cover .ornament { margin-bottom: 18px; }

.cover__event {
  margin-top: 14px;
  font: italic 500 1.2rem/1.3 var(--serif);
  color: var(--gold-light);
}
.cover__names {
  margin: 22px 0 18px;
  font: 500 clamp(3.1rem, 15.5vw, 4.1rem)/.92 var(--serif);
  letter-spacing: .01em;
}
.cover__names span { display: block; }
.cover__names .amp {
  margin: .12em 0;
  font-style: italic;
  font-size: .5em;
  color: var(--gold-light);
}
.cover__date {
  font: 400 .95rem var(--sans);
  letter-spacing: .38em;
  padding-left: .38em;
  color: var(--cream);
}
.cover__btn { margin-top: 30px; }

/* =====================================================================
   1 · HERO
   ===================================================================== */
/* Full screen, edge to edge. Phones and tablets: the photo on top, names and
   date below. Computers (see the 820px rule near the end): photo left half,
   names and date right half. */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--cocoa-deep);
}
.hero__panel {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #2A1D16;
}
/* The photo covers the top 78% and melts into deep brown below, so the faces
   always sit above the names, on tall and short phones alike. */
.hero__photo {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 84%;
  object-fit: cover;
  object-position: 50% 0%;
}
.js .hero__photo { transform: scale(1.07); transition: transform 3.2s var(--ease); }
.js .is-opened .hero__photo { transform: none; }

.hero__shade {                  /* keeps the text readable over the photo */
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(42, 29, 22, .30) 0%,
    rgba(42, 29, 22, 0)   12%,
    rgba(42, 29, 22, 0)   50%,
    rgba(42, 29, 22, .6)  62%,
    rgba(42, 29, 22, .9)  73%,
    rgb(42, 29, 22)       84%);
}
.hero__panel > .beads { position: absolute; left: 0; right: 0; top: 0; z-index: 3; }

/* Gold double arch (isicholo dome) framing the scene; draws downwards on open */
.hero__arch {
  position: absolute;
  z-index: 1;
  top: 64px; left: 16px; right: 16px; bottom: 0;
  border: 1px solid rgba(220, 194, 147, .8);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 180px 180px 0 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 90%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 90%);
  pointer-events: none;
}
.hero__arch::before {
  content: '';
  position: absolute;
  inset: 6px 6px 0;
  border: 1px solid rgba(220, 194, 147, .35);
  border-bottom: 0;
  border-radius: inherit;
}
.js .hero__arch { clip-path: inset(0 0 100% 0); transition: clip-path 2.4s var(--ease) .45s; }
.js .is-opened .hero__arch { clip-path: inset(0); }

.hero__content {
  position: absolute;
  z-index: 4;
  left: 0; right: 0; bottom: 0;
  padding: 0 28px calc(36px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--cream);
}

/* "Siyanimema" in burnished gold with a slow shine passing over it */
.headline {
  display: inline-block;
  padding: 0 .12em;               /* room for the italic overhang */
  font: italic 500 clamp(2.2rem, 10.5vw, 2.7rem)/1.08 var(--serif);
  letter-spacing: .005em;
  background: linear-gradient(100deg, #B8935A 0%, #DCC293 28%, #FFF2D2 40%, #DCC293 52%, #B8935A 100%) 0 0 / 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .45));
  animation: shine 7s ease-in-out 2s infinite;
}
@keyframes shine { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
.hero .eyebrow {
  margin-top: 10px;
  font-size: .64rem;
  letter-spacing: .24em;
  padding-left: .24em;
}
.hero .eyebrow .dot { margin: 0 .45em .2em; background: var(--gold-light); }

/* Names set on a diagonal: Sbusiso left, Phindile right, a gold & between
   and a large faint & behind them */
.names {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 330px);
  margin: 16px auto 0;
}
.names__ghost {
  position: absolute;
  left: 50%; top: 50%;
  z-index: -1;
  transform: translate(-50%, -52%);
  font: italic 400 10.5rem/1 var(--serif);
  color: rgba(220, 194, 147, .1);
  pointer-events: none;
  user-select: none;
}
.names__row { display: flex; flex-direction: column; }
.names__row--1 { align-self: flex-start; align-items: flex-start; }
.names__row--2 { align-self: flex-end;   align-items: flex-end; margin-top: 2px; }
.names__first {
  font: 500 clamp(2.7rem, 12.5vw, 3.2rem)/.95 var(--serif);
  color: var(--cream);
  letter-spacing: .005em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .3);
}
.names__last {
  margin-top: 6px;
  padding: 0 .1em;
  font: 400 .68rem var(--sans);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: rgba(244, 233, 219, .78);
}
.names__row--2 .names__last { margin-right: -.42em; }   /* trailing letter-spacing */
.names__amp {                    /* sits on Phindile's line: "& Phindile" */
  font-style: italic;
  font-weight: 400;
  font-size: .66em;
  color: var(--gold-light);
}
.js .names__row--1[data-reveal]:not(.is-visible) { transform: translateX(-28px); }
.js .names__row--2[data-reveal]:not(.is-visible) { transform: translateX(28px); }

/* Date between two fine gold rules, then day · time · place */
.hero__when {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.hero__when::before, .hero__when::after {
  content: '';
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light));
}
.hero__when::after { transform: scaleX(-1); }
.hero__date {
  font: 500 1.5rem var(--serif-num);
  letter-spacing: .14em;
  padding-left: .14em;
  color: var(--cream);
}
.hero__place {
  margin-top: 6px;
  font: 400 .6rem var(--sans);
  letter-spacing: .2em;
  padding-left: .2em;
  text-transform: uppercase;
  color: rgba(244, 233, 219, .72);
}

.scroll-cue {
  position: absolute;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 50%;
  width: 1px;
  height: 18px;
  background: linear-gradient(var(--gold-light), transparent);
  transform-origin: top;
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}


/* =====================================================================
   2 · MESSAGE
   ===================================================================== */
.message__opening {
  max-width: 17em;
  margin: 0 auto;
  font: italic 500 1.6rem/1.32 var(--serif);
  color: var(--cocoa);
}
.message__body {
  max-width: 30ch;
  margin: 20px auto 0;
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--brown);
}


/* =====================================================================
   3 · DATE & TIME
   ===================================================================== */
.when, .gifts {
  background: var(--weave) var(--nude);
}
.when::before, .when::after,
.gifts::before, .gifts::after {      /* fine gold rules top and bottom */
  content: '';
  position: absolute;
  left: max(30px, calc(50% - 320px));
  right: max(30px, calc(50% - 320px));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.when::before, .gifts::before { top: 14px; }
.when::after,  .gifts::after  { bottom: 14px; }

.date {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  max-width: 340px;
  margin: 30px auto 0;
}
.date__side {
  padding: 11px 0 10px;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  font: 500 .76rem var(--sans);
  letter-spacing: .26em;
  padding-left: .26em;
  text-transform: uppercase;
  color: var(--brown);
}
.date__day {
  font: 500 6.4rem/.8 var(--serif-num);
  color: var(--cocoa);
  letter-spacing: -.01em;
}
.date__year {
  margin-top: 16px;
  font: 400 1rem var(--sans);
  letter-spacing: .62em;
  padding-left: .62em;
  color: var(--cocoa);
}
.time {
  margin: 22px 0 32px;
  font: italic 500 1.5rem var(--serif-num);
  color: var(--brown);
}

/* Month calendar card (drawn by script.js) */
.month {
  max-width: 340px;
  margin: 0 auto 34px;
  overflow: hidden;
  border: 1px solid rgba(195, 160, 106, .55);
  border-radius: 20px;
  background: rgba(252, 248, 242, .82);
  box-shadow: 0 22px 40px -30px rgba(58, 40, 30, .55);
}
.month__beads { height: 22px; background-size: auto 22px; }
.month__body { padding: 18px 16px 20px; }
.month__fallback { font: italic 500 1.2rem var(--serif-num); color: var(--cocoa); }
.month__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.month__caption { padding-bottom: 14px; }
.month__name { display: block; font: italic 500 2rem/1 var(--serif); color: var(--cocoa); }
.month__year {
  display: block;
  margin-top: 6px;
  font: 500 .68rem var(--sans);
  letter-spacing: .42em;
  padding-left: .42em;
  color: var(--gold-text);
}
.month__table th {
  padding: 0 0 10px;
  font: 500 .6rem var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.month__table td {
  position: relative;
  height: 40px;
  padding: 0;
  text-align: center;
  font: 500 1.05rem var(--serif-num);
  color: var(--cocoa);
}
.month__table .is-sun { color: var(--brown); }
.month__table th.is-sun { color: var(--gold-text); }
.month__table td.is-empty { color: transparent; }
.month__marked .month__date { position: relative; z-index: 1; font-weight: 600; font-size: 1.2rem; }
/* hand-drawn gold loop around the day */
.month__loop {
  position: absolute;
  left: 50%; top: 50%;
  width: 46px; height: 46px;
  transform: translate(-50%, -50%) rotate(-8deg);
  overflow: visible;
  pointer-events: none;
}
.month__loop path {
  fill: none;
  stroke: #B8935A;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s var(--ease) .7s;
}
.month.is-visible .month__loop path, .no-js .month__loop path { stroke-dashoffset: 0; }
.month__charm {
  position: absolute;
  right: -2px; top: -6px;
  width: 15px; height: 8px;
  color: var(--gold-text);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* =====================================================================
   4 · PHOTOS
   ===================================================================== */
.gallery {
  padding: 92px 30px 120px;
  text-align: center;
}
.gallery__inner { max-width: 720px; margin: 0 auto; }
.gallery__title {
  margin: 14px 0 46px;
  font: italic 500 2rem/1.1 var(--serif);
  color: var(--cocoa);
}

/* Opening pair: two frames overlapping */
.gallery__pair {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  padding-bottom: calc(22% + 6px);   /* room for frame b, which hangs lower */
}
.frame--a { grid-column: 1 / span 8; grid-row: 1; }
.frame--a img { aspect-ratio: 3 / 4; object-position: 50% 0%; }
.frame--b {
  grid-column: 6 / span 7;
  grid-row: 1;
  z-index: 2;
  transform: translateY(30%);
}
.frame--b img { aspect-ratio: 4 / 5; object-position: 50% 55%; }
.js .frame--b[data-reveal] { transform: translateY(calc(30% + 16px)); }
.js .frame--b[data-reveal].is-visible { transform: translateY(30%); }

/* Then two staggered columns */
.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 44px;
}
.gallery__col { display: grid; gap: 28px; }
.gallery__col--offset { padding-top: 56px; }

.frame--sm { padding: 5px; }
.frame--sm::before { inset: -7px; }
.frame--sm img { aspect-ratio: var(--ar, 4 / 5); object-position: var(--pos, 50% 50%); }

/* Photos open full screen when tapped */
a.frame { display: block; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
a.frame:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 12px; }


/* =====================================================================
   5 · VENUE
   ===================================================================== */
.where { padding-top: 40px; }
.venue {
  margin-top: 16px;
  font: 500 clamp(2.8rem, 13vw, 3.3rem)/1 var(--serif);
  color: var(--cocoa);
}
.venue__area {
  margin: 12px 0 32px;
  font: 400 .8rem var(--sans);
  letter-spacing: .24em;
  padding-left: .24em;
  text-transform: uppercase;
  color: var(--brown);
}


/* =====================================================================
   6 · RSVP
   ===================================================================== */
.rsvp { padding-top: 40px; }
.rsvp__title {
  max-width: 15ch;
  margin: 14px auto 0;
  font: 500 2rem/1.15 var(--serif);
  color: var(--cocoa);
}
.rsvp__deadline {
  display: inline-block;
  margin-top: 20px;
  padding: 9px 18px;
  border: 1px solid rgba(195, 160, 106, .6);
  border-radius: 999px;
  font-size: .84rem;
  color: var(--brown);
}
.rsvp__deadline strong { font-weight: 500; color: var(--cocoa); }

.contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 520px;
  margin: 34px auto 0;
}
.contact {
  padding: 24px 12px 14px;
  border: 1px solid rgba(195, 160, 106, .45);
  border-radius: 18px;
  background: rgba(252, 248, 242, .7);
}
.contact__name {
  font: italic 500 1.75rem/1 var(--serif);
  color: var(--cocoa);
}
.contact__phone {
  margin: 8px 0 18px;
  font-size: .86rem;
  letter-spacing: .04em;
  color: var(--brown);
  white-space: nowrap;
}
.contact__actions { display: grid; gap: 8px; }

/* RSVP form */
.rsvp-form {
  max-width: 520px;
  margin: 34px auto 0;
  padding: 30px 20px 22px;
  border: 1px solid rgba(195, 160, 106, .45);
  border-radius: 22px;
  background: rgba(252, 248, 242, .75);
  box-shadow: 0 24px 44px -32px rgba(58, 40, 30, .5);
  text-align: left;
}
.rsvp-form__hint {
  margin-bottom: 24px;
  text-align: center;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--brown);
}
.field { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.field__label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font: 500 .7rem var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.field__hint { font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--brown); }
.input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid rgba(195, 160, 106, .7);
  border-radius: 14px;
  background: #FFFCF8;
  color: var(--cocoa);
  font: 400 1rem/1.4 var(--sans);       /* 16px stops iPhones zooming in */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--gold-text); box-shadow: 0 0 0 3px rgba(195, 160, 106, .28); }
.input[aria-invalid="true"] { border-color: #A3412C; }
textarea.input { min-height: 96px; resize: vertical; }
select.input {
  padding-right: 44px;
  background: #FFFCF8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2384612F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center;
  cursor: pointer;
}
.field.is-disabled { opacity: .45; }

/* Yes / No as two large buttons */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(195, 160, 106, .7);
  border-radius: 14px;
  background: #FFFCF8;
  font: 500 .88rem/1.25 var(--sans);
  text-align: center;
  color: var(--cocoa);
  transition: background-color .2s, color .2s, border-color .2s;
}
.choice input:checked + span { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }
.choice input:focus-visible + span { outline: 2px solid var(--gold-text); outline-offset: 2px; }

.field__error { margin-top: 7px; font-size: .82rem; color: #A3412C; }
.form-alert {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(163, 65, 44, .08);
  font-size: .86rem;
  text-align: center;
  color: #8E3A27;
}
.rsvp-send__label {
  margin: 26px 0 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(195, 160, 106, .35);
  font: 500 .7rem var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold-text);
}
.rsvp-form .contacts { margin-top: 0; }
.rsvp-form .contact { background: #FFFCF8; text-align: center; }
.rsvp-status {
  margin-top: 16px;
  font-size: .9rem;
  line-height: 1.5;
  text-align: center;
  color: var(--cocoa);
}
.rsvp-status:empty { display: none; }


/* =====================================================================
   6b · GIFTS
   ===================================================================== */
.gifts { padding-top: 84px; padding-bottom: 84px; }
.gifts__icon {
  display: block;
  width: 54px; height: 54px;
  margin: 0 auto 18px;
  color: var(--gold-text);
}
.gifts__title {
  margin-top: 14px;
  font: italic 500 2.15rem/1.1 var(--serif);
  color: var(--cocoa);
}
.gifts__text {
  max-width: 36ch;
  margin: 16px auto 0;
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--brown);
}
.gifts__details {
  display: inline-block;
  margin-top: 26px;
  padding: 18px 26px;
  border: 1px solid rgba(195, 160, 106, .55);
  border-radius: 16px;
  background: rgba(252, 248, 242, .6);
  font-size: .92rem;
  line-height: 1.7;
  color: var(--cocoa);
}
.gifts__details[hidden] { display: none; }


/* =====================================================================
   7 · SONG REQUEST + FOOTER (dark)
   ===================================================================== */
.song {
  background: var(--weave-light) var(--cocoa);
  color: var(--cream);
}
.song__icon {
  display: block;
  width: 30px; height: 30px;
  margin: 0 auto 16px;
  color: var(--gold-light);
}
.song__title {
  max-width: 11em;
  margin: 14px auto 0;
  font: italic 500 2rem/1.15 var(--serif);
}
.song__text {
  max-width: 28ch;
  margin: 14px auto 30px;
  font-weight: 300;
  color: rgba(244, 233, 219, .8);
}

.footer {
  padding: 70px 0 calc(100px + env(safe-area-inset-bottom));
  background: var(--weave-light) var(--cocoa-deep);
  color: var(--cream);
  text-align: center;
}
.footer .ornament { margin-bottom: 20px; }
.footer__thanks {
  font: italic 500 2.7rem/1 var(--serif);
  color: var(--gold-light);
}
.footer__families {
  margin: 14px 0 40px;
  font: 400 .76rem var(--sans);
  letter-spacing: .3em;
  padding-left: .3em;
  text-transform: uppercase;
}
.footer__families .dot { background: var(--gold-light); }
.footer__credit {
  margin-top: 30px;
  padding: 0 24px;
  font-size: .7rem;
  letter-spacing: .06em;
  color: rgba(244, 233, 219, .55);
}
.footer__credit a { color: rgba(244, 233, 219, .8); text-underline-offset: 3px; }


/* =====================================================================
   MUSIC BUTTON
   ===================================================================== */
.music {
  position: fixed;
  z-index: 60;
  bottom: calc(18px + env(safe-area-inset-bottom));
  right: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity .6s var(--ease) .8s, visibility 0s linear .8s;
}
/* No song on the intro: the record appears once the invitation is opened */
body:not(.is-opened) .music { opacity: 0; visibility: hidden; transition: none; }
/* The button is a little record: the song cover (couple photo) spins while the
   song plays, inside a ring of beads that fills with gold as the song goes on. */
.music__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2A1D16;
  color: var(--cream);
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.music__btn > * { grid-area: 1 / 1; position: relative; }   /* stacked: disc, rings, icon on top */
.music__disc { z-index: 1; }
.music__ring { z-index: 2; width: 100%; height: 100%; overflow: visible; }
.music__icon { z-index: 3; }
.music__ring circle { fill: none; }
.music__track { stroke: rgba(220, 194, 147, .25); stroke-width: 1; }
.music__beads {
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 0 3.125;     /* 32 round beads around the ring */
}
.music__beads--base { stroke: rgba(244, 233, 219, .55); }
.music__beads--gold { stroke: #E3C98F; }
.music__ring--gold {
  /* only the played part of the ring shows gold (--p is 0–100, set by script.js) */
  -webkit-mask-image: conic-gradient(#000 calc(var(--p, 0) * 1%), transparent 0);
  mask-image: conic-gradient(#000 calc(var(--p, 0) * 1%), transparent 0);
}
.music__disc {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brown);
  box-shadow: 0 0 0 1px rgba(220, 194, 147, .6), inset 0 0 0 1px rgba(0, 0, 0, .2);
  animation: spin 14s linear infinite;
  animation-play-state: paused;
}
.music__disc img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.72); transition: filter .4s; }
.music.is-playing .music__disc { animation-play-state: running; }
.music.is-playing .music__disc img { filter: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* play / pause mark in a small dark centre, like a record label */
.music__icon {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(42, 29, 22, .78);
  box-shadow: 0 0 0 1px rgba(220, 194, 147, .55);
}
.music__icon .icon { width: 12px; height: 12px; grid-area: 1 / 1; }
.music__play { margin-left: 1px; }
.music__pause { display: none; }
.music.is-playing .music__play  { display: none; }
.music.is-playing .music__pause { display: block; }

.music__label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 16px;
  border-radius: 14px;
  background: rgba(42, 29, 22, .9);
  color: var(--cream);
  font-size: .68rem;
  line-height: 1.3;
  letter-spacing: .04em;
  white-space: nowrap;
  text-align: right;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .5s, transform .5s var(--ease);
  pointer-events: none;
}
.music__label strong { font: italic 500 .95rem/1.15 var(--serif); letter-spacing: 0; color: var(--gold-light); }
.music.show-label .music__label { opacity: 1; transform: none; }


/* =====================================================================
   ADD-TO-CALENDAR SHEET
   ===================================================================== */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(30, 20, 14, .55);
  animation: fade .25s ease;
}
.sheet[hidden] { display: none; }
.sheet__panel {
  width: 100%;
  max-width: var(--col);
  display: grid;
  gap: 10px;
  padding: 28px 24px calc(18px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--weave) var(--paper);
  text-align: center;
  animation: rise .35s var(--ease);
}
.sheet__title {
  margin-bottom: 10px;
  font: italic 500 1.7rem var(--serif);
  color: var(--cocoa);
}
.sheet__close {
  margin-top: 4px;
  min-height: 46px;
  border: 0;
  background: none;
  color: var(--brown);
  font: 500 .74rem var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } }


/* =====================================================================
   PHOTO VIEWER (tap a gallery photo)
   ===================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 18, 13, .95);
  animation: fade .25s ease;
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: min(90vw, 620px);
  max-height: 80vh;
  max-height: 80svh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 5px solid var(--mat);
  border-radius: 4px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  padding: 0;
  border: 1px solid rgba(220, 194, 147, .6);
  border-radius: 50%;
  background: rgba(58, 40, 30, .7);
  color: var(--cream);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lightbox__btn .icon { width: 20px; height: 20px; }
.lightbox__btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.lightbox__close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lightbox__prev  { left: 10px;  top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__count {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 0; right: 0;
  text-align: center;
  font: 400 .74rem var(--sans);
  letter-spacing: .3em;
  color: rgba(244, 233, 219, .7);
}


/* =====================================================================
   SCROLL REVEAL (only when JavaScript runs)
   ===================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transition: none; opacity: 1; transform: none; }
  .js .frame--b[data-reveal] { transform: translateY(30%); }
  .cover { transition: opacity .4s; }
  .cover.is-open { transform: none; opacity: 0; }
  .scroll-cue, .music__disc { animation: none; }
  .sheet, .sheet__panel, .lightbox { animation: none; }
  .js .hero__photo { transform: none; transition: none; }
  .headline { animation: none; }
  .js .hero__arch { clip-path: none; transition: none; }
  .month__loop path { stroke-dashoffset: 0; transition: none; }
}

/* Shorter phones (and WhatsApp's in-app browser): the names start higher up the
   photo, so the dark fade starts higher too */
@media (max-height: 760px) {
  .hero__shade {
    background: linear-gradient(180deg,
      rgba(42, 29, 22, .30) 0%,
      rgba(42, 29, 22, 0)   12%,
      rgba(42, 29, 22, 0)   40%,
      rgba(42, 29, 22, .7)  53%,
      rgba(42, 29, 22, .94) 65%,
      rgb(42, 29, 22)       78%);
  }
}

/* Short screens (small phones, landscape): tighten the hero text */
@media (max-height: 640px) {
  .cover > .beads { flex: none; }
  .cover__arch { margin: 18px auto; padding: 26px 20px 24px; }
  .cover .ornament { width: 64px; height: 31px; margin-bottom: 10px; }
  .cover__event { margin-top: 8px; font-size: 1.05rem; }
  .cover__names { margin: 12px 0 10px; font-size: 2.6rem; }
  .cover__btn { margin-top: 18px; }
  .hero__content { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }   /* clears the music button */
  .headline { font-size: 1.95rem; }
  .names { margin-top: 10px; width: min(100%, 270px); }
  .names__first { font-size: 2.3rem; }
  .names__last { margin-top: 3px; font-size: .6rem; }
  .names__ghost { font-size: 7rem; }
  .hero__when { margin-top: 10px; }
  .hero__date { font-size: 1.2rem; }
  .hero__place { margin-top: 4px; font-size: .56rem; letter-spacing: .18em; padding-left: .18em; }
  .scroll-cue { height: 14px; bottom: 6px; }
}

/* Narrow phones: keep the hero event line on one line */
@media (max-width: 360px) {
  .hero .eyebrow { font-size: .58rem; letter-spacing: .16em; padding-left: .16em; }
  .hero .eyebrow .dot { margin: 0 .35em .2em; }
}

/* =====================================================================
   WIDE SCREENS: the page fills the whole window, no side bands
   ===================================================================== */

/* Landscape screens (computers, tablets and phones held sideways):
   photo on the left half, names and date on the right half */
@media (orientation: landscape) and (min-width: 640px) {
  .hero__panel { background: var(--weave-light) #2A1D16; }
  .hero__photo { width: 50%; height: 100%; object-position: 50% 25%; }
  .hero__shade {
    right: 50%;
    background:
      linear-gradient(90deg, rgba(42, 29, 22, 0) 72%, #2A1D16 100%),
      linear-gradient(180deg, rgba(42, 29, 22, .3) 0%, rgba(42, 29, 22, 0) 12%);
  }
  .hero__content {
    top: 0;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
  }
  .hero__arch {
    top: 70px; bottom: 0;
    left: calc(50% + 34px); right: 34px;
    border-radius: 50% 50% 0 0 / 220px 220px 0 0;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 98%);
    mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 98%);
  }
  .headline { font-size: clamp(2.2rem, min(4.2vw, 7vh), 3.6rem); }
  .hero .eyebrow { margin-top: 14px; font-size: clamp(.62rem, 1.1vw, .78rem); letter-spacing: .24em; padding-left: .24em; white-space: nowrap; }
  .names { width: min(100%, clamp(280px, 30vw, 480px)); margin-top: clamp(16px, 4vh, 38px); }
  .names__first { font-size: clamp(2.6rem, min(5.2vw, 9vh), 5.2rem); }
  .names__last { margin-top: 10px; font-size: .8rem; }
  .names__ghost { font-size: clamp(8rem, 30vh, 17rem); }
  .hero__when { margin-top: clamp(18px, 4.4vh, 40px); }
  .hero__when::before, .hero__when::after { width: 64px; }
  .hero__date { font-size: clamp(1.3rem, 3.4vh, 2rem); }
  .hero__place { margin-top: 10px; font-size: clamp(.62rem, 1vw, .76rem); }
  .scroll-cue { left: 75%; }
}

/* Wider than a phone: roomier sections, three-column gallery */
@media (min-width: 820px) {
  .section { padding: 120px 40px; }
  .where, .rsvp { padding-top: 64px; }      /* these follow a section that already ends with space */
  .message__opening { font-size: 2rem; }
  .message__body { font-size: 1.1rem; }

  .gallery { padding: 120px 40px 90px; }
  .gallery__inner { max-width: 620px; }
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 34px 30px;
    padding-bottom: 60px;
    /* the grid spreads wider than the pair above it */
    margin-left:  calc((100% - min(980px, 100vw - 80px)) / 2);
    margin-right: calc((100% - min(980px, 100vw - 80px)) / 2);
  }
  .gallery__col { display: contents; }
  .gallery__col > a:nth-child(2) { translate: 0 60px; }   /* middle column sits lower */
  .frame--sm img { aspect-ratio: 3 / 4; }
}

/* Very small phones */
@media (max-width: 350px) {
  .section { padding-left: 20px; padding-right: 20px; }
  .contacts { grid-template-columns: 1fr; }
  .date { gap: 12px; }
  .date__side { letter-spacing: .18em; }
}
