/* ---- Fonts (from Kaya's invite) ---- */
@font-face {
  font-family: "Candy Beans";
  src: url("/assets/fonts/CandyBeans.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Super Pandora";
  src: url("/assets/fonts/SuperPandora.ttf") format("truetype");
  font-display: swap;
}

/* ---- Palette (sampled from the invite) ---- */
:root {
  --cream: #f9f6f1;
  --pink: #ef90a3;
  --pink-soft: #f1c6cd;
  --yellow: #ecc836;
  --blue: #9bb4cd;
  --green: #8fbf92;
  --lilac: #d8afd2;
  --ink: #2f3a4b;
  --ink-soft: #6a7482;
  /* titles = Super Pandora, body = Candy Beans (per Kaya's art direction) */
  --title: "Super Pandora", "Trebuchet MS", sans-serif;
  --body: "Candy Beans", "Trebuchet MS", sans-serif;
  --shadow: 0 8px 20px rgba(47, 58, 75, 0.10);
  --drop: drop-shadow(0 8px 16px rgba(47, 58, 75, 0.12));
  --radius: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--pink-soft) url("/assets/shapes/stripe_background.svg") center center / cover fixed;
  padding: clamp(8px, 2vw, 30px);
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 24S4 18 4 11a5 5 0 0 1 10-1 5 5 0 0 1 10 1c0 7-10 13-10 13z' fill='%23ef90a3' stroke='%23fff' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 14 12, auto;
}
/* keep guests' typed input in natural case; sentences read nicer lowercase */
input, textarea { text-transform: none; }
.section-sub, .gift-card p, .hint, .countdown-note, .thanks p, .d-value, footer { text-transform: none; }

/* ---- Frame: cream card with scalloped top & bottom ---- */
.frame {
  max-width: 1040px;
  margin: 0 auto;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(47, 58, 75, 0.16);
  overflow: hidden;
  position: relative;
}
.scallop-edge { display: block; width: 100%; height: 18px; color: var(--cream); }
.scallop-edge svg { display: block; width: 100%; height: 100%; }

.inner { padding: clamp(14px, 3vw, 28px) clamp(16px, 4vw, 44px); position: relative; z-index: 1; }

section { margin-top: clamp(16px, 3vw, 26px); }
section:first-of-type { margin-top: 0; }

/* ---- Titles ---- */
.section-title {
  font-family: var(--title);
  text-align: center;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}
