/* Wedvite — gaya dasar komponen undangan. Tema menimpa variabel di :root[data-theme=...] */
:root {
  --wv-bg: #ffffff;
  --wv-fg: #141414;
  --wv-muted: #6e6a64;
  --wv-surface: #ffffff;
  --wv-line: #e6e2db;
  --wv-accent: #141414;
  --wv-accent-fg: #ffffff;
  --wv-gold: #a88a5c;
  --wv-font-display: 'Cormorant Garamond', Georgia, serif;
  --wv-font-body: 'Jost', system-ui, sans-serif;
  --wv-radius: 0px;
  --wv-shadow: 0 18px 40px -24px rgba(20, 20, 20, .35);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--wv-bg); color: var(--wv-fg);
  font: 16px/1.6 var(--wv-font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--wv-accent) 28%, transparent); }
:focus-visible { outline: 2px solid var(--wv-accent); outline-offset: 3px; border-radius: 4px; }
.wv-icon { flex: none; }
.wv-missing { padding: 30vh 24px; text-align: center; color: var(--wv-muted); }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* buttons */
.wv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 46px; padding: .7em 1.4em; border-radius: var(--wv-radius);
  border: 1px solid var(--wv-accent); background: transparent; color: var(--wv-accent);
  font: 500 .74rem/1 var(--wv-font-body); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
}
.wv-btn:hover { background: color-mix(in srgb, var(--wv-accent) 10%, transparent); }
.wv-btn:active { transform: scale(.98); }
.wv-btn-solid { background: var(--wv-accent); color: var(--wv-accent-fg); }
.wv-btn-solid:hover { background: color-mix(in srgb, var(--wv-accent) 86%, black); }
.wv-btn-ghost { border-color: var(--wv-line); color: var(--wv-fg); }
.wv-btn[disabled] { opacity: .55; cursor: progress; }

/* countdown */
.wv-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 360px; margin-inline: auto; }
.wv-cd-cell { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; border: 1px solid var(--wv-line); border-radius: var(--wv-radius); }
.wv-cd-num { font-family: var(--wv-font-display); font-size: 2rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.wv-cd-label { font-size: .72rem; letter-spacing: .06em; color: var(--wv-muted); margin-top: 6px; }
.wv-cd-done { text-align: center; font-family: var(--wv-font-display); font-size: 1.2rem; }

/* events */
.wv-events { display: grid; gap: 16px; }
.wv-event { padding: 22px; border: 1px solid var(--wv-line); border-radius: var(--wv-radius); background: var(--wv-surface); }
.wv-event-name { margin: 0 0 10px; font: 600 1.4rem/1.2 var(--wv-font-display); }
.wv-event-when { display: flex; gap: .55em; align-items: center; margin: 4px 0; color: var(--wv-fg); }
.wv-event-when .wv-icon { color: var(--wv-accent); }
.wv-event-venue { margin: 12px 0 2px; font-weight: 600; }
.wv-event-address { margin: 0; color: var(--wv-muted); font-size: .93rem; }
.wv-event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* forms */
.wv-form { display: grid; gap: 14px; }
.wv-field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.wv-field > span, .wv-field > legend { font-size: .85rem; font-weight: 600; color: var(--wv-muted); padding: 0; margin-bottom: 6px; }
.wv-field input, .wv-field select, .wv-field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: calc(var(--wv-radius) * .7);
  border: 1px solid var(--wv-line); background: var(--wv-surface); color: var(--wv-fg);
}
.wv-field textarea { resize: vertical; min-height: 92px; }
.wv-field input::placeholder, .wv-field textarea::placeholder { color: color-mix(in srgb, var(--wv-fg) 52%, transparent); }
.wv-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.wv-choice { position: relative; }
.wv-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.wv-choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--wv-line); border-radius: 999px; background: var(--wv-surface); transition: .2s; }
.wv-choice input:checked + span { background: var(--wv-accent); color: var(--wv-accent-fg); border-color: var(--wv-accent); }
.wv-choice input:focus-visible + span { outline: 2px solid var(--wv-accent); outline-offset: 2px; }
.wv-form-status { margin: 0; min-height: 1.4em; font-size: .9rem; color: var(--wv-muted); }
.wv-rsvp-done { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 18px; color: var(--wv-fg); }
.wv-rsvp-done .wv-icon { color: var(--wv-accent); }

