/* ============================================================
   WEDDING SITE — Styles
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --color-bg:        #FFF0E0;
  --color-cream:     #FFF5ED;
  --color-beige:     #FFE8D6;
  --color-sage:      #E8175D;
  --color-sage-dark: #C41250;
  --color-yellow:    #F5B731;
  --color-orange:    #F58A2C;
  --color-olive:     #7A8B1E;
  --color-olive-lt:  #A4B44A;
  --color-brown:     #A67C52;
  --color-brown-lt:  #C9B8A8;
  --color-text:      #2C2220;
  --color-text-muted:#8A7A72;
  --color-white:     #FFFFFF;
  --color-error:     #C0392B;
  --color-success:   #27AE60;

  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, -apple-system, sans-serif;

  --container-max: 1100px;
  --container-sm:  720px;
  --section-py:    6rem;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,.06);
  --shadow-lg:     0 8px 40px rgba(0,0,0,.10);
  --transition:    .3s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}
button { cursor: pointer; }

/* ---------- Utilities ---------- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: var(--container-sm); }
.text-muted { color: var(--color-text-muted); font-size: .9rem; }
.optional { color: var(--color-text-muted); font-weight: 400; font-size: .85em; }
.error-msg { color: var(--color-error); font-size: .85rem; margin-top: .5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .02em;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-sage);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-sage-dark); transform: translateY(-1px); }
.btn-outline {
  border: 1.5px solid var(--color-text);
  color: var(--color-text);
}
.btn-outline:hover { background: var(--color-text); color: var(--color-white); }
.btn-text { color: var(--color-text-muted); padding: .5rem 1rem; }
.btn-text:hover { color: var(--color-text); }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1.25rem; font-size: .85rem; }
.btn-block { display: flex; justify-content: center; width: 100%; }
.btn-nav {
  background: var(--color-sage);
  color: var(--color-white) !important;
  padding: .5rem 1.5rem;
  border-radius: 50px;
}
.btn-nav:hover { background: var(--color-sage-dark); }

/* ---------- Section ---------- */
.section { padding: var(--section-py) 0; }
.section-alt { background: var(--color-cream); }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  text-align: center;
  margin-bottom: .5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}
.subsection-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  text-align: center;
  margin: 3rem 0 1.5rem;
}

/* ============================================================
   PASSWORD OVERLAY
   ============================================================ */
.password-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.password-card {
  text-align: center;
  max-width: 380px;
  padding: 2rem;
}
.password-card h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: .5rem;
}
.password-card p { color: var(--color-text-muted); margin-bottom: 1.5rem; }
.password-card input {
  width: 100%;
  padding: .85rem 1.25rem;
  border: 1.5px solid var(--color-beige);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  text-align: center;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.password-card input:focus { border-color: var(--color-sage); }
.password-card .btn { width: 100%; justify-content: center; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: .75rem 0;
  background: rgba(255, 240, 224, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
}
.navbar.scrolled {
  padding: .6rem 0;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--color-text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-links a {
  padding: .5rem 1rem;
  font-size: .9rem;
  font-weight: 400;
  color: var(--color-text);
  transition: color var(--transition);
  border-radius: 50px;
}
.nav-links a:hover { color: var(--color-sage); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  z-index: 1001;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   HERO — Split layout : photo left, content right
   ============================================================ */
.hero {
  background: var(--color-bg);
  padding-top: 5rem; /* space for fixed navbar */
}
.hero-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: calc(80vh - 5rem);
}
.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-height: 520px;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  max-height: 520px;
}
.hero-content {
  text-align: left;
  color: var(--color-text);
  padding: 1rem 0;
}
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: .75rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: .5rem;
  color: var(--color-text);
}
.hero-name { display: inline-block; }
.hero-ampersand {
  display: inline-block;
  font-style: italic;
  font-weight: 300;
  margin: 0 .15em;
  color: var(--color-orange);
}
.hero-divider {
  width: 50px;
  height: 2px;
  background: var(--color-yellow);
  margin: 1rem 0;
}
.hero-date {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: .2rem;
  color: var(--color-text);
}
.hero-location {
  font-size: .95rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.hero-message {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 440px;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero-cta .btn-outline {
  border-color: var(--color-text);
  color: var(--color-text);
}
.hero-cta .btn-outline:hover {
  background: var(--color-text);
  color: var(--color-white);
}

/* Countdown */
.countdown {
  display: flex;
  gap: 1.25rem;
}
.countdown-item { text-align: center; }
.countdown-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-sage);
}
.countdown-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
}

