/* ===== WEBSITE 17: DATE REVEAL THEME ===== */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Beau+Rivage&family=Rufina:wght@400;700&family=Lato:wght@300;400;700&display=swap');

:root {
  --cream: #FFFDFB;
  --slate-blue: #52839C;
  --slate-blue-light: #EBF2F6;
  --dark-charcoal: #3A3A3A;
  --gold: #D4AF37;
  --gold-light: #F3E5AB;
  --white: #FFFFFF;
  --font-serif: 'Rufina', Georgia, serif;
  --font-script: 'Beau Rivage', cursive;
  --font-sans: 'Lato', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   ENVELOPE GATE
   ═══════════════════════════════════════════ */
#envelope-gate {
  position: fixed;
  inset: 0;
  background-color: var(--cream);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 1.5s ease;
}

.envelope-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
}

.flap {
  position: absolute;
  background-color: var(--slate-blue-light);
  border: 1px solid rgba(82, 131, 156, 0.15);
  transition: transform 1.6s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
}

/* Diagonal split envelope flaps using clip-path */
.flap-left {
  top: 0; left: 0;
  width: 50vw; height: 100vh;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: linear-gradient(135deg, #f0f6fa, #dce7ee);
  border-right: 2px solid var(--slate-blue);
}

.flap-right {
  top: 0; right: 0;
  width: 50vw; height: 100vh;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  background: linear-gradient(225deg, #f0f6fa, #dce7ee);
  border-left: 2px solid var(--slate-blue);
}

.flap-top {
  top: 0; left: 0;
  width: 100vw; height: 50vh;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #f7fafc, #e2ecf2);
  border-bottom: 2px solid var(--slate-blue);
}

.flap-bottom {
  bottom: 0; left: 0;
  width: 100vw; height: 50vh;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(0deg, #f7fafc, #e2ecf2);
  border-top: 2px solid var(--slate-blue);
}

/* Animations when opened */
#envelope-gate.opened .flap-left {
  transform: translateX(-105%);
}
#envelope-gate.opened .flap-right {
  transform: translateX(105%);
}
#envelope-gate.opened .flap-top {
  transform: translateY(-105%);
}
#envelope-gate.opened .flap-bottom {
  transform: translateY(105%);
}

#envelope-gate.opened .seal-btn-wrapper {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

/* Center Seal Button */
.seal-btn-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10100;
  text-align: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1.2s ease;
  pointer-events: auto;
}

.wax-seal {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, #6393ad, #3f6e87);
  border-radius: 50%;
  border: 4px double var(--slate-blue-light);
  box-shadow: 0 10px 25px rgba(63, 110, 135, 0.4), inset 0 2px 8px rgba(255,255,255,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  font-family: var(--font-serif);
  position: relative;
  animation: sealPulse 2s infinite ease-in-out;
  transition: transform 0.2s;
}

.wax-seal:hover {
  transform: scale(1.05);
}

.wax-seal .monogram {
  font-family: var(--font-script);
  font-size: 3rem;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin-top: -5px;
}

.wax-seal .action-text {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  color: var(--slate-blue-light);
  margin-top: 4px;
}

@keyframes sealPulse {
  0%, 100% { box-shadow: 0 10px 25px rgba(63, 110, 135, 0.4); }
  50% { box-shadow: 0 10px 35px rgba(63, 110, 135, 0.6), 0 0 0 10px rgba(82, 131, 156, 0.15); }
}

/* ═══════════════════════════════════════════
   MAIN SITE LAYOUT
   ═══════════════════════════════════════════ */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  color: var(--slate-blue);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.section-subtitle {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 40px;
  line-height: 1;
}

/* Divider pattern */
.leaf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 40px 0;
  color: var(--slate-blue);
  font-size: 1.5rem;
  opacity: 0.6;
}

.leaf-divider::before, .leaf-divider::after {
  content: '';
  height: 1px;
  width: 80px;
  background-color: var(--slate-blue);
}

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at center, #ffffff 0%, var(--cream) 100%);
  padding: 100px 20px;
}