.t-pink { color: var(--pink); }
.t-blue { color: #7f9cbb; }
.t-green { color: var(--green); }
.t-lilac { color: var(--lilac); }
.section-sub { text-align: center; color: var(--ink-soft); margin: 0 auto 16px; max-width: 46ch; }

/* ---- Scalloped cards (Kaya's invite frame as a stretched SVG background —
   renders identically in every browser; % padding keeps content clear of the
   frame's inner edge at any size). ---- */
.scallop {
  background: url("/assets/shapes/scallop_horizontal_card.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(0 7px 11px rgba(47, 58, 75, 0.15));
}

/* ---- Buttons (bouncy & fun) ---- */
.btn {
  font-family: var(--body);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  cursor: pointer;
  background: var(--pink);
  color: #fff;
  box-shadow: 0 5px 0 #d6768a, 0 10px 16px rgba(214, 118, 138, 0.35);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s ease, background 0.15s ease;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { transform: translateY(-2px) rotate(-1.6deg) scale(1.04); background: #ec8296; }
.btn:active { transform: translateY(3px) scale(0.98); box-shadow: 0 2px 0 #d6768a, 0 4px 8px rgba(214, 118, 138, 0.3); }
.btn:focus-visible { outline: 3px dashed var(--lilac); outline-offset: 3px; }
.btn.secondary { background: var(--blue); box-shadow: 0 5px 0 #7e96b2, 0 10px 16px rgba(126, 150, 178, 0.3); }
.btn.secondary:hover { background: #92acc7; }
.btn.secondary:active { box-shadow: 0 2px 0 #7e96b2; }
.btn.green { background: var(--green); box-shadow: 0 5px 0 #6fa273, 0 10px 16px rgba(111, 162, 115, 0.3); }
.btn.green:hover { background: #83b587; }
.btn.green:active { box-shadow: 0 2px 0 #6fa273; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #e6d9dc, 0 8px 16px rgba(47, 58, 75, 0.1); }
.btn.ghost:hover { background: #fffdfd; }
.btn.ghost:active { box-shadow: 0 2px 0 #e6d9dc; }
.btn.small { font-size: 0.92rem; padding: 10px 22px; }

/* ---- Hero ---- */
.hero { text-align: center; }
/* Animated hero — 5 stacked frames, hard snap between faces (no fade/flash) */
.hero-anim { position: relative; width: min(94%, 560px); margin: 0 auto; aspect-ratio: 1198 / 1080; }
.hero-anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; animation: heroCycle 3.5s steps(1, end) infinite; }
.hero-anim img:nth-child(1) { animation-delay: 0s; }
.hero-anim img:nth-child(2) { animation-delay: 0.7s; }
.hero-anim img:nth-child(3) { animation-delay: 1.4s; }
.hero-anim img:nth-child(4) { animation-delay: 2.1s; }
.hero-anim img:nth-child(5) { animation-delay: 2.8s; }
@keyframes heroCycle {
  0%, 19%   { opacity: 1; }
  20%, 100% { opacity: 0; }
}
.hero-art { width: min(94%, 560px); height: auto; margin: 0 auto; display: block; }
.celebrate { font-size: clamp(0.8rem, 2.6vw, 0.98rem); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin: 2px 0 0; }
.kaya-name { font-family: var(--title); color: var(--pink); font-size: clamp(1.8rem, 6vw, 2.7rem); line-height: 1; margin: 2px 0 10px; }
.hero-cta { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.date-chip {
  display: inline-flex; gap: 4px 12px; flex-wrap: wrap; justify-content: center;
  background: #fff; border-radius: 999px; padding: 11px 22px;
  font-size: clamp(0.85rem, 2.6vw, 1rem); letter-spacing: 0.03em; box-shadow: var(--shadow);
}
.date-chip strong { color: var(--pink); font-weight: normal; }

/* ---- Countdown ---- */
.countdown { display: flex; justify-content: center; gap: clamp(8px, 2vw, 14px); flex-wrap: wrap; }
.count-box { padding: 10px 8px; min-width: 64px; text-align: center; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.count-box .num { font-family: var(--title); font-size: clamp(1.6rem, 5.5vw, 2.2rem); line-height: 1; color: var(--pink); }
.count-box:nth-child(2) .num { color: var(--yellow); }
.count-box:nth-child(3) .num { color: var(--blue); }
.count-box:nth-child(4) .num { color: var(--green); }
.count-box .lbl { font-size: 0.64rem; letter-spacing: 0.13em; color: var(--ink-soft); margin-top: 3px; text-transform: uppercase; }
.countdown-note { text-align: center; margin-top: 9px; color: var(--ink-soft); }

/* ---- Details (3-up, refined) ---- */
.details-grid { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 340px; margin: 0 auto; }
.detail { background-image: url("/assets/shapes/scallop_h_blue.svg"); padding: 13% 11%; text-align: center; }
.detail .d-label { color: #7f9cbb; }
.detail .emoji { font-size: 1.35rem; display: block; margin-bottom: 4px; }
.detail .d-label { font-family: var(--title); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--ink-soft); text-transform: uppercase; }
.detail .d-value { font-size: 0.98rem; margin-top: 2px; }
.details-grid.one { grid-template-columns: 1fr; max-width: 300px; }
.party-notes { list-style: none; padding: 0; margin: 20px auto 0; max-width: 400px; display: flex; flex-direction: column; gap: 12px; }
.party-notes li { display: flex; align-items: center; gap: 12px; justify-content: center; text-align: left; color: var(--ink); text-transform: none; font-size: 0.98rem; }
.party-notes .ico { width: 1.7rem; height: 1.7rem; flex-shrink: 0; }
.detail-cta { text-align: center; margin-top: 18px; }

/* ---- Cards / RSVP ---- */
/* Plain rounded card — no scallop (form + thank-you) */
.card {
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(47, 58, 75, 0.12);
  padding: clamp(26px, 5vw, 40px);
  max-width: 460px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
/* soft colored bar across the top of the card */
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--green), var(--blue), var(--lilac));
}
.field { margin-bottom: 15px; }
.field > label { display: block; font-family: var(--title); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 6px; text-transform: uppercase; }
.field .lc { letter-spacing: 0.02em; opacity: 0.75; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  border: none; border-bottom: 2px solid #ecdfe2; border-radius: 0;
  padding: 10px 2px; background: transparent; transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--pink); }
.field input::placeholder, .field textarea::placeholder { color: #c9bdc0; }
.field textarea { resize: vertical; min-height: 58px; }
.hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 5px; }

/* segmented Yes / Can't control */
.toggle { display: flex; gap: 6px; background: var(--cream); border-radius: 999px; padding: 5px; }
.toggle span { flex: 1; }
.toggle label { display: block; text-align: center; cursor: pointer; border-radius: 999px; padding: 11px 8px; transition: all 0.14s ease; color: var(--ink-soft); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle input:checked + label { background: var(--pink); color: #fff; box-shadow: 0 4px 10px rgba(239, 144, 163, 0.4); }
.toggle .no input:checked + label { background: var(--blue); box-shadow: 0 4px 10px rgba(155, 180, 205, 0.4); }

.counts { display: flex; gap: 14px; }
.counts .field { flex: 1; margin-bottom: 0; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--pink-soft); cursor: pointer; background: #fff; color: var(--pink); font-size: 1.4rem; line-height: 1; transition: transform 0.1s ease, background 0.12s ease; }
.stepper button:hover { background: #fdeff2; }
.stepper button:active { transform: scale(0.88); }
.stepper .val { font-family: var(--title); font-size: 1.5rem; color: var(--ink); min-width: 30px; text-align: center; }

.form-error { color: #c0435c; margin: 2px 0 10px; min-height: 1.1em; }
.rsvp-actions { text-align: center; margin-top: 4px; }
#coming-only.hidden { display: none; }

.thanks { text-align: center; }
.thanks .big { font-family: var(--title); font-size: clamp(1.8rem, 7vw, 2.6rem); color: var(--pink); margin: 4px 0; }
.thanks p { color: var(--ink-soft); }

/* ---- Gifts (3-up, refined) ---- */
/* Gifts — compact "presence over presents" with two tiny links beneath */
.gift-lead { text-align: center; max-width: 440px; margin: 0 auto; }
.gift-lead h3 { font-family: var(--title); color: var(--pink); font-size: clamp(1.15rem, 4vw, 1.4rem); letter-spacing: 0.02em; margin: 0 0 6px; }
.gift-lead p { color: var(--ink-soft); font-size: 0.95rem; text-transform: none; margin: 0; }
.gift-or { text-align: center; color: var(--ink-soft); font-size: 0.82rem; text-transform: none; letter-spacing: 0.03em; margin: 16px 0 12px; opacity: 0.85; }
.gift-mini { display: flex; justify-content: center; gap: clamp(24px, 8vw, 56px); flex-wrap: wrap; }
.gift-item { text-align: center; display: flex; flex-direction: column; align-items: center; }
.gift-item .ico { width: 1.4rem; height: 1.4rem; }
.gift-item h4 { font-family: var(--title); font-size: 0.76rem; letter-spacing: 0.08em; color: var(--ink-soft); margin: 3px 0 8px; }

/* ---- Cute icons (replace emoji) ---- */
.ico { width: 1.9rem; height: 1.9rem; display: inline-block; vertical-align: middle; }
.detail .ico { width: 2.1rem; height: 2.1rem; margin-bottom: 6px; }
.gift-card .ico { width: 2.3rem; height: 2.3rem; }
.ico-sm { width: 1.05rem; height: 1.05rem; display: inline-block; vertical-align: -0.15em; }
.month-card .ico { width: 34%; height: 34%; opacity: 0.7; }

/* ---- Slideshow ---- */
.slideshow { max-width: 460px; margin: 0 auto; }
.slide-frame {
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  background: #f2e7e9; box-shadow: var(--shadow);
  border: 4px solid #fff; outline: 3px solid var(--pink-soft);
}
/* blurred fill behind the photo so portraits show whole, with no ugly bars */
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(16px) brightness(1.04); transform: scale(1.12); z-index: 0; }
.slide-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.55s ease; z-index: 1; }
.slide-frame img.active { opacity: 1; }
.slide-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--pink); }
.slide-empty .ico { width: 3rem; height: 3rem; opacity: 0.6; }
.slide-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.slide-arrow { width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; background: #fff; box-shadow: var(--shadow); color: var(--pink); font-size: 1.3rem; line-height: 1; transition: transform 0.12s ease; }
.slide-arrow:hover { transform: scale(1.1); }
.slide-arrow:active { transform: scale(0.92); }
.slide-dots { display: flex; gap: 7px; }
.slide-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--pink-soft); cursor: pointer; padding: 0; }
.slide-dots button.on { background: var(--pink); }
.slide-count { font-family: var(--title); font-size: 0.92rem; color: var(--ink-soft); letter-spacing: 0.06em; }

/* ---- Watch Me Grow (monthly polaroids) ---- */
.months {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 2vw, 16px);
  max-width: 640px;
  margin: 0 auto;
}
.month-card { width: clamp(84px, 20vw, 104px); }
.month-card {
  background: #fff;
  padding: 7px 7px 9px;
  border-radius: 5px;
  box-shadow: 0 6px 13px rgba(47, 58, 75, 0.15);
  text-align: center;
}
.month-card:nth-child(3n+1) { transform: rotate(-2.5deg); }
.month-card:nth-child(3n+2) { transform: rotate(1.5deg); }
.month-card:nth-child(3n) { transform: rotate(-1deg); }
.month-card .ph {
  aspect-ratio: 1;
  border-radius: 3px;
  background: #f2e7e9 center / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: var(--pink); font-size: 1.5rem;
}
.month-card .cap {
  font-family: var(--title); font-size: 0.72rem; color: var(--ink-soft);
  margin-top: 7px; letter-spacing: 0.05em;
}
.month-card.one .ph { background: #fdeef1; }
.month-card.one .cap { color: var(--pink); }
.month-card { cursor: pointer; transition: transform 0.15s ease; }
.month-card:hover { transform: scale(1.06) rotate(0deg) !important; z-index: 2; }

/* Lightbox — click a month polaroid to see it big */
.lightbox { position: fixed; inset: 0; background: rgba(47, 58, 75, 0.85); display: none; align-items: center; justify-content: center; z-index: 100; padding: clamp(16px, 4vw, 40px); }
.lightbox.on { display: flex; animation: lbFade 0.2s ease; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-inner { max-width: min(90vw, 720px); background: #fff; padding: 12px 12px 18px; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); text-align: center; transform: rotate(-1deg); }
.lightbox-inner img { display: block; max-width: 100%; max-height: 78vh; border-radius: 4px; }
.lightbox-inner .cap { font-family: var(--title); font-size: 1rem; color: var(--pink); margin-top: 10px; letter-spacing: 0.06em; }
.lightbox-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: none; cursor: pointer; font-size: 1.4rem; color: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* ---- Guest photo share (/share) ---- */
.share-inner { padding-top: 22px; }
.drop { display: block; text-align: center; padding: 30px 22px; border-radius: 18px; background: #fdeff2; border: 3px dashed var(--pink); cursor: pointer; transition: all 0.15s ease; margin: 8px 0 14px; }
.drop:hover, .drop:active { background: #fce3e8; transform: scale(1.01); }
.drop .ico { width: 2.4rem; height: 2.4rem; }
.drop-title { display: block; font-family: var(--title); color: var(--pink); font-size: 1.15rem; margin-top: 6px; }
.drop-sub { display: block; font-size: 0.82rem; color: var(--ink-soft); text-transform: none; margin-top: 4px; }
.uplist { list-style: none; padding: 0; margin: 8px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.upitem { display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; }
.upitem.bad { background: #fbe1e7; }
.upname { flex: 1; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.upsize { color: var(--ink-soft); font-size: 0.78rem; text-transform: none; }
.upitem.bad .upsize { color: #c0435c; }
.uprm { width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer; background: #fff; color: var(--ink-soft); font-size: 1rem; line-height: 1; }
.uprm:hover { color: #c0435c; }

/* ---- Footer ---- */
footer { text-align: center; color: var(--ink-soft); margin-top: clamp(30px, 5vw, 44px); font-size: 0.92rem; letter-spacing: 0.04em; }
footer .heart { color: var(--pink); }

/* ---- Confetti ---- */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.confetti-bit { position: absolute; top: -24px; background-repeat: no-repeat; background-size: contain; background-position: center; will-change: transform; }

/* ---- Desktop layout ---- */
@media (min-width: 720px) {
  .details-grid { grid-template-columns: repeat(3, 1fr); max-width: 640px; gap: 16px; }
  .gifts { grid-template-columns: repeat(3, 1fr); max-width: 100%; gap: 18px; }
  .hero-art { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #confetti { display: none; }
  .btn, .stepper button { transition: none; }
}