/* ============================================================
   TIMELINE (Programme)
   ============================================================ */
.timeline {
  position: relative;
  max-width: 650px;
  margin: 0 auto;
  padding: 1rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-beige);
}
.timeline-item {
  position: relative;
  padding-left: 72px;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 16px;
  top: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-orange);
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-dot svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-white);
  fill: none;
  stroke-width: 2;
}
.timeline-time {
  font-size: .85rem;
  color: var(--color-orange);
  font-weight: 600;
  margin-bottom: .15rem;
}
.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: .25rem;
}
.timeline-location {
  font-size: .9rem;
  color: var(--color-text-muted);
  margin-bottom: .35rem;
}
.timeline-desc {
  font-size: .95rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* ============================================================
   INFO CARDS
   ============================================================ */
.info-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.info-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-sage-dark);
}
.info-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: .75rem;
}
.info-venue-name {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: .15rem;
}
.info-venue-address { color: var(--color-text-muted); margin-bottom: 1rem; }

/* Contacts */
.contact-list { display: flex; flex-direction: column; gap: .5rem; max-width: 360px; }
.contact-list li {
  display: grid;
  grid-template-columns: 6.5rem auto;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--color-beige);
}
.contact-list li:last-child { border-bottom: none; padding-bottom: 0; }
.contact-list span { font-weight: 500; }
.contact-list a { color: var(--color-sage); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Venue cards with photo */
.info-card-venue {
  display: grid;
  grid-template-columns: 280px 1fr;
  padding: 0;
  overflow: hidden;
}
.info-venue-photo {
  overflow: hidden;
}
.info-venue-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
}
.info-venue-details {
  padding: 2rem;
}
@media (max-width: 700px) {
  .info-card-venue {
    grid-template-columns: 1fr;
  }
  .info-venue-photo img {
    max-height: 200px;
  }
}

/* Gallery card */
.gallery-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.gallery-card p { margin-bottom: 1rem; color: var(--color-text-muted); line-height: 1.7; }
.gallery-info {
  background: var(--color-cream);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}
.gallery-info code {
  background: var(--color-beige);
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .95rem;
}

.access-list { display: flex; flex-direction: column; gap: .75rem; }
.access-item { display: flex; gap: .75rem; align-items: flex-start; }
.access-mode {
  flex-shrink: 0;
  font-weight: 600;
  font-size: .85rem;
  background: var(--color-beige);
  padding: .25rem .75rem;
  border-radius: 50px;
  min-width: 80px;
  text-align: center;
}

/* Accommodations */
.accommodations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.acco-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.acco-card h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: .35rem;
}
.acco-card .acco-distance {
  font-size: .85rem;
  color: var(--color-orange);
  font-weight: 500;
  margin-bottom: .5rem;
}
.acco-card p { font-size: .9rem; color: var(--color-text-muted); margin-bottom: .5rem; }
.acco-card .acco-price {
  font-weight: 600;
  color: var(--color-text);
  margin-top: auto;
  padding-top: .75rem;
}

/* ============================================================
   DRESS CODE
   ============================================================ */
