/* =========================================================
   Undangan Rafly & Khofi — tema burgundy & emas
   Warna utama ada di :root, cukup ubah variabel di bawah.
   Font disimpan lokal di assets/fonts (tidak butuh internet).
     Judul  : Cinzel            Isi    : Cormorant Garamond
     Tulisan tangan: Pinyon Script   Tombol/label: Jost
   ========================================================= */
@font-face {
  font-family: "Cinzel";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/cinzel-latin-500-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Cinzel";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/cinzel-latin-600-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/cormorant-garamond-latin-500-normal.woff2)
    format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/cormorant-garamond-latin-600-normal.woff2)
    format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  src: url(../assets/fonts/cormorant-garamond-latin-500-italic.woff2)
    format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 600;
  font-style: italic;
  font-display: swap;
  src: url(../assets/fonts/cormorant-garamond-latin-600-italic.woff2)
    format("woff2");
}
@font-face {
  font-family: "Pinyon Script";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/pinyon-script-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Jost";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/jost-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Jost";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/jost-latin-500-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Amiri";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/amiri-arabic-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "TAN Nimbus";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url(../assets/fonts/TAN-NIMBUS.woff2) format("woff2");
}
:root {
  --bg: #3a0a16;
  --s1: #4d0f1f;
  --s2: #661a2d;
  --s3: #7a2438;
  --gold: #c9a95c;
  --gold-lt: #e2cb8f;
  --ink: #fbf1e6;
  --script: #e9b6b2;
  --card-head: #e9b6b2;
  --card-sub: #e2cb8f;
  --cd-bg: #d9a3a0;
  --cd-fg: #3a0a16;
  --field-bg: rgba(0, 0, 0, 0.22);
  --field-ink: #fbf1e6;
  --f-head: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-body: "Cormorant Garamond", Georgia, serif;
  --f-script: "Pinyon Script", "Segoe Script", cursive;
  --f-ui: "Jost", "Helvetica Neue", system-ui, sans-serif;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 17.5px;
  line-height: 1.5;
  font-synthesis: none;
  font-kerning: normal;
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden]:not([hidden="until-found" i]) {
  display: none !important;
}
img {
  max-width: 100%;
  display: block;
}
p {
  margin: 0;
}
.wrap {
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--s2);
}
section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

/* ---------- tipografi dasar ---------- */
h2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 29px;
  line-height: 1.25;
  letter-spacing: 0.12em;
  margin: 0;
  color: var(--gold);
  text-transform: uppercase;
  text-wrap: balance;
}
h3 {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}
.script {
  font-family: var(--f-script);
  font-size: 54px;
  line-height: 1.15;
  color: var(--script);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.label {
  font-family: var(--f-ui);
  font-weight: 500;
  letter-spacing: 0.34em;
  font-size: 11.5px;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink);
  padding-left: 0.34em;
}
.note {
  font-family: var(--f-ui);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--gold-lt);
}
/* garis hias kecil di bawah judul bagian */
#ayat h2::after,
#gallery h2::after,
#lovestory h2::after,
#gift h2::after,
#rsvp h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 9px;
  margin: 14px auto 0;
  background:
    linear-gradient(var(--gold), var(--gold)) left center/24px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right center/24px 1px no-repeat,
    linear-gradient(
        45deg,
        transparent 38%,
        var(--gold) 38% 62%,
        transparent 62%
      )
      center/9px 9px no-repeat;
  opacity: 0.9;
}

/* ---------- tombol ---------- */
.btn,
.gbtn {
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--bg);
  background: var(--gold-lt);
  border: 1px solid var(--gold-lt);
  border-radius: 999px;
  padding: 14px 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition:
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.btn svg,
.gbtn svg {
  width: 15px;
  height: 15px;
  flex: none;
  stroke: currentColor;
}
.btn.ghost {
  background: transparent;
  color: var(--card-head);
  border-color: var(--card-head);
  padding: 12px 22px;
}
.btn:active,
.gbtn:active {
  transform: scale(0.97);
}
@media (hover: hover) {
  .btn:hover,
  .gbtn:hover {
    box-shadow:
      0 6px 18px rgba(0, 0, 0, 0.35),
      0 0 0 4px rgba(226, 203, 143, 0.18);
  }
}
.btn:focus-visible,
.gbtn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.music:focus-visible,
.nav:focus-visible,
.igl:focus-visible,
.track:focus-visible {
  outline: 3px solid var(--gold-lt);
  outline-offset: 2px;
}