/* wishes */
.wv-wishes { display: grid; gap: 22px; }
.wv-wish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 460px; overflow-y: auto; overscroll-behavior: contain; }
.wv-wish { padding: 14px 16px; border-radius: var(--wv-radius); background: var(--wv-surface); border: 1px solid var(--wv-line); }
.wv-wish-msg { margin: 0 0 6px; white-space: pre-line; overflow-wrap: anywhere; }
.wv-wish-meta { margin: 0; font-size: .82rem; color: var(--wv-muted); }
.wv-wish-meta strong { color: var(--wv-fg); }
.wv-wish-empty { color: var(--wv-muted); text-align: center; }

/* gifts */
.wv-gifts { display: grid; gap: 12px; }
.wv-gift { padding: 20px; border-radius: var(--wv-radius); border: 1px solid var(--wv-line); background: var(--wv-surface); display: grid; gap: 2px; justify-items: start; }
.wv-gift-bank { margin: 0; font-weight: 700; letter-spacing: .04em; }
.wv-gift-number { margin: 0; font-family: var(--wv-font-display); font-size: 1.45rem; font-weight: 500; line-height: 1.3; font-variant-numeric: lining-nums tabular-nums; letter-spacing: .03em; }
.wv-gift-holder { margin: 0 0 10px; color: var(--wv-muted); }

/* gallery */
.wv-gallery, .wv-live-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wv-gallery-item { position: relative; padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; border-radius: calc(var(--wv-radius) * .5); cursor: zoom-in; background: var(--wv-line); }
.wv-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.wv-gallery-item:hover img { transform: scale(1.05); }
.wv-gallery-item:first-child:nth-last-child(n+4) { grid-column: span 2; grid-row: span 2; }
.wv-live { display: grid; gap: 14px; }
.wv-live-intro { margin: 0; color: var(--wv-muted); }
.wv-live-by { position: absolute; left: 4px; bottom: 4px; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-live-album { display: inline-flex; gap: .4em; align-items: center; color: var(--wv-accent); font-weight: 600; }

.wv-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 8, 6, .92); display: grid; place-items: center; padding: 24px; }
.wv-lightbox img { max-height: 86vh; max-width: 100%; border-radius: 6px; object-fit: contain; }
.wv-lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; cursor: pointer; }
.wv-lightbox-close { top: 16px; right: 16px; }
.wv-lightbox-prev { left: 12px; top: 50%; }
.wv-lightbox-next { right: 12px; top: 50%; }

/* music */
.wv-music {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--wv-line);
  background: var(--wv-surface); color: var(--wv-accent); display: grid; place-items: center; cursor: pointer; box-shadow: var(--wv-shadow);
}
.wv-music.is-playing .wv-icon { animation: wv-spin 4s linear infinite; }
@keyframes wv-spin { to { transform: rotate(360deg); } }
html:not(.wv-opened) .wv-music { opacity: 0; pointer-events: none; }

.wv-toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; z-index: 120; background: #1d1a16; color: #fff; padding: 10px 16px; border-radius: 8px; transition: .35s cubic-bezier(.16,1,.3,1); font-size: .9rem; }
.wv-toast.is-in { opacity: 1; transform: translate(-50%, 0); }

.wv-watermark {
  display: block; text-align: center; padding: 18px 16px calc(80px + env(safe-area-inset-bottom)); font-size: .82rem;
  color: var(--wv-muted); text-decoration: none; background: var(--wv-bg);
}
.wv-watermark strong { color: var(--wv-fg); }
.wv-form-status:empty { display: none; }
