/* ══ Bugis Sutra — champagne · gold thread · blush ══
   Prefix: bg- · Fonts: Prata · Manrope · Noto Sans Buginese */

:root {
  --bg-ivory: #F6F0E3;
  --bg-ivory-2: #FBF6EA;
  --bg-gold: #C9A961;
  --bg-gold-2: #A98D4F;
  --bg-gold-ink: #83703C;
  --bg-blush: #D8A7A0;
  --bg-blush-ink: #9C5F55;
  --bg-ink: #4A4033;
  --bg-line: #E3D9C2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Manrope", system-ui, sans-serif; background: #EFE7D3; color: var(--bg-ink); -webkit-font-smoothing: antialiased; }
body:not(.is-open) { overflow: hidden; }

.bg-page { max-width: 480px; margin: 0 auto; background: var(--bg-ivory); box-shadow: 0 0 60px rgba(74,64,51,.25); position: relative; overflow-x: clip; }

/* ── cover: hoop iris ── */
.bg-cover {
  position: fixed; inset: 0; z-index: 100; max-width: 480px; margin: 0 auto;
  background: radial-gradient(circle at 50% 42%, var(--bg-ivory-2) 0%, var(--bg-ivory) 62%, #EDE4CD 100%);
  display: flex; align-items: center; justify-content: center;
  clip-path: circle(150% at 50% 42%);
  transition: clip-path 1s cubic-bezier(.6,0,.3,1), visibility 0s 1s;
}
body.is-open .bg-cover { clip-path: circle(0% at 50% 42%); visibility: hidden; pointer-events: none; }
.bg-hoop { position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%); width: 320px; height: 320px; pointer-events: none; }
.bg-hoop-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 10px solid var(--bg-gold);
  box-shadow: inset 0 0 0 3px #FBF6EA, inset 0 0 0 5px var(--bg-gold-2), 0 18px 40px -18px rgba(74,64,51,.4);
  transition: transform 1s ease, opacity .6s ease;
}
.bg-hoop-clamp {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 30px; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--bg-gold-2), var(--bg-gold));
}
body.is-open .bg-hoop-ring { transform: scale(1.3); opacity: 0; }
.bg-cover-inner { position: relative; text-align: center; padding: 30px; max-width: 300px; transition: opacity .4s ease; }
body.is-open .bg-cover-inner { opacity: 0; }
.bg-lontara { font-family: "Noto Sans Buginese", serif; font-size: 26px; color: var(--bg-blush); }
.bg-lontara-lg { font-size: 40px; }
.bg-cover-kicker { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--bg-gold-ink); margin: 8px 0 4px; }
.bg-cover-names { font-family: "Prata", Georgia, serif; font-weight: 400; font-size: 40px; line-height: 1.15; }
.bg-cover-names span { display: block; font-size: 17px; color: var(--bg-blush); margin: 4px 0; }
.bg-cover-date { font-size: 13px; letter-spacing: .1em; color: var(--bg-gold-2); margin-top: 6px; }
.bg-cover-guest { margin: 40px 0 18px; font-size: 12.5px; color: #5C5245; background: rgba(255,255,255,.72); border: 1px solid var(--bg-gold); padding: 8px 16px; border-radius: 999px; backdrop-filter: blur(4px); }
.bg-guest-name { font-family: "Prata", serif; font-size: 19px; color: var(--bg-ink); margin-top: 4px; }
.bg-open-btn {
  font-family: "Manrope", sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  background: none; color: var(--bg-gold-2); border: 1.5px dashed var(--bg-gold); padding: 12px 32px; cursor: pointer;
  border-radius: 999px; transition: background .25s ease, color .25s ease;
}
.bg-open-btn:hover { background: var(--bg-gold); color: var(--bg-ivory-2); }

/* ── hero ── */
.bg-hero { position: relative; text-align: center; padding: 60px 28px 48px; }
.bg-hero-floral { position: absolute; width: 90px; height: 90px; color: var(--bg-blush); opacity: .55; }
.bg-hf-l { top: 24px; left: -18px; transform: rotate(-14deg); }
.bg-hf-r { bottom: 20px; right: -18px; transform: rotate(22deg); }
.bg-hero-intro { font-size: 13px; line-height: 1.75; max-width: 32ch; margin: 0 auto; }
.bg-hero-names { font-family: "Prata", serif; font-weight: 400; font-size: 46px; line-height: 1.12; margin: 18px 0 8px; }
.bg-hero-names em { font-style: normal; color: var(--bg-blush); font-size: 24px; margin: 0 4px; }
.bg-hero-date { font-size: 13.5px; letter-spacing: .12em; color: var(--bg-gold-2); }
.bg-cd { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; max-width: 330px; margin: 26px auto 0; }
.bg-cd-cell {
  background: var(--bg-ivory-2); border: 1.5px dashed var(--bg-gold); border-radius: 50% 50% 50% 50% / 42% 42% 42% 42%;
  padding: 13px 4px 10px; text-align: center;
}
.bg-cd-cell b { display: block; font-family: "Prata", serif; font-weight: 400; font-size: 22px; font-variant-numeric: tabular-nums; }
.bg-cd-cell span { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--bg-gold-ink); }

