/* =========================================================
   Asyiqin & Izzlan — Digital Wedding Invitation
   ========================================================= */

:root {
  --cream: #f6efe3;
  --cream-deep: #ede1cd;
  --ivory: #fbf7ef;
  --navy: #4b5775;
  --navy-deep: #3a4360;
  --navy-darker: #2b3249;
  --burgundy: #4a2e1c;
  --burgundy-deep: #2e1b10;
  --burgundy-darker: #1c0f08;
  --gold: #b4883a;
  --gold-light: #e3c687;
  --gold-dark: #8a661f;
  --ink: #3c362d;
  --ink-soft: #6e6558;
  --rose: #c98f90;
  --espresso: #3b2314; /* the couple's names */

  --font-script: 'Pinyon Script', cursive;
  --font-display: 'Italiana', 'Cormorant Garamond', serif;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Jost', sans-serif;

  color-scheme: light;
}

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

html { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-serif);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; background: none; border: none; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6em;
}
.eyebrow--sm { display: block; font-size: 0.62rem; margin-bottom: 0.3em; }
.eyebrow--light { color: #d8dced; }

.heading-serif {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--ink);
}
.heading-serif--sm { font-size: 1.3rem; font-style: italic; font-weight: 400; }
.heading-serif--light { color: var(--ivory); }

.script-heading {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 3rem;
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--ink);
}
.script-heading--closing { color: var(--navy-deep); font-size: 2.6rem; }

/* Short display lines ("Serayapuri Suite", the dress code colour). These
   were in a script font once, hence the class name; they are Italiana now. */
.script-line {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 0.4em 0;
}
.script-line--md { font-size: 1.4rem; }

.body-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 auto 1em;
}
.body-text--light { color: #dde1ef; }
.body-text--tight { font-size: 0.98rem; max-width: 32ch; }

/* ---------- layout shell ---------- */

.section {
  position: relative;
  width: 100%;
  padding: 4.5rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  isolation: isolate;
}
.section.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- ambient floating petals ---------- */
.petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.petal {
  position: absolute;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--rose);
  stroke-width: 1.2;
  opacity: 0.45;
  animation: petalDrift 16s ease-in-out infinite;
}
.petal--1 { top: 10%; left: 10%; animation-duration: 17s; }
.petal--2 { top: 18%; right: 8%; animation-duration: 20s; animation-delay: -5s; }
.petal--3 { bottom: 14%; left: 18%; animation-duration: 14s; animation-delay: -9s; }
@keyframes petalDrift {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(-20px) rotate(14deg); opacity: 0.6; }
}

/* The invitation sits on the same plaster texture as the title page
   (new-main-background.jpg). The picture is on a fixed layer behind the
   sections, so it stays still while the page scrolls (a plain
   `background-attachment: fixed` does not work on iPhones). */
.invitation {
  position: relative;
  z-index: 0;
  background: #e6e1da;
}
.invitation::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../assets/image/new-main-background.jpg') center / cover no-repeat;
  pointer-events: none;
}

/* ---------- cover / wax seal intro ---------- */

.cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  padding-bottom: 8vh;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.9s ease, visibility 0.9s;
}
.cover.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.cover__bg {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.3), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(227,198,135,0.25), transparent 50%),
    var(--cream) url('../assets/image/cream-pattern-tile.jpg') center / 220px repeat;
  animation: driftBg 18s ease-in-out infinite alternate;
}
@keyframes driftBg {
  to { transform: scale(1.08) rotate(1.5deg); }
}

/* the title page: four centred lines over new-main-background.jpg */
.cover__content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5rem 5rem;
  text-align: center;
  color: var(--ink);
}

