/* ==========================================================================
   Philani & Siwelile · Digital Wedding Invitation
   style.css · mobile-first (colour and font tokens in :root)
   ========================================================================== */

:root {
  --ivory: #FFFDF9;
  --paper: #FFFFFF;
  --lilac: #C8A2C8;
  --lilac-ink: #9A78AE;      /* lilac dark enough for large text */
  --lilac-wash: #F4ECF7;
  --lavender: #7E5A9B;
  --lavender-deep: #5F4279;
  --sage: #9CAF88;
  --ink: #3F3549;
  --muted: #6A5F75;
  --error: #B4435A;
  --line: rgba(126, 90, 155, .16);
  --line-strong: rgba(126, 90, 155, .32);
  --shadow: 0 18px 40px -24px rgba(78, 52, 104, .38), 0 4px 12px -6px rgba(78, 52, 104, .10);
  --shadow-sm: 0 10px 24px -18px rgba(78, 52, 104, .40), 0 2px 6px -3px rgba(78, 52, 104, .08);
  --script: 'Great Vibes', 'Snell Roundhand', cursive;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: #F3ECF6; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 700px at 0% 0%, #EFE3F5 0%, transparent 60%),
    radial-gradient(900px 700px at 100% 100%, #EAF0E4 0%, transparent 55%),
    #F3ECF6;
}
html.js body:not(.is-open) { overflow: hidden; }
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: inherit; }
svg { display: block; }
button { font: inherit; color: inherit; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Page card ---------- */
.invite { position: relative; max-width: 480px; margin: 0 auto; background: var(--ivory); overflow: hidden; }
@media (min-width: 520px) {
  body { padding: 40px 0; }
  .invite { border-radius: 28px; box-shadow: 0 40px 90px -40px rgba(78, 52, 104, .45), 0 0 0 1px rgba(126, 90, 155, .08); }
}

/* ---------- Florals ---------- */
.floral { position: absolute; z-index: 0; width: min(52%, 250px); height: auto; aspect-ratio: 1; pointer-events: none; animation: sway 11s ease-in-out infinite; }
.floral--tl { top: -8px; left: -8px; transform-origin: 0 0; }
.floral--tr { top: -8px; right: -8px; transform-origin: 100% 0; animation-name: sway-r; animation-delay: -4s; }
.floral--bl { bottom: -8px; left: -8px; transform-origin: 0 100%; animation-name: sway-r; animation-delay: -2s; }
.floral--br { bottom: -8px; right: -8px; transform-origin: 100% 100%; animation-delay: -6s; }
@keyframes sway   { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1.4deg); } }
@keyframes sway-r { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1.4deg); } }
.divider { width: 132px; height: 22px; margin: 14px auto 0; }

/* ---------- Opening envelope ---------- */
.opening {
  position: fixed; inset: 0; z-index: 100;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(22px, 5vh, 40px);
  padding: 32px 20px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #FFFFFF 0%, #FBF7FC 45%, #F1E7F6 100%);
}
html.js .opening { display: flex; }
.opening[hidden] { display: none !important; }
.opening .floral { width: min(44vw, 230px); }
.opening-head { position: relative; z-index: 1; transition: opacity .6s .8s; }
.opening-names {
  margin-top: 6px;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(44px, 12.5vw, 60px); line-height: 1.1;
  color: var(--lavender);
}
.opening-names .amp { font-family: var(--serif); font-style: italic; font-size: .6em; color: var(--lilac-ink); }
.opening-hint {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  font-size: 10.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  transition: opacity .3s;
}
.opening-hint::before, .opening-hint::after { content: ""; width: 24px; height: 1px; background: var(--lilac); }

