:root {
  --navy: #1B2A4A;
  --navy-light: #2C4270;
  --cream: #F7F3E8;
  --amber: #E2612B;
  --ink: #22262E;
  --muted: #7A7568;
  --border: #E3DCC8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #0a0a0a;
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--ink);
  line-height: 1.6;
}

/* Bingkai konten: full-screen di HP asli, jadi kartu ala-smartphone di layar lebar */
.app-frame {
  position: relative;
  background: var(--navy);
  min-height: 100vh;
}

@media (min-width: 640px) {
  body {
    display: flex;
    justify-content: center;
    padding: 40px 0;
  }
  .app-frame {
    width: 430px;
    min-height: calc(100vh - 80px);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 8px #111;
  }
  .cover {
    border-radius: 24px 24px 0 0;
  }
  .lightbox {
    left: calc(50% - 215px);
    right: calc(50% - 215px);
  }
  .music-toggle {
    right: calc(50% - 215px + 20px);
    bottom: 60px;
  }
}

.ticket-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 14px 60px;
}

.pass {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px 24px;
  margin-bottom: 14px;
  position: relative;
}

.pass--hero {
  background: var(--navy);
  color: var(--cream);
  text-align: center;
  padding: 36px 24px 26px;
  border: none;
}

.pass__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 18px;
}

.plane-icon { font-size: 18px; }

.pass__names {
  font-family: 'Archivo Expanded', sans-serif;
  font-weight: 700;
  font-size: 34px;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

.amp { color: var(--amber); }

.pass__route {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0.85;
  margin: 0 0 22px;
}

.dots {
  display: inline-block;
  width: 40px;
  border-top: 1px dashed rgba(247,243,232,0.5);
  vertical-align: middle;
  margin: 0 4px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.countdown__box {
  background: rgba(247,243,232,0.08);
  border: 1px solid rgba(247,243,232,0.2);
  border-radius: 4px;
  padding: 10px 12px;
  min-width: 56px;
}

.countdown__box span {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 20px;
  color: var(--amber);
}

.countdown__box small {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}

.section-title {
  font-family: 'Archivo Expanded', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
}

.section-title__icon { font-size: 15px; }

.itinerary__row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.itinerary__row:last-child { border-bottom: none; }
.itinerary__row span { color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 12px; }

.maps-embed { margin-top: 14px; border-radius: 4px; overflow: hidden; }
.maps-embed iframe { width: 100%; border: none; display: block; height: 220px; }

.story-text { font-size: 14px; color: var(--ink); margin: 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.gallery-item {
  display: block;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-player { width: 100%; border-radius: 4px; margin-bottom: 8px; background: #000; }

.rsvp-form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.rsvp-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.rsvp-form input[type="text"],
.rsvp-form input[type="number"],
.rsvp-form textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}
.rsvp-form textarea { resize: vertical; }

.attendance-choice { border: none; padding: 0; margin: 0; display: flex; gap: 10px; }
.radio-pill {
  flex: 1;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 0;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.radio-pill input { margin-right: 6px; }

.btn-primary {
  background: var(--navy);
  color: var(--cream);
  border: none;
  border-radius: 4px;
  padding: 13px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: var(--navy-light); }

.alert-success {
  background: #EAF3DE;
  color: #27500A;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.pass--stub {
  background: var(--navy);
  color: var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px dashed var(--amber);
}
.stub-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  letter-spacing: 2px;
  margin: 2px 0 0;
  color: var(--amber);
}
.heart { font-size: 22px; color: var(--amber); }

@media (max-width: 380px) {
  .pass__names { font-size: 28px; }
  .countdown__box { min-width: 48px; padding: 8px; }
}

/* Hero photo background */
.pass--hero-photo {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(27,42,74,0.88) 0%, rgba(27,42,74,0.94) 60%, var(--navy) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

/* Perforated card edges (ticket stub feel) */
.pass {
  position: relative;
}
.pass:not(.pass--hero):not(.pass--hero-photo)::before,
.pass:not(.pass--hero):not(.pass--hero-photo)::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--navy);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
.pass:not(.pass--hero):not(.pass--hero-photo)::before { left: -9px; }
.pass:not(.pass--hero):not(.pass--hero-photo)::after { right: -9px; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .boarding-anim__plane { animation: none; left: 50%; opacity: 1; }
  .boarding-anim__dots span { animation: none; opacity: 1; }
}

/* Gallery as buttons (for lightbox) */
.gallery-item {
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.gallery-item:hover,
.gallery-item:focus-visible {
  transform: scale(1.03);
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.lightbox[hidden] {
  display: none;
}
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 4px;
}
.lightbox__caption {
  color: var(--cream);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

/* QR block in RSVP section */
.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}
.qr-block img { border-radius: 4px; }

/* Floating music toggle */
.music-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--amber);
  color: var(--navy);
  font-size: 18px;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.music-toggle--playing {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,147,46,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(201,147,46,0); }
}

/* Cover / opening screen */
.cover {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.94) 65%, #FFFFFF 100%),
    var(--hero-image, none);
  background-size: cover;
  background-position: center;
  background-color: #FFFFFF;
  transition: opacity 0.5s ease;
}
.cover--hidden {
  opacity: 0;
  pointer-events: none;
}
.cover[hidden] {
  display: none;
}
.cover__inner {
  text-align: center;
  color: var(--ink);
  max-width: 320px;
}
.cover__inner .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.65;
}

/* Animasi loading ala boarding pass di layar pembuka */
.boarding-anim__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 12px;
}
.boarding-anim__dots span {
  animation: blink 1.4s infinite;
  opacity: 0;
}
.boarding-anim__dots span:nth-child(2) { animation-delay: 0.2s; }
.boarding-anim__dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}
.boarding-anim {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  height: 22px;
  margin: 0 auto 14px;
}
.boarding-anim__city {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--navy);
  white-space: nowrap;
  flex-shrink: 0;
}
.boarding-anim__track {
  position: relative;
  flex: 1;
  height: 22px;
}
.boarding-anim__track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(34, 38, 46, 0.3);
}
.boarding-anim__plane {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-size: 16px;
  animation: fly-across 2.8s ease-in-out infinite;
}
@keyframes fly-across {
  0% { left: 0; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: calc(100% - 16px); opacity: 0; }
}
.cover__names {
  font-family: 'Archivo Expanded', sans-serif;
  font-weight: 700;
  font-size: 32px;
  margin: 10px 0 28px;
}
.cover__guest {
  border-top: 1px dashed rgba(34,38,46,0.25);
  border-bottom: 1px dashed rgba(34,38,46,0.25);
  padding: 18px 0;
  margin-bottom: 28px;
}
.cover__guest .muted { color: var(--muted); }
.cover__guest-name {
  font-family: 'Archivo Expanded', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--amber);
  margin: 6px 0 0;
}
.cover__open {
  width: 100%;
}

/* Ticket wrap reveal transition after cover closes */
.ticket-wrap {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.ticket-wrap--visible {
  opacity: 1;
}
