/* ============================================================================
   ISABELLA & ALEXANDER — WEDDING INVITATION
   Pastel & Rose Gold Edition ✿
============================================================================ */

:root {
  /* ---- Pastel & Rose Gold Palette ---- */
  --rose-gold:       #b76e79;   /* rose gold — primary accent */
  --rose-gold-light: #d4a0a8;   /* pale rose gold — highlights */
  --rose-gold-deep:  #8b4f5a;   /* deep rose gold — hover/dark */
  --blush:           #f9e8ec;   /* blush pink — light bg */
  --blush-soft:      #f5dce2;   /* slightly deeper blush */
  --lavender:        #ede0f4;   /* soft lavender — accent bg */
  --mint:            #d8f0ec;   /* soft mint — accent */
  --cream:           #fdf6f8;   /* warm white with pink tint */
  --cream-soft:      #f8eef1;   /* secondary light surface */
  --ink:             #4a3038;   /* warm dark for body text */
  --ink-soft:        #7a5a64;   /* muted warm text */
  --dark-bg:         #3d1f28;   /* deep rose-dark — dark sections */
  --dark-bg-deep:    #2a1019;   /* near-black rose */

  /* ---- Type ---- */
  --font-display: 'Playfair Display', serif;
  --font-body:    'EB Garamond', serif;
  --font-label:   'Montserrat', sans-serif;

  /* ---- Layout ---- */
  --envelope-width: min(86vw, 380px);
  --section-pad-y: clamp(4rem, 9vw, 7rem);
  --container-width: 1100px;
}

/* ============================================================================
   RESET & BASE
============================================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow { max-width: 720px; }

/* ============================================================================
   FLOATING FLOWERS ANIMATION LAYER
============================================================================ */
.flowers-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  overflow: hidden;
}

.flower-petal {
  position: absolute;
  top: -60px;
  font-size: 1.4rem;
  opacity: 0;
  animation: floatDown linear infinite;
  user-select: none;
}

@keyframes floatDown {
  0%   { transform: translateY(-60px) rotate(0deg) translateX(0px); opacity: 0; }
  10%  { opacity: 0.7; }
  80%  { opacity: 0.5; }
  100% { transform: translateY(110vh) rotate(720deg) translateX(60px); opacity: 0; }
}

/* ============================================================================
   SHARED TYPOGRAPHY HELPERS
============================================================================ */
.eyebrow {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose-gold);
  text-align: center;
  margin: 0 0 0.75rem;
}

.eyebrow--light { color: var(--rose-gold-light); }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
  margin: 0;
  color: var(--dark-bg);
}

.section-title--light { color: var(--cream); }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  max-width: 220px;
  margin: 1.5rem auto 2.5rem;
}

.divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose-gold), transparent);
}

.divider--light span {
  background: linear-gradient(90deg, transparent, var(--rose-gold-light), transparent);
}

.diamond {
  width: 7px;
  height: 7px;
  border: 1px solid var(--rose-gold);
  transform: rotate(45deg);
  flex: none;
}

.divider--light .diamond { border-color: var(--rose-gold-light); }

/* ============================================================================
   DIGITAL ENVELOPE — PASTEL ROSE GOLD EDITION ✿
============================================================================ */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vh, 3.5rem);
  padding: 2rem;
  background-color: #2a1019;
  background-image: 
    radial-gradient(rgba(183, 110, 121, 0.2) 1px, transparent 1px),
    linear-gradient(135deg, #3d1f28 0%, #5a2836 100%);
  background-size: 32px 32px, 100% 100%;
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.6s, 
              visibility 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.6s;
  perspective: 1500px;
}

/* Decorative flowers on envelope screen */
.envelope-screen::before {
  content: '✿ ✾ ❀ ✿';
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(212, 160, 168, 0.4);
  font-size: 1.5rem;
  letter-spacing: 1.5rem;
  pointer-events: none;
}
.envelope-screen::after {
  content: '✿ ✾ ❀ ✿';
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(212, 160, 168, 0.4);
  font-size: 1.5rem;
  letter-spacing: 1.5rem;
  pointer-events: none;
}

.envelope-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope {
  position: relative;
  width: var(--envelope-width);
  aspect-ratio: 3 / 2;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.envelope__body {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #fdf0f3 0%, #f5dce2 100%);
  border: 1px solid rgba(183, 110, 121, 0.4);
  border-radius: 4px;
  box-shadow: 
    0 30px 80px -20px rgba(61, 31, 40, 0.6),
    inset 0 0 20px rgba(183, 110, 121, 0.05);
}

.envelope__card {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 86%;
  height: 76%;
  transform: translate(-50%, 0) translateZ(0);
  background: #fff8f9;
  border: 1px solid var(--rose-gold);
  border-radius: 2px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.1);
  transition: transform 1.3s cubic-bezier(0.19, 1, 0.22, 1) 0.4s,
              box-shadow 1.3s ease 0.4s;
}

