/* ===================== BASE ===================== */
:root {
  --red: #a1222b;
  --red-dark: #7a1820;
  --red-light: #d64550;
  --gold: #c9a34a;
  --gold-light: #e6cf9a;
  --cream: #faf6ee;
  --ivory: #fffdf7;
  --ink: #3a2a2a;
  --ink-soft: #6b5555;
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Montserrat', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* ===================== COVER ===================== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(201,163,74,.10), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(201,163,74,.10), transparent 45%),
    linear-gradient(160deg, #7a1820 0%, #a1222b 45%, #6d141c 100%);
  color: var(--ivory);
  padding: 30px 20px;
  transition: opacity .6s ease;
}

.cover-bg { position: absolute; inset: 0; overflow: hidden; }
.cover-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-postion: center;
  animation: kenburns 24s ease-in-out infinite alternate;
}
.cover-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(122,24,32,.55) 0%,
    rgba(161,34,43,.45) 45%,
    rgba(109,20,28,.60) 100%);
}
.cover-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.cover-particle {
  position: absolute;
  bottom: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffedc2 0%, rgba(230,207,154,.45) 55%, transparent 75%);
  box-shadow: 0 0 14px 2px rgba(230,207,154,.5);
  opacity: 0;
  animation: particleFloat linear infinite;
}

.cover-content { position: relative; z-index: 2; max-width: 560px; }

.cover-top {
  font-family: var(--font-sans);
  font-size: .72rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
  font-weight: 300;
}

.cover-names {
  font-family: var(--font-script);
  font-size: clamp(3rem, 10vw, 5.2rem);
  line-height: 1.1;
}
.cover-names .amp {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--gold-light);
  margin: 8px 0;
}

.cover-date {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: .1em;
  margin: 22px 0 18px;
  color: var(--ivory);
}
.cover-date + .cover-date {
  margin-top: -14px;
}
.cover-date-resepsi {
  font-size: .92rem;
  color: var(--gold-light);
}

.cover-sub {
  font-size: .78rem;
  line-height: 1.9;
  color: rgba(255,255,255,.75);
  max-width: 480px;
  margin: 0 auto 10px;
}

.cover-guest {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--gold-light);
  margin: 8px 0 2px;
  line-height: 1.6;
}
.cover-guest .guest-name {
  color: var(--ivory);
  font-weight: 600;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}

.open-btn {
  margin-top: 24px;
  padding: 13px 42px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 40px;
  transition: all .35s ease;
  position: relative;
  overflow: hidden;
}
.open-btn:hover {
  background: var(--gold);
  color: var(--red-dark);
  box-shadow: 0 8px 30px rgba(201,163,74,.4);
  transform: translateY(-2px);
}

.scroll-hint {
  margin-top: 30px;
  animation: bounce 2s infinite;
}

/* cover animation */
.cover.leaving { opacity: 0; pointer-events: none; }

/* ===================== FLOATING BAR ===================== */
.floatbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(161,34,43,.92);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(90,10,20,.35);
}
.music-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(255,255,255,.1);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .3s;
}
.music-btn.playing { animation: spin 3s linear infinite; }
.music-btn:hover { background: var(--gold); color: var(--red-dark); }

.float-links { display: flex; gap: 8px; }
.float-links a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  font-size: .7rem;
  border: 1px solid rgba(255,255,255,.25);
  cursor: pointer;
  transition: all .3s;
  position: relative;
}
.float-links a:hover { background: var(--gold); color: var(--red-dark); border-color: var(--gold); }

/* ===================== MAIN LAYOUT ===================== */
.main {
  position: relative;
  background: var(--cream);
  min-height: 100vh;
}

.main.entered { animation: fadeUp .6s ease; }

/* ===================== FLOWERS ===================== */
.flowers-top { position: relative; height: 60px; }
.flowers-top .ft { position: absolute; top: 0; width: 120px; opacity: .85; }
.ft-left { left: 0; }
.ft-right { right: 0; transform: scaleX(-1); }

/* ===================== SECTION COMMON ===================== */
section {
  padding: 60px 20px;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  color: var(--red);
  line-height: 1.2;
  margin-bottom: 14px;
  font-weight: 400;
}
.section-title.big { font-size: clamp(3rem, 9vw, 4.6rem); }

.section-sub {
  font-size: .85rem;
  color: var(--ink-soft);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 30px;
}