.dresscode-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.dresscode-label {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: .75rem;
}
.dresscode-desc {
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.dresscode-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  text-align: left;
  margin-bottom: 2rem;
}
.dresscode-col h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  margin-bottom: .75rem;
}
.dresscode-list li {
  padding: .35rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: .95rem;
}
.dresscode-do li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-olive);
  font-weight: 600;
}
.dresscode-dont li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--color-error);
  font-weight: 600;
}
.dresscode-palette {
  display: flex;
  gap: .75rem;
  justify-content: center;
}
.dresscode-color {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ============================================================
   RSVP
   ============================================================ */
.rsvp-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.rsvp-card h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1rem;
}
.rsvp-divider-text {
  text-align: center;
  color: var(--color-text-muted);
  font-size: .85rem;
  margin: 1.25rem 0;
  position: relative;
}
.rsvp-divider-text::before,
.rsvp-divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 1.5rem);
  height: 1px;
  background: var(--color-beige);
}
.rsvp-divider-text::before { left: 0; }
.rsvp-divider-text::after { right: 0; }

/* Form elements */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 500;
  font-size: .9rem;
  margin-bottom: .4rem;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .8rem 1rem;
  border: 1.5px solid var(--color-beige);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-size: .95rem;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--color-sage); }
.form-group textarea { resize: vertical; }

/* Search results */
.search-results {
  background: var(--color-white);
  border: 1.5px solid var(--color-beige);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
}
.search-result-item {
  padding: .65rem 1rem;
  cursor: pointer;
  font-size: .9rem;
  transition: background var(--transition);
}
.search-result-item:hover { background: var(--color-cream); }
.search-result-item strong { color: var(--color-sage); }

/* Radio cards */
.radio-group { display: flex; gap: .75rem; flex-wrap: wrap; }
.radio-group-inline { gap: .5rem; }
.radio-card {
  flex: 1;
  min-width: 140px;
  cursor: pointer;
}
.radio-card input { display: none; }
.radio-card-body {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--color-beige);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-size: .95rem;
}
.radio-card input:checked + .radio-card-body {
  border-color: var(--color-sage);
  background: rgba(232,23,93,.06);
}
.radio-card-icon { font-size: 1.2rem; }

.radio-pill {
  cursor: pointer;
}
.radio-pill input { display: none; }
.radio-pill {
  padding: .5rem 1.5rem;
  border: 1.5px solid var(--color-beige);
  border-radius: 50px;
  font-size: .9rem;
  transition: all var(--transition);
}
.radio-pill:has(input:checked) {
  border-color: var(--color-sage);
  background: rgba(232,23,93,.06);
  color: var(--color-sage-dark);
}

/* Members list */
.members-list { display: flex; flex-direction: column; gap: .5rem; }
.member-check {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  border: 1.5px solid var(--color-beige);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.member-check:has(input:checked) {
  border-color: var(--color-sage);
  background: rgba(232,23,93,.06);
}
.member-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-sage);
}

/* Info notices (participation, animaux) */
.rsvp-notice {
  background: var(--color-cream);
  border-left: 3px solid var(--color-orange);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: .9rem;
  line-height: 1.6;
}
.rsvp-notice p + p { margin-top: .4rem; }
.rsvp-notice a { color: var(--color-sage); text-decoration: underline; }
.rsvp-notice-title {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .25rem;
}
.rsvp-notice-total {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}
.rsvp-notice-total strong { color: var(--color-sage); }
.rsvp-notice-warning {
  border-left-color: var(--color-sage);
  background: rgba(232,23,93,.06);
}

/* Confirmation */
.rsvp-confirmation { text-align: center; }
.rsvp-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-olive);
  color: var(--color-white);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.rsvp-confirmation h3 {
  text-align: center;
  font-size: 2rem;
}

/* ============================================================
   GIFT / CAGNOTTE
   ============================================================ */
.gift-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.gift-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.gift-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gift-content h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: .75rem;
}
.gift-content p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-weight: 500;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--color-cream); }
.faq-question .faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .4s ease;
}
.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: .95rem;
}
.faq-answer-inner a { color: var(--color-sage); }
.faq-answer-inner strong { color: var(--color-text); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,.7);
  padding: 3rem 0;
  text-align: center;
}
.footer-names {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--color-white);
  margin-bottom: .15rem;
}
.footer-date { font-size: .9rem; margin-bottom: 1.5rem; }
.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.footer-links a {
  font-size: .85rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--color-white); }