.cover__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: blur(14px) brightness(0.92);
  transform: scale(1.08); /* hide the blur's soft edges */
  transition: filter 0.7s ease, transform 0.7s ease;
}
.cover__image.is-clear {
  filter: blur(0) brightness(1);
  transform: scale(1);
}
/* once revealed, the still picture drifts very slowly so it feels alive like the old video did */
.cover__image.is-clear { animation: sealDrift 18s ease-in-out 0.7s infinite alternate; }
@keyframes sealDrift {
  from { transform: scale(1); }
  to { transform: scale(1.07) translate(-0.8%, -1%); }
}
@media (prefers-reduced-motion: reduce) {
  .cover__image.is-clear { animation: none; }
}
/* Italiana, in capitals: "Walimatulurus", the date, the venue and the city */
.cover__title,
.cover__venue,
.cover__city {
  margin: 0;
  font-family: 'Italiana', var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em; /* balances the trailing letter-space so the line stays centred */
  line-height: 1.9;
  text-transform: uppercase;
}
/* The names sit a little above the middle of the screen: the gap under
   "Walimatulurus" is the gap above the venue plus 1.2rem. Moving the names
   means taking from one gap and adding the same to the other, so
   "Walimatulurus" and the venue lines stay where they are. */
.cover__title { margin-bottom: calc(clamp(2.25rem, 7vh, 4.5rem) + 1.2rem); letter-spacing: 0.42em; text-indent: 0.42em; }

/* Pinyon Script, as written (not capitals) */
.cover__names {
  margin: 0;
  font-family: 'Pinyon Script', var(--font-script);
  font-weight: 400;
  font-size: clamp(1.7rem, 8.6vw, 2.5rem);
  line-height: 1.25;
  color: var(--espresso);
}
.cover__names span {
  display: block;
  margin: 0.1em 0;
  color: var(--espresso); /* same brown as the names */
}

/* The date sits between the names and the venue, a little nearer the venue,
   in the same small Jost capitals as "Click to Continue". Its two gaps plus
   its own line always add up to the same total, so moving it never moves
   the names or the venue: add to one gap, take the same from the other. */
.cover__date {
  margin: calc(clamp(2.25rem, 7vh, 4.5rem) / 2 + 2.9rem) 0 0;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  line-height: 1.9;
  text-transform: uppercase;
  color: var(--burgundy-deep);
}
.cover__venue { margin-top: calc(clamp(2.25rem, 7vh, 4.5rem) / 2 - 0.3rem); }
.cover__city { font-size: 0.9rem; }

.cover__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(6vh, env(safe-area-inset-bottom));
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--burgundy-deep);
  margin: 0;
  animation: hintPulse 1.8s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
#cover[data-stage="playing"] .cover__hint,
.cover.is-hidden .cover__hint {
  opacity: 0;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.cover__content {
  transition: opacity 0.4s ease, visibility 0.4s;
}
#cover[data-stage="envelope"] .cover__content,
#cover[data-stage="untie"] .cover__content {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- stage 0: guest chooser (the front page) ---------- */
/* The swan painting (new-front-page.jpg) fills the screen, anchored to the
   bottom so the swans always stay in view. "Save The Date", the date and the
   three buttons sit at the bottom. A soft dark wash over the picture keeps
   the ivory text readable. */

#cover[data-stage="choose"] { cursor: default; }
#cover[data-stage="choose"] .cover__content {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.chooser {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end; /* everything sits at the bottom */
  padding: clamp(2rem, 9vh, 5rem) 1.5rem clamp(1.5rem, 5vh, 3rem);
  padding: clamp(2rem, 9dvh, 5rem) 1.5rem max(clamp(1.5rem, 5dvh, 3rem), env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ivory);
  background:
    linear-gradient(to bottom, rgba(30, 22, 28, 0.1) 0%, rgba(30, 22, 28, 0.12) 52%, rgba(30, 22, 28, 0.5) 100%),
    #4a4248 url('../assets/image/new-front-page.jpg') center bottom / cover no-repeat;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#cover[data-stage="choose"] .chooser {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@keyframes chooserRise {
  from { opacity: 0; transform: translateY(14px); }
}
.chooser__save {
  margin: 0;
  font-family: 'Pinyon Script', var(--font-script);
  font-size: clamp(2.2rem, 11vw, 3rem);
  line-height: 1.1;
  text-shadow: 0 2px 14px rgba(20, 14, 18, 0.8);
}
.chooser__date {
  margin: 0 0 0.5rem;
  font-family: 'Italiana', var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-indent: 0.26em; /* balances the trailing letter-space so the line stays centred */
  text-shadow: 0 1px 8px rgba(20, 14, 18, 0.7);
}