/* ===================== HERO ===================== */
.hero {
  padding-top: 70px;
}
.hero .bismillah {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 2;
  max-width: 640px;
  margin: 0 auto 8px;
}
.hero .verse-ref {
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 30px;
}

.names-chinese {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 6px 0 18px;
  letter-spacing: .15em;
}
.names-chinese .amp { color: var(--gold); margin: 0 8px; }

.hero .tagline {
  font-size: .85rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ===================== COUPLE ===================== */
.couple-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 20px;
}

.person { text-align: center; }
.person-img {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: 0 auto 18px;
  border-radius: 50%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 6px solid var(--ivory);
  box-shadow: 0 10px 30px rgba(90,10,20,.18);
  outline: 1px solid var(--gold-light);
}
.person-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(145deg, #f0e6d6, #d8c7b0);
}
.person-img .crown {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.1rem;
  background: rgba(255,255,255,.7);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pname {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--red);
  margin-bottom: 6px;
  font-weight: 400;
}
.pchild {
  font-size: .78rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 240px;
  margin: 0 auto;
}

.couple-orname { text-align: center; }
.couple-orname .theamp {
  font-size: 2.4rem;
  color: var(--gold);
  animation: pulse 1.8s ease-in-out infinite;
}
.couple-orname .amp-text {
  font-size: .72rem;
  font-family: var(--font-serif);
  font-style: italic;
  max-width: 150px;
  margin: 10px auto 0;
  color: var(--ink-soft);
}

/* ===================== COUNTDOWN ===================== */
.countdown {
  background: linear-gradient(150deg, var(--red) 0%, var(--red-dark) 100%);
  margin: 30px auto 0;
  border-radius: 10px;
  color: var(--ivory);
  padding: 40px 20px;
}
.count-label {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: var(--gold-light);
}
.cd-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cd-item {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 16px 10px;
  min-width: 80px;
}
.cd-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ivory);
}
.cd-txt {
  display: block;
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-top: 8px;
  color: var(--gold-light);
}

/* ===================== EVENT ===================== */
.event-card {
  background: var(--ivory);
  border: 1px solid var(--gold-light);
  border-radius: 12px;
  padding: 34px 26px;
  max-width: 520px;
  margin: 0 auto 28px;
  box-shadow: 0 8px 28px rgba(90,10,20,.08);
}
.event-card.atm { margin-top: 28px; }

.ev-label {
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.ev-title {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--red);
  font-weight: 400;
  margin-bottom: 16px;
}

.ev-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px dashed var(--gold-light);
  border-bottom: 1px dashed var(--gold-light);
  margin-bottom: 16px;
}
.ev-day { font-family: var(--font-serif); font-size: 1.3rem; color: var(--ink); }
.ev-date-num {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--red);
  line-height: 1;
}
.ev-month { font-family: var(--font-serif); font-size: 1rem; color: var(--ink); }

.ev-info { font-size: .85rem; line-height: 2; color: var(--ink-soft); }
.ev-info strong { color: var(--ink); }
.ev-address { font-style: italic; font-size: .8rem; }

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 28px;
  background: var(--red);
  color: var(--ivory);
  border-radius: 40px;
  font-size: .78rem;
  letter-spacing: .08em;
  transition: all .3s;
}
.map-btn:hover { background: var(--gold); color: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201,163,74,.4); }
.map-btn.outline { background: transparent; border: 1px solid var(--red); color: var(--red); }
.map-btn.outline:hover { background: var(--gold); border-color: var(--gold); color: var(--red-dark); }

/* ===================== GALLERY ===================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.g-item {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  position: relative;
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(145deg, #eee3d3, #d8c7b0);
  transition: transform .5s ease;
}
.g-item:hover img { transform: scale(1.08); }

/* ===================== RSVP ===================== */
.rsvp, .comment, .gift {
  background: var(--ivory);
  border-top: 1px solid var(--gold-light);
  border-bottom: 1px solid var(--gold-light);
}

.form-group {
  margin-bottom: 14px;
  line-height: 0;
}
.form-group input,
.form-group textarea {
  width: 100%;
  max-width: 520px;
  padding: 13px 16px;
  border: 1px solid #e0d4c0;
  border-radius: 8px;
  background: #fffdfa;
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--ink);
  transition: border-color .3s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,163,74,.15);
}

