/* ============================================
   Undangan Pernikahan — Elegant Floral Theme
   ============================================ */

:root{
  --cream:        #fbf6ee;
  --cream-2:      #f4ecdd;
  --cream-3:      #ede2cc;
  --gold:         #b8893d;
  --gold-2:       #8e6624;
  --gold-soft:    #d9b878;
  --ink:          #3b2d1d;
  --ink-soft:     #5b4a32;
  --muted:        #8b7a5f;
  --line:         #d9c9a8;
  --bg-card:      #fffaf1;
  --rose:         #c08a7a;
  --shadow:       0 12px 30px rgba(90,60,20,.08);
  --shadow-lg:    0 25px 60px rgba(90,60,20,.18);

  --f-display:    'Great Vibes', 'Cormorant Garamond', serif;
  --f-serif:      'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --f-sans:       'Poppins', system-ui, -apple-system, sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html, body { margin:0; padding:0; }
html { scroll-behavior:smooth; }
body{
  font-family: var(--f-sans);
  color: var(--ink);
  background: #2a1f14;
  background-image:
    radial-gradient(ellipse at top, #3b2d1d, #1a1208);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Desktop frame: tampilkan undangan dalam container portrait mobile-width */
.frame{
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(0,0,0,.45), 0 0 0 1px rgba(184,137,61,.1);
  overflow: hidden;
}

/* Mobile / layar sempit: undangan harus fit edge-to-edge tanpa frame coklat
   di samping kiri-kanan. Hilangkan cap 480px untuk .frame & .cover, dan
   samakan background body dgn cream agar tidak ada warna coklat yg lolos
   di pinggir saat overscroll/bounce. */
@media (max-width: 600px){
  body{
    background: var(--cream);
    background-image: none;
    background-attachment: scroll;
  }
  .frame{
    max-width: 100%;
    box-shadow: none;
  }
  .cover{
    max-width: 100%;
  }
}

img{ max-width:100%; display:block; }

/* Lock scroll body selama cover overlay aktif */
body.is-locked{ overflow:hidden; height:100vh; }

/* ============================================
   Buttons
   ============================================ */
.btn{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.85rem 1.6rem;
  border:1px solid var(--gold);
  background: transparent;
  color: var(--gold-2);
  font-family: var(--f-sans);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing:.04em;
  text-transform: uppercase;
  cursor:pointer;
  border-radius: 999px;
  text-decoration:none;
  transition: all .25s ease;
}
.btn:hover{ background: var(--gold); color:#fff; transform: translateY(-1px); }
.btn-gold{ background: var(--gold); color:#fff; }
.btn-gold:hover{ background: var(--gold-2); }
.btn-outline{ background: transparent; }
.btn-sm{ padding:.45rem .9rem; font-size:.8rem; }
.btn .icon{ font-size: 1.05rem; }

/* ============================================
   COVER / WELCOME PAGE (halaman pertama)
   ============================================ */
.cover{
  position: fixed;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: 480px;
  height: 100vh; height: 100svh;
  z-index: 200;
  display: grid;
  grid-template-rows: auto 1fr auto;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(217,184,120,.18), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(192,138,122,.14), transparent 60%),
    var(--cream);
  overflow: hidden;
  transform: translate3d(-50%, 0, 0);
  transition: transform .95s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, .35);
}

/* Slide up & out animation */
.cover.is-leaving{
  transform: translate3d(-50%, -100%, 0);
  pointer-events: none;
}
/* Bekukan animasi internal supaya tidak ada repaint yg mengganggu slide-up */
.cover.is-leaving *,
.cover.is-leaving *::before,
.cover.is-leaving *::after{
  animation-play-state: paused !important;
  transition: none !important;
}
.cover.is-gone{ display: none; }

/* Floral ornaments on top/bottom of welcome cover */
.cover__floral{
  position: relative;
  z-index: 4;
  width: 100%;
  pointer-events: none;
  margin: 0;
  overflow: hidden;
  height: 11vh;
  max-height: 90px;
}
.cover__floral .floral-svg{
  width: 110%;
  height: 100%;
  display: block;
  margin-left: -5%;
  filter: drop-shadow(0 6px 12px rgba(80,50,15,.14));
  object-fit: contain;
}
.cover__floral--top{ margin-top: -.5rem; }
.cover__floral--top .floral-svg{ transform: scaleY(-1); }
.cover__floral--bottom{ margin-bottom: -.5rem; }

.cover__inner{
  position: relative;
  z-index: 5;
  padding: 1rem 1.25rem;
  display: grid;
  /* Semua row content-sized; align-content:center menengahkan stack sebagai
     blok utuh sehingga tidak ada row 1fr yg memunculkan jurang kosong. */
  grid-auto-rows: auto;
  justify-items: center;
  align-content: center;
  gap: 1rem;
  min-height: 0;
  overflow: hidden;
}

.cover__heart{
  color: var(--gold-2);
  display: grid; place-items:center;
  margin: 0;
}

.cover__names-big{
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  color: var(--ink);
  line-height: 1;
  margin: 0;
}
.cover__names-big .amp{
  color: var(--gold);
  font-style: italic;
  margin: 0 .15em;
}

.cover__date{
  font-family: var(--f-serif);
  font-size: .85rem;
  color: var(--ink-soft);
  letter-spacing: .08em;
  margin: 0;
}

/* Inline couple photo on welcome page */
.cover__photo-inline{
  margin: .25rem auto;
  min-height: 0;
  max-width: 260px;
  width: 68%;
  aspect-ratio: 3/4;
  max-height: 48vh;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-soft);
}
.cover__photo-inline img{
  width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1)    translateY(0); }
  to   { transform: scale(1.06) translateY(-1.5%); }
}

