/* ============================================
   WEDDING INVITATION · TATIANA & ANGEL
   GUADALAJARA · 14.11.2026
   Palette: beige base + deep green accents
   ============================================ */

:root {
  --bg:          #e8e0cf;   /* single unified beige (from reference) */
  --bg-soft:     #e8e0cf;   /* same — no alternating tints anymore */
  --ink:         #2a3b2c;   /* text is the green tone */
  --green:       #2a3b2c;   /* deep forest — accents, flowers, text */
  --green-soft:  #3d5240;
  --green-dim:   rgba(42, 59, 44, 0.45);
  --line:        rgba(42, 59, 44, 0.22);
  --line-soft:   rgba(42, 59, 44, 0.12);
  --flower:      rgba(42, 59, 44, 0.62); /* outline flowers framing the page */

  --display: 'Cormorant Garamond', 'Times New Roman', serif;
  --display-sc: 'Cormorant SC', 'Cormorant Garamond', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle paper grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.23 0 0 0 0 0.17 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image:
    radial-gradient(ellipse at 12% 16%, var(--green) 0%, transparent 22%),
    radial-gradient(ellipse at 88% 78%, var(--green) 0%, transparent 26%);
}

/* ============================================
   FRAMING FLOWERS — large botanical outlines
   placed along the page edges, top to bottom
   ============================================ */
.frame-flowers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0; /* behind content; sections are transparent so the frame shows in the gutters */
  overflow: visible;
}

/* Watercolor floral frame: soft white peonies/callas/eustoma.
   Only the frame is changed; all invitation content stays untouched. */
.floral-col {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(165px, 22vw, 330px);
  background-image: url('assets/floral-strip.png');
  background-repeat: repeat-y;
  background-position: top left;
  background-size: 100% auto;
  opacity: 0.78;
}
.floral-col-l {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 60%, transparent 100%);
          mask-image: linear-gradient(to right, #000 0%, #000 60%, transparent 100%);
}
.floral-col-r {
  right: 0;
  transform: scaleX(-1);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 60%, transparent 100%);
          mask-image: linear-gradient(to right, #000 0%, #000 60%, transparent 100%);
}

/* Soft beginning/end accents — no hard blocks, only faded corner florals. */
.frame-flowers::before,
.frame-flowers::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: clamp(150px, 18vw, 280px);
  background-image: url('assets/floral-top.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 100%;
  opacity: 0.58;
  pointer-events: none;
}
.frame-flowers::before { top: 0; }
.frame-flowers::after {
  bottom: 0;
  transform: scaleY(-1);
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switch {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--green-dim);
  border-radius: 100px;
  font-family: var(--display-sc);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.lang-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--green-soft);
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.3s ease;
}

.lang-btn:hover { color: var(--green); }
.lang-btn.active { color: var(--green); font-weight: 600; }
.lang-sep { color: var(--green-dim); }

/* ============================================
   ORNAMENTS
   ============================================ */
.title-deco {
  width: 110px;
  height: 16px;
  margin: 6px auto 44px;
  color: var(--green);
}
.title-deco svg { display: block; width: 100%; height: 100%; }

/* Branch-image divider above section headings — identical size everywhere */
.title-divider {
  display: flex;
  justify-content: center;
  margin: 0 auto 26px;
  width: 240px;
  max-width: 62%;
  position: relative;
  z-index: 2;
}
.title-divider img {
  width: 100%;
  height: auto;
  opacity: 0.9;
}

.flourish-side {
  display: none; /* replaced by page-wide .frame-flowers */
}

.divider {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--green);
  position: relative;
  z-index: 2;
}
.divider svg {
  display: block;
  max-width: 440px;
  width: 82%;
  height: auto;
}
.divider-standalone { padding: 48px 0; }

/* ============================================
   HERO — photo card on beige
   ============================================ */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 24px 80px;
  background: transparent; /* let the flower frame show through in the gutters */
}

.hero-inner {
  text-align: center;
  max-width: 620px;
  width: 100%;
  animation: heroFadeIn 1.5s ease-out;
}

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

.hero-eyebrow {
  font-family: var(--display-sc);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: lowercase;
  color: var(--green-soft);
  margin-bottom: 18px;
}

.hero-names {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(52px, 11vw, 92px);
  line-height: 1.0;
  letter-spacing: -0.01em;
  margin-bottom: 36px;
  color: var(--green);
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 18px;
}

.hero-names .name-line {
  font-style: italic;
  font-weight: 600;
}

.hero-names .amp {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.7em;
  color: var(--green-soft);
}

/* Photo card */
.hero-card {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  padding: 0;
  max-width: 460px;
  width: 100%;
}