/* ---------- kartu berbingkai emas + latar motif pohon ---------- */
.frame {
  position: relative;
  width: 100%;
  border: 3px solid var(--gold);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(77, 15, 31, 0.82),
    rgba(102, 26, 45, 0.78) 60%,
    rgba(122, 36, 56, 0.78)
  );
}
.bgtree {
  padding: 30px 20px 36px;
  background:
    linear-gradient(180deg, rgba(77, 15, 31, 0.3), rgba(77, 15, 31, 0.55)),
    url(../assets/images/bg-dates.webp) center/cover;
}
.fl {
  position: absolute;
  bottom: 0;
  width: 31%;
  z-index: 3;
  pointer-events: none;
}
.fl.l {
  left: -6px;
  transform: scaleX(-1);
}
.fl.r {
  right: -6px;
}
.divi {
  width: 80%;
  margin: 12px 0 10px;
}

/* ---------- monogram R & K ---------- */
.mono {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: var(--f-body);
  color: var(--gold);
  line-height: 0.9;
  user-select: none;
}
.mono span:first-child {
  font-size: 92px;
  font-weight: 600;
  font-style: italic;
}
.mono span:last-child {
  font-size: 70px;
  font-weight: 500;
  font-style: italic;
  margin-left: -18px;
  margin-bottom: -2px;
  opacity: 0.92;
}

/* ---------- 0. sampul (gerbang) ---------- */
.sampul {
  position: fixed;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: 430px;
  height: 100svh;
  z-index: 50;
  transform: translateX(-50%);
  transition:
    transform 0.95s cubic-bezier(0.7, 0, 0.25, 1),
    opacity 0.95s ease;
  will-change: transform;
  justify-content: flex-start;
  padding-top: max(30.5svh, 180px);
  overflow: hidden;
  background: url(../assets/images/bg-dates.webp) center/cover;
}
.sampul.open {
  transform: translate(-50%, -102%);
  opacity: 0.6;
}
body.locked,
html:has(body.locked) {
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .sampul {
    transition: none;
  }
}
.gate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sampul > .mono,
.sampul > .wi,
.sampul > .nm2,
.sampul > .to,
.sampul > .to2,
.sampul > .open {
  position: relative;
  z-index: 2;
}
.sampul .mono span:first-child {
  font-size: 80px;
}
.sampul .mono span:last-child {
  font-size: 60px;
}
.sampul .wi {
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.38em;
  padding-left: 0.38em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 22px;
}
.sampul .nm2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: 0.14em;
  padding-left: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 15px;
  line-height: 1.1;
  white-space: nowrap;
}
.sampul .to {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 17px;
  color: var(--gold-lt);
  margin-top: 40px;
}
.sampul .to2 {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-top: 8px;
}
.sampul .open {
  margin-top: 10px;
  padding: 10px 20px;
}
.bq {
  position: absolute;
  bottom: 0;
  z-index: 3;
  pointer-events: none;
  width: 31%;
}
.bq.a {
  left: -6px;
  transform: scaleX(-1);
}
.bq.b {
  right: -6px;
}
.bq.c,
.bq.d {
  display: none;
}

/* ---------- 1. cover ---------- */
section.cover {
  height: 100svh;
  min-height: 600px;
  background: var(--s1) url(../assets/images/cover-bg.webp) center/cover;
  justify-content: flex-start;
  padding: max(29svh, 170px) 40px 0;
}
.cover .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14.5px;
  width: 100%;
}
.cover .mono {
  margin-bottom: -4px;
}
.cover .nm {
  font-family: var(--f-head);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 40px;
  letter-spacing: 0.14em;
  padding-left: 0.14em;
  line-height: 1.1;
}
.cover .date {
  font-family: var(--f-ui);
  font-weight: 500;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
  font-size: 13px;
  color: var(--ink);
}
.scroll {
  width: 28px;
  height: 46px;
  border: 1.5px solid #fff;
  border-radius: 14px;
  position: relative;
  margin-top: 2px;
  background: none;
  padding: 0;
  cursor: pointer;
}
.scroll::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 3px;
  height: 10px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
}