.hero-content {
  border: 1px solid rgba(82, 131, 156, 0.2);
  padding: 60px 40px;
  background-color: var(--white);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03);
  position: relative;
  width: 100%;
  max-width: 750px;
}

.hero-content::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid var(--slate-blue);
  opacity: 0.35;
  pointer-events: none;
}

.hero-logo {
  font-family: var(--font-script);
  font-size: 4rem;
  color: var(--slate-blue);
  margin-bottom: 20px;
  line-height: 1;
}

.hero-names {
  font-size: 3.5rem;
  letter-spacing: 0.05em;
  color: var(--dark-charcoal);
  margin-bottom: 10px;
  line-height: 1.2;
}

.hero-tagline {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 30px;
}

.couple-portrait-wrapper {
  width: 180px;
  height: 180px;
  margin: 0 auto 30px;
  border-radius: 50%;
  border: 3px solid var(--slate-blue-light);
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.couple-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════════════════════════════════════
   SCRATCH DATE REVEAL SECTION
   ═══════════════════════════════════════════ */
#reveal-section {
  background-color: var(--slate-blue-light);
  position: relative;
  overflow: hidden;
}

.scratch-info-text {
  font-size: 1.1rem;
  color: var(--slate-blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 30px;
  font-weight: bold;
}

.scratch-container {
  display: flex;
  justify-content: center;
  gap: 25px;
  max-width: 600px;
  margin: 0 auto 40px;
  flex-wrap: wrap;
}

.scratch-card-box {
  position: relative;
  width: 140px;
  height: 140px;
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scratch-card-box .revealed-value {
  font-family: var(--font-serif);
  color: var(--slate-blue);
  font-weight: bold;
}

.scratch-card-box .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-top: 5px;
}

.scratch-card-box#tdr-tile-day .revealed-value {
  font-size: 3rem;
}
.scratch-card-box#tdr-tile-month .revealed-value {
  font-size: 1.8rem;
}
.scratch-card-box#tdr-tile-year .revealed-value {
  font-size: 2.2rem;
}

.scratch-card-box canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
  border-radius: 12px;
  touch-action: none;
}

#tdr-married {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--dark-charcoal);
  margin-top: 20px;
}

#tdr-married.tdr-show {
  opacity: 1;
  transform: translateY(0);
}

/* Flash effect */
#tdr-flash {
  position: fixed;
  inset: 0;
  background-color: var(--white);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

#tdr-flash.tdr-go {
  animation: flashAnim 0.8s ease-out;
}

@keyframes flashAnim {
  0% { opacity: 0; }
  25% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* Confetti canvas */
#tdr-confetti {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   WELCOME / STORY
   ═══════════════════════════════════════════ */
.story-card {
  background-color: var(--white);
  border: 1px solid rgba(82, 131, 156, 0.15);
  padding: 50px 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  max-width: 700px;
  margin: 0 auto;
  border-radius: 8px;
}

.story-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 25px;
  color: var(--dark-charcoal);
  line-height: 1.8;
}

/* ═══════════════════════════════════════════
   TIMELINE OF EVENTS
   ═══════════════════════════════════════════ */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.event-card {
  background-color: var(--white);
  border: 1px solid rgba(82, 131, 156, 0.15);
  padding: 40px 30px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background-color: var(--slate-blue);
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(82, 131, 156, 0.1);
}

.event-icon {
  font-size: 2.2rem;
  margin-bottom: 15px;
  display: block;
}

.event-title {
  font-size: 1.6rem;
  color: var(--slate-blue);
  margin-bottom: 12px;
}

.event-time {
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
}

.event-desc {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 15px;
}

.event-location {
  font-size: 0.9rem;
  color: var(--dark-charcoal);
  border-top: 1px solid #f0f0f0;
  padding-top: 15px;
}

/* ═══════════════════════════════════════════
   DRESS CODE
   ═══════════════════════════════════════════ */