.hero-photo {
  position: relative;
  z-index: 2;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 64px -20px rgba(42, 59, 44, 0.36);
  border: 1px solid rgba(42, 59, 44, 0.12);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Old hero side-flowers removed per request — framing handled by .frame-flowers */
.hero-flower { display: none; }

.hero-date {
  margin-top: 46px;
  font-family: var(--display-sc);
  font-weight: 600;
  font-size: clamp(22px, 4.2vw, 40px);
  letter-spacing: 0.2em;
  color: var(--green);
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-location {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--display-sc);
  font-weight: 500;
  font-size: clamp(15px, 2vw, 20px);
  letter-spacing: 0.24em;
  color: var(--green-soft);
  text-transform: uppercase;
}

.loc-diamond {
  color: var(--green);
  font-size: 0.66em;
  opacity: 0.78;
  line-height: 1;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  position: relative;
  z-index: 2;
  padding: 100px 32px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.section-featured {
  max-width: 100%;
  margin: 0;
  padding: 120px 32px;
  background: transparent;
}
.section-featured .inner {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-soft);
  padding: 64px 48px;
  border-radius: 8px;
  box-shadow: 0 30px 60px -40px rgba(42,59,44,0.4);
}

.section-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(40px, 5.8vw, 58px);
  letter-spacing: -0.005em;
  margin-bottom: 14px;
  color: var(--green);
  line-height: 1.1;
  display: inline-block;
}

/* ============================================
   INTRO
   ============================================ */
.intro {
  padding-top: 110px;
  padding-bottom: 60px;
}

.intro-greeting {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(40px, 5.8vw, 58px);
  line-height: 1.1;
  color: var(--green);
  margin-bottom: 22px;
}

.intro-text {
  font-family: var(--display);
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--green-soft);
  max-width: 620px;
  margin: 0 auto;
}

/* ============================================
   LOCATION
   ============================================ */
.venue-city {
  font-family: var(--display);
  font-size: clamp(28px, 3.8vw, 38px);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  color: var(--green);
}

.venue-address {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--green-soft);
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ============================================
   PROGRAM TIMELINE — vertical rail + icons
   ============================================ */
.timeline {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 540px;
  margin: 0 auto;
  text-align: left;
}

/* the continuous vertical line, sitting in the gap between icon & time */
.timeline::before {
  content: '';
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 80px;
  width: 1px;
  background: var(--line);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 66px 124px 1fr;
  align-items: center;
  column-gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line-soft);
}
.timeline li:last-child { border-bottom: none; }

/* node dot on the rail */
.timeline li::before {
  content: '';
  position: absolute;
  left: 80px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px var(--bg);
}

.tl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 52px;
  color: var(--green);
}
.tl-icon svg { width: 42px; height: 42px; }

.timeline .time {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}

.timeline .event {
  font-family: var(--display);
  font-style: italic;
  font-size: 30px;
  font-weight: 600;
  color: var(--green-soft);
  line-height: 1.25;
}

/* ============================================
   SECTION BOTANICAL IMAGES (gift / dress code)
   ============================================ */
.section-image {
  display: flex;
  justify-content: center;
  margin: 52px auto 0;
}
.section-image img {
  display: block;
  width: 100%;
  height: auto;
}
.gift-image { max-width: 340px; }
.dresscode-image { max-width: 250px; margin-top: 44px; }
.intro-image { max-width: 400px; margin-top: 44px; }

/* ============================================
   GIFTS
   ============================================ */
.gifts-text {
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 500;
  font-style: italic;
  line-height: 1.65;
  letter-spacing: 0.005em;
  max-width: 640px;
  margin: 0 auto;
  color: var(--green);
}
.gifts-bank-btn { margin-top: 32px; }

/* Bank details — collapsible */
.bank-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 360ms ease, opacity 360ms ease, transform 360ms ease, margin 360ms ease;
  margin-top: 0;
}
.bank-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  margin-top: 36px;
}
.bank-panel-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 44px);
}
.bank-accounts {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bank-account {
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.bank-account:first-child { padding-top: 0; }
.bank-account:last-child { border-bottom: 0; padding-bottom: 0; }
.bank-account-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.bank-account-cur {
  font-family: var(--body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-dim);
}
.bank-account-name {
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 600;
  font-style: italic;
  color: var(--green);
}
.bank-account-rows {
  margin: 0;
  display: grid;
  gap: 6px;
}
.bank-arow {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: baseline;
}
.bank-arow dt {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-dim);
}
.bank-arow dd {
  margin: 0;
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--ink);
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}
.bank-arow dd a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color .25s ease;
}
.bank-arow dd a:hover { border-color: var(--green); }
.bank-concept {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(16px, 1.9vw, 19px);
  font-style: italic;
  font-weight: 500;
  text-align: center;
  color: var(--green);
}

/* ============================================
   DRESS CODE — text only
   ============================================ */
.dresscode-body {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dresscode-line {
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--green);
}

.dresscode-strong {
  font-weight: 700;
  font-style: italic;
  font-size: clamp(22px, 2.8vw, 28px);
  margin-bottom: 4px;
}