.footer-admin { margin-bottom: 1rem; }
.footer-admin a {
  font-size: .8rem;
  opacity: .4;
  transition: opacity var(--transition);
}
.footer-admin a:hover { opacity: .8; }
.footer-credit {
  font-size: .8rem;
  opacity: .4;
}

/* ============================================================
   ENVELOPE INTRO
   ============================================================ */
.envelope-intro {
  /* Envelope width: fits the screen width AND height (room for the card rising out) */
  --w: min(640px, 92vw, calc((100vh - 110px) * 1.12));
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding-top: calc(var(--w) * .2);
  background: radial-gradient(ellipse at 50% 45%, #FFF8F1 0%, var(--color-bg) 55%, #FFE1C8 100%);
  transition: opacity 1s ease, padding-top 1.2s cubic-bezier(.22,.61,.36,1);
}
/* Room for the rising card is no longer needed: re-centre the card */
.envelope-intro.is-revealed {
  padding-top: 0;
}
.envelope-intro.fade-out {
  opacity: 0;
  pointer-events: none;
}

.envelope-wrapper {
  cursor: pointer;
  border-radius: 12px;
  animation: envelope-float 3.2s ease-in-out infinite;
}
.envelope-wrapper:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 10px;
}
.envelope-intro.is-opening .envelope-wrapper {
  cursor: default;
  animation: none;
}
@keyframes envelope-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ---- Envelope container ---- */
.envelope {
  /* Palette */
  --env-liner:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='%237A8B1E'%3E%3Cellipse cx='31' cy='28' rx='6' ry='2.4' transform='rotate(35 31 28)'/%3E%3Cellipse cx='10' cy='30' rx='5' ry='2' transform='rotate(-40 10 30)'/%3E%3Cellipse cx='63' cy='58' rx='4.5' ry='1.8' transform='rotate(30 63 58)'/%3E%3Cellipse cx='45' cy='44' rx='4' ry='1.6' transform='rotate(-30 45 44)'/%3E%3C/g%3E%3Cg fill='%23E8175D'%3E%3Ccircle cx='20' cy='15.4' r='4.2'/%3E%3Ccircle cx='24.37' cy='18.58' r='4.2'/%3E%3Ccircle cx='22.7' cy='23.72' r='4.2'/%3E%3Ccircle cx='17.3' cy='23.72' r='4.2'/%3E%3Ccircle cx='15.63' cy='18.58' r='4.2'/%3E%3Ccircle cx='54' cy='46.8' r='3'/%3E%3Ccircle cx='57.04' cy='49.01' r='3'/%3E%3Ccircle cx='55.88' cy='52.59' r='3'/%3E%3Ccircle cx='52.12' cy='52.59' r='3'/%3E%3Ccircle cx='50.96' cy='49.01' r='3'/%3E%3C/g%3E%3Cg fill='%23FFF5ED'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='54' cy='50' r='1.4'/%3E%3Ccircle cx='48' cy='16' r='1.3'/%3E%3Ccircle cx='8' cy='56' r='1.3'/%3E%3Ccircle cx='34' cy='62' r='1'/%3E%3Ccircle cx='66' cy='30' r='1'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 72px 72px,
    linear-gradient(135deg, var(--color-yellow) 0%, var(--color-orange) 100%);

  position: relative;
  width: var(--w);
  height: calc(var(--w) * .6875);
  filter: drop-shadow(0 22px 40px rgba(160, 14, 66, .28))
          drop-shadow(0 5px 12px rgba(0, 0, 0, .08));
}

/* ---- Back panel (inside of the envelope, with liner) ---- */
.envelope-back {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--env-liner);
  border-radius: 10px;
  z-index: 0;
  transition: opacity .8s ease, transform .9s ease;
}