/* ---------- 2. foto + ayat ---------- */
#foto {
  background: var(--s2);
  padding: 17px 20px 0;
  overflow: hidden;
}
.photo {
  width: 100%;
  aspect-ratio: 353/523;
  border-radius: 24px;
  border: 3px solid var(--gold);
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 1;
}
.bt {
  position: absolute;
  top: 0;
  width: 25%;
}
.bt.l {
  left: -8px;
}
.bt.r {
  right: -8px;
  transform: scaleX(-1);
}
#ayat {
  background: linear-gradient(180deg, var(--s2), var(--s1));
  padding: 32px 24px 90px;
}
#ayat h2 {
  margin-bottom: 28px;
}
.verse {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
}
.verse + .verse {
  margin-top: 28px;
}
.verse:last-child {
  font-family: var(--f-ui);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-top: 22px;
}
.verse.arab {
  font-family: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif;
  font-weight: 400;
  font-synthesis: none;
  font-size: 19px;
  line-height: 2.1;
  margin-bottom: 18px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.verse.arab + .verse {
  margin-top: 0;
}

/* ---------- 3. mempelai ---------- */
#mempelai {
  padding: 31px 20px 120px;
}
#mempelai .frame {
  padding: 36px 18px 44px;
  gap: 16px;
}
.salam {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.salam span:first-child {
  font-size: 26px;
  font-style: italic;
  font-weight: 600;
  color: var(--gold-lt);
  letter-spacing: 0.02em;
}
.salam span:last-child {
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 4px;
}
.intro {
  font-size: 18.5px;
  line-height: 1.5;
  max-width: 320px;
  text-wrap: balance;
}
.prof {
  width: 83.5%;
  margin-top: 8px;
  aspect-ratio: 560/737;
  object-fit: cover;
  object-position: 50% 45%;
  border-radius: 20px;
  border: 3px solid var(--gold);
}
.ampi {
  width: 37%;
  margin-bottom: -6px;
}
#mempelai .script {
  font-size: 56px;
  margin-top: 4px;
}
#mempelai h3 {
  font-family: var(--f-body);
  font-weight: 600;
  text-transform: none;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-top: -8px;
  text-wrap: balance;
}
.sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  line-height: 1.35;
}
.sub .rel {
  font-size: 17px;
  font-style: italic;
  color: var(--gold-lt);
  margin-bottom: 2px;
}
.sub .par {
  font-size: 20px;
  font-weight: 600;
  text-wrap: balance;
}
.sub .and {
  font-size: 18px;
  font-style: italic;
  color: var(--gold-lt);
  line-height: 1;
}
.sub .addr {
  font-size: 16.5px;
  line-height: 1.45;
  opacity: 0.9;
  margin-top: 8px;
}
.igl {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px 9px 14px;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--gold-lt);
  text-decoration: none;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  transition:
    background 0.2s,
    transform 0.2s;
}
.igl svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
}
.igl svg circle[fill] {
  fill: currentColor;
}
.igl:hover {
  background: rgba(226, 203, 143, 0.16);
}
.igl:active {
  transform: scale(0.97);
}

