/* ============================================================
   THEME — change colors/fonts here.
   ============================================================ */
:root {
  /* Palette: warm cream base + lavender + sunflower gold + sage */
  --paper: #faf3e8;       /* main page background */
  --cream: #fff9ef;       /* lighter cream for text on bands */
  --lav: #8a76ab;         /* lavender accent */
  --lav-deep: #5f4f7a;    /* deep lavender for bands / headings */
  --sage: #7c8a5a;        /* botanical green */
  --sage-dark: #5f6b41;
  --gold: #d99a1c;        /* sunflower gold */
  --gold-soft: #ecc873;
  --gold-deep: #b07d12;   /* deeper gold for text on cream */
  --ink: #443a2f;         /* warm brown ink */
  --muted: #8a7f6e;
  --line: #d8cdb8;
  --divider: #ece2cf;     /* hairline between segments */

  --serif: "EB Garamond", "Cardo", Georgia, serif;
  --script: "Cormorant Garamond", "Cardo", serif;

  --maxw: 460px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #efe6d6;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  padding: 24px 12px;
}

.invite {
  width: 100%;
  max-width: var(--maxw);
  /* Cream cardstock + subtle paper grain (inline SVG noise, no external file) */
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid #efe7d6;
  overflow: hidden;
}

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

/* ===================== WATERCOLOR CUTOUTS ===================== */
/* background removal trick: contrast(1.8) pushes near-white pixels
   (e.g. rgb 246,246,246) to pure white; multiply then makes pure white
   fully transparent against the cream card. No JS needed. */
.hero, .band, .block, .countdown-section { position: relative; }
.cutout {
  position: absolute;
  pointer-events: none;
  /* z-index intentionally omitted: lavender sits at z-index:auto so normal
     source-order rendering puts section text (defined after) on top */
  height: auto;
  /*mix-blend-mode: multiply;
  /*filter: contrast(1.8);*/
  opacity: 0.88;
}

/* Lavender sprigs laid sideways at each section corner.
   Width is kept modest so they read as corner accents, not banners. */
.cutout--lav-tr {
  top: -14px; right: -24px;
  width: 116px;
  transform: scaleX(-1) rotate(78deg);
}
.cutout--lav-tl {
  top: -14px; left: -24px;
  width: 116px;
  transform: scaleX(-1) rotate(-78deg);
}
.cutout--lav-br {
  bottom: -14px; right: -24px;
  width: 130px;
  transform: scaleX(-1) rotate(-78deg);
}
.cutout--lav-bl {
  bottom: -14px; left: -24px;
  width: 130px;
  transform: scaleX(-1) rotate(78deg);
}
/* Sunflower bouquet: pure-white bg removed via multiply (no contrast filter).
   padding-bottom must exceed the image's rendered height (width = height
   since image is square 626×626) plus breathing room. */
.band.rsvp { padding-bottom: 200px; }
.cutout--sun-end {
  left: 50%;
  bottom: 8px;
  width: 185px;
  transform: translateX(-50%);
  mix-blend-mode: multiply;
}

/* ===================== HERO ===================== */
.hero { text-align: center; }

.hero__panel {
  background: transparent;
  color: var(--ink);
  padding: 64px 28px 40px;
}

.hero__intro {
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
  font-size: 0.95rem;
}

.names {
  font-family: var(--script);
  font-weight: 500;
  font-size: 3.2rem;
  line-height: 1.1;
  margin: 14px 0;
  color: var(--lav-deep);
}
.names span { display: block; }
.names .amp { font-size: 2rem; font-style: italic; margin: 4px 0; opacity: 0.9; }

.hero__date {
  letter-spacing: 0.35em;
  font-size: 1.05rem;
  margin-top: 12px;
  color: var(--gold-deep);
}

.hero__photo { padding: 24px 28px 0; }
.hero__photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 6px solid #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
/* Framed placeholder shown when a photo file is missing */
.hero__photo.img-missing {
  position: relative;
}
.hero__photo.img-missing::after {
  content: "Foto";
  position: absolute;
  inset: 24px 28px 0;
  display: grid;
  place-items: center;
  border: 6px solid #fff;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.2em;
  background: repeating-linear-gradient(45deg, #efe7d8, #efe7d8 14px, #e6ddca 14px, #e6ddca 28px);
}

.hero__quote {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 22px 40px 8px;
  max-width: 360px;
  margin: 0 auto;
}

/* ===================== MUSIC PLAYER ===================== */
.player { padding: 16px 40px 36px; }
.player__label {
  font-style: italic;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.player__controls { display: flex; align-items: center; gap: 14px; }
.player__btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--sage);
  color: var(--cream);
  font-size: 1.1rem;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 0.15s ease, background 0.2s ease;
}
.player__btn:hover { transform: scale(1.06); background: var(--sage-dark); }
.player__bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.player__progress { height: 100%; width: 0; background: var(--sage); }