.dresscode-note {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  line-height: 1.55;
  color: var(--green-soft);
  margin-top: 22px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   RSVP FORM — larger, bolder labels
   ============================================ */
.rsvp-intro {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(19px, 2.3vw, 23px);
  color: var(--green-soft);
  max-width: 580px;
  margin: 0 auto 56px;
  line-height: 1.6;
}

.rsvp-form {
  text-align: left;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field label,
.field-label {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 25px);
  letter-spacing: 0.005em;
  color: var(--green);
  display: block;
  line-height: 1.3;
}


.adult-only-note {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 25px);
  letter-spacing: 0.005em;
  color: var(--green);
  display: block;
  line-height: 1.35;
  margin: 0;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 21px;
  color: var(--green);
  transition: border-color 0.3s ease;
}

.field textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.5;
}

.field input[type="text"]:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--green);
}

.radio-group, .check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 2px;
}

.radio, .check {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  color: var(--green);
  user-select: none;
}

.radio input, .check input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--green-dim);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.radio input { border-radius: 50%; }
.check input { border-radius: 3px; }

.radio input:hover, .check input:hover { border-color: var(--green); }

.radio input:checked, .check input:checked {
  border-color: var(--green);
  background: var(--green);
}

.radio input:checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 9px; height: 9px;
  background: var(--bg);
  border-radius: 50%;
}

.check input:checked::after {
  content: '';
  position: absolute;
  top: 2px; left: 6px;
  width: 5px; height: 10px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.rsvp-thanks {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 21px;
  color: var(--green);
  text-align: center;
  margin-top: 16px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 16px 42px;
  font-family: var(--display-sc);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-decoration: none;
  border: 1.5px solid;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0;
}

.btn-outline {
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: var(--bg);
}

.btn-dark {
  color: var(--bg);
  background: var(--green);
  border-color: var(--green);
  margin-top: 16px;
  align-self: center;
  padding: 18px 48px;
  font-size: 14px;
}
.btn-dark:hover {
  background: var(--ink);
  border-color: var(--ink);
}

/* ============================================
   COUNTDOWN
   ============================================ */
.countdown-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.countdown-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 38px);
  color: var(--green);
  margin-bottom: 48px;
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(6px, 2vw, 18px);
  flex-wrap: nowrap;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(60px, 14vw, 104px);
}

.cd-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(45px, 9.4vw, 80px);
  line-height: 1;
  color: var(--green);
  font-variant-numeric: lining-nums tabular-nums;
}

.cd-label {
  font-family: var(--display-sc);
  font-size: clamp(9px, 1.6vw, 12px);
  letter-spacing: 0.15em;
  color: var(--green-soft);
  margin-top: 10px;
  text-transform: lowercase;
}

.cd-sep {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 6.6vw, 62px);
  line-height: 1;
  color: var(--green-dim);
  padding-top: clamp(2px, 1vw, 8px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 2;
  background: transparent;
  color: var(--green);
  text-align: center;
  padding: 100px 24px 120px;
}

.footer-flourish {
  width: clamp(220px, 36vw, 320px);
  margin: 0 auto 36px;
  color: var(--green);
}
.footer-flourish svg { display: block; width: 100%; height: auto; }

.footer-text {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(48px, 7vw, 76px);
  letter-spacing: 0.01em;
  color: var(--green);
}

.footer-heart {
  width: 46px;
  margin: 30px auto 0;
  color: var(--green);
  opacity: 0.82;
}
.footer-heart svg { display: block; width: 100%; height: auto; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 760px) {
  .flourish-side { width: 110px; opacity: 0.5; }
  .flourish-side.top-left { top: 16px; left: 12px; }
  .flourish-side.bottom-right { bottom: 16px; right: 12px; }
}

@media (max-width: 640px) {
  .lang-switch { top: 16px; right: 16px; padding: 8px 14px; font-size: 11px; }

  .section { padding: 80px 24px; }
  .section-featured { padding: 90px 24px; }
  .intro { padding: 90px 24px 50px; }

  .hero { padding: 100px 20px 70px; }
  .hero-eyebrow { letter-spacing: 0.22em; }
  .hero-date { letter-spacing: 0.14em; }

  /* On phones the side walls must stay narrow so they never crowd the text. */
  .floral-col { width: clamp(72px, 25vw, 122px); opacity: 0.64; }
  .floral-col-l,
  .floral-col-r {
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 55%, transparent 100%);
            mask-image: linear-gradient(to right, #000 0%, #000 55%, transparent 100%);
  }

  .timeline { max-width: 100%; }
  .timeline::before { left: 58px; }
  .timeline li {
    grid-template-columns: 48px 86px 1fr;
    column-gap: 18px;
    padding: 24px 0;
  }
  .timeline li::before { left: 58px; }
  .tl-icon { width: 48px; height: 42px; }
  .tl-icon svg { width: 32px; height: 32px; }
  .timeline .time { font-size: 30px; }
  .timeline .event { font-size: 22px; }

  .gift-image { max-width: 240px; }
  .dresscode-image { max-width: 200px; }
  .intro-image { max-width: 280px; }
  .footer-heart { width: 40px; }

  .field input[type="text"], .field textarea { font-size: 19px; }

  .countdown { gap: 3px; }
  .cd-unit { min-width: 0; flex: 1; }
  .cd-sep { display: none; }

  .footer { padding: 80px 24px 100px; }
}

