/* Buku tamu · gaya undangan: kertas krem di atas kain linen biru tua, melati putih. Arah & alasan: docs/DESIGN.md */

/* Font di-host sendiri (node_modules/@fontsource, disajikan di vendor/fonts) */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/cormorant-garamond-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/cormorant-garamond-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../vendor/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../vendor/fonts/cormorant-garamond-latin-ext-500-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/montserrat-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/montserrat-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/montserrat-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/montserrat-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/fonts/montserrat-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/fonts/montserrat-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Token disalin dari wedding-invitation/styles.css (baris 4-33). Jangan impor CSS album. */
:root {
  --navy: #18264E;
  --navy-2: #1F2F55;
  --navy-3: #34497A;
  --cream: #F5EFE5;
  --cream-2: #EDE6DA;
  --cream-soft: #D9D3CA;
  --brown: #3B2418;
  --brown-soft: #6A5546;
  --plate: #D2CDC6;
  --wax: #6B74C9;
  --paper: #F7F5F0; /* kertas struk undangan */
  --danger-on-navy: #F6BDBD;
  --danger-on-cream: #8E3B46;

  --f-display: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --f-body: "Montserrat", "Avenir Next", "Segoe UI", sans-serif;

  --ease: cubic-bezier(.2, .7, .15, 1);

  /* linen: serat mendatar dan tegak, supaya biru tua tidak terasa datar */
  --linen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.8 0 0 0 0 0.85 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75 .006' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.22 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  background-color: #1E2C55; /* warna rata-rata kain linen */
}
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--navy);
  background-image: var(--linen);
  color: var(--cream);
  font: 400 .95rem/1.7 var(--f-body);
}
p, h1, h2, h3, figure, blockquote, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
symbol { overflow: visible; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; } /* wadah yang menerima fokus lewat JS, bukan kontrol */

