:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --shadow-nav: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); overflow-x: hidden; }
.hidden { display: none !important; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* KEYFRAMES ANIMASI UNDANGAN */
@keyframes kenBurnsSlow {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes floatPetal {
  0% { transform: translateY(-10%) rotate(0deg); opacity: 0; }
  20% { opacity: 0.85; }
  80% { opacity: 0.85; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}
@keyframes spinDisk {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fadeUpReveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14px; padding: 11px 20px; border-radius: 12px;
  border: none; cursor: pointer; text-decoration: none; transition: all 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-pill { border-radius: 999px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px -4px rgba(37, 99, 235, 0.45); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: #cbd5e1; background: var(--bg-soft); }
.btn-success { background: #10b981; color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }

/* FLOATING PILL NAVBAR */
.floating-nav-wrap { position: sticky; top: 16px; z-index: 50; padding: 0 16px; }
.floating-nav {
  max-width: 1140px; margin: 0 auto; background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px); border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px; padding: 10px 14px 10px 22px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-nav);
}
.brand-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.logo-box {
  width: 32px; height: 32px; border-radius: 9px; background: var(--primary-soft);
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.brand-logo strong { font-size: 17px; font-weight: 800; letter-spacing: -0.4px; }
.by-tag { font-size: 12px; color: var(--primary); font-weight: 600; padding-left: 8px; border-left: 1px solid var(--border); }
.nav-links { display: none; gap: 28px; }
.nav-links a { text-decoration: none; color: #334155; font-size: 14px; font-weight: 600; transition: 0.15s; }
.nav-links a:hover { color: var(--primary); }

/* HERO SECTION */
.hero-section { padding: 48px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.hero-text h1 { font-size: 38px; font-weight: 800; line-height: 1.14; letter-spacing: -1px; margin-bottom: 18px; }
.hero-text h1 span { color: var(--primary); }
.hero-desc { font-size: 16px; color: var(--muted); line-height: 1.65; margin-bottom: 26px; }
.hero-desc b { color: var(--text); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* PHONE MOCKUP HERO */
.hero-mockup { display: flex; justify-content: center; }
.phone-frame {
  width: 295px; height: 560px; background: #0f172a; border-radius: 42px; padding: 11px;
  box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.3); position: relative;
}
.phone-notch {
  width: 95px; height: 22px; background: #0f172a; border-radius: 99px;
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 5;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 32px; overflow: hidden; position: relative;
  background: linear-gradient(170deg, #064e3b 0%, #047857 50%, #d97706 100%);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.phone-arch-preview {
  width: 100%; height: 86%; border-radius: 140px 140px 22px 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.45); background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(8px); padding: 24px 16px; text-align: center; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.phone-badge {
  display: inline-block; margin: 0 auto 10px; font-size: 10px; font-weight: 800; letter-spacing: 0.6px;
  background: rgba(255, 255, 255, 0.2); padding: 4px 10px; border-radius: 99px;
}
.phone-sub { font-size: 12px; opacity: 0.9; }
.phone-couple { font-family: 'Cormorant Garamond', serif; font-size: 34px; font-weight: 700; margin: 4px 0; }
.phone-date { font-size: 12px; opacity: 0.9; margin-bottom: 18px; }
.btn-phone-cta {
  width: 100%; background: #fef3c7; color: #78350f; border: none; padding: 11px 14px;
  border-radius: 99px; font-weight: 800; font-size: 12px; cursor: pointer;
}

/* SECTION HEAD */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.eyebrow { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 1px; color: var(--primary); margin-bottom: 8px; }
.section-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 15px; }

/* CATALOG & THEME CARDS */
.catalog-section { padding: 56px 0; background: var(--bg-soft); }
.category-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.cat-pill {
  background: #fff; border: 1.5px solid var(--border); padding: 9px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: #334155; cursor: pointer; transition: 0.15s;
}
.cat-pill.active, .cat-pill:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px; }
.theme-card {
  background: #fff; border-radius: 20px; border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-card); transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex; flex-direction: column;
}
.theme-card:hover { transform: translateY(-4px); box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.12); }
.theme-thumb {
  height: 270px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
  color: #fff; position: relative; overflow: hidden;
}
.theme-thumb-arch {
  margin: auto; width: 155px; height: 205px; border-radius: 90px 90px 14px 14px;
  border: 2px solid rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 12px;
}
.theme-thumb-arch small { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; opacity: 0.9; }
.theme-thumb-arch strong { font-family: 'Cormorant Garamond', serif; font-size: 24px; margin: 6px 0; }
.theme-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.theme-tags { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 10px; }
.tag-cat { font-size: 11px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 6px; }
.tag-motion { font-size: 10.5px; font-weight: 800; color: #9a3412; background: #ffedd5; padding: 3px 8px; border-radius: 6px; }
.theme-body h3 { font-size: 17px; font-weight: 800; margin-bottom: 5px; }
.theme-body p { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 16px; flex: 1; }
.theme-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }

/* PACKAGES SECTION (TANPA HARGA) */
.packages-section { padding: 64px 0; }
.package-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: stretch; }
.package-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: 22px; padding: 28px 24px;
  display: flex; flex-direction: column; transition: 0.2s;
}
.package-card.featured { border: 2px solid var(--primary); box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.16); }
.pkg-top-row { display: flex; justify-content: space-between; align-items: center; }
.pkg-duration { font-size: 11.5px; font-weight: 800; color: var(--primary); letter-spacing: 0.6px; }
.pkg-badge { background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.package-card h3 { font-size: 24px; font-weight: 800; margin: 10px 0 6px; }
.pkg-tagline { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.pkg-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; flex: 1; }
.pkg-features li { font-size: 14px; color: #334155; font-weight: 500; }

/* TESTIMONI & FOOTER */
.testi-section { padding: 56px 0; background: var(--bg-soft); }
.testi-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.testi-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.testi-card p { font-size: 14px; color: #334155; line-height: 1.6; margin-bottom: 12px; }
.testi-card strong { font-size: 13.5px; color: var(--primary); }
.site-footer { padding: 28px 0; text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }

/* ==========================================
   EDITOR LIVE PREVIEW
   ========================================== */
.editor-shell { min-height: 100vh; display: flex; flex-direction: column; background: #f1f5f9; }
.editor-topbar {
  background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 40;
}
.editor-top-left { display: flex; align-items: center; gap: 10px; }
.editor-top-left strong { display: block; font-size: 14.5px; }
.editor-top-left small { font-size: 12px; color: var(--primary); font-weight: 600; }
.editor-top-actions { display: flex; gap: 8px; }

.mobile-editor-tabs { display: flex; background: #f1f5f9; padding: 4px; border-radius: 10px; }
.ed-tab { border: none; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.ed-tab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

.editor-workspace { flex: 1; display: grid; grid-template-columns: 1fr; }
.editor-form-panel { background: #fff; padding: 18px; overflow-y: auto; display: none; }
.editor-form-panel.active { display: block; }
.ed-section { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.ed-section h4 { font-size: 14px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 13.5px;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slug-input-box { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.slug-input-box span { background: #f8fafc; padding: 10px 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.slug-input-box input { border: none; border-radius: 0; }
.share-link-result { background: var(--bg-soft); padding: 10px; border-radius: 10px; border: 1px solid var(--border); }
.share-link-result input { background: #fff; font-size: 12px; margin-bottom: 8px; }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.editor-preview-panel { padding: 20px; display: none; justify-content: center; align-items: flex-start; overflow-y: auto; }
.editor-preview-panel.active { display: flex; }
.preview-device-wrapper {
  width: 100%; max-width: 410px; height: 740px; background: #fff; border-radius: 32px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25); overflow-y: auto; border: 8px solid #0f172a;
  position: relative;
}

/* ==========================================
   TEMPLATE UNDANGAN MEWAH (3D ARCH MOTION + COVER GATE)
   ========================================== */
.invitation-canvas { width: 100%; min-height: 100%; color: #1e293b; position: relative; overflow-x: hidden; }

/* Layar Sampul Pembuka (Cover Gate) */
.inv-cover-gate {
  position: relative; min-height: 680px; padding: 36px 22px;
  display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
  overflow: hidden; transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}
.inv-cover-gate.opened { display: none; }
.inv-bg-anim {
  position: absolute; inset: -10px; z-index: 0; animation: kenBurnsSlow 14s infinite ease-in-out;
}
.inv-arch-card {
  position: relative; z-index: 2; width: 100%; max-width: 330px;
  border-radius: 165px 165px 24px 24px; padding: 48px 22px 32px;
  background: rgba(15, 23, 42, 0.34); backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}
.inv-ornament-top { font-size: 14px; letter-spacing: 6px; opacity: 0.85; margin-bottom: 8px; }
.inv-couple-title { font-family: 'Cormorant Garamond', serif; font-size: 42px; font-weight: 700; margin: 8px 0; line-height: 1.08; }
.inv-guest-box {
  background: rgba(255, 255, 255, 0.16); padding: 11px 16px; border-radius: 14px;
  margin: 18px 0; border: 1px solid rgba(255, 255, 255, 0.32);
}
.inv-guest-box small { display: block; font-size: 11px; opacity: 0.9; margin-bottom: 2px; }
.inv-guest-box strong { font-size: 16px; }
.btn-open-inv {
  background: #fff; color: #0f172a; border: none; padding: 12px 24px; border-radius: 999px;
  font-weight: 800; font-size: 13.5px; cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
.btn-open-inv:hover { transform: scale(1.04); }

/* Konten Utama Undangan Setelah Dibuka */
.inv-main-body { animation: fadeUpReveal 0.6s ease; }
.inv-hero-banner {
  padding: 52px 22px 42px; text-align: center; color: #fff;
  border-radius: 0 0 36px 36px; position: relative;
}
.inv-section { padding: 34px 22px; text-align: center; border-bottom: 1px solid rgba(0,0,0,0.06); }
.inv-section h3 { font-family: 'Cormorant Garamond', serif; font-size: 28px; margin-bottom: 10px; }
.inv-card-box {
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px; padding: 20px; margin-top: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

/* Countdown Grid */
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.cd-box {
  background: #fff; border-radius: 12px; padding: 10px 6px; border: 1px solid rgba(0,0,0,0.08);
}
.cd-box strong { display: block; font-size: 20px; font-weight: 800; }
.cd-box small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; font-weight: 700; }

/* Tombol Musik Melayang */
.music-fab {
  position: sticky; bottom: 16px; left: calc(100% - 56px); width: 42px; height: 42px;
  border-radius: 50%; border: none; color: #fff; font-size: 16px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3); z-index: 20; display: flex; align-items: center; justify-content: center;
}
.music-fab.playing { animation: spinDisk 6s linear infinite; }

/* Partikel Kelopak Melayang */
.petal-particle {
  position: absolute; top: -20px; width: 10px; height: 10px; border-radius: 50% 0 50% 50%;
  background: rgba(255, 255, 255, 0.55); pointer-events: none; z-index: 1;
  animation: floatPetal linear infinite;
}

.inv-rsvp-form { display: flex; flex-direction: column; gap: 10px; text-align: left; margin-top: 12px; }
.inv-rsvp-form input, .inv-rsvp-form select, .inv-rsvp-form textarea {
  width: 100%; padding: 10px; border-radius: 10px; border: 1px solid #cbd5e1; font-size: 13px;
}
.wish-item { text-align: left; background: #fff; border: 1px solid #e2e8f0; padding: 11px 13px; border-radius: 12px; margin-top: 8px; font-size: 12.5px; }

/* PUBLIC MODE FULL SCREEN */
.public-inv-wrapper { background: #0f172a; min-height: 100vh; display: flex; justify-content: center; }
.invitation-canvas.public-mode { max-width: 480px; background: #fff; min-height: 100vh; box-shadow: 0 0 50px rgba(0,0,0,0.5); }
.btn-back-floating {
  position: fixed; top: 14px; right: 14px; z-index: 60; background: rgba(15, 23, 42, 0.85);
  color: #fff; border: 1px solid rgba(255,255,255,0.2); padding: 8px 14px; border-radius: 99px;
  font-size: 12px; font-weight: 700; cursor: pointer;
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; }
  .hero-text h1 { font-size: 52px; }
  .package-grid, .testi-grid { grid-template-columns: repeat(3, 1fr); }
  .mobile-editor-tabs { display: none; }
  .editor-workspace { grid-template-columns: 440px 1fr; height: calc(100vh - 61px); }
  .editor-form-panel, .editor-preview-panel { display: block !important; height: 100%; }
  .editor-preview-panel { display: flex !important; }
}