@media (max-width: 380px) {
  .radio-group, .check-group { gap: 12px 18px; }
  .radio, .check { font-size: 18px; }
  .cd-num { font-size: 30px; }
  .cd-label { font-size: 8px; letter-spacing: 0.08em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   ENVELOPE INTRO
   ============================================ */
:root {
  --env-w: clamp(300px, 82vw, 540px);
  --env-h: calc(var(--env-w) * 0.66);
  --wax:   #2a3b2c;
}

body.env-locked { overflow: hidden; height: 100vh; }

.env-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #38422a;
  transition: opacity 0.85s ease, visibility 0s linear 0.85s;
}
.env-overlay.s-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.env-overlay.s-gone {
  display: none;
}
.env-overlay.no-anim,
.env-overlay.no-anim * {
  transition: none !important;
  animation: none !important;
}

.env-bloom {
  position: absolute;
  width: min(40vw, 380px);
  opacity: 0.10;
  mix-blend-mode: screen;
  pointer-events: none;
  user-select: none;
}
.env-bloom-tl { top: -6%;  left: -7%;  transform: rotate(-12deg); }
.env-bloom-br { bottom: -8%; right: -7%; transform: rotate(160deg); }

.env-sound {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 224, 207, 0.35);
  border-radius: 50%;
  background: transparent;
  color: rgba(232, 224, 207, 0.85);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.env-sound:hover { background: rgba(232, 224, 207, 0.10); }
.env-sound svg { width: 20px; height: 20px; }
.env-sound .ico-off { display: none; }
.env-sound[aria-pressed="false"] .ico-on { display: none; }
.env-sound[aria-pressed="false"] .ico-off { display: block; }

.env-stage {
  position: absolute;
  inset: 0;
  perspective: 2000px;
}

.envelope {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.env-back,
.env-front,
.env-side,
.env-flap,
.env-card { position: absolute; }

/* back / interior — visible behind the flap once it opens */
.env-back {
  inset: 0;
  z-index: 1;
  background: linear-gradient(160deg, #ddceaa 0%, #d3c39c 68%, #c9b88e 100%);
}

/* invitation card — emerges from the centre of the envelope */
.env-card {
  left: 50%; top: 50%;
  width: min(430px, 84vw);
  height: min(560px, 72vh);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 5px;
  background: linear-gradient(165deg, #fcf8ef 0%, #f2ecdb 100%);
  box-shadow: inset 0 0 0 1px rgba(42, 59, 44, 0.10);
  transform: translate(-50%, -34%) scale(0.92);
  opacity: 0;
  transition:
    transform 2.2s cubic-bezier(0.45, 0.05, 0.25, 1),
    opacity 1.9s ease-in-out,
    box-shadow 2.2s ease-in-out;
}
.env-overlay.s-card .env-card {
  /* slide up OUT of the pocket, but stay tucked BEHIND the front
     (z-index 3 < .env-front z-index 4) so the pocket hides the card's
     lower half — the card sticks up out of the opening, not on top */
  transform: translate(-50%, -56%) scale(1);
  opacity: 1;
  z-index: 3;
  box-shadow: 0 44px 80px -24px rgba(0, 0, 0, 0.6);
}
.env-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.8vh, 16px);
  padding: 8% 10%;
}
.env-card-eyebrow {
  font-family: var(--display-sc);
  font-size: clamp(11px, 1.5vw, 14px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--green-dim);
}
.env-card-names {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1;
  color: var(--green);
  font-size: clamp(30px, 7vw, 50px);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.22em;
}
.env-card-names .amp {
  font-style: italic;
  font-weight: 500;
  font-size: 0.62em;
  color: var(--green-dim);
}
.env-card-rule {
  width: 46px;
  height: 1px;
  background: var(--line);
  margin: clamp(2px, 0.6vh, 6px) 0;
}
.env-card-date {
  font-family: var(--display-sc);
  font-size: clamp(14px, 2.4vw, 19px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--green);
}
.env-card-loc {
  font-family: var(--body);
  font-size: clamp(10px, 1.6vw, 12px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dim);
}

/* left / right side flaps */
.env-side {
  inset: 0;
  z-index: 3;
}
.env-side-l {
  clip-path: polygon(0 0, 0 100%, 50% 50%);
  background: linear-gradient(100deg, #efe4c9 0%, #e6d9b9 100%);
  box-shadow: inset -1px 0 4px rgba(120, 96, 50, 0.14);
}
.env-side-r {
  clip-path: polygon(100% 0, 100% 100%, 50% 50%);
  background: linear-gradient(260deg, #efe4c9 0%, #e6d9b9 100%);
  box-shadow: inset 1px 0 4px rgba(120, 96, 50, 0.14);
}

/* bottom front flap (apex up) */
.env-front {
  inset: 0;
  z-index: 4;
  clip-path: polygon(0 100%, 100% 100%, 50% 46%);
  background: linear-gradient(165deg, #f0e6cc 0%, #e3d6b6 100%);
}
.env-front::before {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(0 100%, 100% 100%, 50% 46%);
  background: linear-gradient(180deg, rgba(120, 96, 50, 0.16), transparent 22%);
}

/* top flap (apex down) — opens upward */
.env-flap {
  inset: 0;
  z-index: 5;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 1.2s cubic-bezier(0.5, 0.02, 0.35, 1);
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  background: linear-gradient(180deg, #f6edd6 0%, #ebe0c3 100%);
  box-shadow: 0 6px 18px rgba(120, 96, 50, 0.16);
  backface-visibility: hidden;
}
.env-flap::after {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  background: linear-gradient(180deg, transparent 60%, rgba(120, 96, 50, 0.10) 100%);
  pointer-events: none;
}
.env-overlay.s-flap .env-flap {
  transform: rotateX(180deg);
}

/* cursive cover line on the closed envelope */
.env-cover-title {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 16%;
  z-index: 6;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  color: #3a4a2f;
  font-size: clamp(28px, 5.4vw, 48px);
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
  text-wrap: balance;
  transition: opacity 0.6s ease, transform 0.8s ease;
}
.env-overlay.s-seal .env-cover-title {
  opacity: 0;
  transform: translateY(-12px);
}

/* wax seal */
.env-seal {
  position: absolute;
  left: 50%;
  top: 52%;
  width: clamp(86px, 16vw, 124px);
  height: clamp(86px, 16vw, 124px);
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  cursor: pointer;
  border-radius: 46% 54% 52% 48% / 53% 47% 53% 47%;
  background:
    radial-gradient(circle at 35% 28%, #2f6a40 0%, #1f5230 40%, #16401f 74%, #0f2e16 100%);
  box-shadow:
    0 0 36px 10px rgba(0, 0, 0, 0.22),
    0 12px 22px -5px rgba(0, 0, 0, 0.55),
    0 4px 8px rgba(0, 0, 0, 0.4),
    inset 0 3px 6px rgba(255, 255, 255, 0.28),
    inset 0 -10px 18px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.35s ease-in-out, box-shadow 0.35s ease-in-out;
}
/* glossy wax sheen */
.env-seal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 55% 38% at 36% 24%, rgba(255, 255, 255, 0.32), transparent 70%);
  pointer-events: none;
}
/* clickable pulse ring */
.env-seal::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(232, 224, 207, 0.5);
  opacity: 0;
  animation: sealRing 2.8s ease-out infinite;
  pointer-events: none;
}
.env-seal-crest {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}
.env-seal:hover {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow:
    0 16px 28px -5px rgba(0, 0, 0, 0.55),
    0 5px 10px rgba(0, 0, 0, 0.45),
    0 0 26px rgba(224, 187, 98, 0.4),
    inset 0 3px 6px rgba(255, 255, 255, 0.32),
    inset 0 -10px 18px rgba(0, 0, 0, 0.45);
}
.env-overlay.s-seal .env-seal {
  animation: sealOff 1.5s cubic-bezier(0.45, 0.05, 0.3, 1) forwards;
  pointer-events: none;
}
@keyframes sealOff {
  0%   { transform: translate(-50%, -50%) rotate(0) scale(1); opacity: 1; }
  35%  { transform: translate(-50%, -78%) rotate(-3deg) scale(1.02); opacity: 1; }
  100% { transform: translate(-50%, -215%) rotate(14deg) scale(0.62); opacity: 0; }
}
@keyframes sealRing {
  0%   { opacity: 0; transform: scale(0.92); }
  18%  { opacity: 0.55; }
  60%  { opacity: 0; transform: scale(1.26); }
  100% { opacity: 0; transform: scale(1.26); }
}

.env-hint {
  position: absolute;
  left: 50%;
  top: 67%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(58, 74, 47, 0.72);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
  animation: hintPulse 2.6s ease-in-out infinite;
}
.env-overlay.s-seal .env-hint { opacity: 0; transition: opacity 0.4s ease; }
@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.9; }
}

/* re-open button */
.env-reopen {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 500;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--green);
  color: var(--bg);
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(42, 59, 44, 0.5);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
}
.env-reopen.is-shown { opacity: 1; transform: translateY(0) scale(1); }
.env-reopen:hover { background: var(--green-soft); }
.env-reopen svg { width: 24px; height: 24px; }

@media (max-height: 620px) {
  :root { --env-w: clamp(240px, 60vh, 380px); }
}


/* === Real photographed envelope + gold T&A wax seal === */
.env-overlay {
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,0.05), transparent 42%),
    linear-gradient(180deg, #454d31 0%, #313924 100%);
}
.env-bloom { display: none; }

