/* ===== Halaman Invitation ===== */
body.invite-page {
  background-color: #4a000a;       /* marun gelap, sama dengan halaman gift */
  overflow-x: hidden;
}

.invite {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px 24px 60px;
}

@keyframes inviteFade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.invite-title {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: clamp(50px, 6vw, 80px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0;
  animation: inviteFade 1s ease 0.1s forwards;
}

/* ===== Tiket ===== */
.ticket {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 920px;
  background-color: #F8F7F3;       /* krem */
  color: #8B3A4A;                  /* marun */
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  animation:
    ticketIn 1.2s cubic-bezier(0.34, 1.3, 0.64, 1) 0.3s forwards,   /* muncul memantul */
    ticketFloat 5s ease-in-out 1.6s infinite;                       /* lalu melayang pelan */
}

@keyframes ticketIn {
  from { opacity: 0; transform: translateY(80px) rotate(-4deg) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes ticketFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Bagian utama */
.ticket-main {
  position: relative;
  flex: 1;
  padding: 34px 40px;
}

.ticket-main::before {             /* garis putus-putus di dalam tiket */
  content: '';
  position: absolute;
  inset: 12px;
  border: 1.5px dashed rgba(139, 58, 74, 0.35);
  border-radius: 10px;
  pointer-events: none;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  opacity: 0.8;
}

.ticket-label {
  margin-top: 18px;
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0.7;
}

.ticket-title {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: clamp(52px, 6vw, 84px);
  line-height: 1;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8B3A4A;
}

.ticket-note {
  margin-top: 10px;
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 13px;
  opacity: 0.8;
}

/* Detail tanggal, jam, tempat, meja */
.ticket-info {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 18px;
  padding: 16px 0;
  border-top: 1.5px dashed rgba(139, 58, 74, 0.4);
  border-bottom: 1.5px dashed rgba(139, 58, 74, 0.4);
}

.info-label {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.7;
}

.info-value {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 17px;
  color: #4a000a;
}

/* Hitung mundur */
.countdown {
  display: flex;
  align-items: center;
  gap: 20px;
}

.countdown-label {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.countdown-boxes {
  display: flex;
  gap: 12px;
}

.count-box {
  min-width: 68px;
  padding: 6px 10px 8px;
  text-align: center;
  background-color: rgba(139, 58, 74, 0.08);
  border-radius: 10px;
}

.count-box span {
  display: block;
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
}

.count-box small {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Sobekan tiket */
.ticket-stub {
  position: relative;
  width: 230px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  border-left: 3px dashed rgba(139, 58, 74, 0.45);   /* garis sobekan */
}

.ticket-stub::before,
.ticket-stub::after {              /* lubang setengah lingkaran di garis sobekan */
  content: '';
  position: absolute;
  left: -15px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #4a000a;       /* sama dengan warna latar halaman */
}

.ticket-stub::before { top: -14px; }
.ticket-stub::after  { bottom: -14px; }

.stub-heart {
  font-size: 30px;
  line-height: 1;
}

.stub-admit {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 46px;
  line-height: 0.95;
  letter-spacing: 3px;
}

.barcode {
  width: 100%;
  height: 70px;
  background: repeating-linear-gradient(
    90deg,
    #8B3A4A 0 2px, transparent 2px 5px,
    #8B3A4A 5px 6px, transparent 6px 10px,
    #8B3A4A 10px 14px, transparent 14px 16px
  );
}

.stub-no,
.stub-seat {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 2px;
}

/* Stempel setelah klik yes */
.stamp {
  position: absolute;
  top: 56%;
  left: 36%;
  padding: 6px 26px;
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 62px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #8B3A4A;
  border: 5px double #8B3A4A;
  border-radius: 12px;
  background-color: rgba(248, 247, 243, 0.55);
  transform: translate(-50%, -50%) rotate(-14deg);
  opacity: 0;
  pointer-events: none;
}

.ticket.confirmed .stamp {
  animation: stampIn 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}

@keyframes stampIn {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(2.6); }
  to   { opacity: 0.85; transform: translate(-50%, -50%) rotate(-14deg) scale(1); }
}

/* ===== RSVP ===== */
.rsvp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  animation: inviteFade 1s ease 1.4s forwards;
}

.rsvp-text {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ffffff;
}

.rsvp-buttons {
  display: flex;
  gap: 20px;
  min-height: 56px;
}

.rsvp-buttons button {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 32px;
  border-radius: 999px;
  cursor: pointer;
}

.btn-yes {
  background-color: #F8F7F3;
  color: #8B3A4A;
  border: 2px solid #F8F7F3;
  transition: transform 0.3s ease;
}

.btn-yes:hover {
  transform: scale(1.08);
}

.btn-no {
  position: relative;
  z-index: 10;
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease;   /* gerakan kabur halus */
}

/* ===== Remind me ===== */
.remind {
  display: none;                 /* tersembunyi sampai "yes" diklik */
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.remind.show {
  display: flex;
  animation: inviteFade 0.6s ease 0.5s both;   /* muncul pelan, setelah stempel dan balon */
}

.btn-remind {
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 26px;
  background: transparent;
  color: #ffffff;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-remind:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== Tombol kembali ke gift ===== */
.invite-back {
  display: none;                   /* tersembunyi sampai confirmed */
  padding: 8px 34px;
  font-family: 'Amatic SC', cursive;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: #8B3A4A;
  background-color: #F8F7F3;
  border-radius: 999px;
  transition: transform 0.3s ease;
}

.invite-back.show {
  display: inline-block;
  animation: inviteFade 0.6s ease 0.9s both;   /* muncul setelah tombol remind me */
}

.invite-back.show:hover {
  transform: scale(1.08);
}

/* ===== Responsif ===== */

/* Tablet: tiket bertumpuk (utama di atas, sobekan di bawah) */
@media (max-width: 900px) {
  .invite {
    min-height: calc(100vh - 54px);
    min-height: calc(100svh - 54px);
    padding: 32px 20px 50px;
  }

  .ticket { flex-direction: column; max-width: 560px; }
  .ticket-main { padding: 28px 26px; }

  .countdown { flex-direction: column; align-items: flex-start; gap: 10px; }
  .countdown-boxes { width: 100%; gap: 8px; }
  .count-box { flex: 1; min-width: 0; padding: 6px 4px 8px; }
  .count-box span { font-size: 40px; }

  .ticket-stub {
    width: 100%;
    border-left: none;
    border-top: 3px dashed rgba(139, 58, 74, 0.45);
  }

  /* lubang pindah ke kiri dan kanan garis sobekan (horizontal) */
  .ticket-stub::before { top: -15px; left: -14px; bottom: auto; }
  .ticket-stub::after  { top: -15px; right: -14px; left: auto; bottom: auto; }

  .stamp { top: 40%; left: 50%; font-size: 52px; }

  .rsvp-text { text-align: center; }
  .rsvp-buttons { flex-wrap: wrap; justify-content: center; }
}

/* HP: detail tiket jadi dua kolom */
@media (max-width: 680px) {
  .ticket-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-value { font-size: 15px; overflow-wrap: anywhere; }
}

/* HP kecil */
@media (max-width: 480px) {
  .ticket-main { padding: 24px 18px; }
  .ticket-main::before { inset: 8px; }

  .ticket-top { font-size: 11px; letter-spacing: 2px; }
  .ticket-label { font-size: 21px; letter-spacing: 3px; }
  .ticket-title { font-size: 46px; }
  .ticket-note { font-size: 12px; }

  .count-box span { font-size: 34px; }
  .count-box small { font-size: 9px; letter-spacing: 1px; }

  .stub-admit { font-size: 40px; }
  .stamp { font-size: 40px; padding: 4px 18px; border-width: 4px; }

  .rsvp-text { font-size: 30px; }
  .rsvp-buttons button { font-size: 24px; padding: 8px 24px; }
  .btn-remind { font-size: 22px; }
  .invite-back { font-size: 24px; padding: 8px 28px; }
}