.dress-code-card {
  background-color: var(--white);
  border: 1px solid rgba(82, 131, 156, 0.15);
  padding: 40px;
  border-radius: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.dress-code-intro {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 30px;
}

.dress-code-columns {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.dress-column {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.dress-column h4 {
  font-size: 1.3rem;
  color: var(--slate-blue);
  margin-bottom: 15px;
}

.dress-column p {
  font-size: 0.95rem;
  color: var(--dark-charcoal);
}

.color-swatch-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.color-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Color palettes */
.swatch-1 { background-color: #EBF2F6; }
.swatch-2 { background-color: #CBDCE6; }
.swatch-3 { background-color: #92B2C3; }
.swatch-4 { background-color: #52839C; }
.swatch-5 { background-color: #D4AF37; }

/* ═══════════════════════════════════════════
   RSVP SECTION
   ═══════════════════════════════════════════ */
#rsvp-section {
  background-color: var(--slate-blue-light);
}

.rsvp-card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 50px 40px;
  box-shadow: 0 15px 40px rgba(82, 131, 156, 0.1);
  max-width: 600px;
  margin: 0 auto;
}

.rsvp-form-group {
  margin-bottom: 25px;
  text-align: left;
}

.rsvp-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--slate-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rsvp-form-group input[type="text"],
.rsvp-form-group select,
.rsvp-form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid rgba(82, 131, 156, 0.3);
  border-radius: 6px;
  background-color: var(--cream);
  font-family: inherit;
  font-size: 1rem;
  color: var(--dark-charcoal);
  outline: none;
  transition: border-color 0.3s;
}

.rsvp-form-group input[type="text"]:focus,
.rsvp-form-group select:focus,
.rsvp-form-group textarea:focus {
  border-color: var(--slate-blue);
}

.rsvp-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.rsvp-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--dark-charcoal);
}

.rsvp-radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--slate-blue);
}

.rsvp-submit-btn {
  width: 100%;
  padding: 15px;
  background-color: var(--slate-blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background-color 0.3s;
  font-family: var(--font-serif);
}

.rsvp-submit-btn:hover {
  background-color: #3f6e87;
}

.rsvp-success-message {
  display: none;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #2e7d32;
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   WISHES WALL
   ═══════════════════════════════════════════ */
.wishes-card {
  background-color: var(--white);
  border: 1px solid rgba(82, 131, 156, 0.15);
  border-radius: 8px;
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
}

.wishes-list {
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
  padding-right: 10px;
}

.wish-item {
  background-color: var(--cream);
  padding: 20px;
  border-radius: 8px;
  text-align: left;
  border-left: 4px solid var(--slate-blue);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.wish-item .wish-author {
  font-family: var(--font-serif);
  font-weight: bold;
  color: var(--slate-blue);
  margin-bottom: 5px;
}

.wish-item .wish-text {
  font-size: 0.95rem;
  color: var(--dark-charcoal);
}

/* Scrollbar styling */
.wishes-list::-webkit-scrollbar {
  width: 6px;
}
.wishes-list::-webkit-scrollbar-track {
  background: var(--cream);
}
.wishes-list::-webkit-scrollbar-thumb {
  background: var(--slate-blue);
  border-radius: 3px;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
  background-color: var(--slate-blue);
  color: var(--white);
  padding: 60px 20px;
  text-align: center;
}

footer .footer-text {
  font-family: var(--font-script);
  font-size: 3rem;
  margin-bottom: 10px;
  line-height: 1;
}

footer .footer-subtext {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  section {
    padding: 60px 0;
  }
  .section-title {
    font-size: 2rem;
  }
  .section-subtitle {
    font-size: 1.8rem;
  }
  .hero-names {
    font-size: 2.5rem;
  }
  .hero-content {
    padding: 40px 20px;
  }
  .scratch-container {
    gap: 15px;
  }
  .scratch-card-box {
    width: 100px;
    height: 100px;
  }
  .scratch-card-box#tdr-tile-day .revealed-value { font-size: 2.2rem; }
  .scratch-card-box#tdr-tile-month .revealed-value { font-size: 1.3rem; }
  .scratch-card-box#tdr-tile-year .revealed-value { font-size: 1.5rem; }
}