.envelope {
  --w: min(80vw, 340px, 56vh);
  position: relative; z-index: 1;
  width: var(--w); height: calc(var(--w) * .68);
  perspective: 1000px;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0 28px 50px -24px rgba(78, 52, 104, .5), 0 6px 14px -6px rgba(78, 52, 104, .18);
  -webkit-tap-highlight-color: transparent;
}
.env-back {
  position: absolute; inset: 0; border-radius: 10px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .55) 1.1px, transparent 1.6px) 0 0 / 11px 11px,
    linear-gradient(180deg, #DCC8E6, #E7D9EE);
}
.env-letter {
  position: absolute; left: 6%; right: 6%; top: 7%; height: 86%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; padding-top: 9%; gap: 4px;
  background: var(--ivory); border-radius: 6px;
  box-shadow: 0 2px 10px rgba(78, 52, 104, .12);
}
.env-letter::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(200, 162, 200, .55); border-radius: 3px; }
.letter-mono { font-family: var(--script); font-size: calc(var(--w) * .13); line-height: 1.1; color: var(--lavender); }
.letter-date { font-size: 9px; letter-spacing: .3em; color: var(--muted); }
.env-front {
  position: absolute; inset: 0; z-index: 3; border-radius: 10px; overflow: hidden;
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(0deg, #F6EFF9, #FAF6FC);
}
.env-front::before, .env-front::after { content: ""; position: absolute; inset: 0; }
.env-front::before { clip-path: polygon(0 0, 50% 56%, 0 100%); background: linear-gradient(100deg, #EEE3F4, #F2E9F6); }
.env-front::after  { clip-path: polygon(100% 0, 100% 100%, 50% 56%); background: linear-gradient(260deg, #ECE0F2, #F0E6F5); }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 4;
  transform-origin: 50% 0;
  filter: drop-shadow(0 4px 5px rgba(78, 52, 104, .16));
}
.env-flap::before {
  content: ""; position: absolute; inset: 0; border-radius: 10px 10px 0 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #EBDFF2, #E2D2EC);
}
.seal {
  position: absolute; left: 50%; top: 57%; z-index: 5;
  width: calc(var(--w) * .28); height: calc(var(--w) * .28);
  padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 6px 8px rgba(60, 30, 90, .35));
}
.seal svg { width: 100%; height: 100%; }
.seal-text {
  position: absolute; inset: 0; display: grid; place-items: center; padding-top: .12em;
  font-family: var(--script); font-size: calc(var(--w) * .072); line-height: 1; white-space: nowrap;
  color: #F6EEFA;
  text-shadow: 0 -1px 0 rgba(40, 15, 60, .5), 0 1px 0 rgba(255, 255, 255, .25);
}
.seal::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 1.5px solid rgba(126, 90, 155, .45);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }

/* opening sequence: seal lifts → flap opens → letter rises → screen fades */
.opening.is-opening { animation: fade-away .8s 1.9s ease forwards; }
.opening.is-opening .seal { pointer-events: none; animation: seal-out .6s cubic-bezier(.5, 0, .75, 0) forwards; }
.opening.is-opening .seal::after { animation: none; opacity: 0; }
.opening.is-opening .env-flap { animation: flap-open .9s .4s cubic-bezier(.45, 0, .2, 1) forwards; }
.opening.is-opening .env-letter { animation: letter-up 1s 1.05s var(--ease) forwards; }
.opening.is-opening .envelope { animation: env-lift .8s 1.9s ease forwards; }
.opening.is-opening .opening-hint,
.opening.is-opening .opening-head { opacity: 0; }
@keyframes seal-out {
  35%  { transform: translate(-50%, -50%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(.4) rotate(-25deg); opacity: 0; }
}
@keyframes flap-open {
  0%   { transform: rotateX(0); z-index: 4; }
  49%  { z-index: 4; }
  50%  { z-index: 1; }
  100% { transform: rotateX(180deg); z-index: 1; }
}
@keyframes letter-up { to { transform: translateY(-52%); } }
@keyframes env-lift  { to { transform: translateY(-18px) scale(1.03); } }
@keyframes fade-away { to { opacity: 0; visibility: hidden; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 128px 28px 64px;
  text-align: center;
  background: radial-gradient(90% 55% at 50% 0%, #F5ECF8 0%, rgba(245, 236, 248, 0) 70%);
}
@media (min-width: 520px) { .hero { min-height: 860px; } }
.hero-inner { position: relative; z-index: 1; }
.hosts {
  max-width: 260px; margin: 0 auto 20px;
  font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--muted);
}
.names { display: flex; flex-direction: column; align-items: center; font-weight: 400; line-height: 1; }
.name { display: flex; flex-direction: column; align-items: center; }
.name > span { font-family: var(--script); font-size: clamp(60px, 18vw, 80px); line-height: 1.05; color: var(--lavender); }
.name small {
  margin-top: 2px; padding-left: .42em;
  font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .42em; text-transform: uppercase;
  color: var(--muted);
}
.names .amp { margin: 10px 0 4px; font-family: var(--serif); font-style: italic; font-size: 40px; color: var(--lilac-ink); }
.invite-line { margin-top: 20px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }
.date-block { display: inline-flex; flex-direction: column; align-items: center; margin-top: 14px; color: var(--lavender-deep); }
.date-block .month, .date-block .year { padding-left: .42em; font-size: 11px; font-weight: 500; letter-spacing: .42em; text-transform: uppercase; }
.date-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 6px 0; }
.date-row span {
  min-width: 88px; padding: 7px 0 7px .24em;
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
  font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
}
.date-row strong { font-family: var(--serif); font-size: 60px; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.city { margin-top: 22px; padding-left: .42em; font-size: 11px; font-weight: 600; letter-spacing: .42em; text-transform: uppercase; color: var(--lavender); }
.scroll-cue {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-top: 30px; border-radius: 50%;
  color: var(--lavender);
}
.scroll-cue .icon { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }

/* hero entrance after the envelope opens */
html.js .rise { opacity: 0; }
html.js body.is-open .rise { animation: rise 1.2s var(--ease) both; animation-delay: calc(var(--i, 0) * 130ms + 150ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
html.js .hero .floral { opacity: 0; }
html.js body.is-open .hero .floral--tl { animation: bloom 1.8s var(--ease) both, sway 11s 1.8s ease-in-out infinite; }
html.js body.is-open .hero .floral--tr { animation: bloom 1.8s .1s var(--ease) both, sway-r 11s 1.9s ease-in-out infinite; }
@keyframes bloom { from { opacity: 0; transform: scale(.86) rotate(-2deg); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: 72px 24px; text-align: center; }
.section--tint { background: linear-gradient(180deg, rgba(246, 239, 249, 0) 0%, #F6EFF9 16%, #F6EFF9 84%, rgba(246, 239, 249, 0) 100%); }
.sec-head { margin-bottom: 30px; }
.eyebrow {
  display: block; padding-left: .34em;
  font-size: 10.5px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--lavender);
}
.title { margin-top: 10px; font-family: var(--serif); font-size: clamp(32px, 9vw, 38px); font-weight: 500; line-height: 1.1; color: var(--lavender-deep); }
.sub { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--muted); }
.lead { font-size: 14.5px; color: var(--muted); }
.fine { margin-top: 16px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 30px 20px 28px;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow);
}
.card::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(200, 162, 200, .22); border-radius: 17px; pointer-events: none; }
.card-icon {
  display: grid; place-items: center;
  width: 50px; height: 50px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--lilac-wash); color: var(--lavender);
}
.card-label { font-size: 10.5px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--lavender); padding-left: .3em; }
.card h3 { margin-top: 6px; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; color: var(--lavender-deep); }
.card .time { margin: 2px 0 8px; font-family: var(--serif); font-size: 40px; font-weight: 500; line-height: 1.1; color: var(--lavender); font-variant-numeric: lining-nums; }
:where(.card) p { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.card--compact { padding: 26px 12px 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: grid; gap: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px;
  border: 1px solid var(--lavender); border-radius: 999px;
  font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  transition: background-color .25s, color .25s, box-shadow .25s, transform .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--lavender); color: #fff; box-shadow: 0 12px 24px -12px rgba(94, 64, 120, .6); }
.btn-primary:hover { background: var(--lavender-deep); }
.btn-ghost { background: var(--paper); color: var(--lavender-deep); }
.btn-ghost:hover { background: var(--lilac-wash); }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { background: transparent; color: var(--muted); border: 1px dashed var(--lilac); box-shadow: none; cursor: default; }
.btn-row { display: grid; gap: 12px; margin-top: 24px; }
.btn-row[hidden] { display: none; }
.text-link {
  display: inline-block; margin-top: 14px; padding: 6px 4px;
  font-size: 12.5px; color: var(--lavender); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px;
}

/* ---------- Countdown ---------- */
.clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.unit { padding: 16px 2px 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.unit b {
  display: block;
  font-family: var(--serif); font-size: clamp(30px, 9vw, 40px); font-weight: 500; line-height: 1;
  color: var(--lavender-deep); font-variant-numeric: lining-nums tabular-nums;
}
.unit span { display: block; margin-top: 8px; font-size: 9px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.clock-done { font-family: var(--serif); font-size: 26px; font-style: italic; color: var(--lavender-deep); }
.calendar-actions { margin-top: 28px; }

/* ---------- Month calendar ---------- */
.month-card { margin-top: 28px; padding: 26px 14px 20px; }
.month-name { font-family: var(--script); font-size: 46px; line-height: 1.05; color: var(--lavender); }
.month-year {
  display: block; margin-top: 2px; padding-left: .42em;
  font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .42em; color: var(--muted);
}
.month-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.cal-dow { padding: 0 0 10px .12em; font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--lavender); }
.cal-day {
  position: relative; display: grid; place-items: center; height: 40px;
  font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--ink); font-variant-numeric: lining-nums;
}
.cal-day.is-wedding { z-index: 1; color: #fff; font-weight: 600; }
.cal-day b { position: relative; font-weight: inherit; padding-bottom: 2px; }
.cal-heart {
  position: absolute; inset: 0; margin: auto; width: 44px; height: 44px;
  fill: var(--lavender);
  filter: drop-shadow(0 4px 6px rgba(94, 64, 120, .35));
  animation: beat 2.4s ease-in-out infinite;
}

/* ---------- Dress code ---------- */
.dress-title { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.1; color: var(--lavender-deep); }
.dress-note { margin-top: 4px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--muted); }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.swatch i {
  width: 46px; height: 46px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line), 0 8px 16px -8px rgba(94, 64, 120, .5);
}

/* ---------- Guest information ---------- */
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0; list-style: none; }
.note { padding: 22px 12px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.note .card-icon { width: 44px; height: 44px; margin-bottom: 12px; }
.note .icon { width: 22px; height: 22px; }
.note strong { display: block; font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.2; color: var(--lavender-deep); }
.note span:last-child { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---------- RSVP ---------- */
.deadline { margin: 6px 0 4px; font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.15; color: var(--lavender-deep); }
.rsvp-to { font-size: 13.5px; color: var(--muted); }
.rsvp-to strong { font-weight: 600; color: var(--ink); }

/* RSVP form */
.rsvp-form { display: grid; gap: 20px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); text-align: left; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field[hidden] { display: none; }
.field-label {
  display: block; margin-bottom: 8px; padding: 0 0 0 2px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--lavender);
}
.field-optional { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.field-input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--ivory);
  font: 16px/1.4 var(--sans); color: var(--ink);   /* 16px stops iOS zooming into fields */
  transition: border-color .25s, box-shadow .25s;
}
textarea.field-input { min-height: 96px; resize: vertical; }
.field-input::placeholder { color: var(--muted); opacity: .7; }
.field-input:focus { outline: none; border-color: var(--lavender); box-shadow: 0 0 0 3px rgba(126, 90, 155, .18); }
.field-input[aria-invalid="true"], .field[aria-invalid="true"] .choice { border-color: var(--error); }
.field-hint { margin-top: 6px; padding-left: 2px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.field-error { margin-top: 6px; padding-left: 2px; font-size: 12.5px; font-weight: 500; line-height: 1.5; color: var(--error); }
.field-error:empty { display: none; }

.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 16px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--ivory);
  font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.2; color: var(--lavender-deep);
  cursor: pointer;
  transition: border-color .25s, background-color .25s;
  -webkit-tap-highlight-color: transparent;
}
.choice:hover { border-color: var(--lavender); }
.choice:has(input:checked) { border-color: var(--lavender); background: var(--lilac-wash); }
.choice input {
  display: grid; place-content: center; flex: none;
  width: 22px; height: 22px; margin: 0;
  border: 1.5px solid var(--lavender); border-radius: 50%;
  background: var(--paper);
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.choice input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lavender); transform: scale(0); transition: transform .2s var(--ease); }
.choice input:checked::before { transform: scale(1); }

