/* ---------- Base ---------- */
:root {
  --ivory: #fdf7f1;
  --red: #a3142f;
  --deep-red: #6e0b1d;
  --pink: #f4b6c6;
  --rose: #e88aa5;
  --gold: #d4a93c;
  --gold-soft: #f1d58a;
  --ink: #3a1d22;
  --script: "Great Vibes", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Josefin Sans", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

h1, h2, p { margin: 0; }
a { color: inherit; }

.page {
  position: relative;
  min-height: 100svh;
  padding: 4.5rem 1.25rem 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
  isolation: isolate;
}

.card {
  position: relative;
  width: min(100%, 30rem);
  text-align: center;
  padding: 2.5rem 1.75rem;
  z-index: 2;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.details { margin-top: 1.75rem; }
.date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
}
.date span { flex: 1; padding: .45rem 0; border-block: 1.5px solid currentColor; max-width: 9rem; }
.date strong { font-family: var(--serif); font-size: 3.1rem; line-height: 1; letter-spacing: 0; font-weight: 700; }
.time { font-size: 1.25rem; font-style: italic; margin-top: .9rem; }
.venue { font-size: 1.3rem; font-weight: 700; margin-top: .5rem; line-height: 1.25; }
.map-link {
  display: inline-block;
  margin-top: .35rem;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .75;
  text-underline-offset: 3px;
}
.map-link:hover { opacity: 1; }

.ornament { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1.1rem auto; color: var(--red); }
.ornament i { display: block; width: 4.5rem; height: 1px; background: currentColor; opacity: .6; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

.next-btn {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: .65rem 1.3rem .55rem;
  border-radius: 99px;
  cursor: pointer;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 5px); } }

.dots {
  position: fixed;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  z-index: 50;
  padding: .5rem .35rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(6px);
}
.dots a { width: 9px; height: 9px; border-radius: 50%; background: rgba(110, 11, 29, .3); transition: transform .3s, background .3s; }
.dots a.active { background: var(--red); transform: scale(1.35); }

/* floral decorations shared */
.fl { position: absolute; z-index: 1; opacity: .9; }