/* The envelope FILLS the whole screen (full-bleed cover), keeping the photo's
   aspect ratio and cropping the overflow — "zoom in, large and close". */
.env-stage { perspective: 2600px; }
.envelope {
  inset: auto;
  left: 50%;
  top: 50%;
  /* cover: always ≥ viewport in both axes, AR locked to 797:370 */
  width: max(100vw, 100vh * 2.15405);
  height: max(100vh, 100vw * 0.46424);
  aspect-ratio: auto;
  transform: translate(-50%, -50%);
  background: none;
  box-shadow: none;
  overflow: visible;
}
.envelope::before { content: none; }

/* Body + flap each carry the real envelope photo so the closed state is the photo */
.env-front,
.env-flap {
  background: url('assets/envelope-bg.png') center center / 100% 100% no-repeat;
  box-shadow: none;
}
/* body = whole photo MINUS the top flap triangle */
.env-front {
  clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 50% 57%);
}
.env-front::before { content: none; }
/* not needed with a single photo body */
.env-side-l,
.env-side-r { display: none; }

/* interior revealed once the flap lifts */
.env-back {
  background: linear-gradient(160deg, #3b4326 0%, #2f3720 100%);
  box-shadow: inset 0 0 70px rgba(0,0,0,0.55);
}

/* top flap = photo's top triangle, fold apex matched to the photo (~57%) */
.env-flap {
  clip-path: polygon(0 0, 100% 0, 50% 57%);
  transition: transform 2.1s cubic-bezier(0.5, 0.02, 0.35, 1);
}
.env-flap::after { content: none; }

/* No text on the envelope — only the wax seal is visible (per reference). */
.env-cover-title { display: none !important; }
.env-hint { display: none !important; }

/* the real wax seal, cropped from the reference photo */
.env-seal {
  top: 57.5%;
  width: clamp(140px, 19vh, 300px);
  height: auto;
  aspect-ratio: 162 / 143;
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.env-seal::before,
.env-seal::after { content: none; }
.env-seal-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter:
    drop-shadow(0 10px 14px rgba(0,0,0,0.45))
    drop-shadow(0 2px 3px rgba(0,0,0,0.40));
}
.env-seal:hover {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: none;
}
.env-sound {
  color: rgba(238,232,202,0.80);
  border-color: rgba(238,232,202,0.30);
}

/* ============================================================
   ENVELOPE v2 — four-flap reveal of the REAL website beneath
   The overlay is a cover. The website already exists under it;
   the flaps open and drift away to uncover the full page.
   ============================================================ */

/* Closed state keeps a solid background so the page never flashes
   before the flap photos load. The moment opening begins (s-seal)
   the background goes transparent — the flaps still fully cover the
   viewport, so the swap is invisible — and from then on the real
   website shows through any gap the flaps leave behind. */
.env-overlay {
  background: #6c744c;
}
.env-overlay.s-seal { background: none; }

/* legacy pieces — no longer rendered */
.env-back,
.env-front,
.env-side,
.env-card,
.env-cover-title,
.env-hint { display: none !important; }

.env-stage { perspective: 2600px; }

/* every flap fills the whole envelope and carries the identical photo;
   the clip-path cuts each to its own triangle so the closed envelope is
   seamless. Apex of all four meets at 50% / 54%. */
.env-flap {
  position: absolute;
  inset: 0;
  background: url('assets/envelope-paper.png') center center / 100% 100% no-repeat;
  box-shadow: none;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.env-flap::after { content: none; }

.env-flap-top {
  z-index: 5;
  clip-path: polygon(0 0, 100% 0, 50% 54%);
  transform-origin: 50% 0;
  transform: rotateX(0deg);
  transition: transform 2.7s cubic-bezier(0.42, 0.04, 0.18, 1),
              opacity 1.7s ease;
}
.env-flap-bottom {
  z-index: 3;
  clip-path: polygon(0 100%, 100% 100%, 50% 54%);
  transform-origin: 50% 100%;
  transform: rotateX(0deg);
  transition: transform 2.4s cubic-bezier(0.5, 0.02, 0.3, 1) 0.1s,
              opacity 1.9s ease 0.18s;
}
.env-flap-left {
  z-index: 4;
  clip-path: polygon(0 0, 50% 54%, 0 100%);
  transform-origin: 0 50%;
  transform: rotateY(0deg);
  transition: transform 2.4s cubic-bezier(0.5, 0.02, 0.3, 1) 0.32s,
              opacity 1.9s ease 0.42s;
}
.env-flap-right {
  z-index: 4;
  clip-path: polygon(100% 0, 100% 100%, 50% 54%);
  transform-origin: 100% 50%;
  transform: rotateY(0deg);
  transition: transform 2.4s cubic-bezier(0.5, 0.02, 0.3, 1) 0.5s,
              opacity 1.9s ease 0.6s;
}

/* Phase 1 — only the TOP flap lifts; the upper part of the website
   is uncovered behind it. The other three stay shut. */
.env-overlay.s-flap .env-flap-top {
  transform: translateY(-6%) rotateX(177deg);
}
.env-overlay.s-flap .env-flap-bottom { transform: rotateX(0deg); }
.env-overlay.s-flap .env-flap-left   { transform: rotateY(0deg); }
.env-overlay.s-flap .env-flap-right  { transform: rotateY(0deg); }

/* Phase 2 — the top flap drifts up and off, the bottom slides down,
   the sides swing outward; all softly fade so the full website is
   cleanly revealed beneath. */
.env-overlay.s-open .env-flap-top {
  transform: translateY(-80%) rotateX(177deg);
  opacity: 0;
}
.env-overlay.s-open .env-flap-bottom {
  transform: translateY(74%) rotateX(-170deg);
  opacity: 0;
}
.env-overlay.s-open .env-flap-left {
  transform: translateX(-58%) rotateY(-168deg);
  opacity: 0;
}
.env-overlay.s-open .env-flap-right {
  transform: translateX(58%) rotateY(168deg);
  opacity: 0;
}
.env-overlay.s-open { pointer-events: none; }

/* Wax seal — clean and realistic: no glow, no halo, no blurred ring.
   Only a tight grounding shadow remains. */
.env-seal {
  position: absolute;
  left: 50%;
  top: 53.5%;
  z-index: 6;
  width: clamp(140px, 19vh, 300px);
  height: auto;
  aspect-ratio: 162 / 143;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.4s ease;
}
.env-seal::before,
.env-seal::after { content: none; }
.env-seal-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  /* only a small, tight shadow directly beneath the wax — no halo / streak */
  filter: drop-shadow(0 2px 2px rgba(40, 44, 26, 0.30));
}
.env-seal:hover {
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow: none;
}

/* Soft fade-out on click — the seal simply dissolves, no fly-off. */
.env-overlay.s-seal .env-seal {
  animation: none;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -53%) scale(1.04);
  transition: opacity 1.15s ease, transform 1.5s ease;
}