.boot-note { padding: 3rem 1rem; text-align: center; color: var(--cream-soft); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  padding: .7rem 1rem; background: var(--cream); color: var(--navy); font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Melati kecil di sudut benda. Tidak boleh menutupi teks. */
.sprig { position: absolute; display: block; pointer-events: none; z-index: 2; }
.sprig svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Klip baja penjepit kertas, sama dengan klip polaroid di undangan */
.clip { position: absolute; z-index: 3; width: 1.15rem; height: auto; overflow: visible; pointer-events: none; filter: drop-shadow(1px 2px 1.5px rgba(5, 9, 25, .45)); }

/* Karcis: takik sudut seperti karcis undangan */
.ticket {
  position: relative;
  padding: .7em 1.5em .8em;
  background: var(--plate);
  color: var(--brown);
  text-align: center;
  -webkit-mask: radial-gradient(circle .6em at 0 0, #0000 98%, #000) 0 0 / 51% 51% no-repeat,
                radial-gradient(circle .6em at 100% 0, #0000 98%, #000) 100% 0 / 51% 51% no-repeat,
                radial-gradient(circle .6em at 0 100%, #0000 98%, #000) 0 100% / 51% 51% no-repeat,
                radial-gradient(circle .6em at 100% 100%, #0000 98%, #000) 100% 100% / 51% 51% no-repeat;
  mask: radial-gradient(circle .6em at 0 0, #0000 98%, #000) 0 0 / 51% 51% no-repeat,
        radial-gradient(circle .6em at 100% 0, #0000 98%, #000) 100% 0 / 51% 51% no-repeat,
        radial-gradient(circle .6em at 0 100%, #0000 98%, #000) 0 100% / 51% 51% no-repeat,
        radial-gradient(circle .6em at 100% 100%, #0000 98%, #000) 100% 100% / 51% 51% no-repeat;
}
.ticket::before {
  content: ""; position: absolute; inset: .35rem;
  border: 1px solid rgba(59, 36, 24, .55); pointer-events: none;
  -webkit-mask: inherit; mask: inherit;
}

/* Kertas: lembar krem bertekstur yang ditumpuk di atas kain. Bayangan hanya menandai lapisan itu. */
.sheet {
  position: relative;
  background: var(--grain), var(--paper);
  color: var(--brown);
  box-shadow: 0 16px 26px -16px rgba(3, 6, 18, .85), 0 2px 4px rgba(3, 6, 18, .25);
}

/* Struk bergerigi, sama dengan struk "Terima kasih" di penutup undangan */
.receipt {
  position: relative;
  background: var(--grain), var(--paper);
  color: var(--brown);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 16px 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 51% repeat-x;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 16px 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 51% repeat-x;
}
.receipt-wrap { position: relative; filter: drop-shadow(0 14px 18px rgba(3, 6, 18, .6)); }

/* Segel lilin: satu-satunya aksen warna, hanya di tanda "sudah tercatat" */
.wax {
  display: grid; place-items: center;
  width: 3.1rem; height: 3.1rem;
  border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 36% 30%, #9aa2ec 0%, var(--wax) 55%, #4a52a3 100%);
  box-shadow: 0 2px 5px rgba(5, 9, 25, .6), inset 0 0 0 3px rgba(255, 255, 255, .14), inset 0 0 0 5px rgba(30, 36, 90, .25);
  color: #F4F2FF;
  font: 600 1.45rem/1 var(--f-display);
  text-shadow: 0 -1px 0 rgba(30, 36, 90, .55), 0 1px 0 rgba(255, 255, 255, .25);
}

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: 0 1.4rem;
  border: 1px solid transparent; border-radius: 2px;
  background: none;
  font: 500 .9rem/1.2 var(--f-body);
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: progress; opacity: .75; }
.btn--small { min-height: 2.75rem; padding: 0 1rem; font-size: .84rem; }
/* pil hanya untuk aksi utama, seperti tombol Kirim Konfirmasi di undangan */
.btn--primary { border-radius: 999px; background: var(--plate); color: var(--brown); font-size: .95rem; }
.btn--primary:hover { background: var(--cream); }
.sheet .btn--primary, .receipt .btn--primary, .dialog .btn--primary { background: var(--navy); color: var(--cream); }
.sheet .btn--primary:hover, .receipt .btn--primary:hover, .dialog .btn--primary:hover { background: var(--navy-3); }
.btn--line { border-color: currentColor; color: inherit; }
.btn--line:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.btn--danger { background: var(--danger-on-cream); color: var(--cream); }
.btn--danger:hover { background: #7A2F3A; }
.btn--block { width: 100%; }

/* tombol teks bergaris bawah, tetap 44px untuk jari */
.linkbtn {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .1rem;
  border: 0; background: none; cursor: pointer;
  font: 500 .84rem/1.3 var(--f-body); color: inherit;
  text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px;
}
.linkbtn:hover { text-decoration-thickness: 2px; }

/* Kolom formulir: garis bawah saja, seperti RSVP undangan */
.field { display: grid; gap: .35rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend, .field__label { font-weight: 500; font-size: .88rem; padding: 0; }
.field__opt { font-weight: 400; color: var(--brown-soft); }
.field input[type="text"], .field input[type="password"], .field input[type="search"], .field input[type="url"],
.field input[type="date"], .field input[type="time"], .field textarea {
  width: 100%; min-height: 3rem;
  padding: .6rem .1rem;
  background: transparent;
  border: 0; border-bottom: 1px solid currentColor; border-radius: 0;
  font-size: 1rem; /* 16px: mencegah zoom otomatis di iOS */
}
.field textarea { resize: vertical; min-height: 5.5rem; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--brown-soft); opacity: 1; }
.field [aria-invalid="true"] { border-bottom-color: var(--danger-on-cream); border-bottom-width: 2px; }
.field__hint { font-size: .8rem; color: var(--brown-soft); }
.field__error { font-size: .84rem; font-weight: 500; color: var(--danger-on-cream); }
.field__error:empty { display: none; }

/* Saklar (checkbox role=switch) dengan teks status, jadi tidak bergantung warna */
.switch { display: flex; align-items: center; gap: .85rem; min-height: 2.75rem; cursor: pointer; }
.switch input {
  appearance: none; flex: none; margin: 0;
  width: 3.1rem; height: 1.8rem; border-radius: 999px;
  background: var(--plate); border: 1px solid var(--brown-soft);
  position: relative; cursor: pointer;
  transition: background-color .2s var(--ease);
}
.switch input::after {
  content: ""; position: absolute; top: .2rem; left: .2rem;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--brown-soft);
  transition: transform .2s var(--ease);
}
.switch input:checked { background: var(--navy); border-color: var(--navy); }
.switch input:checked::after { transform: translateX(1.3rem); border-color: var(--navy); }
.switch input:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }
.switch__text { display: grid; line-height: 1.35; }
.switch__state { font-size: .8rem; color: var(--brown-soft); }

/* Toast */
.toast-region {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%); width: min(calc(100% - 2rem), 24rem);
  display: grid; gap: .5rem; pointer-events: none;
}
.toast {
  padding: .8rem 1rem; border-radius: 2px;
  background: var(--navy-2); color: var(--cream); border: 1px solid rgba(245, 239, 229, .35);
  box-shadow: 0 10px 22px -10px rgba(3, 6, 18, .85);
  font-size: .88rem; text-align: center;
  animation: toast-in .25s var(--ease);
}
.toast[data-kind="error"] { border-color: var(--danger-on-navy); color: var(--danger-on-navy); font-weight: 500; }
@keyframes toast-in { from { opacity: 0; transform: translateY(.5rem); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
