:root {
  --lux-cream: #fbf9f5;
  --lux-charcoal: #1c1a19;
  --lux-muted-gold: #c5a065;
  --lux-sand: #e6ded6;
  --lux-border: rgba(28, 26, 25, 0.08);
  --lux-card: rgba(255, 255, 255, 0.75);
  --font-serif: 'Italiana', serif;
  --font-caps: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--lux-cream);
  color: var(--lux-charcoal);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Page Screen Management */
.page-view {
  display: none;
  opacity: 0;
  min-height: 100vh;
  transition: opacity 0.8s var(--ease-cinematic);
}

.page-view.active {
  display: block;
  opacity: 1;
}

/* ========================================================
   PAGE 1: CINEMATIC 3D WAX SEAL & ENVELOPE
   ======================================================== */
.envelope-ambient-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #f5efe6 0%, #ebe0d3 100%);
  z-index: 0;
}

.envelope-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.invitation-crest {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--lux-muted-gold);
  letter-spacing: 4px;
}

.envelope-tagline {
  font-family: var(--font-caps);
  font-size: 0.75rem;
  letter-spacing: 5px;
  color: #8b8077;
  margin-bottom: 40px;
}

.envelope-box {
  position: relative;
  width: 320px;
  height: 220px;
  background: #ded0c3;
  border-radius: 6px;
  box-shadow: 0 30px 60px rgba(45, 38, 32, 0.18);
  perspective: 1200px;
  cursor: pointer;
}

.envelope-pocket {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-left: 160px solid #d4c4b5;
  border-right: 160px solid #d4c4b5;
  border-bottom: 120px solid #c9b7a6;
  border-top: 100px solid transparent;
  border-radius: 0 0 6px 6px;
  pointer-events: none;
}

.flap-top {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
  border-top: 130px solid #c8b6a5;
  transform-origin: top center;
  transition: transform 0.9s var(--ease-cinematic);
}

.seal-button {
  position: absolute;
  top: 90px;
  left: calc(50% - 28px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d9a07b, #8f4f2c);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25), inset 0 2px 3px rgba(255, 255, 255, 0.4);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: opacity 0.5s ease, transform 0.3s;
}

.seal-emboss {
  color: #fff;
  font-size: 1.2rem;
  opacity: 0.9;
}

/* The Letter Card inside */
.letter-card {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  height: 195px;
  background: #fff;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 1.1s var(--ease-cinematic);
}

.letter-inner {
  text-align: center;
}

.letter-monogram {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--lux-muted-gold);
}

.letter-inner h3 {
  font-family: var(--font-caps);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #4a4541;
  margin: 6px 0 2px 0;
}

.invitee-line {
  font-size: 0.72rem;
  color: #8c8279;
}

.mini-gold-divider {
  width: 30px;
  height: 1px;
  background: var(--lux-muted-gold);
  margin: 8px auto;
}

.tap-open-prompt {
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--lux-muted-gold);
}

