/* ══ Jawa Jepara Papercut — paper white · pearl gray · zero chroma ══
   Prefix: jp- · Fonts: EB Garamond · Nunito Sans · Noto Sans Javanese */

:root {
  --jp-white: #FDFDFB;
  --jp-paper: #F0F0EA;
  --jp-gray: #E4E4DC;
  --jp-gray-d: #D9D9D2;
  --jp-ink: #3B3B38;
  --jp-mut: #78786F;
  --jp-shadow: 0 1px 2px rgba(59,59,56,.06), 0 3px 8px rgba(59,59,56,.07), 0 14px 30px -12px rgba(59,59,56,.16);
  --jp-shadow-lg: 0 1px 2px rgba(59,59,56,.07), 0 6px 14px rgba(59,59,56,.09), 0 26px 48px -16px rgba(59,59,56,.24);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Nunito Sans", system-ui, sans-serif; background: var(--jp-paper); color: var(--jp-ink); -webkit-font-smoothing: antialiased; }
body:not(.is-open) { overflow: hidden; }

.jp-page { max-width: 480px; margin: 0 auto; position: relative; overflow-x: clip; padding: 18px 16px 0; background: linear-gradient(180deg, #ECECE4 0%, var(--jp-paper) 8%, var(--jp-paper) 92%, #ECECE4 100%); }

/* ── the sheet motif ── */
.jp-sheet {
  position: relative; background: var(--jp-white); border-radius: 4px;
  box-shadow: var(--jp-shadow);
  margin-bottom: 22px;
}
.jp-sheet::before { /* scalloped cut edge */
  content: ""; position: absolute; top: -8px; left: 14px; right: 14px; height: 16px;
  background: radial-gradient(circle at 8px 12px, transparent 7px, var(--jp-white) 7.5px);
  background-size: 22px 16px; background-repeat: repeat-x;
  filter: drop-shadow(0 -2px 2px rgba(59,59,56,.08));
}

/* ── cover: paper cascade ── */
.jp-cover {
  position: fixed; inset: 0; z-index: 100; max-width: 480px; margin: 0 auto;
  background: var(--jp-paper); display: flex; align-items: center; justify-content: center;
  transition: visibility 0s 1.25s;
}
.jp-sheet3, .jp-sheet2, .jp-sheet1 {
  position: absolute; left: 50%; top: 50%; width: 86%; height: 76%;
  background: var(--jp-white); border-radius: 4px;
}
.jp-sheet3 { transform: translate(-50%,-50%) rotate(-4deg); box-shadow: var(--jp-shadow); transition: transform .7s cubic-bezier(.6,0,.3,1); }
.jp-sheet2 { transform: translate(-50%,-50%) rotate(3deg); box-shadow: var(--jp-shadow); transition: transform .7s cubic-bezier(.6,0,.3,1) .12s; }
.jp-sheet1 { transform: translate(-50%,-50%) rotate(0deg); box-shadow: var(--jp-shadow-lg); transition: transform .75s cubic-bezier(.6,0,.3,1) .26s, opacity .4s ease .5s; }
body.is-open .jp-cover { visibility: hidden; pointer-events: none; }
body.is-open .jp-sheet3 { transform: translate(-50%,-50%) rotate(-4deg) translateX(-120%) translateY(-6%); }
body.is-open .jp-sheet2 { transform: translate(-50%,-50%) rotate(3deg) translateX(120%) translateY(-4%); }
body.is-open .jp-sheet1 { transform: translate(-50%,-50%) rotate(0deg) translateY(-130%); opacity: 0; }
.jp-cover-inner { position: relative; text-align: center; padding: 30px; transition: opacity .4s ease; }
body.is-open .jp-cover-inner { opacity: 0; }
.jp-hanacaraka { font-family: "Noto Sans Javanese", serif; font-size: 24px; color: #A9A99E; letter-spacing: .2em; }
.jp-hanacaraka-lg { font-size: 36px; }
.jp-cover-bismillah { font-size: 11px; letter-spacing: .2em; color: var(--jp-mut); margin: 10px 0 4px; }
.jp-cover-names { font-family: "EB Garamond", Georgia, serif; font-weight: 500; font-size: 44px; line-height: 1.1; }
.jp-cover-names span { display: block; font-style: italic; font-weight: 400; font-size: 18px; color: #A9A99E; margin: 4px 0; }
.jp-cover-date { font-size: 13px; letter-spacing: .1em; color: var(--jp-mut); margin-top: 6px; }
.jp-cover-guest { margin: 24px 0 20px; font-size: 12.5px; color: var(--jp-mut); }
.jp-guest-name { font-family: "EB Garamond", serif; font-size: 21px; color: var(--jp-ink); margin-top: 4px; }
.jp-open-btn {
  font-family: "Nunito Sans", sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  background: var(--jp-white); color: var(--jp-ink); border: 1.5px solid var(--jp-gray-d); padding: 13px 34px; cursor: pointer;
  box-shadow: var(--jp-shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.jp-open-btn:hover { transform: translateY(-2px); box-shadow: var(--jp-shadow-lg); }

/* ── hero ── */
.jp-hero { text-align: center; padding: 44px 26px 34px; }
.jp-filigree { width: 120px; height: 60px; color: var(--jp-gray-d); display: block; margin: 0 auto; transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
.jp-filigree-b { transform: scaleY(-1); }
.jp-hero.revealed .jp-filigree { transform: translateY(-6px); }
.jp-hero.revealed .jp-filigree-b { transform: scaleY(-1) translateY(-6px); }
.jp-hero-intro { font-size: 13px; line-height: 1.75; color: var(--jp-mut); max-width: 34ch; margin: 12px auto 0; }
.jp-hero-names { font-family: "EB Garamond", serif; font-weight: 500; font-size: 48px; line-height: 1.1; margin: 16px 0 8px; }
.jp-hero-names em { font-style: italic; color: #A9A99E; }
.jp-hero-date { font-size: 13.5px; letter-spacing: .12em; color: var(--jp-mut); }
.jp-cd { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; max-width: 330px; margin: 24px auto 18px; }
.jp-cd-cell {
  background: var(--jp-paper); border: 1px solid var(--jp-gray); border-radius: 3px;
  padding: 11px 4px 9px; text-align: center; box-shadow: inset 0 1px 0 var(--jp-white), 0 1px 2px rgba(59,59,56,.05);
}
.jp-cd-cell b { display: block; font-family: "EB Garamond", serif; font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; }
.jp-cd-cell span { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--jp-mut); }

/* ── sections ── */
.jp-sec { padding: 42px 26px 38px; }
.jp-sec-head { text-align: center; margin-bottom: 28px; }
.jp-head-filigree { width: 110px; height: 55px; color: var(--jp-gray-d); margin: 0 auto; display: block; }
.jp-sec-title { font-family: "EB Garamond", serif; font-weight: 500; font-size: 26px; margin-top: 8px; }
.jp-sec-sub { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: #A9A99E; margin-top: 4px; }

/* ── couple: cut frames ── */
.jp-cutframe {
  width: 84px; height: 84px; margin: 0 auto 16px; display: grid; place-items: center;
  font-family: "EB Garamond", serif; font-size: 34px; color: var(--jp-mut);
  background: var(--jp-paper); box-shadow: var(--jp-shadow), inset 0 0 0 1px var(--jp-white), inset 0 0 0 2px var(--jp-gray);
  clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%);
}
.jp-person { text-align: center; }
.jp-amp { text-align: center; font-family: "EB Garamond", serif; font-style: italic; font-size: 28px; color: #A9A99E; margin: 12px 0; }
.jp-person-name { font-family: "EB Garamond", serif; font-weight: 500; font-size: 23px; }
.jp-person-parents { margin-top: 8px; font-size: 13px; line-height: 1.65; color: var(--jp-mut); }
.jp-person-ig { margin-top: 6px; font-size: 12px; color: #A9A99E; letter-spacing: .06em; }

/* ── events ── */
.jp-event {
  text-align: center; background: var(--jp-paper); padding: 24px 20px 20px; margin-bottom: 14px;
  border: 1px solid var(--jp-gray); box-shadow: inset 0 2px 0 var(--jp-white);
}
.jp-event-title { font-family: "EB Garamond", serif; font-weight: 500; font-size: 22px; }
.jp-event-time { font-size: 13px; font-weight: 700; color: #8F8F84; margin-top: 4px; letter-spacing: .05em; }
.jp-event-venue { font-size: 14.5px; font-weight: 700; margin-top: 10px; }
.jp-event-addr { font-size: 12.5px; line-height: 1.55; color: var(--jp-mut); margin-top: 2px; }
.jp-cal { margin-top: 13px; display: flex; justify-content: center; gap: 10px; }
.jp-cal a {
  font-size: 11.5px; font-weight: 700; color: var(--jp-ink); text-decoration: none;
  border: 1px solid var(--jp-gray-d); background: var(--jp-white); padding: 6px 12px;
  box-shadow: 0 1px 2px rgba(59,59,56,.07); transition: box-shadow .2s ease;
}
.jp-cal a:hover { box-shadow: var(--jp-shadow); }
.jp-map-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.jp-map-tab {
  appearance: none; border: 1px solid var(--jp-gray-d); background: var(--jp-white); cursor: pointer;
  padding: 10px 0; font-family: "Nunito Sans", sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--jp-mut);
  box-shadow: 0 1px 2px rgba(59,59,56,.06);
}
.jp-map-tab.is-active { background: var(--jp-paper); color: var(--jp-ink); box-shadow: inset 0 2px 4px rgba(59,59,56,.1); }
.jp-map { display: block; width: 100%; height: 215px; border: 1px solid var(--jp-gray-d); filter: grayscale(.85); }

/* ── story ── */
.jp-story { list-style: none; position: relative; padding-left: 56px; }
.jp-story::before {
  content: ""; position: absolute; left: 20px; top: 6px; bottom: 6px; width: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 2 v20 M2 12 h20' stroke='%23E4E4DC' stroke-width='1.4'/%3E%3Ccircle cx='12' cy='12' r='3.4' fill='%23D9D9D2'/%3E%3C/svg%3E") repeat-y;
}
.jp-story-item { position: relative; padding-bottom: 26px; }
.jp-story-item:last-child { padding-bottom: 0; }
.jp-story-year { font-family: "EB Garamond", serif; font-size: 15px; color: #A9A99E; letter-spacing: .1em; }
.jp-story-title { font-family: "EB Garamond", serif; font-weight: 500; font-size: 19px; margin: 3px 0 5px; }
.jp-story-text { font-size: 13.5px; line-height: 1.7; color: var(--jp-mut); }

/* ── gallery ── */
.jp-gal-sec { background: var(--jp-paper); box-shadow: none; border: 1px solid var(--jp-gray); }
.jp-gal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.jp-g-item {
  cursor: zoom-in; background: var(--jp-white); padding: 8px;
  box-shadow: var(--jp-shadow); transition: transform .25s ease, box-shadow .25s ease;
 aspect-ratio: 4/3; overflow: hidden; }
.jp-g-item:nth-child(odd) { transform: rotate(-.6deg); }
.jp-g-item:nth-child(even) { transform: rotate(.6deg); }
.jp-g-item:hover { transform: rotate(0) translateY(-3px); box-shadow: var(--jp-shadow-lg); }
.jp-g-item svg { display: block; width: 100%; height: auto; }
.jp-g-item img { display: block; width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; }
.jp-g-item { color: #A19C8E; }

/* ── forms ── */
.jp-form { display: grid; gap: 15px; }
.jp-field { display: grid; gap: 6px; border: none; }
.jp-field span, .jp-field legend { font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--jp-mut); }
.jp-field input, .jp-field select, .jp-field textarea {
  font-family: "Nunito Sans", sans-serif; font-size: 14.5px; color: var(--jp-ink);
  background: var(--jp-paper); border: 1px solid var(--jp-gray); border-radius: 3px; padding: 11px 13px; outline: none; width: 100%;
  box-shadow: inset 0 2px 3px rgba(59,59,56,.05);
}
.jp-field input:focus, .jp-field select:focus, .jp-field textarea:focus { background: var(--jp-white); border-color: var(--jp-gray-d); }
.jp-radios { display: block; }
.jp-radios label { display: flex; gap: 9px; align-items: center; font-size: 14px; padding: 4px 0; text-transform: none; letter-spacing: 0; color: var(--jp-mut); }
.jp-radios input { accent-color: #A9A99E; width: 16px; height: 16px; }
.jp-submit {
  justify-self: center; appearance: none; cursor: pointer;
  background: var(--jp-ink); color: var(--jp-white); border: none; border-radius: 3px;
  font-family: "Nunito Sans", sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; padding: 13px 34px; box-shadow: var(--jp-shadow); transition: transform .2s ease;
}
.jp-submit:hover { transform: translateY(-2px); }
.jp-thanks { text-align: center; font-family: "EB Garamond", serif; font-style: italic; font-size: 18px; color: var(--jp-mut); padding: 22px 8px; }

/* ── wishes ── */
.jp-wish-form { margin-bottom: 26px; }
.jp-wishes { display: grid; gap: 12px; margin-bottom: 16px; }
[data-wishes-list] .wish { background: var(--jp-paper); border: 1px solid var(--jp-gray); box-shadow: inset 0 1px 0 var(--jp-white); padding: 14px 17px 12px; }
[data-wishes-list] .wish h4 { font-family: "EB Garamond", serif; font-weight: 600; font-size: 16px; }
[data-wishes-list] .wish p { font-size: 13px; line-height: 1.65; color: var(--jp-mut); margin-top: 3px; }
[data-wishes-list] .wish time { display: block; font-size: 10.5px; color: #A9A99E; margin-top: 5px; }
.jp-more {
  display: block; margin: 0 auto; appearance: none; background: var(--jp-white); cursor: pointer;
  border: 1px solid var(--jp-gray-d); color: var(--jp-mut); font-family: "Nunito Sans", sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 9px 20px;
  box-shadow: 0 1px 2px rgba(59,59,56,.07);
}

/* ── amplop ── */
.jp-amplop { background: var(--jp-paper); box-shadow: none; border: 1px solid var(--jp-gray); }
.jp-amplop-note { text-align: center; font-size: 13px; line-height: 1.65; color: var(--jp-mut); max-width: 36ch; margin: 0 auto 20px; }
.jp-envs { display: grid; gap: 12px; }
.jp-env { background: var(--jp-white); text-align: center; padding: 20px 18px 17px; box-shadow: var(--jp-shadow); border: 1px solid var(--jp-gray); }
.jp-env-name { font-size: 10.5px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: #A9A99E; }
.jp-env-num { font-family: "EB Garamond", serif; font-size: 24px; letter-spacing: .06em; margin-top: 7px; }
.jp-env-holder { font-size: 12px; color: var(--jp-mut); margin-top: 3px; }
.jp-copy {
  margin-top: 12px; appearance: none; cursor: pointer; background: var(--jp-paper); color: var(--jp-ink);
  border: 1px solid var(--jp-gray-d); font-family: "Nunito Sans", sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 7px 15px; box-shadow: 0 1px 2px rgba(59,59,56,.06);
}

/* ── closing ── */
.jp-closing { text-align: center; padding: 44px 26px 30px; margin-bottom: 6px; }
.jp-closing-text { font-size: 13px; line-height: 1.75; color: var(--jp-mut); max-width: 34ch; margin: 14px auto 18px; }
.jp-closing-names { font-family: "EB Garamond", serif; font-weight: 500; font-size: 36px; }
.jp-closing .jp-filigree { margin-top: 18px; }

/* ── music ── */
.jp-music {
  position: fixed; right: 18px; bottom: 22px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  background: var(--jp-white); color: var(--jp-mut); border: 1px solid var(--jp-gray-d);
  cursor: pointer; display: grid; place-items: center; box-shadow: var(--jp-shadow-lg);
}
.jp-music svg { width: 20px; height: 20px; }
.jp-music.is-playing { background: var(--jp-ink); color: var(--jp-white); border-color: var(--jp-ink); }

/* ── reveal (behavior-critical) + shadow-box parallax ── */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .85s ease, transform .85s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }
.jp-sheet [data-reveal] .jp-filigree, .jp-sheet .jp-filigree { transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
.jp-sec.revealed .jp-head-filigree { transform: translateY(-7px); }
.jp-sheet.revealed::after { content: none; }

.lb-overlay { font-family: "Nunito Sans", sans-serif; background: rgba(240,240,234,.96); color: #3B3B38; }
.lb-overlay .lb-btn { background: rgba(59,59,56,.06); border-color: rgba(59,59,56,.3); color: inherit; }
.map-open { color: var(--jp-ink); }

@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; }
}