/* ── sections ── */
.bg-sec { padding: 50px 26px; }
.bg-sec-head { text-align: center; margin-bottom: 30px; }
.bg-head-floral { width: 34px; height: 34px; color: var(--bg-gold); }
.bg-sec-title { font-family: "Prata", serif; font-weight: 400; font-size: 24px; margin-top: 6px; }
.bg-sec-sub { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--bg-blush-ink); margin-top: 5px; }

/* ── couple hoops ── */
.bg-couple { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.bg-person { text-align: center; }
.bg-hoopframe {
  position: relative; width: 108px; height: 108px; margin: 0 auto 14px; border-radius: 50%;
  border: 6px solid var(--bg-gold); background: var(--bg-ivory-2);
  box-shadow: inset 0 0 0 3px #FBF6EA, inset 0 0 0 5px var(--bg-gold-2);
  display: grid; place-items: center;
}
.bg-hoopclamp {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 18px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--bg-gold-2), var(--bg-gold));
}
.bg-hoopframe b { font-family: "Prata", serif; font-weight: 400; font-size: 30px; color: var(--bg-gold-2); }
.bg-amp { font-family: "Prata", serif; font-size: 26px; color: var(--bg-blush); padding-top: 38px; }
.bg-person-name { font-family: "Prata", serif; font-size: 18px; line-height: 1.3; }
.bg-person-parents { margin-top: 7px; font-size: 11.5px; line-height: 1.55; color: #7C7160; }
.bg-person-ig { margin-top: 5px; font-size: 11.5px; color: var(--bg-blush-ink); }

/* ── events ── */
.bg-events { background: var(--bg-ivory-2); }
.bg-stitchline { display: block; width: 78%; margin: 0 auto 26px; height: 24px; color: var(--bg-gold); }
.bg-stitch { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 10 7; }
.bg-stitchline .bg-stitch { stroke-dasharray: 10 260; stroke-dashoffset: 0; }
.bg-stitchline.revealed .bg-stitch { animation: bg-sew 2.2s ease forwards; }
@keyframes bg-sew { from { stroke-dasharray: 0 300; } to { stroke-dasharray: 10 260; } }
.bg-event {
  background: #fff; text-align: center; padding: 26px 22px; margin-bottom: 14px;
  border: 1.5px dashed var(--bg-gold); outline: 4px solid var(--bg-ivory-2); outline-offset: -9px;
}
.bg-event-title { font-family: "Prata", serif; font-weight: 400; font-size: 21px; }
.bg-event-time { font-size: 13px; font-weight: 700; color: var(--bg-gold-ink); margin-top: 4px; letter-spacing: .04em; }
.bg-event-venue { font-size: 14px; font-weight: 700; margin-top: 10px; }
.bg-event-addr { font-size: 12.5px; line-height: 1.55; color: #7C7160; margin-top: 2px; }
.bg-cal { margin-top: 12px; display: flex; justify-content: center; gap: 14px; }
.bg-cal a { font-size: 12px; font-weight: 700; color: var(--bg-gold-ink); text-decoration: none; border-bottom: 1.5px dashed var(--bg-gold); padding-bottom: 2px; }
.bg-map-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.bg-map-tab {
  appearance: none; border: 1.5px dashed var(--bg-gold); background: var(--bg-ivory); cursor: pointer;
  padding: 10px 0; font-family: "Manrope", sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--bg-gold-2);
}
.bg-map-tab.is-active { background: var(--bg-gold); color: var(--bg-ivory-2); border-style: solid; }
.bg-map { display: block; width: 100%; height: 220px; border: 1.5px dashed var(--bg-gold); }

/* ── story: sewn thread ── */
.bg-story { list-style: none; position: relative; padding-left: 40px; }
.bg-storythread { position: absolute; left: 8px; top: 0; height: 100%; width: 24px; color: var(--bg-blush); }
.bg-storythread .bg-stitch { stroke-dasharray: 12 560; }
.bg-story.revealed .bg-storythread .bg-stitch { animation: bg-sewthread 3.2s ease forwards; }
@keyframes bg-sewthread { from { stroke-dasharray: 0 600; } to { stroke-dasharray: 12 560; } }
.bg-story-item { position: relative; padding-bottom: 28px; }
.bg-story-item:last-child { padding-bottom: 0; }
.bg-story-item::before {
  content: ""; position: absolute; left: -36px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-ivory); border: 3px solid var(--bg-gold);
}
.bg-story-year { font-family: "Prata", serif; font-size: 14px; color: var(--bg-blush-ink); letter-spacing: .08em; }
.bg-story-title { font-family: "Prata", serif; font-weight: 400; font-size: 18px; margin: 3px 0 5px; }
.bg-story-text { font-size: 13px; line-height: 1.7; color: #5C5245; }

/* ── gallery: hoops ── */
.bg-gal-sec { background: var(--bg-ivory-2); }
.bg-gal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bg-g-item { cursor: zoom-in; transition: transform .3s ease;  aspect-ratio: 4/3; overflow: hidden; }
.bg-g-item:hover { transform: scale(1.03) rotate(1.5deg); }
.bg-g-item svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 16px rgba(74,64,51,.18)); }
.bg-g-item img { display: block; width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; }
.bg-g-item { color: #A88940; }

/* ── forms ── */
.bg-form { display: grid; gap: 15px; }
.bg-field { display: grid; gap: 6px; border: none; }
.bg-field span, .bg-field legend { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--bg-gold-ink); }
.bg-field input, .bg-field select, .bg-field textarea {
  font-family: "Manrope", sans-serif; font-size: 14.5px; color: var(--bg-ink);
  background: #fff; border: 1.5px dashed var(--bg-line); border-radius: 12px; padding: 11px 14px; outline: none; width: 100%;
}
.bg-field input:focus, .bg-field select:focus, .bg-field textarea:focus { border-color: var(--bg-gold); border-style: solid; }
.bg-radios { display: block; }
.bg-radios label { display: flex; gap: 9px; align-items: center; font-size: 14px; padding: 4px 0; text-transform: none; letter-spacing: 0; }
.bg-radios input { accent-color: var(--bg-gold); width: 16px; height: 16px; }
.bg-submit {
  justify-self: center; appearance: none; cursor: pointer; border-radius: 999px;
  background: var(--bg-gold); color: #fff; border: none;
  font-family: "Manrope", sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; padding: 13px 34px; transition: background .25s ease, transform .2s ease;
}
.bg-submit:hover { background: var(--bg-gold-2); transform: translateY(-2px); }
.bg-thanks { text-align: center; font-family: "Prata", serif; font-size: 17px; color: var(--bg-gold-2); padding: 22px 8px; }