/* ---- Card (hidden behind front, slides out on open) ---- */
.envelope-card {
  position: absolute;
  top: calc(var(--w) * .03125);
  left: calc(var(--w) * .03125);
  right: calc(var(--w) * .03125);
  bottom: calc(var(--w) * .125);
  background: #FFFBF6;
  border-radius: 6px;
  z-index: 1;
  box-shadow: 0 4px 18px rgba(0,0,0,.10);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 1s cubic-bezier(.4,.0,.2,1);
}
.envelope.card-out .envelope-card {
  transform: translateY(-42%);
}
.envelope.revealed .envelope-card {
  transform: translateY(calc(var(--w) * .047)) scale(1.08);
  transition: transform 1.2s cubic-bezier(.22,.61,.36,1) .15s;
}
.envelope-card::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  left: 10px;
  border: 1px solid rgba(245, 138, 44, .45);
  border-radius: 3px;
  pointer-events: none;
}
.envelope-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: calc(var(--w) * .0625) calc(var(--w) * .05);
  text-align: center;
}
.envelope-card-eyebrow {
  font-family: var(--font-sans);
  font-size: max(10px, calc(var(--w) * .02));
  font-weight: 500;
  color: var(--color-sage);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .75em;
}
.envelope-card-names {
  font-family: var(--font-serif);
  font-size: max(22px, calc(var(--w) * .06));
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.2;
}
.envelope-card-names span {
  display: inline-block;
  margin: 0 .3rem;
  color: var(--color-orange);
  font-style: italic;
}
.envelope-card-divider {
  width: calc(var(--w) * .12);
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-sage), var(--color-orange), var(--color-yellow), var(--color-olive));
  margin: calc(var(--w) * .018) 0;
}
.envelope-card-date {
  font-family: var(--font-serif);
  font-size: max(14px, calc(var(--w) * .03));
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: .05em;
}
.envelope-card-venue {
  font-family: var(--font-sans);
  font-size: max(11px, calc(var(--w) * .0212));
  color: var(--color-text-muted);
  margin-top: .35em;
}

/* ---- Front panel (side + bottom folds, open at the top) ---- */
.envelope-front {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  border-radius: 10px;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' x2='1' y1='0' y2='0'%3E%3Cstop offset='0' stop-color='%23D9145A'/%3E%3Cstop offset='1' stop-color='%23EC2A69'/%3E%3C/linearGradient%3E%3ClinearGradient id='r' x1='1' x2='0' y1='0' y2='0'%3E%3Cstop offset='0' stop-color='%23D9145A'/%3E%3Cstop offset='1' stop-color='%23EC2A69'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' x2='0' y1='1' y2='0'%3E%3Cstop offset='0' stop-color='%23C41250'/%3E%3Cstop offset='1' stop-color='%23E41C61'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='100' height='100' fill='%23A90E45'/%3E%3Cpolygon points='0,0 50,54 0,100' fill='url(%23l)'/%3E%3Cpolygon points='100,0 50,54 100,100' fill='url(%23r)'/%3E%3Cpolygon points='0,100 50,58 100,100' fill='url(%23b)' stroke='%239E0D40' stroke-opacity='.35' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  transition: opacity .8s ease, transform .9s ease;
}

/* ---- Top flap (fuchsia outside, liner inside) ---- */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 54%;
  z-index: 3;
  border-radius: 10px 10px 0 0;
  transform-origin: top center;
  transform: perspective(1200px) rotateX(0deg);
  /* z-index drops behind the card halfway through the opening */
  transition: transform .8s cubic-bezier(.4,.0,.2,1), z-index 0s linear .4s, opacity .7s ease;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0' stop-color='%23F4467F'/%3E%3Cstop offset='1' stop-color='%23E8175D'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='0,0 50,100 100,0' fill='url(%23f)' stroke='%23B50F4B' stroke-opacity='.5' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.envelope-flap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--env-liner);
  opacity: 0;
  /* Liner shows once the flap is edge-on (halfway) */
  transition: opacity 0s linear .4s;
}
.envelope.opened .envelope-flap {
  transform: perspective(1200px) rotateX(180deg);
  z-index: 0;
}
.envelope.opened .envelope-flap::after {
  opacity: 1;
}

