:root {
  color-scheme: light;
  --bg: #fff4ec;
  --paper: #fffdfa;
  --ink: #4a2c48;
  --muted: #8d6f86;
  --rose: #e2558f;
  --violet: #8e5cc4;
  --sun: #f7a928;
  --coral: #ff7a6b;
  --sky: #3fb3e6;
  --mint: #5fbf7f;
  --line: #f4d9e4;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.6;
  text-align: center;
  overflow-x: hidden;
  /* soft confetti of colour behind everything */
  background:
    radial-gradient(circle at 8% 12%, #ffd6e7 0, transparent 22%),
    radial-gradient(circle at 92% 28%, #fff1b8 0, transparent 20%),
    radial-gradient(circle at 12% 58%, #dff3ff 0, transparent 22%),
    radial-gradient(circle at 88% 74%, #e8dcff 0, transparent 22%),
    radial-gradient(circle at 30% 96%, #dcf5e3 0, transparent 22%),
    var(--bg);
  background-attachment: fixed;
}
body.locked { overflow: hidden; height: 100vh; }

.script { font-family: "Great Vibes", cursive; font-weight: 400; }
.eyebrow {
  font-family: "Quicksand", sans-serif; font-weight: 700;
  letter-spacing: .3em; text-transform: uppercase; font-size: .75rem;
  color: var(--violet); margin: 0 0 .75rem;
}
.bride { color: var(--rose); }
.groom { color: var(--violet); }
.amp { color: var(--sun); }

/* ---------- Flowers ---------- */
.bloom { display: block; width: var(--s); height: var(--s); overflow: visible; }
.corner .bloom, .wreath .bloom {
  position: absolute;
  transform: rotate(var(--r, 0deg));
  animation: sway 4.5s ease-in-out var(--dl, 0s) infinite alternate;
}
@keyframes sway {
  to { transform: rotate(calc(var(--r, 0deg) + 9deg)) scale(1.05); }
}

.corner { position: absolute; width: 150px; height: 150px; pointer-events: none; z-index: 1; }
.corner .bloom { left: var(--x); top: var(--y); }
.corner.tl { top: -14px; left: -14px; }
.corner.tr { top: -14px; right: -14px; transform: scaleX(-1); }
.corner.bl { bottom: -14px; left: -14px; transform: scaleY(-1); }
.corner.br { bottom: -14px; right: -14px; transform: scale(-1, -1); }

.wreath {
  position: relative;
  width: min(78vw, 320px); aspect-ratio: 1;
  margin: .5rem auto 1rem;
  display: grid; place-items: center;
}
.wreath::before {
  content: ""; position: absolute; inset: 9%;
  border-radius: 50%; border: 2px dashed #f6b8cf;
}
.wreath .bloom { left: calc(var(--x) - var(--s) / 2); top: calc(var(--y) - var(--s) / 2); }

.flower-row { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin-top: 1.75rem; }
.flower-row.small { margin: -52px 0 14px; }
.flower-row .bloom { animation: bob 3s ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes bob { to { transform: translateY(-5px) rotate(6deg); } }

.petals { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.petal {
  position: absolute; top: -24px; left: var(--l);
  width: var(--w); height: calc(var(--w) * .7);
  background: var(--c); opacity: .8;
  border-radius: 150% 0 150% 0;
  animation: fall var(--t) linear var(--dl) infinite;
}
@keyframes fall {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(var(--sx), 55vh) rotate(220deg); }
  100% { transform: translate(0, 110vh) rotate(480deg); }
}

/* ---------- Cover ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 24px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, #ffd3e4 0, transparent 40%),
    radial-gradient(circle at 85% 80%, #ffe9a8 0, transparent 40%),
    radial-gradient(circle at 85% 15%, #e3d6ff 0, transparent 35%),
    radial-gradient(circle at 15% 85%, #d3f0ff 0, transparent 35%),
    var(--bg);
  transition: transform .9s cubic-bezier(.7,0,.3,1), opacity .9s;
}
.cover.open { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.cover-inner { max-width: 420px; position: relative; z-index: 2; }
.cover h1 { font-size: clamp(2.4rem, 10vw, 3.4rem); margin: 0; line-height: 1.05; position: relative; }
.cover h1 span { display: block; }
.cover .to { color: var(--muted); font-style: italic; margin: .75rem 0 1.5rem; }

/* ---------- Sections ---------- */
main { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.section {
  position: relative;
  padding: 72px 0;
  opacity: 0; transform: translateY(24px);
  transition: opacity 1s, transform 1s;
}
.section + .section::before {
  /* little dotted line between sections */
  content: ""; position: absolute; top: 0; left: 50%; translate: -50% 0;
  width: 140px; height: 6px;
  background: radial-gradient(circle, currentColor 2.2px, transparent 2.6px) 0 50% / 14px 6px repeat-x;
  color: var(--coral);
  -webkit-mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
          mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}
.section.visible { opacity: 1; transform: none; }
.section:last-child { padding-bottom: 140px; }
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.big { font-size: clamp(3rem, 14vw, 4.6rem); line-height: 1.1; margin: .5rem 0; }
.date-line {
  font-family: "Quicksand", sans-serif; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; font-size: .85rem;
  color: var(--ink); margin: 0;
}
.title {
  display: inline-block;
  font-family: "Quicksand", sans-serif; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; font-size: .95rem;
  color: var(--rose); margin: 0 0 1.75rem; padding-bottom: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 Q6 0 12 4 T24 4' fill='none' stroke='%23f7a928' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center bottom / 24px 8px repeat-x;
}

.quote-card {
  background: var(--paper);
  border: 2px dashed #c9b3ee;
  border-radius: 28px;
  padding: 28px 22px;
  box-shadow: 0 10px 30px -18px rgba(142, 92, 196, .5);
}
.arabic { font-family: "Amiri", serif; font-size: 1.7rem; line-height: 2; color: var(--violet); margin: 0 0 .75rem; }
.quote { font-style: italic; font-size: 1.25rem; margin: 0; }
.quote-src { color: var(--violet); font-family: "Quicksand", sans-serif; font-size: .85rem; font-weight: 700; margin: .75rem 0 0; }

.couple-grid { display: grid; gap: .5rem; }
.couple .name { font-size: 2.4rem; margin: 0; line-height: 1.2; }
.couple .amp { font-size: 2.6rem; }
.parents { color: var(--muted); font-size: 1rem; margin: .25rem 0 0; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.countdown div {
  border-radius: 20px 20px 20px 6px; padding: 14px 4px;
  box-shadow: 0 8px 20px -14px rgba(74, 44, 72, .5);
}
.countdown div:nth-child(1) { background: #ffe0ec; color: var(--rose); }
.countdown div:nth-child(2) { background: #fff0c2; color: #d4880c; }
.countdown div:nth-child(3) { background: #dff3ff; color: #1f8fc2; }
.countdown div:nth-child(4) { background: #ebe1ff; color: var(--violet); }
.countdown span { display: block; font-family: "Quicksand", sans-serif; font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.countdown small { font-family: "Quicksand", sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .62rem; font-weight: 700; color: var(--ink); opacity: .7; }

.card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 28px;
  padding: 28px 20px;
  margin-top: 40px;
  box-shadow: 0 14px 34px -22px rgba(226, 85, 143, .6);
}
.label {
  font-family: "Quicksand", sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em; font-size: .7rem;
  color: var(--violet); margin: 1rem 0 0;
}
.flower-row + .label { margin-top: 0; }
.value { font-size: 1.3rem; margin: .1rem 0; }
.small { font-size: 1rem; color: var(--muted); margin: 0; }

.map-wrap { border-radius: 28px; overflow: hidden; border: 4px solid #fff; aspect-ratio: 4 / 3; background: var(--paper); box-shadow: 0 0 0 2px #bfe6f7, 0 14px 30px -20px rgba(63, 179, 230, .7); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.closing p:first-of-type { font-style: italic; font-size: 1.25rem; }
.hijri { font-style: italic; color: var(--muted); margin: .2rem 0 0; }
.venue-line { color: var(--muted); font-style: italic; margin: .35rem 0 0; }

/* ---------- Invitation wording ---------- */
.invite p { margin: .4rem 0; }
.invite .salam { font-style: italic; color: var(--violet); font-size: 1.25rem; }
.invite .parent-names {
  font-family: "Quicksand", sans-serif; font-weight: 700; font-size: .95rem;
  letter-spacing: .06em; text-transform: uppercase; margin: .9rem 0;
}
.invite .parent-names span { display: block; }
.invite .parent-names .amp { font-size: 1.8rem; text-transform: none; line-height: 1.2; }
.invite .name { font-size: clamp(1.9rem, 8.5vw, 2.5rem); line-height: 1.2; margin: 1rem 0 .25rem; }
.invite .with { font-style: italic; color: var(--muted); }

/* ---------- Dress code ---------- */
.dress-photo { display: block; border-radius: 24px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 14px 30px -18px rgba(74, 44, 72, .7); }
.dress-photo img { display: block; width: 100%; height: auto; }
.dress-name { font-family: "Great Vibes", cursive; font-size: 2.2rem; color: #a07a5c; margin: .5rem 0 .25rem; }
.swatches { display: flex; justify-content: center; gap: 10px; margin-bottom: .9rem; }
.swatches span {
  width: 34px; height: 34px; border-radius: 50%; background: var(--c);
  border: 3px solid #fff; box-shadow: 0 4px 10px -4px rgba(74, 44, 72, .5);
}

/* ---------- Aturcara ---------- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 380px; text-align: left; }
.timeline li { position: relative; padding: 0 0 1.4rem 34px; }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--dot); box-shadow: 0 0 0 4px #fff;
}
.timeline li:not(:last-child)::after {
  content: ""; position: absolute; left: 12px; top: 22px; bottom: -2px;
  border-left: 2px dashed #f2c3d6;
}
.timeline time { display: block; font-family: "Quicksand", sans-serif; font-weight: 700; font-size: .85rem; color: var(--rose); letter-spacing: .05em; }
.timeline span { font-size: 1.2rem; }

/* ---------- Navigation apps ---------- */
.nav-apps { display: flex; justify-content: center; gap: 22px; margin-top: .75rem; }
.app {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: "Quicksand", sans-serif; font-weight: 700; font-size: .78rem;
  color: var(--ink); text-decoration: none;
}
.app-icon {
  width: 62px; height: 62px; border-radius: 17px; overflow: hidden;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px -8px rgba(74, 44, 72, .55);
  transition: transform .2s;
}
.app:hover .app-icon { transform: translateY(-3px) rotate(-3deg); }
.app-icon svg { width: 100%; height: 100%; }
.app-icon.gmaps { background: #fff; }
.app-icon.gmaps svg { width: 74%; height: 74%; }
.app-icon.waze { background: #33ccff; }
.app-icon.waze svg { width: 84%; height: 84%; }
.app-icon.amaps { background: linear-gradient(135deg, #8bd97a 0 50%, #c8ecff 50%); }

/* ---------- Forms (RSVP & Ucapan) ---------- */
.form {
  display: grid; gap: 14px; text-align: left;
  background: var(--paper); border: 2px solid var(--line); border-radius: 28px;
  padding: 24px 20px; margin-top: 1.25rem;
  box-shadow: 0 14px 34px -22px rgba(142, 92, 196, .6);
}
.form label, .form legend {
  display: grid; gap: 6px;
  font-family: "Quicksand", sans-serif; font-weight: 700; font-size: .75rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--violet);
}
.form input, .form select, .form textarea {
  font: inherit; font-family: "Quicksand", sans-serif; font-size: 1rem; font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--ink);
  width: 100%; padding: 12px 14px;
  background: #fff8fb; border: 2px solid #f1d5e2; border-radius: 16px;
  outline: none; transition: border-color .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--rose); }
.form textarea { resize: vertical; }
.choice { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice legend { margin-bottom: 6px; }
.choice label { display: block; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 6px; border-radius: 16px;
  border: 2px solid #f1d5e2; background: #fff8fb;
  font-size: .95rem; letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer;
}
.choice input:checked + span { border-color: var(--rose); background: #ffe0ec; color: var(--rose); }
.choice input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.form .btn { width: 100%; }
.form [hidden] { display: none; }
.form-status { margin: 0; text-align: center; font-family: "Quicksand", sans-serif; font-size: .9rem; color: var(--mint); min-height: 1.2em; }
.form-status.error { color: var(--coral); }

.wishes { display: grid; gap: 12px; margin-top: 1.25rem; max-height: 420px; overflow-y: auto; padding: 4px; text-align: left; }
.wish { background: var(--paper); border-radius: 20px 20px 20px 6px; padding: 14px 16px; border-left: 5px solid var(--tone, var(--rose)); }
.wish strong { font-family: "Quicksand", sans-serif; font-size: .9rem; color: var(--tone, var(--rose)); }
.wish p { margin: .2rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.wishes .empty { text-align: center; color: var(--muted); font-style: italic; }

/* ---------- Hadiah ---------- */
.gift { margin-top: 1.25rem; }
.qr {
  width: 200px; aspect-ratio: 1; margin: 0 auto 1.25rem;
  border-radius: 20px; background: #fff; padding: 10px;
  box-shadow: 0 0 0 3px #ffe0ec, 0 10px 24px -14px rgba(226, 85, 143, .7);
  display: grid; place-items: center;
}
.qr img { width: 100%; height: 100%; object-fit: contain; }
.qr-missing { font-family: "Quicksand", sans-serif; font-size: .78rem; color: var(--muted); margin: 0; }
.account { font-family: "Quicksand", sans-serif; font-weight: 700; letter-spacing: .08em; }

/* ---------- Hubungi ---------- */
.contacts { display: grid; gap: 12px; }
.contact {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--paper); border: 2px solid var(--line); border-radius: 22px; padding: 14px 16px;
}
.contact div { flex: 1; min-width: 0; }
.contact strong { display: block; font-size: 1.15rem; line-height: 1.3; }
.contact small { color: var(--muted); font-size: .9rem; }
.contact a {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none; font-size: 1.15rem;
}
.contact .call { background: #dff3ff; color: #1f8fc2; }
.contact .wa { background: #dcf5e3; color: #3c9a5f; }

/* ---------- Bottom menu ---------- */
.bottom-nav {
  position: fixed; left: 50%; bottom: 10px; translate: -50% 0; z-index: 40;
  width: min(calc(100% - 20px), 480px);
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
  background: rgba(255, 253, 250, .94); backdrop-filter: blur(8px);
  border: 2px solid #fff; border-radius: 22px; padding: 6px;
  box-shadow: 0 10px 26px -12px rgba(74, 44, 72, .45);
}
.bottom-nav[hidden] { display: none; }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 6px; border-radius: 16px;
  font-family: "Quicksand", sans-serif; font-weight: 700; font-size: .66rem; letter-spacing: .02em;
  color: var(--muted); text-decoration: none;
  transition: color .2s, background .2s, transform .2s;
}
.bottom-nav svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.bottom-nav a:hover { color: var(--rose); }
.bottom-nav a:active { transform: scale(.92); }
.bottom-nav a[aria-current="true"] { color: var(--rose); background: #ffe0ec; }
.bottom-nav a:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }

/* SoundCloud player is kept off-screen; only the music button is visible */
.sc-frame { position: fixed; left: -9999px; bottom: 0; width: 300px; height: 166px; border: 0; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border-radius: 999px;
  font-family: "Quicksand", sans-serif; font-size: .95rem; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--coral));
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(226, 85, 143, .8);
}
.btn-primary.alt {
  background: linear-gradient(135deg, var(--sky), var(--violet));
  box-shadow: 0 8px 18px -8px rgba(63, 179, 230, .8);
}
.btn-ghost { background: #fff; color: var(--rose); box-shadow: inset 0 0 0 2px var(--rose); }
.btn-ghost:hover { background: var(--rose); color: #fff; }
.btn small { font-weight: 500; opacity: .85; }
.icon {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.actions .btn { flex: 1 1 200px; }
#openBtn { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }

/* ---------- Floating controls ---------- */
.fab-group { position: fixed; right: 16px; bottom: 92px; display: flex; flex-direction: column; gap: 10px; z-index: 40; }
.fab {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff;
  background: linear-gradient(135deg, #ffe0ec, #ebe1ff); color: var(--violet);
  display: grid; place-items: center; padding: 0;
  font-size: 1.15rem; cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(142, 92, 196, .6);
}
.fab.spin { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 380px) {
  .corner { width: 120px; height: 120px; }
  .corner .bloom { scale: .8; transform-origin: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .section { transition: none; opacity: 1; transform: none; }
  .fab.spin, #openBtn, .corner .bloom, .wreath .bloom, .flower-row .bloom { animation: none; }
  .petals { display: none; }
}