/* ---------- 4. save the date ---------- */
#savethedate {
  aspect-ratio: 393/745;
  justify-content: flex-start;
  padding: 38px 20px 0;
  background:
    linear-gradient(
      180deg,
      rgba(77, 15, 31, 0.94) 0,
      rgba(77, 15, 31, 0.62) 30%,
      rgba(77, 15, 31, 0) 58%
    ),
    url(../assets/images/savedate2.webp) 50% 88% / cover;
}
#savethedate .script {
  font-size: 60px;
  margin-bottom: -14px;
}
#savethedate h2 {
  font-size: 32px;
  margin-top: 10px;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
}
.cd {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 86%;
  margin-top: 18px;
}
.cd div {
  background: var(--cd-bg);
  color: var(--cd-fg);
  border-radius: 7px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.cd b {
  display: block;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 21px;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.1;
}
.cd small {
  font-family: var(--f-ui);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.1;
}

/* ---------- 5. acara ---------- */
#acara .frame {
  padding: 36px 12px 30px;
}
#acara .frame > p {
  font-size: 17.5px;
}
.event {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  border-radius: 24px;
  padding: 46px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 18px;
  border: 1.5px solid var(--gold);
  box-shadow:
    inset 0 0 0 4px var(--s2),
    inset 0 0 0 5px rgba(201, 169, 92, 0.6);
  background: linear-gradient(180deg, #6a2133, #7d2c3a);
}
.event::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(../assets/images/design-utama.webp) center/cover;
  opacity: 0.28;
  z-index: -1;
}
.event > * {
  margin: 0;
}
.event h3 {
  letter-spacing: 0.12em;
  color: var(--card-head);
  font-size: 20px;
}
.event .script {
  font-size: 68px;
  margin-top: 12px;
  color: var(--card-head);
}
.event .big {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.2;
  color: var(--card-head);
  letter-spacing: 0.06em;
  font-variant-numeric: lining-nums tabular-nums;
  margin-top: 4px;
}
.event .sm {
  color: var(--card-sub);
  font-size: 17px;
  font-style: italic;
  line-height: 1.3;
}
.event .pin {
  margin-top: 20px;
  color: var(--card-head);
  width: 20px;
  height: 26px;
}
.event .pin + .sm {
  margin-top: 14px;
}
.event .sm ~ p {
  margin-top: 10px;
  color: var(--ink);
  font-size: 18.5px;
  line-height: 1.35;
}
.event .btn {
  margin-top: 20px;
}
#acara {
  padding-bottom: 110px;
}

/* ---------- 6. gallery: geser dengan jari ---------- */
#gallery {
  padding: 40px 0 34px;
  gap: 0;
  background: linear-gradient(180deg, var(--s1), #2a0610);
}
#gallery h2 {
  color: var(--gold);
}
.gsub {
  font-size: 18px;
  font-style: italic;
  color: var(--gold-lt);
  margin: 6px 20px 24px;
}
.track {
  position: relative;
  display: flex;
  gap: 12px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
  scroll-snap-type: x mandatory; /* di HP: berhenti tepat di satu foto, halus bawaan browser */
  outline-offset: -3px;
}
.track::-webkit-scrollbar {
  display: none;
}
.track::before,
.track::after {
  content: "";
  flex: 0 0 calc(9% - 12px);
}
.track.free {
  scroll-snap-type: none; /* dimatikan sementara saat mouse/keyboard menggerakkan galeri */
  scroll-behavior: auto;
}
.track.drag {
  scroll-snap-type: none;
  cursor: grabbing;
  scroll-behavior: auto;
}
.track img {
  flex: 0 0 82%;
  min-width: 0;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  opacity: 0.5;
  transform: scale(0.93);
  /* opacity & scale diatur JS per frame saat digeser */
  will-change: transform, opacity;
  scroll-snap-align: center;
  -webkit-user-drag: none;
  user-select: none;
}

.dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-top: 20px;
}
.dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(226, 203, 143, 0.35);
  transition:
    width 0.3s ease,
    background 0.3s ease;
}
.dots i.on {
  width: 22px;
  background: var(--gold-lt);
}

.ggrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: calc(100% - 40px);
  margin-top: 30px;
}
.ggrid img {
  width: 100%;
  min-width: 0;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: 50% 35%;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* ---------- 7. love story ---------- */
#lovestory {
  padding-bottom: 120px;
}
#lovestory .frame {
  padding: 36px 22px 36px;
  gap: 0;
}
#lovestory h2 {
  margin-bottom: 28px;
}
.lsphoto {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}
.arch {
  width: 74%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 999px 999px 28px 28px;
  border: 3px solid var(--gold);
  box-shadow:
    0 0 0 5px rgba(201, 169, 92, 0.22),
    0 6px 18px rgba(0, 0, 0, 0.35);
}
/* bingkai oval (love story) */
.arch.oval {
  width: 70%;
  border-radius: 50%;
  box-shadow:
    0 0 0 6px rgba(102, 26, 45, 0.95),
    0 0 0 8px rgba(201, 169, 92, 0.7),
    0 10px 26px rgba(0, 0, 0, 0.45);
}
.story {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}
.story article {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.story h3 {
  font-size: 17px;
  letter-spacing: 0.14em;
}
.story p {
  font-size: 18px;
  line-height: 1.5;
  text-wrap: pretty;
}
.lsend {
  font-size: 19px;
  line-height: 1.45;
  font-style: italic;
  color: var(--gold-lt);
  margin-top: 30px;
  text-wrap: balance;
}
.cap {
  font-family: var(--f-script);
  font-size: 32px;
  line-height: 1.25;
  color: var(--gold-lt);
  margin-top: 22px;
  text-wrap: balance;
}

/* ---------- 8. gift ---------- */
#gift .frame {
  padding: 44px 20px 40px;
}
.gicon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.gicon svg {
  width: 28px;
  height: 28px;
}
#gift h2.gh {
  margin-bottom: 18px;
}
.gtxt {
  font-size: 18.5px;
  line-height: 1.5;
  margin-bottom: 24px;
  text-wrap: pretty;
}
.gbtn {
  padding: 6px 6px 6px 22px;
  gap: 14px;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    0 0 0 4px rgba(226, 203, 143, 0.16);
}
.gbtn i {
  display: flex;
  transition: transform 0.35s ease;
}
.gbtn[aria-expanded="true"] i {
  transform: rotate(180deg);
}
.gwrap {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  transition: grid-template-rows 0.5s ease;
}
.gwrap.open {
  grid-template-rows: 1fr;
}
.ginner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease 0.1s;
}
.gwrap.open .ginner {
  opacity: 1;
  padding-top: 22px;
}
@media (prefers-reduced-motion: reduce) {
  .gwrap,
  .ginner {
    transition: none;
  }
}
.acc {
  width: 100%;
  border: 1.5px solid var(--gold);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  background: rgba(58, 10, 22, 0.4);
}
.acc small {
  color: var(--card-sub);
  font-size: 17.5px;
  font-style: italic;
}
.acc b {
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--card-head);
}
.logo {
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
}
.logo img {
  width: auto;
}
.logo img.bri {
  height: 26px;
}
.logo img.mandiri {
  height: 32px;
}

/* ---------- 9. rsvp ---------- */
#rsvp .frame {
  padding: 36px 18px 30px;
  gap: 20px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  text-align: left;
}
label {
  font-family: var(--f-ui);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-lt);
}
input,
textarea,
select {
  font: inherit;
  font-variant-numeric: lining-nums;
  font-weight: 500;
  font-size: 18px;
  width: 100%;
  background: var(--field-bg);
  color: var(--field-ink);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 4px;
}
textarea {
  min-height: 96px;
  resize: vertical;
}
::placeholder {
  color: rgba(251, 241, 230, 0.5);
  font-style: italic;
  opacity: 1;
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.row2 > div {
  min-width: 0;
}

/* ---------- 10. penutup ---------- */
#penutup {
  position: relative;
  /* padding bawah ~ tinggi bunga (flowrow) supaya footer duduk DI ATAS bunga, tidak tertimpa */
  padding: 40px 26px 42%;
  gap: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(77, 15, 31, 0.35), rgba(77, 15, 31, 0.6)),
    url(../assets/images/design-utama.webp) center top/cover;
}
.arch-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
#penutup .arch {
  width: 78%;
  margin-bottom: 0;
}
#penutup p {
  font-size: 18.5px;
  line-height: 1.5;
  text-wrap: balance;
}
#penutup .script {
  font-size: 52px;
  margin-top: 6px;
  white-space: nowrap;
}
#penutup .divi {
  width: 70%;
  margin: 0;
}
#penutup .flowrow {
  display: flex;
  justify-content: space-between;
  width: calc(100% + 12px);
  position: absolute;
  bottom: 0;
  left: -6px;
  right: -6px;
  pointer-events: none;
}
#penutup .flowrow img {
  width: 31%;
}
#penutup .flowrow img:first-child {
  transform: scaleX(-1);
}