/* ===================== BANDS (now plain cream segments) ===================== */
.band {
  background: transparent;
  color: var(--ink);
  text-align: center;
  padding: 52px 32px;
  border-bottom: 1px solid var(--divider);
}
.band__intro {
  max-width: 340px;
  margin: 0 auto 22px;
  font-size: 0.98rem;
  color: var(--muted);
}

/* ===================== COUNTDOWN ===================== */
.bigdate {
  font-family: var(--script);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  padding: 18px 0;
  margin: 14px 0 26px;
  color: var(--lav-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.countdown-section__label {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.countdown__unit span {
  font-size: 2.4rem;
  font-family: var(--script);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--lav-deep);
}
.countdown__unit small {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 4px;
}

/* ===================== GENERIC BLOCKS ===================== */
.block {
  text-align: center;
  padding: 48px 36px;
  border-bottom: 1px solid #ece8dc;
}
.icon { font-size: 1.7rem; margin-bottom: 10px; }

.script {
  font-family: var(--script);
  font-weight: 500;
  font-style: italic;
  font-size: 2rem;
  color: var(--lav-deep);
  margin-bottom: 12px;
}
.time { font-weight: 600; font-size: 1.15rem; letter-spacing: 0.02em; }
.place { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.95rem; margin-top: 6px; }
.muted { color: var(--muted); font-style: italic; font-size: 0.95rem; margin-top: 4px; }

.overline {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  color: var(--sage-dark);
  margin: 26px 0 12px;
  font-weight: 600;
}

.closing { margin-top: 28px; letter-spacing: 0.06em; }
.thanks { font-size: 2.2rem; margin-top: 4px; }

/* ===================== BUTTONS ===================== */
.ghost-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 26px;
  border: 1px solid currentColor;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.ghost-btn:hover { background: var(--lav-deep); color: var(--cream); border-color: var(--lav-deep); }

.solid-btn {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: none;
  background: var(--lav-deep);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.solid-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }

/* ===================== TIMELINE ===================== */
.timeline {
  list-style: none;
  max-width: 320px;
  margin: 18px auto 0;
  text-align: left;
  position: relative;
  padding-left: 8px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 19px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--line);
}
.timeline li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  position: relative;
}
.timeline .dot {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: var(--paper);
  border-radius: 50%;
  z-index: 1;
  font-size: 0.95rem;
}
.timeline .ti-time {
  font-weight: 600;
  font-size: 0.95rem;
}
.timeline .ti-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ===================== LISTS ===================== */
.recs {
  list-style: none;
  max-width: 320px;
  margin: 0 auto;
}
.recs li {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 4px 0;
}

/* ===================== GIFT QR ===================== */
.qr {
  width: 150px; height: 150px;
  margin: 8px auto 0;
  background: #fff;
  padding: 8px;
}

/* ===================== RSVP FORM ===================== */
.rsvp__form {
  max-width: 340px;
  margin: 8px auto 0;
  text-align: left;
  display: grid;
  gap: 16px;
}
.rsvp__form label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
.rsvp__form input[type="text"],
.rsvp__form select,
.rsvp__form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.98rem;
  border-radius: 2px;
}
.rsvp__form input:focus,
.rsvp__form select:focus,
.rsvp__form textarea:focus { outline: none; border-color: var(--lav); }
.rsvp__form input::placeholder,
.rsvp__form textarea::placeholder { color: var(--muted); }

.rsvp__choice {
  border: none;
  display: grid;
  gap: 8px;
}
.rsvp__choice legend { font-size: 0.88rem; margin-bottom: 4px; }
.rsvp__form .radio { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; cursor: pointer; }
.radio input { accent-color: var(--lav-deep); }

.rsvp__status {
  font-size: 0.92rem;
  text-align: center;
  min-height: 1.2em;
  font-style: italic;
}

/* ===================== FOOTER ===================== */
.foot {
  background: transparent;
  color: var(--lav-deep);
  text-align: center;
  padding: 30px 22px 26px;
  font-family: var(--script);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--divider);
}