/* Open State */
.envelope-box.unsealed .flap-top {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-box.unsealed .seal-button {
  opacity: 0;
  transform: scale(0.6);
}

.envelope-box.unsealed .letter-card {
  transform: translateY(-130px) scale(1.05);
  z-index: 4;
}

.open-instruction {
  margin-top: 36px;
  font-family: var(--font-caps);
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: #8c7e73;
  animation: pulseInstruction 2.5s infinite;
}

/* ========================================================
   PAGE 2: FULL-SCREEN CAROUSEL & EDITORIAL BODY
   ======================================================== */
.floating-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 10px;
  border-radius: 40px;
  display: flex;
  gap: 6px;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.nav-pill {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 30px;
  font-family: var(--font-caps);
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.nav-pill.active, .nav-pill:hover {
  background: var(--lux-charcoal);
  color: #fff;
}

/* FULL-SCREEN CAROUSEL (100vh) */
.full-screen-carousel {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s var(--ease-cinematic), transform 1.4s var(--ease-cinematic);
  transform: scale(1.05);
}

.carousel-slide.active-slide {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* Image Placeholders with Editorial Backdrop */
.slide-media-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #383431 0%, #201e1d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-bg-2 {
  background: linear-gradient(135deg, #443c36 0%, #2a2420 100%);
}

.slide-bg-3 {
  background: linear-gradient(135deg, #323b35 0%, #1c221e 100%);
}

.placeholder-content {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  padding: 20px;
}

.ph-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
  color: var(--lux-muted-gold);
}

.ph-title {
  font-family: var(--font-caps);
  letter-spacing: 3px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

.ph-desc {
  font-size: 0.8rem;
  margin-top: 6px;
}

/* Slide Overlay Text */
.slide-overlay {
  position: absolute;
  bottom: 120px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  z-index: 2;
  padding: 0 20px;
}

.editorial-eyebrow {
  font-family: var(--font-caps);
  font-size: 0.75rem;
  letter-spacing: 5px;
  color: var(--lux-muted-gold);
  display: block;
  margin-bottom: 8px;
}

.editorial-names {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 2px;
}

.quote-style {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-style: italic;
  max-width: 700px;
  margin: 0 auto;
}

.editorial-date {
  font-family: var(--font-caps);
  font-size: 0.75rem;
  letter-spacing: 4px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* Arrows */
.carousel-arrows {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  gap: 12px;
  z-index: 10;
}

.arrow-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
  font-size: 1.2rem;
  transition: all 0.3s;
}

.arrow-btn:hover {
  background: #fff;
  color: var(--lux-charcoal);
}

/* Indicator Lines */
.carousel-indicators {
  position: absolute;
  bottom: 50px;
  left: 40px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator-bar {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
  border-radius: 2px;
}

.indicator-bar.active .bar-progress {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: progressFill 5.5s linear;
}

.scroll-down-hint {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-caps);
  font-size: 0.65rem;
  letter-spacing: 3px;
  z-index: 10;
}

/* ========================================================
   EDITORIAL CARD & FORM SECTIONS
   ======================================================== */
.page-content-wrapper {
  max-width: 680px;
  margin: -50px auto 80px auto;
  position: relative;
  z-index: 10;
  padding: 0 16px;
}

.editorial-card {
  background: var(--lux-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--lux-border);
  border-radius: 24px;
  padding: 44px 32px;
  margin-bottom: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.card-header {
  text-align: center;
  margin-bottom: 28px;
}

.section-label {
  font-family: var(--font-caps);
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: var(--lux-muted-gold);
  display: block;
  margin-bottom: 6px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.card-title-sm {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  text-align: center;
  font-weight: 400;
}

.card-subtitle {
  font-size: 0.85rem;
  color: #7a736d;
  margin-top: 6px;
}

/* Minimal Luxury Form Inputs */
.luxury-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-container label {
  display: block;
  font-family: var(--font-caps);
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: #555;
  margin-bottom: 8px;
}

.lux-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd2c7;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--lux-charcoal);
  outline: none;
  transition: border-color 0.3s;
}

.lux-input:focus {
  border-color: var(--lux-charcoal);
}

.segmented-control {
  display: flex;
  gap: 10px;
}

.segment {
  flex: 1;
  position: relative;
}

.segment input {
  position: absolute;
  opacity: 0;
}

.segment span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid #ddd2c7;
  border-radius: 10px;
  background: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.3s;
}

.segment input:checked + span {
  background: var(--lux-charcoal);
  color: #fff;
  border-color: var(--lux-charcoal);
}

.lux-btn-primary {
  padding: 16px;
  background: var(--lux-charcoal);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: var(--font-caps);
  letter-spacing: 3px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
  margin-top: 8px;
}

.lux-btn-primary:active {
  transform: scale(0.98);
}

/* GCash Luxury Button */
.gifting-text {
  font-size: 0.88rem;
  color: #6c645d;
  line-height: 1.8;
  text-align: center;
}

.gcash-luxury-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border-radius: 30px;
  background: #007dfe;
  color: white;
  border: none;
  font-family: var(--font-caps);
  font-size: 0.8rem;
  letter-spacing: 2px;
  cursor: pointer;
  margin-top: 24px;
  box-shadow: 0 8px 24px rgba(0, 125, 254, 0.22);
}

.gcash-logo-icon {
  background: #fff;
  color: #007dfe;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Next Page Callout */
.next-page-callout {
  text-align: center;
  margin: 40px 0;
}

.next-page-callout p {
  font-family: var(--font-caps);
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: #8c8279;
  margin-bottom: 12px;
}

.editorial-link-btn {
  background: transparent;
  border: 1px solid var(--lux-charcoal);
  color: var(--lux-charcoal);
  font-family: var(--font-caps);
  font-size: 0.75rem;
  letter-spacing: 3px;
  padding: 14px 28px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
}

.editorial-link-btn:hover {
  background: var(--lux-charcoal);
  color: #fff;
}

/* ========================================================
   PAGE 3: DETAILS & SCHEDULE
   ======================================================== */
.details-screen-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 80px 20px;
}

.editorial-back {
  background: none;
  border: none;
  font-family: var(--font-caps);
  font-size: 0.72rem;
  letter-spacing: 3px;
  color: #777;
  cursor: pointer;
  margin-bottom: 30px;
}

.timeline-luxury {
  margin: 20px 0;
}

.timeline-row {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--lux-border);
}

.tl-hour {
  font-family: var(--font-caps);
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--lux-muted-gold);
  min-width: 90px;
}

.tl-body h4 {
  font-family: var(--font-caps);
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.tl-body p {
  font-size: 0.85rem;
  color: #666;
}

.palette-display {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.palette-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.palette-swatch span {
  margin-top: 60px;
  font-size: 0.68rem;
  color: #888;
  white-space: nowrap;
}

.attire-note {
  font-size: 0.85rem;
  color: #777;
  text-align: center;
}

.attire-image-slot {
  height: 200px;
  background: #ede3d8;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c7e73;
  font-size: 0.82rem;
  letter-spacing: 1px;
  margin: 20px 0 10px 0;
}

.map-slot {
  height: 240px;
}

.margin-top {
  margin-top: 30px;
}

.center-btn {
  text-align: center;
  margin-top: 40px;
}

/* ========================================================
   GCASH MODAL
   ======================================================== */
.modal-dim {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 25, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dim.open {
  display: flex;
}

.lux-modal {
  background: #ffffff;
  width: 100%;
  max-width: 360px;
  border-radius: 24px;
  padding: 36px 24px;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.close-x {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
}

.modal-head {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  margin: 6px 0 16px 0;
}

.qr-canvas-placeholder {
  width: 190px;
  height: 190px;
  background: #eff6ff;
  border: 2px dashed #007dfe;
  border-radius: 14px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #007dfe;
  font-size: 0.78rem;
}

.gcash-acc-num {
  font-family: var(--font-caps);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-top: 16px;
  font-weight: 600;
}

.gcash-holder {
  font-size: 0.8rem;
  color: #777;
}

.copy-lux-btn {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  background: var(--lux-charcoal);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-family: var(--font-caps);
  font-size: 0.7rem;
  letter-spacing: 2px;
  cursor: pointer;
}

@keyframes progressFill {
  from { width: 0%; }
  to { width: 100%; }
}

@keyframes pulseInstruction {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (max-width: 768px) {
  .editorial-names { font-size: 2.8rem; }
  .arrow-btn { width: 38px; height: 38px; }
  .editorial-card { padding: 32px 20px; }
}