.cover__greet{
  margin: 0;
  padding: .5rem .9rem;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  width: 100%;
  max-width: 320px;
}
.cover__greet .muted{ margin: 0; color: var(--muted); font-size: .75rem; line-height:1.25; }
.cover__greet .guest{
  font-family: var(--f-display);
  font-size: 1.3rem;
  color: var(--gold-2);
  margin: 0;
  font-weight: 400;
  line-height: 1.1;
}

#openBtn{ align-self: center; padding: .55rem 1.3rem; font-size: .85rem; }

/* ============================================
   HERO (halaman setelah Buka Undangan dibuka)
   ============================================ */
.hero{
  position: relative;
  min-height: 100vh; min-height: 100svh;
  background: var(--cream);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero--photo .hero__photo{
  position: absolute;
  inset: 0 0 auto 0;
  height: 55%;
  background-image: var(--cover-img);
  background-size: cover;
  background-position: center 25%;
  z-index: 1;
  animation: kenburns 22s ease-in-out infinite alternate;
}
.hero--photo .hero__photo-tint{
  position: absolute;
  inset: 0 0 auto 0;
  height: 62%;
  z-index: 2;
  background: linear-gradient(180deg,
    rgba(0,0,0,.06) 0%,
    rgba(0,0,0,0)   30%,
    rgba(251,246,238,0) 55%,
    rgba(251,246,238,.95) 88%,
    var(--cream)    100%);
  pointer-events: none;
}
.hero__content{
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 1.5rem 1.25rem 1rem;
  background: linear-gradient(180deg, rgba(251,246,238,0) 0%, rgba(251,246,238,.95) 25%, var(--cream) 100%);
}
.hero--photo .hero__content{ margin-top: 45vh; }

.hero__heart{
  color: var(--gold-2);
  display: grid; place-items: center;
  margin: 0 auto .25rem;
}
.hero__sub{
  font-family: var(--f-sans);
  font-size: .85rem;
  letter-spacing: .35em;
  color: var(--ink-soft);
  margin: 0;
  text-transform: uppercase;
}
.hero__title{
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  color: var(--ink);
  margin: .25rem 0 .75rem;
  line-height: 1;
}
.hero__title .amp{
  color: var(--gold);
  font-style: italic;
  margin: 0 .15em;
}
.hero__date{
  font-family: var(--f-serif);
  color: var(--ink-soft);
  margin: .25rem 0 1rem;
  letter-spacing: .05em;
}
.hero__actions{
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.hero__actions .btn{ font-size: .78rem; padding: .55rem 1.1rem; }

.hero__floral{
  position: relative;
  z-index: 4;
  width: 100%;
  margin-bottom: -2rem;
  pointer-events: none;
}
.hero__floral .floral-svg{
  width: 130%;
  height: auto;
  display: block;
  margin-left: -15%;
  filter: drop-shadow(0 -6px 14px rgba(80,50,15,.12));
}

/* Floating particles */
.particles{
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.particle{
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,235,180,.95) 0%, rgba(255,200,120,.4) 60%, rgba(255,200,120,0) 100%);
  box-shadow: 0 0 8px rgba(255,220,150,.6);
  opacity: 0;
  animation: floatUp var(--d) linear infinite;
  animation-delay: var(--delay);
}
@keyframes floatUp {
  0%   { transform: translate(0, 0)         scale(.6); opacity: 0; }
  10%  { opacity: var(--op, .8); }
  90%  { opacity: var(--op, .8); }
  100% { transform: translate(var(--drift, 0), -110vh) scale(1.1); opacity: 0; }
}

/* Cover countdown (small inline version on hero) */
.cover-countdown{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  max-width: 360px;
  margin: 1rem auto 1.25rem;
}
.cdc{
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .3rem .35rem;
  box-shadow: 0 4px 12px rgba(90,60,20,.10);
}
.cdc-num{
  display: block;
  font-family: var(--f-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.cdc-label{
  display: block;
  margin-top: .15rem;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Save The Date pill button */
.btn-dark{
  background: linear-gradient(180deg, #4a3826 0%, #2e2014 100%);
  color: #f3e6c8;
  border-color: #2e2014;
}
.btn-dark:hover{ background: #2e2014; color: #fff; }
.btn-pill{ padding: .7rem 1.6rem; border-radius: 999px; }


/* ============================================
   Invitation main content
   ============================================ */
.invitation{ background: var(--cream); padding-bottom: 4rem; }
/* Fade-in singkat saat cover terbuka, sinkron dgn slide-up */
.invitation.is-revealing{
  animation: invitationReveal .7s ease-out both;
}
@keyframes invitationReveal{
  from{ opacity: 0; transform: translateY(8px); }
  to  { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce){
  .invitation.is-revealing{ animation: none; }
}
.section{
  padding: 5rem 1.25rem;
  position: relative;
}
.section:nth-child(odd){ background: var(--cream); }
.section:nth-child(even){ background: var(--cream-2); }
.container{ max-width: 1100px; margin: 0 auto; }
.container.narrow{ max-width: 720px; margin: 0 auto; text-align:center; }

.section__kicker{
  font-family: var(--f-display);
  font-size: 2rem;
  color: var(--gold-2);
  margin: 0 0 1rem;
  text-align:center;
  font-weight: 400;
}
.section__title{
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 6vw, 3.6rem);
  color: var(--ink);
  margin: 0 0 .25rem;
  text-align:center;
  font-weight: 400;
}
.section__sub{
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-2);
  margin: 0 0 2.5rem;
  text-align:center;
  letter-spacing: .05em;
}

.floral{
  height: 60px;
  background-repeat: no-repeat; background-position: center;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 60'><g stroke='%23b8893d' stroke-width='1' fill='none' opacity='.7'><path d='M40 30 Q 80 0 130 30 T 220 30'/><path d='M120 30 q -10 -12 -25 -10 q 10 10 25 10'/><path d='M140 30 q 10 -12 25 -10 q -10 10 -25 10'/></g><circle cx='130' cy='30' r='3' fill='%23b8893d'/></svg>");
  opacity: .8;
  margin: 0 auto 2rem;
}

/* ===== Opening / Quote ===== */
.quote{
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 1.5rem 0 .5rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.quote-source{ color: var(--gold-2); font-size: .95rem; margin: 0 0 2rem; }
.thanks{
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.9;
  margin: 1rem 0 0;
}

/* ===== Couple ===== */
/* Selalu 1 kolom karena .frame dikunci max-width 480px (mobile-style invitation). */
.couple-grid{
  display:grid; gap: 3rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}
.person{ text-align:center; min-width: 0; }
.person__photo{
  width: clamp(160px, 58%, 220px);
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid #fff;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-soft);
  position: relative;
}
.person__photo img{ width:100%; height:100%; object-fit:cover; }
.person__photo-placeholder{
  width:100%; height:100%;
  background: linear-gradient(135deg, var(--cream-3), var(--gold-soft));
  display:grid; place-items:center;
  font-size: 3.5rem; color: var(--gold-2);
}
.person__name{
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 7.5vw, 2.2rem);
  color: var(--gold-2);
  margin: 0 0 .5rem; font-weight:400;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.person__bio{ color: var(--muted); font-style: italic; margin: 0 0 1rem; overflow-wrap: anywhere; }
.person__parents{ color: var(--ink-soft); font-size: .95rem; line-height: 1.7; margin: 1rem 0; overflow-wrap: anywhere; }
.person__parents span{ color: var(--gold); font-family: var(--f-display); font-size: 1.2rem; }
.ig-btn{
  display:inline-block;
  margin-top: .75rem;
  padding: .35rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold-2);
  text-decoration:none;
  font-size: .85rem;
  transition: all .2s;
}
.ig-btn:hover{ background: var(--gold); color:#fff; }

/* ===== Countdown ===== */
.countdown{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  max-width: 480px; margin: 2rem auto;
}
.cd-box{
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem .5rem;
  box-shadow: var(--shadow);
}
.cd-num{
  display:block;
  font-family: var(--f-serif);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 600;
  color: var(--gold-2);
  line-height: 1;
}
.cd-label{
  display:block;
  margin-top: .35rem;
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===== Events ===== */
/* Selalu 1 kolom karena .frame max-width 480px. */
.events-grid{
  display:grid; gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}
.event-card{
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align:center;
  box-shadow: var(--shadow);
  position: relative;
}
.event-card::before{
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  pointer-events:none;
  opacity: .5;
}
.event-card__name{
  font-family: var(--f-display);
  font-size: 2.2rem; color: var(--gold-2);
  margin: 0 0 1rem; font-weight: 400;
  overflow-wrap: anywhere;
}
.event-card__date{ color: var(--ink); font-weight: 500; margin-bottom:.25rem; }
.event-card__time{ color: var(--gold-2); margin-bottom: 1rem; letter-spacing:.05em; }
.event-card__loc{ color: var(--ink-soft); margin: 1rem 0 1.5rem; line-height: 1.5; overflow-wrap: anywhere; }
.event-card__loc small{ color: var(--muted); }

/* ===== Love Story Timeline =====
   Frame max-width 480px → selalu pakai layout sejajar (garis kiri),
   bukan zig-zag kiri/kanan yang butuh ruang ≥600px. */
.timeline{
  position: relative;
  padding: 1rem 0;
  margin: 2rem auto 0;
}
.timeline::before{
  content:""; position: absolute; left: 18px; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.timeline__item{
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
  display:flex;
  justify-content: flex-start;
}
.timeline__dot{
  position: absolute;
  left: 18px; top: 1.25rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--cream);
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--gold-soft);
}
.timeline__card{
  width: calc(100% - 40px);
  margin-left: 40px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-align:left;
  min-width: 0;
}
.timeline__year{
  display:inline-block;
  background: var(--gold);
  color: #fff;
  font-size: .75rem;
  padding: .15rem .7rem;
  border-radius: 999px;
  letter-spacing:.08em;
  margin-bottom: .5rem;
}
.timeline__title{
  font-family: var(--f-serif);
  font-size: 1.3rem; color: var(--gold-2);
  margin: 0 0 .5rem; font-weight: 600;
  overflow-wrap: anywhere;
}
.timeline__desc{ margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; }

/* ===== Gallery =====
   Frame max-width 480px → cukup maksimal 3 kolom agar tile tidak terlalu kecil. */
.gallery-grid{
  display:grid; gap: .5rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
}
.gallery-item{
  display:block; overflow:hidden;
  aspect-ratio: 1/1;
  border-radius: 8px;
  cursor: zoom-in;
  box-shadow: var(--shadow);
}
.gallery-item img{
  width: 100%; height:100%; object-fit:cover;
  transition: transform .4s ease;
}
.gallery-item:hover img{ transform: scale(1.05); }

/* Lightbox */
.lightbox{
  position: fixed; inset:0; z-index: 9999;
  background: rgba(20,15,5,.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 1rem;
}
.lightbox.is-open{ display:flex; }
.lightbox img{ max-width: 95vw; max-height: 90vh; border-radius: 4px; }
.lightbox__close{
  position:absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.15);
  border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.4rem; cursor: pointer;
}

/* ===== Gift ===== */
.gift-toggle{
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  margin: 1rem 0;
  text-align:left;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.gift-toggle summary{
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  font-family: var(--f-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold-2);
  list-style: none;
  display:flex; align-items:center; justify-content: space-between;
}
.gift-toggle summary::after{ content: "+"; color: var(--gold); font-size: 1.5rem; }
.gift-toggle[open] summary::after{ content: "−"; }
.gift-list{ padding: 0 1.5rem 1.5rem; }
.gift-card{
  background: var(--cream);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
}
.gift-card__name{
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-2);
  margin-bottom: .25rem;
}
.gift-card__no{
  display:flex; align-items:center; justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.acc-no{
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  letter-spacing: .06em;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
}
.gift-card__holder{ color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.gift-address{ padding: 1rem 1.5rem 1.5rem; margin: 0; color: var(--ink-soft); }

/* ===== RSVP form ===== */
.rsvp-form{
  display:grid; gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem;
  text-align:left;
  box-shadow: var(--shadow);
  margin: 1rem 0 2rem;
}
.rsvp-form label{
  display: grid; gap: .35rem;
  font-size: .9rem; color: var(--ink-soft);
  font-weight: 500;
}
.rsvp-form input, .rsvp-form select, .rsvp-form textarea{
  font-family: var(--f-sans);
  font-size: 1rem;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus{
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,137,61,.18);
}
.form-feedback{
  font-size: .9rem;
  min-height: 1.2em;
  text-align:center;
}
.form-feedback.success{ color: #2d7a3d; }
.form-feedback.error{ color: #b53d3d; }

/* ===== Wishes ===== */
.wishes__title{
  font-family: var(--f-serif);
  font-size: 1.4rem;
  color: var(--gold-2);
  margin: 2.5rem 0 1rem;
  text-align:center;
}
.wishes{
  display: grid;
  gap: .75rem;
  max-height: 380px;
  overflow-y: auto;
  padding: .25rem;
  text-align:left;
}
.wishes::-webkit-scrollbar{ width: 6px; }
.wishes::-webkit-scrollbar-thumb{ background: var(--gold-soft); border-radius: 3px; }
.wish{
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem 1rem;
  box-shadow: 0 4px 10px rgba(90,60,20,.04);
}
.wish__head{ display:flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; gap:.5rem; flex-wrap:wrap; }
.wish__head strong{ color: var(--gold-2); }
.wish__badge{
  font-size: .7rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.wish__badge--hadir{ background: #e3f1e1; color: #2d7a3d; }
.wish__badge--ragu{  background: #fdf3d6; color: #8a6a16; }
.wish__badge--tidak{ background: #f7dede; color: #a23434; }
.wish__msg{ margin: .25rem 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.wish__time{ color: var(--muted); font-size: .75rem; }

/* ===== Closing ===== */
.section-closing{
  background: linear-gradient(180deg, var(--cream-2) 0%, var(--cream-3) 100%) !important;
  text-align:center;
}
.closing{
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.8;
  margin: 1.5rem 0 2rem;
}
.closing-sign{ margin: 0; color: var(--muted); }
.closing-names{
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--gold-2);
  margin: .5rem 0 1rem;
  font-weight: 400;
}
.hashtag{
  display:inline-block;
  font-family: var(--f-serif);
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: .08em;
  padding: .35rem 1.2rem;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
}

.footer{
  text-align:center;
  padding: 2rem 1rem 6rem; /* room for bottom nav */
  color: var(--muted);
  font-size: .85rem;
  background: var(--ink);
}
.footer p{ margin: 0; color: var(--cream-3); }

/* ===== Floating Action Buttons (FAB) ===== */
.fab-stack{
  position: fixed;
  left: 50%;
  bottom: 5rem;
  transform: translateX(calc(240px - 100% - 0.85rem));
  display: grid;
  gap: .55rem;
  z-index: 90;
}
@media (max-width: 520px){
  .fab-stack{
    left: auto; right: .5rem; bottom: 4.5rem;
    transform: none;
  }
}
/* Hide FAB & bottom nav until cover is opened */
body.is-locked .fab-stack,
body.is-locked .bottom-nav{ display: none !important; }
.fab{
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4a3826 0%, #2e2014 100%);
  color: #f3e6c8;
  border: none;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.fab:hover{ transform: translateY(-2px); box-shadow: 0 12px 22px rgba(0,0,0,.22); }
.fab svg{ display: block; }
.fab-music.is-playing{ animation: pulseRing 2s ease-out infinite; }
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0   rgba(184,137,61,.55); }
  70%  { box-shadow: 0 0 0 12px rgba(184,137,61,0); }
  100% { box-shadow: 0 0 0 0   rgba(184,137,61,0); }
}
.fab-music.is-playing svg{ animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Bottom navigation ===== */
.bottom-nav{
  position: fixed;
  left: 50%;
  bottom: .75rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .35rem .5rem;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(60,40,20,.22), 0 0 0 1px rgba(184,137,61,.08);
  z-index: 95;
  max-width: min(440px, calc(100vw - 1.5rem));
  overflow-x: auto;
  scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar{ display: none; }
.bottom-nav a{
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.bottom-nav a svg{ width: 18px; height: 18px; display: block; }
.bottom-nav a:hover,
.bottom-nav a.is-active{
  background: var(--gold);
  color: #fff;
}
@media (max-width: 480px){
  .bottom-nav a{ width: 34px; height: 34px; }
  .bottom-nav a svg{ width: 16px; height: 16px; }
  .fab-stack{ right: .5rem; bottom: 4.5rem; }
}

/* ============================================
   ADMIN
   ============================================ */
.admin-body{
  background: #f4f5f7;
  font-family: var(--f-sans);
  color: #2a2a2a;
}
.admin-container{
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar{
  background: #1f1b16;
  color: #e8dec6;
  padding: 1.5rem 1rem;
}
.admin-sidebar h1{
  font-family: var(--f-display);
  font-size: 1.6rem;
  color: var(--gold-soft);
  margin: 0 0 2rem;
  text-align:center;
}
.admin-nav{ display:grid; gap: .25rem; }
.admin-nav a{
  color: #e8dec6;
  text-decoration: none;
  padding: .6rem .9rem;
  border-radius: 8px;
  font-size: .95rem;
  transition: background .2s;
}
.admin-nav a:hover{ background: rgba(255,255,255,.07); }
.admin-nav a.active{ background: var(--gold); color: #fff; }
.admin-main{ padding: 2rem; }
.admin-header{
  display:flex; align-items:center; justify-content: space-between;
  margin-bottom: 2rem;
}
.admin-header h2{ margin:0; font-size: 1.6rem; color: var(--ink); }
.admin-card{
  background:#fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin-bottom: 1.5rem;
}
.admin-card h3{ margin: 0 0 1rem; color: var(--ink); }
.admin-form{ display:grid; gap: 1rem; }
.admin-form .row{ display:grid; gap: 1rem; }
@media(min-width:768px){ .admin-form .row.cols-2{ grid-template-columns: 1fr 1fr; } .admin-form .row.cols-3{ grid-template-columns: 1fr 1fr 1fr; } }
.admin-form label{ display: grid; gap: .35rem; font-size: .9rem; font-weight: 500; color: #555; }
.admin-form input, .admin-form select, .admin-form textarea{
  padding: .55rem .8rem;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  font-size: .95rem;
  font-family: var(--f-sans);
  background: #fff;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus{
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,137,61,.15);
}
.admin-form .btn{ width: fit-content; }
.admin-table{ width:100%; border-collapse: collapse; }
.admin-table th, .admin-table td{
  padding: .75rem;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: .92rem;
}
.admin-table th{ background: #faf7f1; color: var(--ink); font-weight: 600; }
.admin-table tr:hover td{ background: #fcfaf5; }

.flash{
  padding: .8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.flash.success{ background: #e7f5e9; color: #1e6b30; border:1px solid #b9dec1; }
.flash.error{   background: #fbe6e6; color: #8c2424; border:1px solid #f0c2c2; }

.login-page{
  display: grid; place-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1f1b16, #3b2d1d);
  padding: 1rem;
}
.login-card{
  width: 100%; max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-card h1{
  font-family: var(--f-display);
  font-size: 2.2rem;
  color: var(--gold-2);
  text-align:center;
  margin: 0 0 .5rem;
}
.login-card .login-sub{
  text-align:center; color: var(--muted);
  margin: 0 0 2rem;
}

@media(max-width: 768px){
  .admin-container{ grid-template-columns: 1fr; }
  .admin-sidebar{ position: sticky; top: 0; z-index: 10; padding: 1rem; }
  .admin-sidebar h1{ display: none; }
  .admin-nav{ display: flex; flex-wrap: wrap; gap: .25rem; }
  .admin-nav a{ font-size: .8rem; padding: .4rem .7rem; }
  .admin-main{ padding: 1rem; }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .section{ opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
  .section.in-view{ opacity: 1; transform: none; }
}

/* ============================================
   Floral 3D ornament — header dengan ribbon
   ============================================ */
.floral-header,
.floral-divider{
  position: relative;
  margin: 0 auto 1.5rem;
  width: 100%;
  max-width: 560px;
  /* 3D perspective container */
  perspective: 900px;
  perspective-origin: 50% 50%;
}
.floral-header__inner{
  position: relative;
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
  will-change: transform;
}
.floral-svg{
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 22px rgba(80,50,15,.18));
}
/* Setiap layer pakai depth Z yg berbeda untuk efek 3D */
.flayer{
  transform-origin: 50% 60%;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
  will-change: transform;
}
.flayer-1{ transform: translateZ(-20px); }
.flayer-2{ transform: translateZ(0px);   }
.flayer-3{ transform: translateZ(20px);  }
.flayer-4{ transform: translateZ(40px);  }

/* Subtle float animation untuk tiap layer (kecepatan beda → terlihat seperti hidup) */
@media (prefers-reduced-motion: no-preference) {
  .flayer-1{ animation: floatA 9s ease-in-out infinite; }
  .flayer-2{ animation: floatB 7s ease-in-out infinite; }
  .flayer-3{ animation: floatA 6s ease-in-out infinite reverse; }
  .flayer-4{ animation: floatC 5s ease-in-out infinite; }
}
@keyframes floatA {
  0%,100% { transform: translateZ(-20px) translateY(0)   rotateZ(0deg); }
  50%     { transform: translateZ(-20px) translateY(-4px) rotateZ(-.6deg); }
}
@keyframes floatB {
  0%,100% { transform: translateZ(0px) translateY(0)   rotateZ(0deg); }
  50%     { transform: translateZ(0px) translateY(3px) rotateZ(.5deg); }
}
@keyframes floatC {
  0%,100% { transform: translateZ(40px) translateY(0)    scale(1); }
  50%     { transform: translateZ(40px) translateY(-5px) scale(1.015); }
}

/* Ribbon banner di tengah */
.floral-header__ribbon{
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%) translateZ(60px);
  background: linear-gradient(180deg, #5a3f24 0%, #3c2814 100%);
  color: #f5e7c8;
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  letter-spacing: .04em;
  padding: .35rem 2.5rem;
  border-top: 1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(0,0,0,.25);
  box-shadow: 0 8px 24px rgba(60,40,20,.35);
  white-space: nowrap;
}
.floral-header__ribbon::before,
.floral-header__ribbon::after{
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 16px;
  background: #2a1a08;
}
.floral-header__ribbon::before{
  left: -16px;
  clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%);
}
.floral-header__ribbon::after{
  right: -16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%);
}
.floral-header__ribbon span{
  display: inline-block;
  text-shadow: 0 1px 0 rgba(0,0,0,.3), 0 0 8px rgba(255,220,160,.25);
}

/* Variant divider (tanpa ribbon) */
.floral-divider{
  max-width: 360px;
  margin: 1rem auto 2rem;
  opacity: .85;
}
.floral-divider .floral-svg{
  filter: drop-shadow(0 8px 14px rgba(80,50,15,.14));
}

/* Mobile tweaks */
@media (max-width: 600px){
  .floral-header{ max-width: 100%; margin-bottom: 1rem; }
  .floral-header__ribbon{
    font-size: 1.3rem;
    padding: .25rem 1.5rem;
  }
}

/* Reduce motion: nonaktifkan float anim & 3D */
@media (prefers-reduced-motion: reduce){
  .flayer{ animation: none !important; transform: none !important; }
  .floral-header__inner{ transition: none; }
}

