:root {
  --navy: #0A142D;
  --navy-deep: #060D1F;
  --royal: #1B3668;
  --steel: #4A6B82;
  --gold: #F5D799;
  --gold-deep: #D4AF37;
  --parchment: #EFE0C2;
  --parchment-light: #FAF3E3;
  --offwhite: #F8F9FA;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #172E5C 0%, var(--navy) 52%, var(--navy-deep) 100%);
  color: var(--offwhite);
  font-family: 'Prompt', sans-serif;
  overflow-x: hidden;
}

/* Subtle vintage paper grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image: radial-gradient(#F5D799 0.7px, transparent 0.7px);
  background-size: 18px 18px;
}

/* ================= GOLD PARTICLES CANVAS ================= */
#goldParticlesCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 210; /* Visible both over envelope and main page */
}

/* ================= ENVELOPE OPENING OVERLAY ================= */
#envelopeOverlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 44%, rgba(27, 54, 104, 0.96) 0%, rgba(10, 20, 45, 0.98) 68%, #050B19 100%);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.9s ease;
}

#envelopeOverlay.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-aura {
  position: absolute;
  width: min(90vw, 440px);
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 215, 153, 0.16) 0%, rgba(212, 175, 55, 0.04) 45%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

.envelope-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.38em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.92;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.envelope-subtitle {
  font-size: 12.5px;
  font-weight: 300;
  color: rgba(248, 249, 250, 0.72);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.envelope-wrapper {
  position: relative;
  width: min(88vw, 370px);
  height: 240px;
  perspective: 1200px;
  cursor: pointer;
  animation: floatEnvelope 4s ease-in-out infinite;
}

.envelope-wrapper.open {
  animation: none;
}

@keyframes floatEnvelope {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

.envelope-body {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(155deg, #162B58 0%, #0B1633 65%, #070F24 100%);
  border: 1px solid rgba(245, 215, 153, 0.48);
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.72),
    0 0 40px rgba(245, 215, 153, 0.08),
    inset 0 0 26px rgba(245, 215, 153, 0.1);
  overflow: hidden;
}

/* Inner gold foil trim */
.envelope-body::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 6px;
  border: 1px solid rgba(245, 215, 153, 0.18);
  pointer-events: none;
  z-index: 4;
}

.envelope-letter {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 182px;
  border-radius: 6px;
  background: linear-gradient(180deg, #0D1B3B 0%, #081228 100%);
  border: 1.5px solid var(--gold);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(245, 215, 153, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  transform: translateY(42px);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.envelope-wrapper.open .envelope-letter {
  transform: translateY(-68px);
}

.envelope-letter-title {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--parchment);
  text-shadow: 0 2px 10px rgba(245, 215, 153, 0.25);
}

.envelope-letter-sub {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--gold-deep);
  margin-top: 6px;
}

.envelope-pocket {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(32.5deg, rgba(17, 36, 77, 0.98) 50%, transparent 50.6%),
    linear-gradient(-32.5deg, rgba(11, 23, 52, 0.99) 50%, transparent 50.6%);
  pointer-events: none;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 136px;
  z-index: 4;
  transform-origin: top center;
  transition: transform 0.72s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.envelope-flap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #1F3E7A 0%, #11244E 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.envelope-wrapper.open .envelope-flap {
  transform: rotateX(175deg);
  z-index: 1;
}

.wax-seal {
  position: absolute;
  top: 118px;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.wax-seal svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
}

.wax-seal-text {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #2A1D06;
  text-shadow: 0 1px 0 rgba(255, 245, 220, 0.55);
}

.envelope-wrapper.open .wax-seal {
  transform: translate(-50%, -50%) scale(0.75);
  opacity: 0;
}

.open-btn {
  margin-top: 30px;
  padding: 12px 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 215, 153, 0.14), rgba(212, 175, 55, 0.24));
  border: 1px solid rgba(245, 215, 153, 0.72);
  color: var(--gold);
  font-family: 'Prompt', sans-serif;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.open-btn:hover {
  transform: translateY(-2px);
  background: rgba(245, 215, 153, 0.26);
  box-shadow: 0 0 26px rgba(245, 215, 153, 0.32);
}

/* ================= MAIN INVITATION CONTAINER ================= */
.page-shell {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 16px 72px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= VINTAGE THEATER TICKET (MATCHING IMAGE 2) ================= */
.vintage-ticket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 50% 22%, rgba(27, 54, 104, 0.55) 0%, transparent 62%),
    linear-gradient(160deg, #0D1D3D 0%, #071126 55%, #0B1936 100%);
  border: 2px solid var(--parchment);
  border-radius: 14px;
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.65),
    0 0 36px rgba(245, 215, 153, 0.08),
    inset 0 0 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  margin-bottom: 26px;
}

