/* ══ Bentar — ivory · espresso · marigold ══
   Prefix: bl- · Fonts: Marcellus · Albert Sans · Noto Sans Balinese */

:root {
  --bl-ivory: #F7F2E4;
  --bl-ivory-2: #EFE7D2;
  --bl-espresso: #2A2320;
  --bl-stone: #4A423B;
  --bl-marigold: #D9A441;
  --bl-marigold-2: #E8B93E;
  --bl-white: #FDFBF4;
  --bl-gold-ink: #8F6A1E;
  --bl-body: #4E463E;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Albert Sans", system-ui, sans-serif; background: var(--bl-espresso);
  color: var(--bl-body); -webkit-font-smoothing: antialiased;
}
body:not(.is-open) { overflow: hidden; }

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

/* ── cover: gate opens ── */
.bl-cover {
  position: fixed; inset: 0; z-index: 100; max-width: 480px; margin: 0 auto;
  background: linear-gradient(180deg, var(--bl-ivory) 0%, var(--bl-ivory-2) 100%);
  display: flex; align-items: center; justify-content: center;
  transition: visibility 0s 1.2s;
}
.bl-gate { position: absolute; top: 0; bottom: 0; width: 40%; transition: transform 1.05s cubic-bezier(.65,0,.25,1); }
.bl-gate svg { display: block; width: 100%; height: 100%; }
.bl-gate-l { left: 0; }
.bl-gate-r { right: 0; }
.bl-cover-inner {
  position: relative; text-align: center; color: var(--bl-espresso);
  padding: 28px 20px; width: 64%; max-width: 340px; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(247,242,228,.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 40px rgba(42,35,32,.18);
  border-left: 1px solid rgba(217,164,65,.35);
  border-right: 1px solid rgba(217,164,65,.35);
  transition: opacity .45s ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bl-cover-inner { background: rgba(247,242,228,.93); }
}
body.is-open .bl-cover { visibility: hidden; pointer-events: none; }
body.is-open .bl-gate-l { transform: translateX(-104%); }
body.is-open .bl-gate-r { transform: translateX(104%); }
body.is-open .bl-cover-inner { opacity: 0; }

.bl-aksara { font-family: "Noto Sans Balinese", serif; font-size: 21px; color: var(--bl-marigold); line-height: 1.6; }
.bl-aksara-sm { font-size: 15px; }
.bl-cover-mean { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--bl-stone); margin-top: 4px; }
.bl-cover-names { font-family: "Marcellus", serif; font-weight: 400; font-size: 44px; line-height: 1.1; margin: 14px 0 6px; }
.bl-cover-names span { display: block; font-size: 17px; color: var(--bl-marigold); margin: 4px 0; }
.bl-cover-date { font-size: 14px; letter-spacing: .08em; color: var(--bl-stone); }
.bl-cover-guest { margin: 26px 0 22px; font-size: 13px; color: var(--bl-stone); }
.bl-guest-name { font-family: "Marcellus", serif; font-size: 20px; color: var(--bl-espresso); margin-top: 5px; }
.bl-open-btn {
  font-family: "Albert Sans", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--bl-ivory); background: var(--bl-espresso);
  border: 1px solid var(--bl-espresso); padding: 13px 34px; cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.bl-open-btn:hover { background: var(--bl-marigold); border-color: var(--bl-marigold); color: var(--bl-espresso); }
.bl-cover-flower { width: 34px; height: 34px; margin-top: 22px; }

