/* Vianna's 7th: romantic, vintage, girly-luxe */
:root {
  --ivory: #fffaf4;
  --cream: #fbf2e8;
  --blush-50: #fff6f7;
  --blush-100: #fdecf0;
  --blush-200: #f8d9e2;
  --petal: #f3c1d0;
  --rose-300: #eaa6bc;
  --rose-400: #e08aa8;
  --rose-500: #d06f93;
  --rose-600: #b85a7e;
  --rose-700: #9a4566;
  --ink: #6b3a4d;
  --ink-soft: #8f6474;
  --gold: #c9a45a;
  --gold-soft: rgba(201, 164, 90, .55);
  --gold-deep: #a7843f;
  --bow-main: #f6bfd0;
  --bow-dark: #e89fb6;
  --bow-knot: #f2adc3;
  --font-body: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --font-caps: "Cormorant SC", "Cormorant Garamond", Garamond, serif;
  --shadow-drop: drop-shadow(0 18px 26px rgba(184, 90, 126, .22)) drop-shadow(0 3px 6px rgba(184, 90, 126, .12));
  --hairline: inset 0 0 0 3px var(--ivory), inset 0 0 0 4px var(--gold-soft);
  /* aliases used by the host page */
  --pink-300: var(--rose-300);
  --pink-400: var(--rose-400);
  --pink-500: var(--rose-500);
  --shadow: 0 14px 30px -16px rgba(154, 69, 102, .35), 0 3px 8px -4px rgba(154, 69, 102, .15);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  background: #fbf3f1;
  overflow-x: hidden;
}