/* ── wishes ── */
.bg-wish-form { margin-bottom: 26px; }
.bg-wishes { display: grid; gap: 11px; margin-bottom: 16px; }
[data-wishes-list] .wish { background: #fff; border: 1.5px dashed var(--bg-line); border-radius: 14px; padding: 13px 16px 11px; }
[data-wishes-list] .wish h4 { font-family: "Prata", serif; font-weight: 400; font-size: 15.5px; color: var(--bg-gold-2); }
[data-wishes-list] .wish p { font-size: 13px; line-height: 1.6; margin-top: 3px; }
[data-wishes-list] .wish time { display: block; font-size: 10.5px; color: #A79C88; margin-top: 5px; }
.bg-more {
  display: block; margin: 0 auto; appearance: none; background: none; cursor: pointer; border-radius: 999px;
  border: 1.5px dashed var(--bg-gold); color: var(--bg-gold-2); font-family: "Manrope", sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 9px 20px;
}

/* ── amplop ── */
.bg-amplop { background: var(--bg-ivory-2); }
.bg-amplop-note { text-align: center; font-size: 13px; line-height: 1.65; max-width: 36ch; margin: 0 auto 20px; }
.bg-envs { display: grid; gap: 14px; }
.bg-env { background: #fff; border: 1.5px dashed var(--bg-gold); border-radius: 16px; text-align: center; padding: 20px 18px 17px; }
.bg-env-name { font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--bg-blush-ink); }
.bg-env-num { font-family: "Prata", serif; font-size: 23px; letter-spacing: .05em; margin-top: 7px; }
.bg-env-holder { font-size: 12px; color: #7C7160; margin-top: 3px; }
.bg-copy {
  margin-top: 12px; appearance: none; cursor: pointer; border-radius: 999px;
  background: var(--bg-gold); color: #fff; border: none;
  font-family: "Manrope", sans-serif; font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 8px 16px;
}

/* ── closing ── */
.bg-closing { background: linear-gradient(180deg, var(--bg-ivory) 0%, #EFE4C8 100%); text-align: center; padding: 52px 28px 38px; }
.bg-closing .bg-lontara { color: var(--bg-gold-2); }
.bg-closing-text { font-size: 13px; line-height: 1.7; color: #5C5245; max-width: 34ch; margin: 14px auto 20px; }
.bg-closing-names { font-family: "Prata", serif; font-size: 36px; }
.bg-closing-bar { margin-top: 16px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--bg-blush); }

/* ── music ── */
.bg-music {
  position: fixed; right: 18px; bottom: 22px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg-ivory-2); color: var(--bg-gold-2); border: 1.5px dashed var(--bg-gold);
  cursor: pointer; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(74,64,51,.2);
}
.bg-music svg { width: 20px; height: 20px; }
.bg-music.is-playing { animation: bg-threadpulse 2.4s ease infinite; }
@keyframes bg-threadpulse { 0%,100% { box-shadow: 0 8px 20px rgba(74,64,51,.2), 0 0 0 0 rgba(201,169,97,.5);} 60% { box-shadow: 0 8px 20px rgba(74,64,51,.2), 0 0 0 10px rgba(201,169,97,0);} }

/* ── reveal (behavior-critical) ── */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

.lb-overlay { font-family: "Manrope", sans-serif; }
.map-open { color: var(--bg-gold-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  /* cover-open end-states so content remains reachable */
  body.is-open [data-cover] { opacity: 0 !important; visibility: hidden !important; }
}