.stepper { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; }
.stepper-btn {
  padding: 0; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--paper);
  font-size: 22px; line-height: 1; color: var(--lavender);
  cursor: pointer;
  transition: background-color .25s, border-color .25s;
  -webkit-tap-highlight-color: transparent;
}
.stepper-btn:hover { border-color: var(--lavender); background: var(--lilac-wash); }
.stepper-input { text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.stepper-input::-webkit-outer-spin-button, .stepper-input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

.rsvp-note { text-align: center; }
.rsvp-status { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; text-align: center; color: var(--lavender-deep); }
.rsvp-status:empty { display: none; }
.rsvp-or {
  display: flex; align-items: center; gap: 12px; margin-top: 28px;
  font-size: 10.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
}
.rsvp-or::before, .rsvp-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.rsvp-or + .btn-row { margin-top: 16px; }

/* ---------- Programme ---------- */
.pill {
  display: inline-block; margin-bottom: 14px; padding: 7px 16px 7px calc(16px + .24em);
  border-radius: 999px; background: var(--lilac-wash);
  font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--lavender-deep);
}
.programme-note { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.4; color: var(--muted); }
.timeline { padding: 0; list-style: none; text-align: left; }
.timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: baseline; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--lavender); font-variant-numeric: lining-nums; }