/* Watercolor bow pattern: fixed full-viewport layer (works on iOS, unlike background-attachment: fixed) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #fbf3f1;
  background-image: url("/bg-bows.jpg");
  background-image: image-set(url("/bg-bows.webp") type("image/webp"), url("/bg-bows.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
@media (min-width: 760px) and (orientation: landscape) {
  body::before {
    background-image: url("/bg-bows-wide.jpg");
    background-image: image-set(url("/bg-bows-wide.webp") type("image/webp"), url("/bg-bows-wide.jpg") type("image/jpeg"));
    background-position: center;
  }
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 12px 36px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}

/* ---------- The card: eyelet-lace scalloped edge, gold + rose hairlines, filigree corners ---------- */
.card {
  position: relative;
  border: 18px solid transparent;
  border-image: url("/lace-border.svg") 28 round;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, .9), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(224, 138, 168, .13) 1px, transparent 1.6px) 0 0 / 15px 15px,
    var(--ivory);
  background-clip: padding-box;
  filter: var(--shadow-drop);
  padding: 30px 16px 64px;
  text-align: center;
  margin-bottom: 26px;
}
/* inner fine rose frame, corners left open for the flourishes */
.card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(224, 138, 168, .45);
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) center / calc(100% - 140px) 100% no-repeat,
    linear-gradient(#000 0 0) center / 100% calc(100% - 140px) no-repeat;
          mask:
    linear-gradient(#000 0 0) center / calc(100% - 140px) 100% no-repeat,
    linear-gradient(#000 0 0) center / 100% calc(100% - 140px) no-repeat;
}
.corner { position: absolute; width: 76px; height: 76px; pointer-events: none; z-index: 0; }
.corner.tl { top: 2px; left: 2px; }
.corner.tr { top: 2px; right: 2px; transform: scaleX(-1); }
.corner.bl { bottom: 2px; left: 2px; transform: scaleY(-1); }
.corner.br { bottom: 2px; right: 2px; transform: scale(-1, -1); }
.card > :not(.corner):not(.hero-bow) { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.invite { padding-top: 66px; }
.hero-bow {
  position: absolute;
  left: 50%;
  top: -62px;
  width: 150px;
  height: 112px;
  translate: -50% 0;
  z-index: 2;
  filter: drop-shadow(0 6px 8px rgba(184, 90, 126, .25));
  --bow-edge: #d4b06a;
  animation: wiggle 6s ease-in-out infinite;
}
@keyframes wiggle { 0%, 100% { rotate: -2.5deg; } 50% { rotate: 2.5deg; } }

.eyebrow {
  margin: 0 0 2px;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: .98rem;
  letter-spacing: .12em;
  color: var(--gold-deep);
  text-wrap: balance;
}
h1 { margin: 0; font-weight: 400; line-height: 1; }
.name {
  display: block;
  font-family: "Playfair Display", "Bodoni 72", Didot, Georgia, serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(3.7rem, 18vw, 5.4rem);
  letter-spacing: .015em;
  line-height: 1.1;
  padding: .06em .1em .1em;
  margin: 4px 0 -.06em;
  background: linear-gradient(180deg, #ea92b0 0%, var(--rose-500) 50%, var(--rose-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .9)) drop-shadow(0 4px 8px rgba(208, 111, 147, .18));
}
.turning {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .14em;
  margin-top: -4px;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.75rem, 7.6vw, 2.2rem);
  color: var(--ink);
}
/* Standalone numeral: romantic script 7, rose gradient with a gilded edge */
.seven {
  font-family: "Playfair Display", "Bodoni 72", Didot, Georgia, serif;
  font-style: normal;
  font-weight: 600;
  font-size: 2.1em;
  line-height: .8;
  padding: 0 .02em 0 .02em;
  background: linear-gradient(170deg, #f0a3bd 10%, var(--rose-500) 55%, var(--rose-700) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(.6px .8px 0 #d4b06a) drop-shadow(0 3px 5px rgba(184, 90, 126, .2));
}
.turning .bang { margin-left: -.1em; }

.invite-line {
  margin: 14px auto 0;
  max-width: 28ch;
  text-wrap: balance;
  font-size: 1.22rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
}

.scroll-divider { display: block; width: min(250px, 80%); height: 29px; margin: 18px auto 16px; }
.scroll-divider.small { width: min(210px, 70%); margin: 4px auto 18px; }

/* Details: ivory cartouches with rose border + gold inner hairline */
.details { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 10px; max-width: 360px; text-align: left; }
.details li {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, var(--blush-50));
  border: 1px solid var(--petal);
  box-shadow: var(--hairline);
  font-size: clamp(1.02rem, 4.7vw, 1.2rem);
  white-space: nowrap;
}
.details strong { font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blush-100); color: var(--rose-500);
  box-shadow: inset 0 0 0 1px var(--gold-soft), 0 0 0 3px #fff, 0 0 0 4px var(--petal);
}
.icon svg { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.actions { display: grid; gap: 10px; margin: 14px auto 0; max-width: 360px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 11px 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-caps); font-weight: 700; font-size: 1.04rem; letter-spacing: .06em; line-height: 1.15; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(.985); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, .step:focus-visible, .link-btn:focus-visible {
  outline: 2px solid var(--rose-400); outline-offset: 3px;
}
.btn-soft {
  color: var(--rose-700);
  background: var(--ivory);
  border-color: var(--rose-300);
  box-shadow: var(--hairline);
}
.btn-soft:hover { background: var(--blush-50); }
.btn-primary {
  color: #fffaf4;
  background: linear-gradient(180deg, #f2adc3 0%, var(--rose-400) 55%, var(--rose-500) 100%);
  border-color: var(--rose-500);
  box-shadow: inset 0 0 0 3px rgba(242, 173, 195, .0), inset 0 0 0 3.5px rgba(255, 238, 205, .85), 0 10px 20px -10px rgba(154, 69, 102, .7);
  text-shadow: 0 1px 1px rgba(154, 69, 102, .35);
}
.btn-primary:hover { filter: brightness(1.04); }

/* Final call to action: the one prominent pink button on the invitation */
.btn-rsvp {
  display: flex; width: 100%; max-width: 360px; margin: 20px auto 0;
  min-height: 62px; font-size: 1.32rem; letter-spacing: .14em;
  --bow-main: #fffaf4; --bow-dark: #fde3ea; --bow-knot: #fff3f6;
}
.btn-rsvp svg { width: 32px; height: 24px; }

/* ---------- RSVP card ---------- */
.rsvp { padding-top: 34px; text-align: left; scroll-margin-top: 16px; }
.rsvp.flash { animation: flash 1.4s ease; }
@keyframes flash { 30% { filter: var(--shadow-drop) drop-shadow(0 0 14px rgba(224, 138, 168, .8)); } }
.mini-bow { display: block; width: 64px; height: 48px; margin: 0 auto; }
.rsvp h2, .thanks h3 {
  margin: 0; text-align: center;
  font-family: var(--font-script); font-weight: 400;
  font-size: 2.9rem; line-height: 1.2; color: var(--rose-500);
}
.rsvp .sub { margin: 2px 0 6px; text-align: center; font-style: italic; font-size: 1.15rem; color: var(--ink-soft); }

.returning {
  margin: 0 0 18px; padding: 12px 16px; border-radius: 14px;
  background: var(--cream); border: 1px solid var(--gold-soft);
  color: var(--ink); font-size: 1.05rem; font-style: italic; text-align: center;
}

form { position: relative; z-index: 1; }
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
label, legend {
  display: block; margin-bottom: 6px; padding: 0;
  font-family: var(--font-caps); font-weight: 700; font-size: 1.02rem; letter-spacing: .07em;
  color: var(--rose-700);
}
.req { color: var(--rose-400); }
.opt { font-family: var(--font-body); font-style: italic; font-weight: 500; letter-spacing: 0; color: var(--ink-soft); font-size: .95rem; text-transform: none; }

input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="password"], textarea {
  width: 100%;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.15rem; /* >= 16px, prevents iOS zoom */
  line-height: 1.35;
  color: var(--ink);
  background: #fffdf9;
  border: 1px solid var(--petal);
  border-radius: 12px;
  padding: 12px 15px;
  box-shadow: inset 0 1px 2px rgba(184, 90, 126, .06);
  transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: #c3a0ad; font-style: italic; }
input:focus, textarea:focus { outline: none; border-color: var(--rose-400); background: #fff; box-shadow: 0 0 0 4px rgba(234, 166, 188, .22); }
.invalid input, .invalid textarea, input.invalid { border-color: #c94a6e; background: #fff6f7; }

.err { margin: 6px 2px 0; color: #b4365b; font-size: 1rem; font-style: italic; }
.err:empty { display: none; }
.hint { margin: 4px 4px 0; text-align: right; font-size: .9rem; color: var(--ink-soft); }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-opt { margin: 0; position: relative; cursor: pointer; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; color: var(--ink); font-size: 1.08rem; }
.choice-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 98px; padding: 12px 8px; text-align: center; line-height: 1.2;
  border-radius: 18px; background: var(--ivory);
  border: 1px solid var(--petal);
  box-shadow: var(--hairline);
  transition: all .15s ease;
}
.choice-card .emoji { font-size: 1.55rem; }
.choice-opt input:checked + .choice-card {
  background: var(--blush-100); border-color: var(--rose-400); color: var(--rose-700);
  box-shadow: inset 0 0 0 3px var(--blush-100), inset 0 0 0 4px var(--gold), 0 8px 16px -10px rgba(154, 69, 102, .55);
}
.choice-opt input:focus-visible + .choice-card { outline: 2px solid var(--rose-400); outline-offset: 3px; }

.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.counts[hidden] { display: none; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input { text-align: center; padding: 11px 4px; font-weight: 700; font-size: 1.25rem; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--rose-300); background: var(--ivory); color: var(--rose-500);
  box-shadow: inset 0 0 0 3px var(--ivory), inset 0 0 0 4px var(--gold-soft);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.step svg { width: 16px; height: 16px; }
.step:active { background: var(--blush-100); }

.row2 { display: grid; gap: 0 12px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error { margin: 0 0 12px; text-align: center; color: #b4365b; font-weight: 600; font-style: italic; }
.form-error:empty { display: none; }
.btn-submit { width: 100%; min-height: 58px; font-size: 1.2rem; letter-spacing: .12em; margin-top: 6px; }
.btn-submit[disabled] { opacity: .7; cursor: progress; }

.thanks { text-align: center; padding: 6px 4px 4px; outline: none; }
.thanks[hidden] { display: none; }
.thanks-bow { width: 110px; height: 82px; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; --bow-edge: #d4b06a; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.thanks p { margin: 10px auto 0; max-width: 32ch; color: var(--ink-soft); font-size: 1.2rem; font-style: italic; }
.thanks-summary {
  display: inline-block; margin-top: 14px !important; padding: 9px 20px; border-radius: 999px;
  background: var(--blush-100); border: 1px solid var(--petal); box-shadow: inset 0 0 0 3px var(--blush-100), inset 0 0 0 4px var(--gold-soft);
  color: var(--rose-700) !important; font-style: normal !important; font-weight: 700; font-size: 1.1rem !important;
}
.rsvp.done .mini-bow, .rsvp.done h2, .rsvp.done .sub, .rsvp.done .scroll-divider { display: none; }
.link-btn {
  display: block; margin: 18px auto 0; background: none; border: 0; padding: 6px;
  color: var(--rose-600); font: italic 600 1.08rem var(--font-body); text-decoration: underline; text-decoration-color: var(--gold-soft); text-underline-offset: 4px; cursor: pointer;
}

.foot {
  position: relative; width: fit-content; margin: 0 auto 24px; padding: 8px 20px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; background: rgba(255, 250, 244, .92);
  border: 1px solid var(--petal); box-shadow: inset 0 0 0 3px rgba(255, 250, 244, .92), inset 0 0 0 4px var(--gold-soft);
  color: var(--rose-600); font-size: 1.12rem; font-style: italic;
}
.foot svg { width: 15px; height: 15px; fill: var(--rose-300); }

/* Bow confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti svg { position: absolute; top: -40px; width: 30px; height: 22px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(var(--rot, 360deg)); } }

@media (min-width: 480px) {
  .row2 { grid-template-columns: 1fr 1fr; }
  .corner { width: 86px; height: 86px; }
}

@media (min-width: 760px) {
  .wrap { max-width: 620px; padding-top: 92px; }
  .card { border-width: 20px; padding: 48px 54px 76px; }
  .invite { padding-top: 80px; }
  .hero-bow { width: 190px; height: 142px; top: -84px; }
  .corner { width: 108px; height: 108px; }
  .card::before {
    -webkit-mask:
      linear-gradient(#000 0 0) center / calc(100% - 196px) 100% no-repeat,
      linear-gradient(#000 0 0) center / 100% calc(100% - 196px) no-repeat;
            mask:
      linear-gradient(#000 0 0) center / calc(100% - 196px) 100% no-repeat,
      linear-gradient(#000 0 0) center / 100% calc(100% - 196px) no-repeat;
  }
}

@media (min-width: 1100px) {
  .wrap { max-width: 1140px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; align-items: start; padding-top: 100px; }
  .card { margin-bottom: 0; }
  .foot { grid-column: 1 / -1; margin-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
