body.locked { overflow: hidden; height: 100vh; }
body { background-image: radial-gradient(1200px 700px at 50% -200px, var(--accent-soft), transparent 70%); background-repeat: no-repeat; }

em { font-style: italic; color: var(--accent); }

/* ---------- Sampul ---------- */
.cover {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; text-align: center;
  padding: 40px 22px;
  background: var(--bg);
  background-image:
    radial-gradient(90% 55% at 50% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(90% 45% at 50% 100%, var(--accent-soft), transparent 70%);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), visibility 1s;
}
.cover.hide { opacity: 0; transform: scale(1.06); visibility: hidden; }
.cover-inner { animation: rise 1.4s var(--ease) both; }
.cover-names { font-size: clamp(56px, 13vw, 120px); line-height: .95; margin: 0; display: flex; flex-direction: column; align-items: center; }
.cover-names em, .hero-names em { font-size: .55em; margin: .08em 0; }
.cover-date { margin: 26px 0 0; font-size: 13px; letter-spacing: .32em; color: var(--muted); }
.cover-guest { margin: 54px 0 36px; }
.cover-guest p { margin: 0; font-size: 14px; color: var(--muted); }
.cover-guest .guest-name { font-size: 30px; color: var(--text); margin-top: 6px; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Aksi atas ---------- */
.top-actions { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; z-index: 60; display: flex; gap: 10px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  transition: transform .3s var(--ease);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.playing svg { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.theme-sheet {
  position: fixed; top: calc(max(16px, env(safe-area-inset-top)) + 54px); right: 16px; z-index: 60;
  width: 240px; padding: 14px; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 24px 50px -20px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: top right; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.theme-sheet.open { opacity: 1; transform: none; pointer-events: auto; }
.sheet-title { margin: 2px 8px 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sheet-list { display: grid; gap: 2px; }
.sheet-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; font-size: 15px;
}
.sheet-list button:hover { background: var(--accent-soft); }
.sheet-list button[aria-current="true"] { font-weight: 600; }
.sheet-list .dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128,128,128,.3); flex-shrink: 0; }

/* ---------- Layout umum ---------- */
main { padding-bottom: 120px; }
.section { max-width: 860px; margin: 0 auto; padding: 120px 22px; text-align: center; }
.section-title { font-size: clamp(32px, 5.4vw, 52px); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 56px; }
.section-sub { color: var(--muted); max-width: 520px; margin: -30px auto 44px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 100px 22px 80px; position: relative; }
.hero-names { font-size: clamp(64px, 14vw, 150px); line-height: .92; margin: 0; display: flex; flex-direction: column; align-items: center; }
.hero-names.small { font-size: clamp(48px, 9vw, 84px); }
.hero-date { margin: 30px 0 52px; font-size: 14px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: min(460px, 100%); }
.countdown div { padding: 18px 6px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.countdown span { display: block; font-size: clamp(26px, 6vw, 36px); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.scroll-hint { position: absolute; bottom: 36px; width: 24px; height: 38px; border-radius: 12px; border: 1.5px solid var(--line); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--muted); animation: wheel 2s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Kutipan ---------- */
.ornament { width: 1px; height: 70px; background: linear-gradient(var(--accent), transparent); margin: 0 auto 40px; }
.quote blockquote { margin: 0 auto; max-width: 680px; font-size: clamp(26px, 4.2vw, 40px); line-height: 1.3; font-style: italic; }
.quote-src { margin: 26px 0 0; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

/* ---------- Mempelai ---------- */
.couple { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.couple-amp { font-size: 64px; color: var(--accent); font-style: italic; }
.person { display: flex; flex-direction: column; align-items: center; }
.avatar {
  width: 190px; aspect-ratio: 3 / 4; border-radius: 999px; overflow: hidden; margin-bottom: 28px;
  background: linear-gradient(160deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .mono { font-family: var(--serif); font-size: 84px; color: var(--accent); }
.person h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 6px; line-height: 1.15; }
.person p { margin: 0; color: var(--muted); font-size: 15px; max-width: 280px; }
.person a { margin-top: 14px; font-size: 14px; color: var(--accent); text-decoration: none; }

/* ---------- Acara ---------- */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.event { padding: 44px 32px 36px; }
.event h3 { margin: 0 0 26px; font-family: var(--serif); font-weight: 400; font-size: 36px; }
.event-date { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 22px; }
.event-date .day { font-size: 56px; font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.event-date .meta { text-align: left; font-size: 14px; line-height: 1.45; color: var(--muted); border-left: 1px solid var(--line); padding-left: 18px; }
.event-date .meta strong { display: block; color: var(--text); font-weight: 500; font-size: 15px; }
.event-time { font-size: 15px; margin: 0 0 22px; }
.event-place { font-weight: 600; margin: 0 0 4px; }
.event-addr { color: var(--muted); font-size: 15px; margin: 0 auto 28px; max-width: 300px; }
.event-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Kisah ---------- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; position: relative; text-align: left; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 52px 48px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--accent); }
.timeline .year { font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--accent); }
.timeline h3 { margin: 4px 0 6px; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; }
.timeline p { margin: 0; color: var(--muted); }

/* ---------- Galeri ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; gap: 10px; }
.gallery > * { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.gallery > :nth-child(6n+1) { grid-row: span 2; }
.gallery > :nth-child(6n+5) { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .8s var(--ease); }
.gallery img:hover { transform: scale(1.04); }
.gallery .ph {
  display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--accent);
  background: linear-gradient(145deg, var(--surface), var(--accent-soft));
}
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; cursor: zoom-out; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 90vh; border-radius: 14px; }

/* ---------- RSVP ---------- */
.form { max-width: 520px; margin: 0 auto; padding: 36px 30px; text-align: left; display: grid; gap: 20px; }
.form label { display: grid; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.form input:not([type=radio]), .form select, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg); outline: none; font-size: 16px; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field { display: grid; gap: 8px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.segmented { padding: 4px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border-radius: 14px; border: 1px solid var(--line); }
.segmented label { display: block; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 10px 4px; border-radius: 10px; font-size: 14px; color: var(--muted); transition: background .25s, color .25s, box-shadow .25s; }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }
.form .btn { margin-top: 4px; }
.form .btn:disabled { opacity: .5; cursor: progress; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wishes-status { color: var(--muted); font-size: 14px; text-align: center; margin: 8px 0 0; }

.wishes { max-width: 520px; margin: 28px auto 0; display: grid; gap: 12px; text-align: left; max-height: 460px; overflow-y: auto; }
.wish { padding: 20px 22px; }
.wish header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.wish strong { font-weight: 600; font-size: 15px; }
.wish .badge { font-size: 11px; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.wish p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- Hadiah ---------- */
.gifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 640px; margin: 0 auto; }
.gift { padding: 30px 26px; text-align: left; position: relative; overflow: hidden; }
.gift::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--accent-soft); }
.gift .bank { font-size: 13px; font-weight: 600; letter-spacing: .16em; color: var(--accent); }
.gift .num { font-size: 26px; letter-spacing: .06em; font-variant-numeric: tabular-nums; margin: 18px 0 2px; }
.gift .holder { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

/* ---------- Penutup ---------- */
.closing { padding-bottom: 80px; }
.closing-text { max-width: 540px; margin: 0 auto 50px; color: var(--muted); font-size: 18px; }
.hashtag { margin-top: 30px; font-size: 14px; letter-spacing: .1em; color: var(--accent); }

/* ---------- Dock ---------- */
.dock {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 140%); transition: transform .8s var(--ease);
  display: flex; gap: 4px; padding: 7px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.3);
}
.dock.show { transform: translate(-50%, 0); }
.dock a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .25s, color .25s; }
.dock a.active { background: var(--text); color: var(--bg); }
.dock svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Responsif ---------- */
@media (max-width: 640px) {
  .section { padding: 90px 16px; }
  .couple { grid-template-columns: 1fr; gap: 10px; }
  .couple-amp { font-size: 48px; margin: 10px 0; }
  .avatar { width: 160px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery > :nth-child(6n+5) { grid-column: span 1; }
  .event { padding: 36px 22px 30px; }
  .form { padding: 28px 20px; }
  .countdown { gap: 8px; }
  .dock a { width: 40px; height: 40px; }
}

/* ---------- Foto sampul ---------- */
.cover.has-photo {
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.6)), var(--cover-img) center / cover no-repeat;
  color: #fff;
}
.cover.has-photo .eyebrow,
.cover.has-photo em { color: #fff; opacity: .9; }
.cover.has-photo .cover-date,
.cover.has-photo .cover-guest p { color: rgba(255,255,255,.82); }
.cover.has-photo .cover-guest .guest-name { color: #fff; }
.cover.has-photo .btn-primary { background: #fff; color: #1D1D1F; }

.preview-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  background: #1D1D1F; color: #fff; text-align: center;
  font-size: 13px; padding: 8px 16px; letter-spacing: .01em;
}

.made-with { display: inline-block; margin-top: 70px; font-size: 12px; letter-spacing: .08em; color: var(--muted); text-decoration: none; }
.made-with .serif { font-size: 16px; color: var(--text); letter-spacing: .02em; }
