/*
================================================================
  Arabella & James - Custom Wedding Invitation (Canva Re-implementation)
  Theme: Dark Calla Lily, White Lace, Polaroid, and Espresso
================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Pinyon+Script&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
  --wedding-dark: #000000;
  --wedding-espresso: #251712; /* Espresso Background */
  --wedding-cream: #FAF6F0;
  --wedding-text-white: #FEFDFA;
  --wedding-gold: #c4c4a0;
  --wedding-gold-dark: #75743b;
  
  --font-script: 'Pinyon Script', cursive;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Montserrat', sans-serif;
}

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

body {
  background-color: var(--wedding-dark);
  color: var(--wedding-text-white);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- Fullscreen Slides --- */
.w-slide {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
  padding: 2rem;
}

.w-slide.flower-bg {
  background-image: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('../images/wedding_flower_bg.png');
}

.w-slide.chairs-bg {
  background-image: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('../images/wedding_chairs_bg.png');
}

.w-slide.espresso-bg {
  background-color: var(--wedding-espresso);
}

/* --- Typography --- */
.w-main-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--wedding-text-white);
  margin-bottom: 0.75rem;
}

.w-script-names {
  font-family: var(--font-script);
  font-size: 5rem;
  color: var(--wedding-text-white);
  line-height: 1.2;
  font-weight: 400;
  text-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.w-serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2.25rem;
  color: var(--wedding-text-white);
  margin-bottom: 0.5rem;
}

.w-date-loc {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--wedding-text-white);
  margin-top: 1rem;
}

/* --- Slide 1: Envelope Cover --- */
.envelope-container {
  position: relative;
  width: 460px;
  height: 300px;
  background-color: #FAF6F0;
  border-radius: 4px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}

.envelope-container:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Lace flap border */
.envelope-flap-lace {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.envelope-monogram {
  font-family: var(--font-script);
  font-size: 4rem;
  color: var(--wedding-espresso);
  z-index: 10;
  opacity: 0.85;
}

.lace-trim-horizontal {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 25px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='20' height='20'%3E%3Cpath d='M10 0 C15 0 20 5 20 10 C20 15 15 20 10 20 C5 20 0 15 0 10 C0 5 5 0 10 0 Z M10 4 C6.7 4 4 6.7 4 10 C4 13.3 6.7 16 10 16 C13.3 16 16 13.3 16 10 C16 6.7 13.3 4 10 4 Z' fill='%23ffffff' opacity='0.25'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
}

.envelope-hint {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--wedding-text-white);
  margin-top: 3rem;
  animation: bounceHint 2s infinite;
  cursor: pointer;
}

@keyframes bounceHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --- Slide 2: Square Lace Invite Card --- */
.lace-card-frame {
  position: relative;
  width: 420px;
  height: 420px;
  background-color: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  margin-bottom: 2rem;
}

/* Scalloped lace border */
.lace-card-frame::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 20px solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='18' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-dasharray='3 3' opacity='0.6'/%3E%3Cpath d='M30 0 C35 8 45 8 50 0 L60 10 C52 15 52 25 60 30 L50 40 C45 32 35 32 30 40 L20 50 C15 42 5 42 0 50 L10 40 C18 35 18 25 10 20 L0 10 C8 5 8 15 0 0' fill='none' stroke='%23ffffff' stroke-width='1.2' opacity='0.7'/%3E%3C/svg%3E") 20 repeat;
  pointer-events: none;
}

.lace-card-frame h3 {
  font-family: var(--font-script);
  font-size: 4rem;
  color: var(--wedding-text-white);
  line-height: 1.2;
  font-weight: 400;
}

/* --- Slide 3: RSVP Envelope pocket & Polaroids --- */
.rsvp-envelope-wrapper {
  position: relative;
  width: 520px;
  height: 380px;
  margin-bottom: 2rem;
}

.rsvp-envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 30px;
  width: 460px;
  height: 260px;
  background-color: #FAF6F0;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 2rem;
  border-radius: 4px;
}

.rsvp-envelope-pocket::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-left: 230px solid transparent;
  border-right: 230px solid transparent;
  border-top: 130px solid #EFECE6;
  z-index: 1;
  transform-origin: top;
  border-radius: 4px;
}

.rsvp-insert-card {
  position: absolute;
  top: -25px;
  left: 90px;
  width: 340px;
  height: 230px;
  background-color: var(--wedding-cream);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 170px 170px 0 0; /* Arched Top */
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.08);
  transform: rotate(-3deg);
}

.rsvp-insert-card h4 {
  font-family: var(--font-script);
  font-size: 3.5rem;
  color: var(--wedding-espresso);
  line-height: 1.1;
  font-weight: 400;
}

.rsvp-click-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wedding-espresso);
  font-weight: 600;
  margin-top: 1rem;
  border-bottom: 1.5px solid var(--wedding-espresso);
  padding-bottom: 2px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.rsvp-click-btn:hover {
  opacity: 0.75;
}