/* ---------- Cover ---------- */
.cover {
  background:
    radial-gradient(circle at 20% 10%, rgba(244, 182, 198, .45), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(163, 20, 47, .15), transparent 45%),
    var(--ivory);
  color: var(--deep-red);
}
.cover::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1.5px solid rgba(212, 169, 60, .7);
  outline: 1px solid rgba(212, 169, 60, .4);
  outline-offset: 5px;
  pointer-events: none;
}
.cv-1 { width: 9rem; top: -2.2rem; left: -2.2rem; animation: spin 40s linear infinite; }
.cv-2 { width: 7rem; bottom: -1.5rem; right: -1.5rem; animation: spin 50s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.cover-inner { text-align: center; width: min(100%, 28rem); position: relative; z-index: 2; }
.cover-title { font-weight: 400; line-height: 1; }
.cover-title .names { display: block; font-family: var(--script); font-size: clamp(3rem, 13vw, 4.6rem); color: var(--red); }
.cover-title .amp { color: var(--rose); }
.cover-title .word {
  display: block;
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: .4em;
  font-size: clamp(1.4rem, 6vw, 2rem);
  margin-top: .6rem;
  padding-left: .4em;
}
.cover-sub { font-style: italic; font-size: 1.15rem; margin-bottom: 1.25rem; }

.fn-list { display: grid; gap: .7rem; }
.fn-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  text-decoration: none;
  font-family: var(--sans);
  box-shadow: 0 6px 18px rgba(110, 11, 29, .12);
  transition: transform .2s, box-shadow .2s;
}
.fn-btn:hover, .fn-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(110, 11, 29, .2); }
.fn-name { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .92rem; }
.fn-when { font-size: .78rem; letter-spacing: .1em; opacity: .85; white-space: nowrap; }
.fn-roce { background: linear-gradient(120deg, #f7cf4a, #eaa92a); color: #2e4a1b; }
.fn-pani { background: repeating-linear-gradient(90deg, #e2582b 0 10px, #ee7d2f 10px 20px); color: #fff6e3; }
.fn-pani .fn-name { font-family: "Shrikhand", cursive; text-transform: none; letter-spacing: .03em; font-weight: 400; font-size: 1.05rem; }
.fn-wedding { background: linear-gradient(120deg, var(--red), #d94a6c); color: #fff; }
.fn-porthapon { background: var(--deep-red); color: var(--gold-soft); border: 1.5px solid var(--gold); }
.fn-rsvp { background: #fff; color: var(--red); border: 1.5px dashed var(--rose); box-shadow: none; }

/* ---------- Roce (coconut / turmeric / palm) ---------- */
.roce {
  background:
    radial-gradient(circle at 50% 40%, #fde68a 0%, #f6c945 45%, #e9a628 100%);
  color: #2e4a1b;
}
.frond { position: absolute; width: 15rem; color: #4f8a2e; z-index: 1; filter: drop-shadow(0 4px 6px rgba(46, 74, 27, .25)); }
.frond-tl { top: 1rem; left: -5rem; transform: rotate(35deg); }
.frond-tr { top: 2rem; right: -5.5rem; transform: rotate(150deg); color: #3e7a24; }
.frond-bl { bottom: 2rem; left: -6rem; transform: rotate(-30deg); color: #3e7a24; }
.frond-br { bottom: 0; right: -5rem; transform: rotate(-145deg); }
.roce .frond { animation: sway 6s ease-in-out infinite; transform-origin: 0 50%; }
@keyframes sway { 50% { rotate: 4deg; } }

.roce-card {
  background: #fffaf0;
  border-radius: 200px 200px 24px 24px;
  border: 3px solid #4f8a2e;
  box-shadow: 0 0 0 8px #fffaf0, 0 0 0 10px #7a4a2a, 0 20px 40px rgba(90, 53, 25, .3);
  padding-top: 3.5rem;
}
.roce-card .eyebrow { color: #7a4a2a; }
.roce-title { line-height: 1; }
.roce-title .script { display: block; font-family: var(--script); font-size: 3.4rem; color: #7a4a2a; font-weight: 400; }
.roce-title .big {
  display: block;
  font-family: "Yeseva One", var(--serif);
  font-size: clamp(2rem, 9vw, 2.7rem);
  color: #3e7a24;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 400;
}
.coconut-row { display: flex; justify-content: center; align-items: flex-end; gap: .5rem; margin: 1.2rem 0 .8rem; }
.cn { width: 3.4rem; }
.cn-half { width: 5rem; }
.cn-a { transform: rotate(-12deg); }
.cn-b { transform: rotate(18deg); }
.roce-blurb { font-size: 1.15rem; font-style: italic; color: #5a3519; }
.roce .date span { border-color: #e9a628; }
.roce .date strong { color: #7a4a2a; }
.roce .venue { color: #3e7a24; }
.roce .next-btn { color: #2e4a1b; }

/* ---------- Umbracha Pani (retro) ---------- */
.pani { background: #f3e2bd; color: #4a2410; }
.sunburst {
  position: absolute;
  inset: -50%;
  z-index: 0;
  background: repeating-conic-gradient(from 0deg at 50% 50%, #f0a030 0 7.5deg, #f3e2bd 7.5deg 15deg);
  opacity: .55;
  animation: spin 120s linear infinite;
}
.pani-card {
  background: #fff6e3;
  border: 4px solid #4a2410;
  border-radius: 28px;
  box-shadow: 10px 10px 0 #e2582b, 20px 20px 0 #4a2410;
  overflow: hidden;
  padding-top: 3rem;
}
.stripes { position: absolute; top: 0; left: 0; right: 0; display: grid; }
.stripes i { height: 7px; }
.stripes i:nth-child(1) { background: #e2582b; }
.stripes i:nth-child(2) { background: #f0a030; }
.stripes i:nth-child(3) { background: #f6d365; }
.stripes i:nth-child(4) { background: #3f8f8a; }
.pani .eyebrow { color: #a2401b; }
.pani-title {
  font-family: "Shrikhand", cursive;
  font-weight: 400;
  font-size: clamp(2.6rem, 12vw, 3.6rem);
  line-height: .95;
  color: #f0a030;
  text-shadow: 3px 3px 0 #e2582b, 6px 6px 0 #4a2410;
}
.pani-title .small {
  display: block;
  font-family: var(--script);
  font-size: 2.6rem;
  color: #4a2410;
  text-shadow: none;
  margin-bottom: .2rem;
}
.vinyl-wrap { margin: 1.4rem auto 1rem; width: 6.5rem; }
.vinyl { width: 100%; animation: spin 6s linear infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.retro-line {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .04em;
  background: #4a2410;
  color: #f6d365;
  padding: .75rem 1rem .6rem;
  border-radius: 99px;
  transform: rotate(-2deg);
}
.pani .date span { border-color: #e2582b; }
.pani .date strong { font-family: "Shrikhand", cursive; font-weight: 400; color: #e2582b; }
.pani .venue { color: #a2401b; }
.pani .next-btn { background: #fff6e3; }

/* ---------- Wedding (red & pink) ---------- */
.wedding {
  background:
    radial-gradient(circle at 50% 0%, #fde3ea 0%, #f7c6d3 55%, #ec9bb3 100%);
  color: var(--deep-red);
}
.fl-1 { width: 8rem; top: -2rem; left: -2rem; }
.fl-2 { width: 4.5rem; top: 4rem; left: 3.5rem; }
.fl-3 { width: 8rem; bottom: -2rem; right: -2rem; }
.fl-4 { width: 4.5rem; bottom: 4.5rem; right: 3.5rem; }
.wedding .fl { animation: spin 60s linear infinite; }
.wedding-card {
  background: #fffafb;
  border-radius: 50% 50% 20px 20px / 150px 150px 20px 20px;
  border: 2px solid var(--red);
  box-shadow: 0 0 0 7px #fffafb, 0 0 0 9px var(--rose), 0 24px 50px rgba(110, 11, 29, .25);
  padding: 4.5rem 1.6rem 2.25rem;
}
.verse { margin: 0 auto; max-width: 22rem; font-style: italic; font-size: 1.2rem; line-height: 1.35; color: var(--red); }
.verse cite { display: block; font-family: var(--sans); font-style: normal; font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; margin-top: .5rem; color: var(--rose); }
.invite-line { font-size: 1.12rem; line-height: 1.45; margin: 1.3rem auto 0; max-width: 24rem; }
.couple { display: flex; flex-direction: column; align-items: center; gap: .1rem; margin-top: 1rem; font-weight: 400; }
.person .name { display: block; font-family: var(--script); font-size: clamp(2.5rem, 11vw, 3.2rem); color: var(--red); line-height: 1.1; }
.person .parents { display: block; font-family: var(--sans); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #8a4a57; }
.heart { color: #d94a6c; font-size: 1.8rem; margin: .4rem 0; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } 60% { transform: scale(1); } }
.wedding .date span { border-color: var(--rose); }
.wedding .date strong { color: var(--red); }
.followed { font-style: italic; font-size: 1.1rem; margin-top: 1.4rem; }
.blessings { font-family: var(--script); font-size: 2.2rem; color: var(--red); margin-top: 1.5rem; }
.wedding .next-btn { color: var(--deep-red); }

/* ---------- Porthapon (gold & red) ---------- */
.porthapon {
  background:
    radial-gradient(circle at 50% 30%, #a3142f 0%, #6e0b1d 60%, #3f0611 100%);
  color: var(--gold-soft);
}
.porthapon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(241, 213, 138, .35) 1px, transparent 1.5px);
  background-size: 22px 22px;
  z-index: 0;
}
.porthapon-card {
  border: 2px solid var(--gold);
  outline: 1px solid rgba(212, 169, 60, .5);
  outline-offset: 7px;
  background: linear-gradient(180deg, rgba(63, 6, 17, .85), rgba(110, 11, 29, .85));
  padding: 3rem 1.75rem;
}
.deco { position: absolute; width: 2.2rem; height: 2.2rem; border: 2px solid var(--gold); }
.deco-tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.deco-tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.deco-bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.deco-br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.porthapon .eyebrow { color: var(--gold); }
.porthapon-title {
  font-family: "Cinzel", var(--serif);
  font-weight: 700;
  font-size: clamp(2.3rem, 11vw, 3.3rem);
  letter-spacing: .08em;
  background: linear-gradient(180deg, #fff1bf 0%, #e7c35a 45%, #b8862b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.porthapon .ornament { color: var(--gold); }
.cheers { width: 7.5rem; margin: .4rem auto .6rem; display: block; }
.porthapon-blurb { font-size: 1.45rem; font-style: italic; color: #fff3d0; }
.porthapon .date span { border-color: var(--gold); }
.porthapon .date strong { color: #fff1bf; }
.porthapon .venue { color: #fff3d0; }

/* ---------- RSVP ---------- */
.rsvp {
  background: linear-gradient(180deg, var(--ivory), #fbe3ea);
  color: var(--deep-red);
}
.rs-1 { width: 9rem; top: -2.5rem; right: -2.5rem; animation: spin 50s linear infinite; }
.rsvp-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(110, 11, 29, .14);
  border-top: 6px solid var(--red);
  text-align: left;
}
.rsvp-title { font-family: var(--script); font-weight: 400; font-size: 4rem; color: var(--red); text-align: center; line-height: 1; }
.rsvp-sub { text-align: center; font-style: italic; font-size: 1.15rem; margin-bottom: 1.4rem; }

form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0;
  margin-bottom: .4rem;
}
.field em { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field input[type="text"],
.field input[type="number"],
.field textarea {
  font: inherit;
  font-size: 1.1rem;
  padding: .7rem .9rem;
  border: 1.5px solid #ecc3cf;
  border-radius: 10px;
  background: #fffafb;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--rose); outline-offset: 1px; border-color: var(--rose); }
.field input[type="number"] { max-width: 7rem; }

.choice { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice legend { width: 100%; }
.pill, .check { position: relative; cursor: pointer; }
.pill input, .check input { position: absolute; opacity: 0; pointer-events: none; }
.pill span, .check span {
  display: inline-block;
  padding: .55rem 1rem .45rem;
  border-radius: 99px;
  border: 1.5px solid #ecc3cf;
  font-family: var(--sans);
  font-size: .85rem;
  transition: background .2s, color .2s, border-color .2s;
}
.pill input:checked + span, .check input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.pill input:focus-visible + span, .check input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
.check span::before { content: "＋ "; }
.check input:checked + span::before { content: "✓ "; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.attend-only { display: grid; gap: 1rem; }
.attend-only[hidden] { display: none; }

.form-error { color: #b00020; font-family: var(--sans); font-size: .9rem; }
.send-to { font-family: var(--sans); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; text-align: center; margin-top: .4rem; }
.wa-list { display: grid; gap: .6rem; }
.wa-btn {
  display: flex;
  align-items: center;
  gap: .9rem;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: .85rem 1.1rem;
  background: #1f9e55;
  color: #fff;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  box-shadow: 0 6px 16px rgba(31, 158, 85, .3);
  transition: transform .2s, background .2s;
}
.wa-btn:hover, .wa-btn:focus-visible { background: #178a49; transform: translateY(-2px); }
.wa-btn svg { width: 1.8rem; height: 1.8rem; flex: none; }
.wa-btn strong { display: block; font-size: 1rem; letter-spacing: .03em; }
.wa-btn small { display: block; font-size: .8rem; opacity: .9; margin-top: .1rem; }

.signoff { text-align: center; font-style: italic; font-size: 1.1rem; margin-top: 1.6rem; }
.signoff span { display: block; font-family: var(--script); font-style: normal; font-size: 2.2rem; color: var(--red); }
.back-top { position: relative; z-index: 2; margin-top: 1.5rem; font-family: var(--sans); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Card index (/) ---------- */
.index-page { min-height: 100svh; padding: 3rem 1.25rem; background: var(--ivory); color: var(--deep-red); }
.index-page header { text-align: center; margin-bottom: 2rem; }
.index-page h1 { font-family: var(--script); font-weight: 400; font-size: clamp(2.8rem, 10vw, 4rem); color: var(--red); }
.index-page header p { font-style: italic; font-size: 1.15rem; }
.set-grid { display: grid; gap: 1rem; max-width: 60rem; margin: 0 auto; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.set {
  background: #fff;
  border-radius: 18px;
  padding: 1.5rem;
  border-top: 5px solid var(--red);
  box-shadow: 0 10px 30px rgba(110, 11, 29, .1);
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.set h2 { font-family: var(--sans); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }
.set ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; }
.set li { font-family: var(--sans); font-size: .78rem; padding: .35rem .7rem .25rem; border-radius: 99px; background: #fbe3ea; }
.set .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem; }
.set .actions a, .set .actions button {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .6rem .9rem .5rem;
  border-radius: 99px;
  border: 1.5px solid var(--red);
  background: transparent;
  color: var(--red);
  cursor: pointer;
  text-decoration: none;
}
.set .actions .primary { background: var(--red); color: #fff; }
.set .actions .wa { border-color: #1f9e55; color: #1f9e55; }

@media (min-width: 720px) {
  .frond { width: 22rem; }
  .cn { width: 4rem; }
  .cn-half { width: 6rem; }
}
