/* JaDi Baby Shower — coquette pink gingham + ribbon bows
   Matches the reference: pink vichy check, scattered bows, sparkle stars. */

:root {
  --pink-check: rgba(244, 173, 198, 0.55); /* gingham square tint */
  --pink-soft: #fbe3ec;
  --rose: #e58aa9;
  --rose-deep: #d06f93;
  --rose-press: #b85a7f;
  --plum: #8a4663;          /* body text */
  --plum-soft: #a9647f;
  --cream: #fffafc;
  --card-bg: rgba(255, 250, 252, 0.93);
  --shadow: 0 18px 50px rgba(196, 110, 142, 0.28);
  --shadow-sm: 0 6px 18px rgba(196, 110, 142, 0.18);
  --radius: 26px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--plum);
  min-height: 100vh;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  /* pink gingham: two translucent pink stripe sets over white.
     overlaps render darker -> classic vichy check. */
  background-color: #fff;
  background-image:
    linear-gradient(90deg, var(--pink-check) 50%, transparent 50%),
    linear-gradient(0deg, var(--pink-check) 50%, transparent 50%);
  background-size: 56px 56px, 56px 56px;
  background-blend-mode: multiply;
}

/* faint sparkle stars layered on top of the gingham */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(214, 111, 147, .35) 1.4px, transparent 1.6px),
    radial-gradient(circle, rgba(214, 111, 147, .22) 1.1px, transparent 1.3px);
  background-size: 112px 112px, 168px 168px;
  background-position: 18px 30px, 80px 120px;
}

/* ---- floating decorative bows ---- */
.bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-decor .float-bow {
  position: absolute;
  opacity: .5;
  animation: drift 14s ease-in-out infinite;
  will-change: transform;
}
.bg-decor .float-bow svg { display: block; }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-16px) rotate(6deg); }
}

/* ---- hopping decorative bunnies ---- */
.bg-decor .float-bunny {
  position: absolute;
  opacity: .55;
  animation: hop 3.6s ease-in-out infinite;
  will-change: transform;
}
.bg-decor .float-bunny svg { display: block; }
@keyframes hop {
  0%, 100%  { transform: translateY(0) rotate(0); }
  20%       { transform: translateY(-22px) rotate(-7deg); }
  40%       { transform: translateY(0) rotate(0); }
  46%       { transform: translateY(-6px) rotate(4deg); }
  52%       { transform: translateY(0) rotate(0); }
}

/* ---- little bunnies tucked inside the card, behind the text ---- */
.card-bunny {
  position: absolute;
  z-index: -1;                 /* always behind the card's text content */
  opacity: .4;
  pointer-events: none;
  animation: hop-card 3.4s ease-in-out infinite;
  will-change: transform;
}
.card-bunny svg { display: block; }
@keyframes hop-card {
  0%, 100% { transform: translateY(0)    scale(var(--s, 1)) rotate(0); }
  22%      { transform: translateY(-13px) scale(var(--s, 1)) rotate(-7deg); }
  44%      { transform: translateY(0)    scale(var(--s, 1)) rotate(0); }
  50%      { transform: translateY(-5px)  scale(var(--s, 1)) rotate(4deg); }
  56%      { transform: translateY(0)    scale(var(--s, 1)) rotate(0); }
}

/* ---- language toggle ---- */
.lang-toggle {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 5;
  display: flex;
  background: var(--card-bg);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--plum-soft);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-toggle button.active {
  background: var(--rose);
  color: #fff;
}