.radio-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
  line-height: normal;
}
.radio label { cursor: pointer; }
.radio input { display: none; }
.radio span {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid #e0d4c0;
  border-radius: 40px;
  font-size: .8rem;
  transition: all .3s;
  cursor: pointer;
}
.radio input:checked + span {
  background: var(--red);
  color: var(--ivory);
  border-color: var(--red);
}

.submit-btn {
  display: inline-block;
  padding: 13px 46px;
  background: var(--red);
  color: var(--ivory);
  border: none;
  border-radius: 40px;
  font-family: var(--font-sans);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .3s;
}
.submit-btn:hover { background: var(--gold); color: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201,163,74,.4); }

.form-msg {
  margin-top: 14px;
  font-size: .82rem;
  color: var(--red);
  min-height: 1.2em;
}
.form-msg.success { color: #2e7d32; }

/* ===================== GIFT ===================== */
.gift-box {
  max-width: 380px;
  margin: 0 auto;
}
.bank-item {
  background: var(--cream);
  border: 1px solid var(--gold-light);
  border-radius: 12px;
  padding: 26px;
}
.bank-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--red);
  margin-bottom: 6px;
}
.bank-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ink);
  margin-bottom: 4px;
}
.bank-holder { font-size: .78rem; color: var(--ink-soft); margin-bottom: 16px; }
.copy-btn {
  padding: 9px 22px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 40px;
  font-size: .76rem;
  cursor: pointer;
  transition: all .3s;
}
.copy-btn:hover { background: var(--gold); color: var(--red-dark); }

/* ===================== COMMENT ===================== */
.comments-list {
  max-width: 560px;
  margin: 30px auto 0;
  text-align: left;
}
.comment-item {
  background: var(--cream);
  border: 1px solid var(--gold-light);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  animation: fadeUp .5s ease;
}
.c-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.c-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.c-name { font-size: .9rem; color: var(--ink); font-weight: 500; }
.c-date { font-size: .72rem; color: var(--ink-soft); }
.c-text { font-size: .85rem; color: var(--ink-soft); line-height: 1.7; }

/* ===================== CLOSING ===================== */
.closing-top {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 2;
  max-width: 560px;
  margin: 0 auto 30px;
  color: var(--ink-soft);
}
.closing-names {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 7vw, 3rem);
  color: var(--red);
  margin-bottom: 20px;
}
.closing-names .amp {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--gold);
  margin: 0 10px;
}
.closing-thanks { font-size: .85rem; color: var(--ink-soft); margin-bottom: 6px; }
.closing-family {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 10px;
}

/* ===================== FOOTER ===================== */
.footer {
  text-align: center;
  padding: 30px 20px 110px;
  font-size: .75rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--gold-light);
}
.footer .heart { color: var(--red); }

/* ===================== LIGHTBOX ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(20,5,8,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  animation: fade .3s ease;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lb-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 2.6rem;
  cursor: pointer;
  line-height: 1;
}
.lb-close:hover { color: var(--gold); }

/* ===================== ANIMATIONS ===================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
@keyframes kenburns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.18) translate(-1.5%, -1%); }
}
@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .9; }
  50% { transform: translateY(-50vh) translateX(var(--sway)); opacity: .6; }
  100% { transform: translateY(-108vh) translateX(calc(var(--sway) * -1)); opacity: 0; }
}

.cover-anim { opacity: 0; animation: fadeUp 1s ease forwards; }
.cover-content .cover-anim:nth-child(1) { animation-delay: .2s; }
.cover-content .cover-anim:nth-child(2) { animation-delay: .4s; }
.cover-content .cover-anim:nth-child(3) { animation-delay: .7s; }
.cover-content .cover-anim:nth-child(4) { animation-delay: .9s; }
.cover-content .cover-anim:nth-child(5) { animation-delay: 1.2s; }
.cover-content .cover-anim:nth-child(6) { animation-delay: 1.5s; }
.cover-content .cover-anim:nth-child(7) { animation-delay: 1.7s; }
.cover-content .cover-anim:nth-child(8) { animation-delay: 1.9s; }
.cover-content .cover-anim:nth-child(9) { animation-delay: 2.1s; }

/* ===================== SCROLL REVEAL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
  section { padding: 45px 18px; }
  .couple-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .couple-orname .amp-text { max-width: 220px; }
  .person-img { max-width: 220px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .cd-item { min-width: 68px; }
  .cd-num { font-size: 1.9rem; }
  .float-links { display: none; }
}