/* ---------- musik ---------- */
.music {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold-lt);
  background: var(--gold);
  color: var(--bg);
  font-size: 22px;
  cursor: pointer;
  z-index: 20;
  line-height: 1;
}
.music.off {
  background: var(--s1);
  color: var(--gold-lt);
}
.story strong {
  color: var(--gold-lt);
  font-weight: 600;
}

/* ---------- animasi: bunga/ornamen muncul dari pinggir kiri & kanan ---------- */
.js .fl,
.js .bt,
.js .bq,
.js .flowrow img {
  opacity: 0;
  transition:
    translate 1.2s cubic-bezier(0.16, 0.84, 0.3, 1),
    opacity 0.9s ease;
}
.js .fl.l,
.js .bt.l,
.js .bq.a,
.js .bq.c,
.js .flowrow img:first-child {
  translate: -130% 0;
}
.js .fl.r,
.js .bt.r,
.js .bq.b,
.js .bq.d,
.js .flowrow img.m,
.js .lsphoto::after {
  translate: 130% 0;
}
.js .bq.c,
.js .bq.d {
  transition-delay: 0.25s;
}
.js .fl.in,
.js .bt.in,
.js .bq.in,
.js .flowrow img.in {
  translate: 0 0;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .js .fl,
  .js .bt,
  .js .bq,
  .js .flowrow img {
    translate: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}

/* =========================================================
   ANIMASI TAMBAHAN
   1. reveal konten saat di-scroll (.rv/.in dipasang lewat JS)
   2. konten sampul & cover masuk berurutan
   3. kelopak bunga jatuh, ornamen bergoyang, countdown pop
   ========================================================= */

/* ---------- 1. reveal saat scroll ---------- */
.js .rv {
  opacity: 0;
  transition:
    opacity 0.8s cubic-bezier(0.16, 0.84, 0.3, 1) var(--d, 0s),
    translate 0.8s cubic-bezier(0.16, 0.84, 0.3, 1) var(--d, 0s),
    scale 0.8s cubic-bezier(0.16, 0.84, 0.3, 1) var(--d, 0s),
    background 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.js .rv.up {
  translate: 0 34px;
}
.js .rv.left {
  translate: -42px 0;
}
.js .rv.right {
  translate: 42px 0;
}
.js .rv.zoom {
  scale: 0.9;
}
.js .rv.in {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}
/* garis hias di bawah judul ikut tumbuh */
.js h2.rv::after {
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.9s ease calc(var(--d, 0s) + 0.35s);
}
.js h2.rv.in::after {
  transform: scaleX(1);
}

/* ---------- 2a. konten sampul masuk saat halaman dibuka ---------- */
@keyframes riseIn {
  from {
    opacity: 0;
    translate: 0 26px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
.js .sampul > .mono {
  animation: riseIn 0.9s cubic-bezier(0.16, 0.84, 0.3, 1) 0.1s both;
}
.js .sampul > .wi {
  animation: riseIn 0.9s cubic-bezier(0.16, 0.84, 0.3, 1) 0.25s both;
}
.js .sampul > .nm2 {
  animation: riseIn 0.9s cubic-bezier(0.16, 0.84, 0.3, 1) 0.4s both;
}
.js .sampul > .to {
  animation: riseIn 0.9s cubic-bezier(0.16, 0.84, 0.3, 1) 0.6s both;
}
.js .sampul > .to2 {
  animation: riseIn 0.9s cubic-bezier(0.16, 0.84, 0.3, 1) 0.72s both;
}
.js .sampul > .open {
  animation: riseIn 0.9s cubic-bezier(0.16, 0.84, 0.3, 1) 0.88s both;
}
/* kilau lembut melintas pada tombol undangan */
.js .sampul .open {
  position: relative;
  overflow: hidden;
}
.js .sampul .open::after {
  content: "";
  position: absolute;
  top: -25%;
  bottom: -25%;
  left: -45%;
  width: 38%;
  rotate: 10deg;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  animation: sheen 3.6s ease-in-out 2s infinite;
}
@keyframes sheen {
  0% {
    translate: 0 0;
  }
  45%,
  100% {
    translate: 400% 0;
  }
}

/* ---------- 2b. konten cover tersusun setelah undangan dibuka ---------- */
.js .cover .inner {
  position: relative;
  z-index: 2;
}
.js .cover .inner > * {
  opacity: 0;
  translate: 0 30px;
  transition:
    opacity 0.9s ease,
    translate 0.9s cubic-bezier(0.16, 0.84, 0.3, 1);
}
.js body.opened .cover .inner > * {
  opacity: 1;
  translate: 0 0;
}
.js body.opened .cover .inner > :nth-child(1) {
  transition-delay: 0.35s;
}
.js body.opened .cover .inner > :nth-child(2) {
  transition-delay: 0.5s;
}
.js body.opened .cover .inner > :nth-child(3) {
  transition-delay: 0.65s;
}
.js body.opened .cover .inner > :nth-child(4) {
  transition-delay: 0.78s;
}
.js body.opened .cover .inner > :nth-child(5) {
  transition-delay: 0.9s;
}
.js body.opened .cover .inner > :nth-child(6) {
  transition-delay: 1.02s;
}
.js body.opened .cover .inner > :nth-child(7) {
  transition-delay: 1.25s;
}

/* ---------- 3. detail kecil ---------- */
/* titik penunjuk scroll bergerak */
@keyframes dotMove {
  0% {
    translate: 0 0;
    opacity: 1;
  }
  70% {
    translate: 0 18px;
    opacity: 0;
  }
  100% {
    translate: 0 0;
    opacity: 0;
  }
}
.js .scroll::after {
  animation: dotMove 1.9s ease-in-out infinite;
}
/* angka countdown pop tiap berganti */
@keyframes cdp {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.22);
  }
  100% {
    transform: scale(1);
  }
}
.cd b.pop {
  animation: cdp 0.5s ease;
}
/* ornamen bunga bergoyang setelah meluncur masuk */
@keyframes sway {
  0%,
  100% {
    rotate: -1.4deg;
  }
  50% {
    rotate: 1.6deg;
  }
}
.js .fl.in,
.js .bt.in,
.js .bq.in,
.js .flowrow img.in {
  animation: sway 7s ease-in-out infinite;
  transform-origin: top center;
}
/* tanda "&", ikon kado, dan pin lokasi bernafas */
@keyframes floaty {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}
.js .ampi,
.js .gicon {
  animation: floaty 4s ease-in-out infinite;
}
@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}
.js .event .pin {
  animation: bob 2.4s ease-in-out infinite;
}
/* tombol musik berdenyut saat musik diputar */
@keyframes beat {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(226, 203, 143, 0.45);
  }
  55% {
    box-shadow: 0 0 0 12px rgba(226, 203, 143, 0);
  }
}
.music:not(.off) {
  animation: beat 2.2s ease-out infinite;
}
/* kelopak bunga jatuh (elemen <i class=petal> dibuat lewat JS) */
.petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.petals.bg {
  z-index: -1;
}
.petals.bg .petal {
  width: 10px;
  height: 10px;
}
/* layer kelopak di belakang kartu: semua section jadi stacking context agar z-index:-1 tepat di atas latar, di bawah kartu/foto/teks */
section {
  isolation: isolate;
}
.petals.off .petal {
  animation-play-state: paused;
}
.petal {
  position: absolute;
  top: -5%;
  width: 13px;
  height: 13px;
  border-radius: 80% 6% 80% 6%;
  background: linear-gradient(135deg, var(--gold-lt), var(--script) 70%);
  opacity: 0;
  scale: var(--s, 1);
  animation: fall 10s linear infinite;
}
@keyframes fall {
  0% {
    translate: 0 calc(var(--fh, 110vh) * -0.04);
    rotate: 0deg;
    opacity: 0;
  }
  6% {
    opacity: var(--o, 0.6);
  }
  30% {
    translate: 16px calc(var(--fh, 110vh) * 0.3);
    rotate: 100deg;
  }
  55% {
    translate: -14px calc(var(--fh, 110vh) * 0.55);
    rotate: 210deg;
    opacity: var(--o, 0.6);
  }
  80% {
    translate: 12px calc(var(--fh, 110vh) * 0.8);
  }
  100% {
    translate: -10px var(--fh, 110vh);
    rotate: 330deg;
    opacity: 0;
  }
}
/* zoom halus foto galeri grid (mouse) */
@media (hover: hover) {
  .ggrid img:hover {
    transform: scale(1.045);
  }
}