.envelope__card-monogram {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  background: linear-gradient(135deg, #b76e79 0%, #f0c5cb 30%, #c4838d 55%, #f5d0d5 80%, #9e5a65 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 1px 1px rgba(183, 110, 121, 0.2));
  letter-spacing: 0.05em;
}

.envelope__card-rule {
  display: block;
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose-gold), transparent);
}

.envelope__card-date {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
  font-weight: 500;
}

.envelope__pocket {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(150deg, #fdf0f3 30%, #f0d0d8 100%);
  clip-path: polygon(0% 100%, 100% 100%, 50% 40%);
  border-top: 1px solid rgba(183, 110, 121, 0.3);
  box-shadow: inset 0 -10px 30px rgba(183, 110, 121, 0.05);
}

.envelope__flap {
  position: absolute;
  inset: 0;
  height: 60%;
  z-index: 3;
  background: linear-gradient(135deg, #7a3545 0%, #5a1e2c 100%);
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  transform-origin: top center;
  transform-style: preserve-3d;
  border-bottom: 1px solid rgba(183, 110, 121, 0.3);
  transition: transform 1s cubic-bezier(0.45, 0, 0.15, 1) 0.1s,
              z-index 0s linear 0.5s;
}

.seal {
  position: absolute;
  top: 40%;
  left: 50%;
  width: clamp(58px, 18vw, 76px);
  height: clamp(58px, 18vw, 76px);
  transform: translate(-50%, -50%) scale(1);
  z-index: 4;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  filter: drop-shadow(0 8px 16px rgba(61, 31, 40, 0.45));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.seal:hover { transform: translate(-50%, -50%) scale(1.08); }

.seal__half {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  background: radial-gradient(circle at 35% 30%, #c47080 0%, #8b4155 70%, #5a1e2c 100%);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), inset -2px -4px 10px rgba(0,0,0,0.4);
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1),
              opacity 0.6s ease 0.2s;
}

.seal::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: radial-gradient(circle at 35% 30%, #c47080 0%, #8b4155 80%);
  border-radius: 43% 57% 50% 50% / 40% 45% 55% 60%;
  z-index: -1;
  opacity: 0.85;
}

.seal__half--left {
  clip-path: polygon(0% 0%, 51% 0%, 49% 100%, 0% 100%);
  justify-content: flex-end;
  padding-right: 5px;
  background: linear-gradient(135deg, #b76e79 0%, #9e5a65 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.seal__half--left::after {
  content: 'I';
  position: absolute;
  right: 52%;
  font-family: var(--font-display);
  background: linear-gradient(135deg, #f0c5cb 0%, #c4838d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.seal__half--right {
  clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%);
  justify-content: flex-start;
  padding-left: 5px;
}
.seal__half--right::after {
  content: 'A';
  position: absolute;
  left: 52%;
  font-family: var(--font-display);
  background: linear-gradient(135deg, #f0c5cb 0%, #c4838d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.envelope.is-open .envelope__flap {
  transform: rotateX(180deg);
  z-index: 0;
}

.envelope.is-open .envelope__card {
  transform: translate(-50%, -75%) scale(1.05) translateZ(50px);
  box-shadow: 0 35px 60px -10px rgba(61, 31, 40, 0.5);
}

.envelope.is-open .seal__half--left {
  transform: translate(-180%, -20%) rotate(-45deg);
  opacity: 0;
}

.envelope.is-open .seal__half--right {
  transform: translate(180%, -20%) rotate(45deg);
  opacity: 0;
}

.envelope-screen__hint {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--rose-gold-light);
  text-align: center;
  margin: 0;
  opacity: 0.75;
  animation: hintPulse 2s infinite ease-in-out;
  transition: opacity 0.5s ease;
}

@keyframes hintPulse {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-5px); opacity: 0.9; }
}

.envelope-screen__hint.is-hidden { opacity: 0; }

/* ============================================================================
   HERO — PASTEL ROSE GOLD
============================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background-color: var(--dark-bg);
  background-image:
    radial-gradient(rgba(183, 110, 121, 0.15) 1px, transparent 1px),
    linear-gradient(160deg, #3d1f28 0%, #5a2836 50%, #3d1f28 100%);
  background-size: 30px 30px, 100% 100%;
  color: var(--cream);
  overflow: hidden;
}

/* Decorative flower corner */
.hero::before {
  content: '❀';
  position: absolute;
  top: 2rem; left: 2rem;
  font-size: 3rem;
  color: rgba(212, 160, 168, 0.25);
  animation: floatBob 4s ease-in-out infinite;
}
.hero::after {
  content: '✿';
  position: absolute;
  bottom: 5rem; right: 2rem;
  font-size: 2.5rem;
  color: rgba(212, 160, 168, 0.2);
  animation: floatBob 5s ease-in-out infinite 1s;
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(15deg); }
}

.hero__content {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__line {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s ease, transform 1s ease;
}

body.invitation-open .hero__line {
  opacity: 1;
  transform: translateY(0);
}

.hero__eyebrow {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose-gold-light);
  margin: 0 0 1.25rem;
  transition-delay: 0.1s;
}

.hero__names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 11vw, 6rem);
  line-height: 1.15;
  margin: 0;
}