/* ----- the three buttons ----- */
.chooser__options {
  width: min(100%, 300px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: chooserRise 0.9s ease 0.25s both;
}
.chooser__btn {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(251, 247, 239, 0.75);
  border-radius: 999px;
  background: rgba(40, 30, 36, 0.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ivory);
  font-family: 'Italiana', var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400; /* Italiana only comes in one weight */
  letter-spacing: 0.04em;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
}
.chooser__btn:hover,
.chooser__btn.is-picked {
  background: var(--ivory);
  color: var(--ink);
}
.chooser__btn:active { transform: scale(0.97); }
.chooser__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* short screens (e.g. a phone held sideways): give the buttons the room */
@media (max-height: 560px) {
  .chooser { padding-top: 1rem; padding-bottom: 1.25rem; }
  .chooser__save { font-size: 2rem; }
  .chooser__options { gap: 0.45rem; }
  .chooser__btn { min-height: 2.6rem; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .chooser__options { animation: none; }
  .chooser__btn { transition: none; }
}

/* ---------- stage 2: envelope + ribbon ---------- */

.envelope {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s;
  perspective: 1400px;
}
#cover[data-stage="envelope"] .envelope,
#cover[data-stage="untie"] .envelope {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.envelope__card {
  position: relative;
  width: 78vw;
  max-width: 280px;
  aspect-ratio: 0.5625;
  border-radius: 6px;
  background: url('../assets/image/landing.jfif') center / cover no-repeat;
  box-shadow: 0 20px 50px rgba(40, 20, 15, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.envelope__frame {
  position: absolute;
  top: 17%;
  right: 11%;
  bottom: 5%;
  left: 10%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10%;
}
.envelope__greet {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: #f1e4d2;
  text-align: center;
  margin: 0;
  padding: 0 1rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.envelope__flap {
  position: absolute;
  inset: 0;
  background: url('../assets/image/landing.jfif') center / cover no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% 46%, 50% 72%, 0 46%);
  transform-origin: top center;
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.8s ease 0.25s;
  box-shadow: 0 10px 20px rgba(60, 40, 10, 0.18);
}
.envelope__flap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.08));
}
.envelope__flap.is-open {
  transform: rotateX(-125deg) translateY(-6%);
  opacity: 0;
}

.envelope__seal-mini {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-script);
  font-size: 0.85rem;
  color: #5c4312;
  filter: drop-shadow(0 4px 8px rgba(138,102,31,0.35));
}
.envelope__seal-mini-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.envelope__seal-mini span {
  position: relative;
  transform: translateY(-2%);
}