/* Final fix: no sound control on envelope screen. */
.env-sound { display: none !important; }


/* ============================================================
   FINAL ENVELOPE OPENING FIX
   - absolutely no opening sound
   - seal fades out softly
   - top flap opens first
   - the three lower triangles do NOT fly away; they dissolve in place
   ============================================================ */
.env-sound { display: none !important; }

.env-overlay.s-seal .env-seal {
  animation: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, -53%) scale(1.02) !important;
  transition: opacity 0.9s ease, transform 1.1s ease !important;
}

/* The top triangular flap is the only part that physically opens. */
.env-flap-top {
  transition:
    transform 2.45s cubic-bezier(0.42, 0.04, 0.18, 1),
    opacity 1.15s ease 0.3s !important;
}
.env-overlay.s-flap .env-flap-top {
  transform: translateY(-7%) rotateX(177deg) !important;
  opacity: 1 !important;
}

/* Lower three triangles stay exactly where they are during the top opening. */
.env-overlay.s-flap .env-flap-bottom,
.env-overlay.s-flap .env-flap-left,
.env-overlay.s-flap .env-flap-right {
  transform: none !important;
  opacity: 1 !important;
}

/* Final reveal: lower three triangles simply dissolve in place — no travel, no sliding, no swinging. */
.env-overlay.s-open .env-flap-bottom,
.env-overlay.s-open .env-flap-left,
.env-overlay.s-open .env-flap-right {
  transform: none !important;
  opacity: 0 !important;
  transition: opacity 1.85s ease-in-out !important;
}