/* Polaroid Frames */
.polaroid-frame {
  position: absolute;
  background-color: #FFFFFF;
  padding: 10px 10px 30px 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  border-radius: 2px;
  z-index: 2;
  transition: transform 0.5s ease;
}

.polaroid-frame img,
.polaroid-frame svg {
  width: 130px;
  height: 130px;
  object-fit: cover;
  display: block;
}

.polaroid-left {
  left: 20px;
  top: 40px;
  transform: rotate(-12deg);
}

.polaroid-right {
  right: 40px;
  top: 60px;
  transform: rotate(8deg);
}

/* --- Slide 4: Details Oval and Polaroids --- */
.details-oval-frame {
  position: relative;
  width: 300px;
  height: 420px;
  background-color: #E3DDD3;
  border-radius: 150px; /* Oval shape */
  border: 6px double var(--wedding-espresso);
  box-shadow: 0 20px 45px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  margin-bottom: 2rem;
  background-image: radial-gradient(circle at center, #F6F4EF 0%, #D5CFBF 100%);
}

.details-oval-content {
  width: 240px;
  height: 240px;
  background-color: var(--wedding-cream);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 1px dashed rgba(37,23,18,0.2);
}

.details-oval-content h4 {
  font-family: var(--font-script);
  font-size: 3.5rem;
  color: var(--wedding-espresso);
  line-height: 1.1;
  font-weight: 400;
}

.polaroid-details-1 {
  position: absolute;
  top: 20px;
  right: -80px;
  transform: rotate(15deg);
  z-index: 2;
}

.polaroid-details-2 {
  position: absolute;
  bottom: 10px;
  right: -90px;
  transform: rotate(-8deg);
  z-index: 2;
}

/* --- Slide 5: Square Photo with Lace Frame --- */
.story-photo-frame {
  position: relative;
  width: 340px;
  height: 340px;
  box-shadow: 0 25px 45px rgba(0,0,0,0.5);
  margin-bottom: 2rem;
}

.story-photo-frame svg,
.story-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-photo-lace {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  border: 20px solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 0 Q30 5 40 0 L40 40 Q30 35 20 40 Q10 35 0 40 L0 0 Q10 5 20 0 Z' fill='none' stroke='%23ffffff' stroke-width='1.5' opacity='0.8'/%3E%3Ccircle cx='20' cy='20' r='10' fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.4'/%3E%3C/svg%3E") 20 repeat;
  pointer-events: none;
}

/* --- Fullscreen Modals --- */
.w-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(37, 23, 18, 0.98);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
  padding: 2rem;
}

.w-modal.active {
  opacity: 1;
  visibility: visible;
}

.w-modal-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 2rem;
  color: var(--wedding-text-white);
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
}

.w-modal-content {
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 3rem;
  background-color: var(--wedding-cream);
  color: var(--wedding-espresso);
  border: 1px solid var(--wedding-gold);
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  position: relative;
}

.w-modal-content::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid rgba(212,175,55,0.25);
  pointer-events: none;
}

.w-modal-content h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--wedding-espresso);
}

.w-scroll-down {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.rsvp-message {
  display: none;
  padding: 0.8rem;
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border-radius: 4px;
}

.rsvp-message.success {
  background-color: #EAEFE9;
  color: #3C4A3A;
  border: 1px solid var(--wedding-gold-dark);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
  .w-script-names {
    font-size: 3.5rem;
  }
  .envelope-container {
    width: 320px;
    height: 210px;
  }
  .envelope-monogram {
    font-size: 2.5rem;
  }
  .lace-card-frame {
    width: 310px;
    height: 310px;
    padding: 2rem;
  }
  .lace-card-frame h3 {
    font-size: 2.5rem;
  }
  .rsvp-envelope-wrapper {
    width: 320px;
    height: 250px;
  }
  .rsvp-envelope-pocket {
    width: 280px;
    height: 180px;
    left: 20px;
  }
  .rsvp-envelope-pocket::before {
    border-left-width: 140px;
    border-right-width: 140px;
    border-top-width: 90px;
  }
  .rsvp-insert-card {
    width: 200px;
    height: 150px;
    left: 60px;
    top: -15px;
    padding: 1rem;
  }
  .rsvp-insert-card h4 {
    font-size: 2rem;
  }
  .polaroid-frame img,
  .polaroid-frame svg {
    width: 80px;
    height: 80px;
  }
  .polaroid-left {
    left: 10px;
    top: 40px;
  }
  .polaroid-right {
    right: 15px;
    top: 50px;
  }
  .details-oval-frame {
    width: 220px;
    height: 310px;
  }
  .details-oval-content {
    width: 160px;
    height: 160px;
    padding: 1rem;
  }
  .details-oval-content h4 {
    font-size: 2.2rem;
  }
  .polaroid-details-1 {
    right: -40px;
    top: 10px;
  }
  .polaroid-details-2 {
    right: -55px;
    bottom: 10px;
  }
  .story-photo-frame {
    width: 260px;
    height: 260px;
  }
}