/* ---- Envelope fades away once the card is out ---- */
.envelope.revealed .envelope-back,
.envelope.revealed .envelope-front {
  opacity: 0;
  transform: translateY(calc(var(--w) * .08));
}
.envelope.revealed .envelope-flap {
  opacity: 0;
}

/* ---- Wax seal ---- */
.envelope-seal {
  position: absolute;
  top: calc(54% - var(--w) * .109);
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--w) * .219);
  height: calc(var(--w) * .219);
  z-index: 5;
  transition: transform .3s ease, opacity .5s ease;
  filter: drop-shadow(0 3px 4px rgba(90, 10, 40, .35));
}
.envelope.opened .envelope-seal {
  opacity: 0;
  pointer-events: none;
}
.seal-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.seal-text {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding-bottom: 2px;
}
.seal-initials {
  font-family: var(--font-serif);
  font-size: max(13px, calc(var(--w) * .04));
  font-weight: 600;
  color: #6B4F1A;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(255,220,130,.4);
}
.seal-date {
  font-family: var(--font-sans);
  font-size: max(7px, calc(var(--w) * .0163));
  font-weight: 600;
  color: #7D5D1E;
  letter-spacing: .05em;
  margin-top: 4px;
  text-shadow: 0 1px 1px rgba(255,220,130,.3);
}

/* Hover */
.envelope-intro:not(.is-opening) .envelope-wrapper:hover .envelope-seal {
  transform: translateX(-50%) scale(1.06);
}

/* ---- Hint + enter button ---- */
.envelope-actions {
  position: relative;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.envelope-hint {
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
  animation: envelope-hint 2.4s ease-in-out infinite;
  transition: opacity .4s ease;
}
.envelope-intro.is-opening .envelope-hint {
  opacity: 0;
  animation: none;
}
@keyframes envelope-hint {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}
.envelope-enter {
  position: absolute;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(232, 23, 93, .3);
  transition: opacity .6s ease, transform .6s ease, background var(--transition);
}
.envelope-intro.ready .envelope-enter {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .envelope-wrapper, .envelope-hint { animation: none; }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; min-height: auto; }
  /* Square crop so both faces stay fully visible on phones/tablets */
  .hero-photo { max-height: none; width: 100%; max-width: 440px; margin: 0 auto; }
  .hero-photo img { max-height: none; height: auto; aspect-ratio: 1 / 1; object-position: center 45%; }
  .hero-content { text-align: center; }
  .hero-divider { margin: 1rem auto; }
  .hero-cta { justify-content: center; }
  .hero-message { margin-left: auto; margin-right: auto; }
  .countdown { justify-content: center; }
  .gift-card { grid-template-columns: 1fr; }
  .gift-image { max-height: 320px; overflow: hidden; }
  .gift-image img { max-height: 320px; }
}

@media (max-width: 768px) {
  :root { --section-py: 4rem; }

  /* Nav mobile */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    transform: translateX(100%);
    transition: transform .4s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-size: 1.2rem;
    padding: .75rem 1.5rem;
  }

  /* Hero */
  .hero { padding-top: 4rem; }
  .hero-inner { padding: 1.5rem; }
  .hero-title { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-cta { flex-direction: column; align-items: center; }
  .countdown { gap: 1rem; }
  .countdown-number { font-size: 1.5rem; }

  /* Timeline */
  .timeline::before { left: 18px; }
  .timeline-item { padding-left: 52px; }
  .timeline-dot { left: 6px; width: 24px; height: 24px; }

  /* Dress code */
  .dresscode-columns { grid-template-columns: 1fr; gap: 1.5rem; }
  .dresscode-card { padding: 2rem 1.5rem; }

  /* RSVP */
  .rsvp-card { padding: 1.75rem 1.25rem; }

  /* Accommodations */
  .accommodations-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-eyebrow { font-size: .75rem; }
  .hero-date { font-size: 1.15rem; }
  .hero-message { font-size: .9rem; }
  .btn-lg { padding: .85rem 2rem; font-size: 1rem; }
  .radio-card { flex-basis: 100%; }
  .section-title { font-size: 1.8rem; }
  .info-card { padding: 1.5rem; }
}