/* The opened top flap also fades softly after it has lifted. */
.env-overlay.s-open .env-flap-top {
  transform: translateY(-9%) rotateX(177deg) !important;
  opacity: 0 !important;
  transition:
    transform 0.6s ease,
    opacity 1.45s ease-in-out !important;
}


/* ============================================================
   FAST ENVELOPE TIMING OVERRIDE
   Requested: total opening around 1.5–2 seconds.
   - no sound
   - seal fades quickly
   - top flap opens first in about 1 second
   - lower three triangles dissolve in place in about 0.8–1 second
   ============================================================ */
.env-sound { display: none !important; }

.env-overlay.s-seal .env-seal {
  animation: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, -52%) scale(1.015) !important;
  transition: opacity 0.35s ease, transform 0.45s ease !important;
}

.env-flap-top {
  transition:
    transform 0.95s cubic-bezier(0.42, 0.04, 0.18, 1),
    opacity 0.65s ease 0.1s !important;
}
.env-overlay.s-flap .env-flap-top {
  transform: translateY(-7%) rotateX(177deg) !important;
  opacity: 1 !important;
}

.env-overlay.s-flap .env-flap-bottom,
.env-overlay.s-flap .env-flap-left,
.env-overlay.s-flap .env-flap-right {
  transform: none !important;
  opacity: 1 !important;
}

.env-overlay.s-open .env-flap-bottom,
.env-overlay.s-open .env-flap-left,
.env-overlay.s-open .env-flap-right {
  transform: none !important;
  opacity: 0 !important;
  transition: opacity 0.9s ease-in-out !important;
}