/* ---- card ---- */
.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  backdrop-filter: blur(3px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 26px 22px;
  text-align: center;
  border: 1.5px solid rgba(229, 138, 169, .35);
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ribbon-top { margin: -6px 0 2px; }
.bow-hero {
  width: 130px;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(196, 110, 142, .35));
  animation: bowpop .8s cubic-bezier(.2, 1.3, .4, 1) both .15s;
}
@keyframes bowpop {
  from { opacity: 0; transform: scale(.6) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.eyebrow {
  margin: 4px 0 14px;        /* extra gap so the cursive title doesn't overlap it */
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--plum-soft);
}
.title {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(46px, 14vw, 64px);
  line-height: 1;
  margin: 0 0 6px;
  color: var(--rose-deep);
}
.baby-name {
  font-family: "Great Vibes", cursive;
  font-size: clamp(28px, 8vw, 36px);
  color: var(--plum);
  margin: 0 0 4px;
}
.hosts { margin: 0; font-size: 14px; color: var(--plum-soft); }

.divider { color: var(--rose); margin: 16px 0; letter-spacing: 4px; font-size: 14px; }

/* ---- countdown ---- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 4px;
  flex-wrap: wrap;
}
.cd-box {
  background: #fff;
  border: 1.5px solid rgba(229, 138, 169, .4);
  border-radius: 14px;
  padding: 8px 10px;
  min-width: 58px;
  box-shadow: var(--shadow-sm);
}
.cd-num { font-size: 24px; font-weight: 700; color: var(--rose-deep); line-height: 1; }
.cd-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--plum-soft); margin-top: 3px; }
.cd-msg { font-size: 15px; font-weight: 600; color: var(--rose-deep); }

/* ---- details ---- */
.details { list-style: none; padding: 0; margin: 10px 0 6px; }
.details li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  padding: 7px 0;
  font-weight: 500;
}
.details .ic { font-size: 19px; }
.map-link {
  display: inline-block;
  color: var(--rose-deep);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 4px;
}
.map-link:hover { text-decoration: underline; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
}
.btn:active { transform: scale(.97); }
.registry {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  box-shadow: 0 10px 24px rgba(208, 111, 147, .4);
  margin-top: 8px;
}
.registry:hover { box-shadow: 0 14px 30px rgba(208, 111, 147, .5); }
.registry-note { font-size: 12.5px; color: var(--plum-soft); margin: 8px 0 0; }

/* ---- RSVP ---- */
.rsvp h2 {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 34px;
  color: var(--rose-deep);
  margin: 0 0 12px;
}
.field { display: block; text-align: left; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; color: var(--plum-soft); margin-bottom: 6px; }
input[type="text"], input[type="number"], textarea {
  width: 100%;
  border: 1.5px solid rgba(229, 138, 169, .45);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--plum);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(229, 138, 169, .22);
}
textarea { resize: vertical; }

.choice { display: flex; gap: 10px; }
.choice-btn {
  flex: 1;
  border: 1.5px solid rgba(229, 138, 169, .45);
  background: #fff;
  color: var(--plum);
  border-radius: 14px;
  padding: 13px 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.choice-btn.yes[aria-pressed="true"] {
  background: linear-gradient(135deg, #7ec98f, #57b06f);
  border-color: #57b06f;
  color: #fff;
}
.choice-btn.no[aria-pressed="true"] {
  background: linear-gradient(135deg, #e58aa9, #d06f93);
  border-color: #d06f93;
  color: #fff;
}
#countField.hide { display: none; }

.submit {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  box-shadow: 0 10px 24px rgba(208, 111, 147, .4);
  margin-top: 4px;
}
.submit:disabled { opacity: .6; cursor: default; transform: none; }
.form-msg { min-height: 18px; font-size: 13.5px; font-weight: 600; margin: 8px 0 0; }
.form-msg.err { color: #c0392b; }

/* ---- thank you ---- */
.thanks { text-align: center; padding: 6px 0; animation: rise .5s ease both; }
.thanks-bow { font-size: 44px; animation: bowpop .7s cubic-bezier(.2,1.3,.4,1) both; }
.thanks h3 { font-family: "Great Vibes", cursive; font-weight: 400; font-size: 32px; color: var(--rose-deep); margin: 4px 0 6px; }
.thanks p { font-size: 15px; color: var(--plum); margin: 0 0 12px; }
.btn-text { background: none; border: 0; color: var(--rose-deep); font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: underline; }

/* ---- footer ---- */
.foot {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--plum-soft);
}
.host-link { color: var(--plum-soft); text-decoration: none; opacity: .7; }
.host-link:hover { text-decoration: underline; }

/* ---- mobile: keep the language switch pinned at the very top, clear of content ---- */
@media (max-width: 560px) {
  /* reserve space so the fixed toggle never sits on top of the card */
  body { padding-top: calc(54px + env(safe-area-inset-top)); }
  .lang-toggle {
    top: calc(8px + env(safe-area-inset-top));
    right: 50%;
    transform: translateX(50%);          /* centered pill, away from the card edges */
    background: #fff;                     /* fully opaque so nothing shows through while scrolling */
    border: 1.5px solid rgba(229, 138, 169, .35);
    box-shadow: 0 6px 18px rgba(196, 110, 142, .28);
  }
}

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