.hero__name { display: block; }
.hero__names .hero__name:nth-of-type(1) { transition-delay: 0.25s; }
.hero__ampersand {
  display: block;
  font-style: italic;
  font-size: 0.55em;
  color: var(--rose-gold);
  margin: 0.1em 0;
  transition-delay: 0.4s;
}
.hero__names .hero__name:nth-of-type(3) { transition-delay: 0.55s; }

.hero__tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--cream-soft);
  margin: 1.75rem 0 0;
  max-width: 28ch;
  transition-delay: 0.7s;
}

.hero__divider {
  margin: 1.75rem auto 1.5rem;
  transition-delay: 0.85s;
}

.hero__date {
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-gold-light);
  margin: 0;
  transition-delay: 1s;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--rose-gold-light);
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero__scroll-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, var(--rose-gold-light), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50%      { transform: scaleY(1.2); opacity: 1; }
}

/* ============================================================================
   SCROLL-REVEAL SECTIONS
============================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

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

/* ============================================================================
   INVITATION BODY — BLUSH PASTEL
============================================================================ */
.invitation-body {
  padding: var(--section-pad-y) 0;
  background: linear-gradient(180deg, var(--cream) 0%, var(--blush) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* subtle flower bg pattern */
.invitation-body::before {
  content: '✿  ❀  ✾  ✿  ❀  ✾  ✿  ❀  ✾  ✿';
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 1rem;
  color: rgba(183, 110, 121, 0.12);
  letter-spacing: 1.2rem;
  pointer-events: none;
}

.invitation-body__text {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 1.5rem;
}

.invitation-body__signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--dark-bg);
  margin-top: 2rem;
}

/* ============================================================================
   EVENT DETAILS — DEEP ROSE
============================================================================ */
.events {
  padding: var(--section-pad-y) 0;
  background-color: var(--dark-bg);
  background-image: 
    radial-gradient(rgba(183, 110, 121, 0.12) 1px, transparent 1px);
  background-size: 30px 30px;
  position: relative;
  overflow: hidden;
}

.events::before {
  content: '❀';
  position: absolute;
  top: 1.5rem; right: 3rem;
  font-size: 4rem;
  color: rgba(212, 160, 168, 0.1);
  animation: floatBob 6s ease-in-out infinite;
}
.events::after {
  content: '✿';
  position: absolute;
  bottom: 1.5rem; left: 3rem;
  font-size: 3rem;
  color: rgba(212, 160, 168, 0.08);
  animation: floatBob 7s ease-in-out infinite 2s;
}

.events__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 1rem;
}

.event-card {
  background: rgba(253, 240, 243, 0.05);
  border: 1px solid rgba(183, 110, 121, 0.35);
  padding: 2.5rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.event-card:hover {
  border-color: var(--rose-gold);
  transform: translateY(-4px);
  background: rgba(183, 110, 121, 0.08);
}

.event-card__time {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin: 0 0 0.4rem;
}

.event-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--cream);
  margin: 0;
}

.event-card__venue {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--rose-gold-light);
  margin: 0;
}

.event-card__address,
.event-card__note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--cream-soft);
  margin: 0;
  opacity: 0.85;
}

/* ============================================================================
   MAP SECTION
============================================================================ */
.map-section {
  padding: var(--section-pad-y) 0;
  background: linear-gradient(180deg, var(--blush) 0%, var(--lavender) 100%);
  text-align: center;
}

.map-section__text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 2.25rem;
}

.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rose-gold);
  background: var(--cream);
  box-shadow: 0 20px 50px -25px rgba(139, 79, 90, 0.35);
  overflow: hidden;
}

.map-frame__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: sepia(25%) saturate(85%) hue-rotate(300deg) contrast(95%);
}

.map-section__address {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 1.5rem;
}