.env-overlay.s-open .env-flap-top {
  transform: translateY(-9%) rotateX(177deg) !important;
  opacity: 0 !important;
  transition:
    transform 0.25s ease,
    opacity 0.75s ease-in-out !important;
}


/* ============================================================
   FINAL INTRO SCREEN OVERRIDE
   Envelope is removed. Fullscreen blurred photo cover + Abrir.
   ============================================================ */
body.env-locked {
  overflow: hidden !important;
  height: 100vh !important;
}

.intro-overlay.env-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #141812 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: opacity 850ms ease, visibility 0s linear 850ms !important;
}

.intro-overlay.is-opening {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.intro-overlay.s-gone {
  display: none !important;
}

.intro-bg-photo {
  position: absolute !important;
  inset: -18px !important;
  width: calc(100% + 36px) !important;
  height: calc(100% + 36px) !important;
  object-fit: cover !important;
  filter: blur(10px) !important;
  transform: scale(1.04) !important;
  transform-origin: center !important;
  user-select: none !important;
  pointer-events: none !important;
}

.intro-dim {
  position: absolute !important;
  inset: 0 !important;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.04), transparent 34%),
    linear-gradient(180deg, rgba(18, 23, 15, 0.46), rgba(18, 23, 15, 0.60)) !important;
  pointer-events: none !important;
}

.intro-content {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(28px, 4vw, 42px) !important;
  padding: 32px !important;
  text-align: center !important;
  color: #f7f0df !important;
}

.intro-cover-title {
  margin: 0 !important;
  font-family: var(--display-sc) !important;
  font-size: clamp(16px, 2.1vw, 28px) !important;
  font-weight: 500 !important;
  letter-spacing: 0.22em !important;
  text-transform: none !important;
  line-height: 1.4 !important;
  color: rgba(250, 244, 229, 0.95) !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45) !important;
}

.intro-open-btn {
  min-width: clamp(150px, 18vw, 210px) !important;
  padding: 15px 38px !important;
  border: 1px solid rgba(250, 244, 229, 0.78) !important;
  border-radius: 22px !important;
  background: rgba(20, 28, 18, 0.22) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
  color: rgba(250, 244, 229, 0.96) !important;
  font-family: var(--display-sc) !important;
  font-size: clamp(14px, 1.2vw, 18px) !important;
  font-weight: 500 !important;
  letter-spacing: 0.18em !important;
  cursor: pointer !important;
  box-shadow: 0 18px 38px rgba(0,0,0,0.22) !important;
  transition:
    transform 240ms ease,
    background 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease !important;
}

.intro-open-btn:hover {
  transform: translateY(-2px) !important;
  background: rgba(250, 244, 229, 0.12) !important;
  border-color: rgba(250, 244, 229, 0.98) !important;
  box-shadow: 0 22px 46px rgba(0,0,0,0.28) !important;
}

.intro-open-btn:active {
  transform: translateY(0) scale(0.985) !important;
}

/* Make sure old envelope UI never appears. */
.envelope,
.env-stage,
.env-flap,
.env-seal,
.env-reopen,
.env-hint,
.env-bloom,
.env-sound {
  display: none !important;
}

@media (max-width: 640px) {
  .intro-bg-photo {
    filter: blur(9px) !important;
    transform: scale(1.06) !important;
  }
  .intro-content {
    gap: 26px !important;
    padding: 24px !important;
  }
  .intro-open-btn {
    border-radius: 20px !important;
    padding: 14px 34px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay.env-overlay,
  .intro-open-btn {
    transition: none !important;
  }
}

/* Guest photo upload */
.photo-upload-section { text-align: center; }
.photo-upload-card {
  width: min(760px, calc(100% - 32px));
  margin: 26px auto 0;
  padding: clamp(28px, 5vw, 52px) clamp(20px, 5vw, 48px);
  border: 1px solid rgba(58, 69, 47, 0.18);
  border-radius: 28px;
  background: rgba(255,255,255,0.18);
  box-shadow: 0 18px 55px rgba(45, 52, 38, 0.08);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.photo-upload-title { margin-top: 0; }
.photo-upload-text { max-width: 620px; margin: 0 auto 24px; line-height: 1.7; }
.photo-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-picker-btn, .photo-upload-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin: 6px; }
.photo-upload-btn:disabled { opacity: .45; cursor: not-allowed; }
.photo-selection, .photo-status, .photo-upload-note { margin: 14px auto 0; max-width: 620px; }
.photo-upload-note { opacity: .7; font-size: .92em; }
.photo-status.is-error { color: #8b2f2f; }
.photo-status.is-success { color: #49643d; }
.photo-progress { width: min(520px, 100%); height: 7px; margin: 20px auto 0; border-radius: 999px; overflow: hidden; background: rgba(58,69,47,.12); }
.photo-progress-bar { height: 100%; width: 0; background: currentColor; opacity: .65; transition: width .25s ease; }
@media (max-width: 640px) { .photo-upload-card { border-radius: 22px; } .photo-picker-btn, .photo-upload-btn { width: 100%; margin: 6px 0; } }