/* hormati preferensi kurangi gerak */
@media (prefers-reduced-motion: reduce) {
  .js .rv,
  .js .cover .inner > * {
    opacity: 1 !important;
    translate: none !important;
    scale: none !important;
    transition: none !important;
  }
  .js h2.rv::after {
    transform: none !important;
    transition: none !important;
  }
  .js .sampul > .mono,
  .js .sampul > .wi,
  .js .sampul > .nm2,
  .js .sampul > .to,
  .js .sampul > .to2,
  .js .sampul > .open,
  .js .fl.in,
  .js .bt.in,
  .js .bq.in,
  .js .flowrow img.in,
  .js .ampi,
  .js .gicon,
  .js .event .pin,
  .js .scroll::after,
  .cd b.pop,
  .music:not(.off) {
    animation: none !important;
  }
  .js .sampul .open::after,
  .petal {
    display: none;
  }
}

/* galeri mengalir: besar-kecil foto mengikuti posisi geser (diatur script.js) */
.track img { transition: none; }

/* ---------- rsvp: animasi ceklis setelah ucapan terkirim ---------- */
#wishform[hidden],
.wishdone[hidden] {
  display: none;
}
.wishdone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 6px;
  text-align: center;
}
.wishdone .chk {
  width: 84px;
  height: 84px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wishdone .chk-c {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}
.wishdone .chk-p {
  stroke: var(--gold-lt);
  stroke-width: 3.5;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
}
.wishdone b {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
}
.wishdone small {
  font-family: var(--f-body);
  font-size: 18px;
  color: var(--gold-lt);
  opacity: 0;
}
.wishdone.play .chk {
  animation: chk-pop 0.5s ease 0.75s both;
}
.wishdone.play .chk-c {
  animation: chk-draw 0.7s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.wishdone.play .chk-p {
  animation: chk-draw 0.45s ease 0.6s forwards;
}
.wishdone.play b {
  animation: chk-in 0.5s ease 0.95s forwards;
}
.wishdone.play small {
  animation: chk-in 0.5s ease 1.1s forwards;
}
@keyframes chk-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes chk-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes chk-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wishdone .chk-c,
  .wishdone .chk-p {
    stroke-dashoffset: 0;
    animation: none !important;
  }
  .wishdone b,
  .wishdone small {
    opacity: 1;
    animation: none !important;
  }
  .wishdone .chk {
    animation: none !important;
  }
}

/* ---------- footer: Created by NantiKita ---------- */
.nantikita-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  text-shadow: 0 1px 6px rgba(40, 5, 15, 0.95), 0 0 14px rgba(40, 5, 15, 0.8);
}
.ntk-logo {
  width: 90px;
  height: auto;
  opacity: 0.85;
  margin-bottom: 4px;
}
.ntk-brand {
  font-family: var(--f-ui);
  font-size: 11px;
  color: var(--ink);
  opacity: 0.7;
  letter-spacing: 0.04em;
  text-align: center;
}
.ntk-brand strong {
  font-family: "TAN Nimbus", sans-serif;
  font-weight: 600;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: 0.08em;
}
.ntk-igl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.ntk-igl svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  opacity: 0.7;
}
.ntk-igl:hover {
  opacity: 1;
}
.ntk-igl:active {
  opacity: 0.6;
}
.ntk-igl:focus-visible {
  outline: 3px solid var(--gold-lt);
  outline-offset: 2px;
}