/* ============================================================================
   COUNTDOWN — DEEP ROSE BG
============================================================================ */
.countdown {
  padding: var(--section-pad-y) 0;
  background-color: var(--dark-bg-deep);
  background-image: 
    radial-gradient(rgba(183, 110, 121, 0.15) 1px, transparent 1px);
  background-size: 30px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown::before {
  content: '✿ ❀ ✾ ❀ ✿';
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: rgba(212, 160, 168, 0.2);
  letter-spacing: 1.5rem;
  white-space: nowrap;
}

.countdown__grid {
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.75rem);
  flex-wrap: wrap;
  margin-top: 1rem;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: clamp(72px, 22vw, 110px);
  aspect-ratio: 1;
  border: 1px solid rgba(183, 110, 121, 0.45);
  background: rgba(183, 110, 121, 0.06);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.countdown__item:hover {
  border-color: var(--rose-gold);
  transform: scale(1.05);
}

.countdown__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  color: var(--rose-gold-light);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-family: var(--font-label);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream-soft);
  opacity: 0.8;
}

.countdown__note {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--cream-soft);
  margin-top: 2.5rem;
}

/* ============================================================================
   FOOTER
============================================================================ */
.site-footer {
  padding: var(--section-pad-y) 0 3.5rem;
  background: linear-gradient(180deg, var(--blush-soft) 0%, var(--cream) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '✿  ❀  ✾  ✿  ❀';
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: rgba(183, 110, 121, 0.15);
  letter-spacing: 1.5rem;
  white-space: nowrap;
}

.site-footer__monogram {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.2rem, 6vw, 3rem);
  color: var(--dark-bg);
  margin: 0;
}

.site-footer__monogram span {
  color: var(--rose-gold);
  font-style: normal;
  margin: 0 0.2em;
}

.site-footer__text {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0;
}

.site-footer__contact {
  font-family: var(--font-label);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--dark-bg);
  margin: 0.5rem 0 2rem;
}

.site-footer__credit {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  opacity: 0.8;
  margin: 0;
}

/* ============================================================================
   RESPONSIVE
============================================================================ */
@media (max-width: 860px) {
  .events__grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  .hero { padding: 5rem 1.25rem 4rem; }
  .countdown__grid { gap: 0.6rem; }
  .countdown__item { width: 22vw; }
}

/* ============================================================================
   ACCESSIBILITY
============================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .envelope__flap,
  .envelope__card,
  .seal__half,
  .envelope-screen,
  .hero__line,
  .reveal,
  .hero__scroll-line,
  .flower-petal {
    transition: none !important;
    animation: none !important;
  }
  .hero__line, .reveal { opacity: 1; transform: none; }
}

/* ============================================================================
   LANGUAGE SWITCHER
============================================================================ */
.lang-switcher {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 1100;
  font-family: var(--font-label);
}

.lang-switcher__toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(183, 110, 121, 0.45);
  border-radius: 999px;
  background: rgba(253, 246, 248, 0.92);
  backdrop-filter: blur(6px);
  color: var(--dark-bg);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.lang-switcher__toggle:hover,
.lang-switcher__toggle:focus-visible {
  border-color: var(--rose-gold);
  outline: none;
}

.lang-switcher__icon { font-size: 0.9rem; line-height: 1; }

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--cream);
  border: 1px solid rgba(183, 110, 121, 0.35);
  border-radius: 10px;
  box-shadow: 0 16px 40px -16px rgba(61, 31, 40, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.lang-switcher.is-open .lang-switcher__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__menu li {
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-switcher__menu li:hover,
.lang-switcher__menu li:focus-visible {
  background: var(--blush-soft);
  color: var(--dark-bg);
  outline: none;
}

.lang-switcher__menu li[aria-selected="true"] {
  color: var(--rose-gold);
  font-weight: 500;
}

@media (max-width: 480px) {
  .lang-switcher { top: 0.85rem; right: 0.85rem; }
  .lang-switcher__toggle { padding: 0.45rem 0.75rem; font-size: 0.68rem; }
}

/* ============================================================================
   ARABIC RTL
============================================================================ */
html[lang="ar"] {
  --font-display: 'Aref Ruqaa', serif;
  --font-body:    'Tajawal', sans-serif;
  --font-label:   'Tajawal', sans-serif;
}

body.lang-ar .eyebrow,
body.lang-ar .hero__eyebrow,
body.lang-ar .hero__date,
body.lang-ar .hero__scroll,
body.lang-ar .event-card__time,
body.lang-ar .countdown__label,
body.lang-ar .map-section__address,
body.lang-ar .envelope__card-date,
body.lang-ar .envelope-screen__hint,
body.lang-ar .site-footer__contact,
body.lang-ar .lang-switcher__toggle {
  letter-spacing: 0.02em;
  text-transform: none;
}

body.lang-ar .invitation-body__text,
body.lang-ar .map-section__text,
body.lang-ar .event-card__address,
body.lang-ar .event-card__note {
  line-height: 2;
}

html[dir="rtl"] .lang-switcher { right: auto; left: 1.1rem; }
html[dir="rtl"] .lang-switcher__menu { right: auto; left: 0; }

@media (max-width: 480px) {
  html[dir="rtl"] .lang-switcher { left: 0.85rem; }
}