/* ---------- Contacts ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact {
  display: block; padding: 22px 10px 18px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: border-color .25s, transform .25s;
}
.contact:hover { border-color: var(--line-strong); }
.contact-name { display: block; font-family: var(--script); font-size: 38px; line-height: 1.1; color: var(--lavender); }
.contact-phone { display: block; margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.contact-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--lavender);
}
.contact-cta .icon { width: 14px; height: 14px; }
.registry-contact { margin-top: 22px; }
.registry-contact .contact-name { word-spacing: .12em; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  padding: 64px 24px 150px;
  text-align: center;
  background: linear-gradient(180deg, var(--ivory), #F3EAF7);
}
.footer .floral { width: min(40%, 200px); }
.footer-inner { position: relative; z-index: 1; }
.monogram { font-family: var(--script); font-size: 58px; line-height: 1.1; color: var(--lavender); }
.footer-date { margin-top: 2px; padding-left: .34em; font-size: 10.5px; font-weight: 500; letter-spacing: .34em; color: var(--muted); }
.credit { margin-top: 36px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Music + toast ---------- */
.music {
  position: fixed; z-index: 60;
  right: max(16px, calc(50% - 240px + 16px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--lavender);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: opacity .4s;
}
.music[hidden] { display: none; }
html.js body:not(.is-open) .music { opacity: 0; pointer-events: none; }
.music .icon { width: 22px; height: 22px; }
.music .slash { transition: opacity .2s; }
.music[aria-pressed="true"] .slash { opacity: 0; }
.music[aria-pressed="true"] .icon { animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.08); } }

.toast {
  position: fixed; z-index: 120; left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 32px);
  padding: 12px 20px; border-radius: 999px;
  background: var(--lavender-deep); color: #fff;
  font-size: 12.5px; text-align: center;
  box-shadow: 0 16px 30px -14px rgba(60, 30, 90, .6);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s var(--ease); transition-delay: var(--d, 0s); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Small phones ---------- */
@media (max-width: 359px) {
  .clock { gap: 6px; }
  .unit span { letter-spacing: .08em; }
  .notes, .contacts { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .floral, .seal::after, .scroll-cue .icon, .music .icon, .cal-heart { animation: none !important; }
  .opening.is-opening * { animation: none !important; }
  .opening.is-opening { animation: fade-away .35s ease forwards !important; }
  html.js .rise, html.js .reveal, html.js .hero .floral { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .btn, .contact, .field-input, .choice, .stepper-btn, .choice input::before { transition: none; }
}