.ribbon-btn {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#cover[data-stage="untie"] .ribbon-btn { opacity: 1; pointer-events: auto; }
.ribbon-btn.is-untied { opacity: 0; pointer-events: none; }

.ribbon { width: 52%; filter: drop-shadow(0 6px 10px rgba(60, 40, 10, 0.25)); }
.ribbon__tail, .ribbon__strip {
  fill: #f4ead6;
  stroke: #cdb27a;
  stroke-width: 1;
  transition: transform 0.7s ease, opacity 0.7s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.ribbon__knot {
  fill: #ecdcb8;
  stroke: #b89a5c;
  stroke-width: 1;
  transition: transform 0.5s ease 0.2s, opacity 0.5s ease 0.2s;
  transform-box: fill-box;
  transform-origin: center;
}
.ribbon-btn span {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f1e4d2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: opacity 0.4s ease;
}

.ribbon-btn.is-untied .ribbon__tail--l { transform: translate(-42px, -12px) rotate(-35deg); opacity: 0; }
.ribbon-btn.is-untied .ribbon__tail--r { transform: translate(42px, -12px) rotate(35deg); opacity: 0; }
.ribbon-btn.is-untied .ribbon__strip--l { transform: translate(-18px, 32px) rotate(-14deg); opacity: 0; }
.ribbon-btn.is-untied .ribbon__strip--r { transform: translate(18px, 32px) rotate(14deg); opacity: 0; }
.ribbon-btn.is-untied .ribbon__knot { transform: scale(0.3); opacity: 0; }
.ribbon-btn.is-untied span { opacity: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.95em 1.8em;
  border-radius: 2px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn:active { transform: scale(0.97); }

.btn--outline {
  border: 1px solid var(--ink-soft);
  color: var(--ink);
  background: transparent;
  margin: 1rem 0;
}
.btn--outline:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

.btn--solid {
  background: var(--burgundy);
  color: var(--ivory);
  border: 1px solid var(--burgundy);
  width: 100%;
}
.btn--solid:hover { background: var(--burgundy-darker); }


/* ---------- music toggle ---------- */

.music-toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(60,54,45,0.15);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  backdrop-filter: blur(4px);
}
.music-toggle svg { width: 20px; height: 20px; }
.music-toggle .icon-sound-off { display: none; }
.music-toggle[aria-pressed="false"] .icon-sound-on { display: none; }
.music-toggle[aria-pressed="false"] .icon-sound-off { display: block; }
.music-toggle.is-spinning svg { animation: none; }

/* ---------- shared small text (date / city lines) ---------- */

.hero__date {
  font-family: var(--font-sans);
  letter-spacing: 0.2em;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

.hero__city {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- family message ---------- */

.heading-caps {
  font-family: 'Italiana', var(--font-serif);
  font-weight: 400; /* Italiana only comes in one weight */
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-indent: 0.16em; /* balances the trailing letter-space so the line stays centred */
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.4rem;
}

.heading-caps--light { color: var(--ivory); } /* on the dark RSVP band */
/* "Sila RSVP sebelum ...": the same Jost capitals as the form labels ("Nama" etc.) */
.rsvp__deadline { font-size: 0.75rem; letter-spacing: 0.08em; }

.family { padding-top: 6rem; padding-bottom: 3rem; }
.family__text {
  font-family: var(--font-display); /* Italiana */
  font-size: 1.1rem;
  line-height: 1.65;
  letter-spacing: 0.04em;
  text-transform: lowercase; /* shown all in small letters */
  color: var(--ink-soft);
  max-width: 19em;
  /* the gap above pushes the message down towards the middle of the screen */
  margin: clamp(2rem, 7vh, 4rem) 0 0;
}

/* ---------- countdown ---------- */

.countdown { padding-top: 3.5rem; padding-bottom: 5rem; }
.countdown__box {
  display: flex;
  justify-content: space-between;
  width: min(100%, 300px);
  padding: 0.9rem 1.6rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 3rem; }
.countdown__num {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums; /* digits keep their width as the seconds tick */
}
.countdown__label {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: #a39a8c;
}
.countdown__note { margin: 4.5rem 0 0; font-family: 'Pinyon Script', var(--font-script); font-size: 1.9rem; letter-spacing: 0; color: var(--ink-soft); }

/* ---------- location ---------- */

.venue-illustration {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto 1.4rem;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(60, 40, 10, 0.18);
}
.location__details { margin: 1.6rem 0; }
.location__address {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0.6rem 0 0;
}
.location__address + .location__address { margin-top: 1.3rem; } /* blank line before the date */

/* ---------- programme / timeline ---------- */

.timeline {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  width: 100%;
  max-width: 320px;
  text-align: left;
}
.timeline__item {
  display: grid;
  grid-template-columns: 86px 16px 1fr;
  align-items: start;
  column-gap: 0.9rem;
  padding-bottom: 1.5rem;
  position: relative;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: 92px;
  top: 14px;
  bottom: -2px;
  width: 1px;
  background: rgba(138,102,31,0.35);
}
.timeline__item:last-child::before { display: none; }
.timeline__time {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  padding-top: 2px;
}
.timeline__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-dark);
  margin-top: 7px;
  justify-self: center;
}
.timeline__content { display: flex; flex-direction: column; font-family: var(--font-sans); }
.timeline__content strong {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
}
.timeline__content small { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.25rem; }

/* ---------- dress code ---------- */

.outfits-photo {
  width: 100%;
  max-width: 190px;
  height: auto;
  margin: 1.4rem 0;
  filter: drop-shadow(0 10px 18px rgba(60, 40, 10, 0.25));
}

/* ---------- RSVP ---------- */

.rsvp {
  background: linear-gradient(170deg, var(--burgundy-deep), var(--burgundy-darker));
  color: var(--ivory);
}

.rsvp-form {
  width: 100%;
  max-width: 320px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.2rem 0 2rem;
}
.rsvp-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dde1ef;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  font-family: var(--font-serif);
  font-size: 1rem;
  padding: 0.6em 0.7em;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: var(--ivory);
}
.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder { color: rgba(255,255,255,0.5); }
.rsvp-form select option { color: #222; }
.rsvp-form__note {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin: 0;
}

/* honeypot field: kept off-screen for people, still present for bots */
.rsvp-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.rsvp-form__error {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  line-height: 1.5;
  color: #f3b9a8;
  margin: 0;
}
.rsvp-form .btn:disabled { opacity: 0.6; cursor: default; }

.rsvp-thanks {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-light);
  margin: 1.4rem 0;
}

.wishes {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 320px;
  border-top: 1px solid rgba(255,255,255,0.25);
  padding-top: 2rem;
}
/* Auto-scrolling wall: switched on by script.js when there are more wishes
   than fit. Every wish gets the same fixed-height slot, so the window shows
   exactly --wishes-visible of them and script.js moves the track up one slot
   at a time (--wishes-index). */
.wishes--scrolling {
  display: block;
  --wishes-slot: 7rem;   /* height of one wish */
  --wishes-gap: 1.3rem;  /* space between wishes */
}
.wishes__viewport {
  height: calc(var(--wishes-visible, 3) * var(--wishes-slot) + (var(--wishes-visible, 3) - 1) * var(--wishes-gap));
  overflow: hidden;
}
.wishes__track {
  display: flex;
  flex-direction: column;
  gap: var(--wishes-gap);
  transform: translateY(calc(var(--wishes-index, 0) * -1 * (var(--wishes-slot) + var(--wishes-gap))));
  transition: transform 0.9s ease;
}
.wishes__track .wish {
  flex: 0 0 var(--wishes-slot);
  height: var(--wishes-slot);
  margin: 0;
  overflow: hidden;
}
/* long wishes are cut to four lines so every slot is the same height */
.wishes__track .wish p {
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.wish p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: #ece9dd;
}
.wish cite {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* ---------- closing ---------- */

.closing {
  padding-bottom: 5rem;
}
.closing__eyebrow { /* Italiana */
  font-family: 'Italiana', var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.26em;
  text-indent: 0.26em; /* balances the trailing letter-space so the line stays centred */
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.8rem;
}
.closing__names { /* Pinyon Script */
  font-family: 'Pinyon Script', var(--font-script);
  font-size: 2.6rem;
  line-height: 1.2;
  color: var(--espresso);
  margin: 0 0 0.9rem;
}
.closing__hashtag { /* Cormorant Garamond */
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0;
}
.closing__thanks { /* Italiana */
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 1.8rem 0 0;
}

/* =========================================================
   Desktop / tablet — center the mobile card on a soft backdrop
   ========================================================= */

@media (min-width: 720px) {
  body {
    background: radial-gradient(circle at 20% 10%, #f3ead9, transparent 55%),
      radial-gradient(circle at 80% 85%, #e4d6c0, transparent 55%),
      linear-gradient(160deg, #ece0cb, #ddd0b8);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 0 1rem 2.5rem; /* no space above: the invitation starts flush with the top, like the cover */
  }

  .invitation {
    max-width: 460px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(40,30,10,0.25);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    /* here the texture has to stay inside the centred card, so it is drawn
       on the card itself (same width as the card) instead of the fixed layer */
    background: #e6e1da url('../assets/image/new-main-background.jpg') center top / 460px auto repeat-y fixed;
  }
  .invitation::before { display: none; }

  .cover {
    max-width: 460px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(40,30,10,0.25);
  }

  .music-toggle { right: calc(50% - 230px + 1.1rem); }

  @media (max-width: 1000px) {
    .music-toggle { right: 1.1rem; }
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .section, .cover, .cover__bg, .cover__hint { transition: none !important; animation: none !important; }
  /* no auto-scroll: the wall becomes a box the guest scrolls by hand */
  .wishes__track { transition: none; transform: none; }
  .wishes__track [data-clone] { display: none; }
  .wishes__viewport { overflow-y: auto; }
}