@media (min-width: 680px) {
  .vintage-ticket {
    grid-template-columns: 1fr 220px;
  }
}

.ticket-main {
  position: relative;
  padding: 30px 24px 28px;
  text-align: center;
  border: 1px solid rgba(239, 224, 194, 0.35);
  margin: 7px;
  border-radius: 8px;
  overflow: hidden;
}

@media (min-width: 680px) {
  .ticket-main {
    margin: 7px 0 7px 7px;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 36px 34px 30px;
  }
}

/* Theater curtains & chandelier SVG decorations */
.ticket-curtain-left,
.ticket-curtain-right {
  position: absolute;
  top: 0;
  width: 115px;
  height: 155px;
  pointer-events: none;
  opacity: 0.72;
}
.ticket-curtain-left { left: -4px; }
.ticket-curtain-right { right: -4px; transform: scaleX(-1); }

.ticket-chandelier {
  width: 96px;
  height: 58px;
  margin: -14px auto 4px;
  display: block;
  opacity: 0.92;
  filter: drop-shadow(0 0 10px rgba(245, 215, 153, 0.35));
}

.role-pill {
  position: relative;
  z-index: 2;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(239, 224, 194, 0.12);
  border: 1px solid rgba(239, 224, 194, 0.45);
  color: var(--parchment);
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-title {
  position: relative;
  z-index: 2;
  font-family: 'Cinzel', serif;
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.05;
  margin: 4px 0 6px;
  background: linear-gradient(180deg, #FAF0D7 0%, #E7CFA0 65%, #C6A463 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.65));
}

.hero-sub {
  position: relative;
  z-index: 2;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin-bottom: 16px;
}

/* Cream ornamental plaques matching Image 2 */
.plaque-stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 12px 0 18px;
}

.vintage-plaque {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 22px;
  background: linear-gradient(180deg, #F5E9D0 0%, #E3CFA9 100%);
  color: var(--navy);
  border-radius: 999px;
  border: 1.5px solid #B69249;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.vintage-plaque.thai {
  font-family: 'Prompt', sans-serif;
  font-size: 13.5px;
  letter-spacing: 0.04em;
}

.greeting-text {
  position: relative;
  z-index: 2;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(248, 249, 250, 0.9);
  max-width: 440px;
  margin: 0 auto 20px;
}

.ar-cta-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F5E4BE 0%, #D4AF37 100%);
  color: var(--navy);
  font-family: 'Prompt', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(212, 175, 55, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ar-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(212, 175, 55, 0.42);
}

.ar-subnote {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  font-size: 11.5px;
  color: rgba(245, 215, 153, 0.78);
}

.ticket-props {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 14px;
  opacity: 0.85;
  pointer-events: none;
}

.prop-svg {
  width: 72px;
  height: 52px;
}

/* Perforated tear-off stub */
.ticket-stub {
  position: relative;
  padding: 24px 18px;
  margin: 0 7px 7px;
  border: 1px solid rgba(239, 224, 194, 0.35);
  border-top: 2px dashed rgba(239, 224, 194, 0.55);
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: center;
}

@media (min-width: 680px) {
  .ticket-stub {
    margin: 7px 7px 7px 0;
    border-top: 1px solid rgba(239, 224, 194, 0.35);
    border-left: 2px dashed rgba(239, 224, 194, 0.55);
    border-radius: 0 8px 8px 0;
    padding: 28px 16px;
  }
}

.stub-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--parchment);
}