/* ── falling petals ── */
.bl-petals { position: fixed; inset: 0; max-width: 480px; margin: 0 auto; pointer-events: none; z-index: 60; overflow: hidden; }
.bl-petal { position: absolute; top: -50px; width: 22px; height: 22px; opacity: 0; }
body.is-open .bl-petal { animation: bl-fall 13s linear infinite; }
.bl-p1 { left: 8%; animation-delay: 0s !important; }
.bl-p2 { left: 30%; width: 16px; height: 16px; animation-delay: 3.5s !important; }
.bl-p3 { left: 55%; animation-delay: 7s !important; }
.bl-p4 { left: 74%; width: 17px; height: 17px; animation-delay: 1.8s !important; }
.bl-p5 { left: 90%; animation-delay: 9.5s !important; }
@keyframes bl-fall {
  0% { transform: translateY(-40px) rotate(0deg); opacity: 0; }
  8% { opacity: .5; }
  50% { transform: translateY(50vh) rotate(180deg) translateX(24px); opacity: .38; }
  92% { opacity: .12; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}
@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; }
} }

/* ── hero in gate ── */
.bl-hero { position: relative; background: var(--bl-ivory); padding: 40px 20px 46px; }
.bl-hero-frame { position: absolute; inset: 0; display: flex; justify-content: space-between; pointer-events: none; }
.bl-hero-frame::before, .bl-hero-frame::after {
  content: ""; position: absolute; top: 20px; bottom: 20px; width: 1.5px;
  background: linear-gradient(180deg, transparent, var(--bl-marigold) 24% 76%, transparent);
  opacity: .85;
}
.bl-hero-frame::before { left: 16px; }
.bl-hero-frame::after { right: 16px; }
.bl-tridatu { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 120px; height: 5px;
  background: linear-gradient(90deg, #2A2320 0 33%, #FDFBF4 33% 66%, #A03A2A 66% 100%); border-radius: 3px; }
.bl-hero-body { position: relative; text-align: center; padding: 26px 34px 0; }
.bl-hero-intro { font-size: 13px; line-height: 1.7; color: var(--bl-body); max-width: 32ch; margin: 14px auto 16px; }
.bl-hero-names { font-family: "Marcellus", serif; font-weight: 400; font-size: 42px; line-height: 1.15; color: var(--bl-espresso); }
.bl-hero-names em { display: block; font-style: normal; font-size: 15px; color: var(--bl-marigold); letter-spacing: .2em; text-transform: uppercase; margin: 8px 0; }
.bl-hero-date { margin-top: 10px; font-size: 14px; letter-spacing: .1em; color: var(--bl-stone); }
.bl-cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 330px; margin: 26px auto 0; }
.bl-cd-cell { background: var(--bl-white); border: 1px solid #E4D9BE; padding: 10px 4px 8px; text-align: center; }
.bl-cd-cell b { display: block; font-family: "Marcellus", serif; font-weight: 400; font-size: 24px; color: var(--bl-espresso); font-variant-numeric: tabular-nums; }
.bl-cd-cell span { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--bl-gold-ink); }

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

/* ── couple ── */
.bl-person { background: var(--bl-white); border: 1px solid #E7DCC4; padding: 26px 20px 22px; text-align: center; position: relative; max-width: 340px; }
.bl-person::before, .bl-person::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--bl-marigold);
}
.bl-person::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.bl-person::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.bl-person-l { margin-left: 0; }
.bl-person-r { margin-left: auto; }
.bl-wiwit { text-align: center; color: var(--bl-marigold); font-size: 22px; margin: 12px 0; }
.bl-avatar {
  width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--bl-espresso); color: var(--bl-marigold);
  display: grid; place-items: center; font-family: "Marcellus", serif; font-size: 22px;
  box-shadow: 0 0 0 3px var(--bl-ivory), 0 0 0 4px var(--bl-marigold);
}
.bl-person-name { font-family: "Marcellus", serif; font-size: 21px; color: var(--bl-espresso); }
.bl-person-parents { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.bl-person-ig { margin-top: 6px; font-size: 12px; color: var(--bl-gold-ink); letter-spacing: .05em; }

/* ── events asymmetric ── */
.bl-events { background: linear-gradient(180deg, var(--bl-ivory-2), var(--bl-ivory)); }
.bl-event { background: var(--bl-white); border: 1px solid #E7DCC4; border-top: 4px solid var(--bl-marigold); padding: 22px 20px; width: 88%; }
.bl-event-a { margin-right: auto; }
.bl-event-b { margin-left: auto; border-top-color: var(--bl-espresso); }
.bl-event-no { font-family: "Marcellus", serif; font-size: 13px; letter-spacing: .3em; color: var(--bl-marigold); }
.bl-event-title { font-family: "Marcellus", serif; font-size: 22px; color: var(--bl-espresso); margin-top: 2px; }
.bl-event-time { font-size: 13.5px; font-weight: 600; color: var(--bl-gold-ink); margin-top: 4px; }
.bl-event-venue { font-size: 14.5px; font-weight: 600; color: var(--bl-espresso); margin-top: 10px; }
.bl-event-addr { font-size: 12.5px; line-height: 1.55; margin-top: 2px; }
.bl-cal { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.bl-cal a {
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-decoration: none;
  color: var(--bl-espresso); border-bottom: 1px solid var(--bl-marigold); padding-bottom: 2px;
}
.bl-maps { margin-top: 26px; }
.bl-map-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.bl-map-tab {
  appearance: none; border: 1px solid var(--bl-espresso); background: var(--bl-ivory); cursor: pointer;
  padding: 10px 0; font-family: "Albert Sans", sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--bl-espresso);
}
.bl-map-tab:first-child { border-right: none; }
.bl-map-tab.is-active { background: var(--bl-espresso); color: var(--bl-ivory); }
.bl-map { display: block; width: 100%; height: 220px; border: 1px solid var(--bl-espresso); }

/* ── story ── */
.bl-story { list-style: none; display: grid; gap: 8px; }
.bl-story-item { position: relative; padding: 14px 0 14px 66px; border-bottom: 1px dashed #D8CBAA; }
.bl-story-item:last-child { border-bottom: none; }
.bl-story-year {
  position: absolute; left: 0; top: 14px; font-family: "Marcellus", serif; font-size: 15px;
  color: var(--bl-gold-ink); border: 1px solid var(--bl-marigold); padding: 5px 8px;
}
.bl-story-title { font-family: "Marcellus", serif; font-size: 18px; color: var(--bl-espresso); }
.bl-story-text { font-size: 13.5px; line-height: 1.65; margin-top: 5px; }

/* ── gallery ── */
.bl-gal-sec { background: var(--bl-ivory-2); }
.bl-gal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bl-g-item { cursor: zoom-in; border: 4px solid var(--bl-white); box-shadow: 0 8px 20px -12px rgba(42,35,32,.4); transition: transform .25s ease;  aspect-ratio: 4/3; overflow: hidden; }
.bl-g-item:nth-child(odd) { transform: rotate(-1.2deg); }
.bl-g-item:nth-child(even) { transform: rotate(1.2deg); }
.bl-g-item:hover { transform: rotate(0) scale(1.02); }
.bl-g-item svg { display: block; width: 100%; height: auto; }
.bl-g-item img { display: block; width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; }
.bl-g-item { color: #4C7A5A; }

/* ── forms ── */
.bl-form { display: grid; gap: 16px; }
.bl-field { display: grid; gap: 6px; border: none; }
.bl-field span, .bl-field legend { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--bl-stone); }
.bl-field input, .bl-field select, .bl-field textarea {
  font-family: "Albert Sans", sans-serif; font-size: 14.5px; color: var(--bl-espresso);
  background: var(--bl-white); border: 1px solid #DCD1B6; padding: 11px 13px; outline: none; width: 100%;
  transition: border-color .2s ease;
}
.bl-field input:focus, .bl-field select:focus, .bl-field textarea:focus { border-color: var(--bl-marigold); }
.bl-radios { display: block; }
.bl-radios label { display: flex; gap: 9px; align-items: center; font-size: 14px; padding: 5px 0; text-transform: none; letter-spacing: 0; }
.bl-radios input { accent-color: var(--bl-marigold); width: 16px; height: 16px; }
.bl-submit {
  justify-self: center; appearance: none; border: 1px solid var(--bl-espresso); cursor: pointer;
  background: var(--bl-espresso); color: var(--bl-ivory); font-family: "Albert Sans", sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; padding: 13px 32px;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.bl-submit:hover { background: var(--bl-marigold); border-color: var(--bl-marigold); color: var(--bl-espresso); }
.bl-thanks { text-align: center; font-family: "Marcellus", serif; font-size: 17px; color: var(--bl-gold-ink); padding: 24px 8px; }

/* ── wishes ── */
.bl-wish-form { margin-bottom: 26px; }
.bl-wishes { display: grid; gap: 10px; margin-bottom: 16px; }
[data-wishes-list] .wish { background: var(--bl-white); border: 1px solid #E7DCC4; border-left: 3px solid var(--bl-marigold); padding: 13px 16px 11px; }
[data-wishes-list] .wish h4 { font-family: "Marcellus", serif; font-weight: 400; font-size: 15.5px; color: var(--bl-espresso); }
[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: #8F8471; margin-top: 6px; }
.bl-more {
  display: block; margin: 0 auto; appearance: none; background: none; cursor: pointer;
  border: 1px solid var(--bl-espresso); color: var(--bl-espresso); font-family: "Albert Sans", sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 9px 20px;
}

/* ── amplop ── */
.bl-amplop { background: var(--bl-ivory-2); }
.bl-amplop-note { text-align: center; font-size: 13px; line-height: 1.65; max-width: 36ch; margin: 0 auto 20px; }
.bl-envs { display: grid; gap: 12px; }
.bl-env { background: var(--bl-espresso); color: var(--bl-ivory); padding: 20px 18px 17px; text-align: center; position: relative; }
.bl-env::before { content: ""; position: absolute; top: 7px; left: 7px; right: 7px; bottom: 7px; border: 1px solid rgba(217,164,65,.4); pointer-events: none; }
.bl-env-name { font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--bl-marigold); }
.bl-env-num { font-family: "Marcellus", serif; font-size: 23px; letter-spacing: .06em; margin-top: 7px; }
.bl-env-holder { font-size: 12px; color: #C9BFA9; margin-top: 3px; }
.bl-copy {
  margin-top: 12px; appearance: none; cursor: pointer; background: var(--bl-marigold); color: var(--bl-espresso);
  border: none; font-family: "Albert Sans", sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; padding: 8px 16px;
}

/* ── closing ── */
.bl-closing { background: var(--bl-espresso); color: var(--bl-ivory); text-align: center; padding: 52px 26px 36px; }
.bl-closing .bl-aksara { color: var(--bl-marigold); }
.bl-closing-text { font-size: 13px; line-height: 1.7; color: #C9BFA9; max-width: 34ch; margin: 16px auto 22px; }
.bl-closing-names { font-family: "Marcellus", serif; font-size: 34px; }
.bl-closing-shanti { margin-top: 18px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--bl-marigold); }

/* ── music ── */
.bl-music {
  position: fixed; right: 18px; bottom: 22px; z-index: 90; width: 44px; height: 44px;
  background: var(--bl-espresso); color: var(--bl-marigold); border: 1px solid rgba(217,164,65,.5);
  cursor: pointer; display: grid; place-items: center; border-radius: 0;
}
.bl-music svg { width: 20px; height: 20px; }
.bl-music.is-playing { animation: bl-ring 2.6s ease infinite; }
@keyframes bl-ring { 0%,100% { box-shadow: 0 0 0 0 rgba(217,164,65,.45);} 60% { box-shadow: 0 0 0 11px rgba(217,164,65,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; }
.bl-g-item[data-reveal] { opacity: 0; transition: opacity .8s ease, transform .8s ease; }
.bl-g-item[data-reveal].revealed:nth-child(odd) { transform: rotate(-1.2deg); }
.bl-g-item[data-reveal].revealed:nth-child(even) { transform: rotate(1.2deg); }

.lb-overlay { font-family: "Albert Sans", sans-serif; }
.map-open { color: var(--bl-gold-ink); }