.stub-swatch-box {
  background: linear-gradient(180deg, #F5E9D0 0%, #E3CFA9 100%);
  border: 1.5px solid #B69249;
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.stub-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(10, 20, 45, 0.25);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.25);
}

.nurse-cap-svg {
  width: 82px;
  height: 50px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

/* ================= SOFT GLASS SECTIONS ================= */
.section-card {
  position: relative;
  background: rgba(10, 20, 45, 0.65);
  border: 1px solid rgba(245, 215, 153, 0.3);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  padding: 28px 22px;
  margin-bottom: 22px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.sec-eyebrow {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.sec-title {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--parchment);
  margin: 0 0 8px;
}

.sec-desc {
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: rgba(248, 249, 250, 0.8);
  margin: 0 0 20px;
  line-height: 1.65;
}

/* ================= COUNTDOWN ================= */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}

.cd-box {
  background: rgba(27, 54, 104, 0.32);
  border: 1px solid rgba(245, 215, 153, 0.32);
  border-radius: 10px;
  padding: 14px 6px;
  text-align: center;
}

.cd-num {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}

.cd-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(248, 249, 250, 0.72);
  margin-top: 4px;
  text-transform: uppercase;
}

/* ================= DRESS CODE (PANTONE STYLE) ================= */
.pantone-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 540px;
  margin: 0 auto;
}

@media (max-width: 460px) {
  .pantone-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pantone-card {
  background: #FAF6EE;
  border-radius: 8px;
  padding: 6px 6px 10px;
  color: var(--navy);
  text-align: left;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease;
}

.pantone-card:hover {
  transform: translateY(-3px);
}

.pantone-swatch {
  width: 100%;
  aspect-ratio: 1 / 1.1;
  border-radius: 5px;
  margin-bottom: 7px;
}

.sw-beige { background: #D8C8B8; }
.sw-burgundy { background: #52141E; }
.sw-gold { background: linear-gradient(135deg, #F5D799 0%, #C8A25A 48%, #8F6B24 100%); }
.sw-espresso { background: #543B29; }

.pantone-brand {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #333;
}

.pantone-name {
  font-size: 10px;
  color: #555;
  margin-top: 2px;
  line-height: 1.25;
}

/* ================= RSVP & WISH BOARD ================= */
.wish-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 540px;
  margin: 0 auto 22px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(6, 13, 31, 0.72);
  border: 1px solid rgba(245, 215, 153, 0.32);
  color: var(--offwhite);
  font-family: 'Prompt', sans-serif;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 215, 153, 0.12);
}

.form-textarea {
  min-height: 88px;
  resize: vertical;
}

.submit-btn {
  padding: 13px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--navy);
  border: none;
  font-family: 'Prompt', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gold);
  max-width: 540px;
  margin: 0 auto 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245, 215, 153, 0.2);
}

.wish-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 540px;
  margin: 0 auto;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.wish-card {
  background: rgba(27, 54, 104, 0.28);
  border: 1px solid rgba(245, 215, 153, 0.22);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 12px 14px;
}

.wish-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.wish-author {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--gold);
}

.wish-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 215, 153, 0.14);
  border: 1px solid rgba(245, 215, 153, 0.35);
  color: var(--gold);
  white-space: nowrap;
}

.wish-msg {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--offwhite);
  margin: 0;
  word-break: break-word;
}

.wish-meta {
  margin-top: 6px;
  font-size: 10.5px;
  color: rgba(248, 249, 250, 0.55);
}

.footer-note {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(245, 215, 153, 0.65);
  margin-top: 24px;
}
