@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Cormorant+Garamond:wght@300;400;500;600&display=swap');

:root {
  --english-font: "Cormorant Garamond", serif;
  --script-font: "Great Vibes", cursive;
  --arabic-font: "Simplified Arabic Fixed", "Simplified Arabic", "Tahoma", "Arial", sans-serif;

  --off-white: #fbfaf6;
  --soft-beige: #f7f4ee;
  --gold: #9b7b4d;
  --gold-soft: #8a7a56;
  --logo-rose: #cf7f87;
  --text-dark: #5f564d;
  --text-soft: #8b8178;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--soft-beige);
}

body {
  font-family: var(--english-font);
  color: #6f6458;
}

section {
  margin: 0;
  padding: 0;
}

img,
video {
  display: block;
}

body.lock-scroll {
  overflow: hidden;
  height: 100dvh;
}

body.ready-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
}

/* =========================
   Full Screen Video Sections
========================= */

.screen {
  width: 100vw;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  background: var(--soft-beige);
}

.full-media {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--soft-beige);
}

.cover-media {
  object-fit: cover;
}

.contain-media {
  object-fit: contain;
}

.hidden {
  display: none !important;
}

/* =========================
   Intro Video
========================= */

.click-text {
  position: absolute;
  bottom: calc(72px + env(safe-area-inset-bottom));
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--gold);
  font-family: var(--english-font);
  font-size: clamp(16px, 4.5vw, 19px);
  letter-spacing: 2px;
  line-height: 1.7;
  animation: softPulse 2.2s ease-in-out infinite;
  z-index: 5;
}

.click-text .arabic,
.arabic {
  font-family: var(--arabic-font);
}

.click-text.fade-out {
  animation: textFadeOut 0.6s ease forwards;
}

#introScreen.fade-out-intro {
  animation: introFadeOut 3s ease forwards;
}

/* =========================
   Main Loop Video
========================= */

#mainVideoScreen {
  transform: translateY(100%);
  opacity: 0;
  overflow: hidden;
}

#mainVideoScreen.slide-up {
  animation: slideUpFade 0.45s ease-out forwards;
}

#mainVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transform-origin: center center;
  pointer-events: none;
}

.scroll-text {
  position: absolute;
  bottom: calc(28px + env(safe-area-inset-bottom));
  left: 0;
  width: 100%;
  text-align: center;
  color: white;
  font-family: var(--english-font);
  font-size: clamp(12px, 3.4vw, 15px);
  letter-spacing: 3px;
  line-height: 1.8;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.75);
  z-index: 5;
}

.scroll-text .arabic {
  font-family: var(--arabic-font);
}

.scroll-text span {
  display: block;
  font-size: 20px;
}

/* =========================
   Invitation Image Section
========================= */

.image-full-section {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft-beige);
  overflow: hidden;
}

.image-full-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   Vintage Countdown Section
========================= */

.vintage-countdown-section {
  width: 100%;
  min-height: 500px;
  background: #fbfaf6;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 28px 80px;
  overflow: hidden;
}

.countdown-inner {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  text-align: center;
}

.countdown-logo {
  width: clamp(225px, 88vw, 360px);
  height: auto;
  margin: 0 auto 42px;
  display: block;
  object-fit: contain;
  opacity: 0.95;
}

.countdown-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 22px;
}

.countdown-box {
  min-height: 104px;
  background: rgba(207, 127, 135, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(207, 127, 135, 0.35);
  box-shadow: none;
}

.countdown-box span {
  display: block;
  font-family: var(--arabic-font);
  color: var(--logo-rose);
  font-size: clamp(34px, 10vw, 48px);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.countdown-box small {
  display: block;
  font-family: var(--arabic-font);
  color: var(--logo-rose);
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 1px;
}

/* =========================
   RSVP Removed
========================= */

.rsvp-section,
.luxury-rsvp-section {
  display: none !important;
}

/* =========================
   Location Section
========================= */

.location-section {
  width: 100%;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  padding: calc(54px + env(safe-area-inset-top)) 24px calc(42px + env(safe-area-inset-bottom));
}

.location-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

.location-overlay {
  position: absolute;
  inset: 0;
  background: rgba(251, 250, 246, 0.28);
  z-index: 1;
}

.location-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  text-align: center;
  color: #6b6258;
}

.location-content h2 {
  font-family: var(--script-font);
  font-size: clamp(42px, 13vw, 60px);
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  color: #81766d;
  margin-bottom: 24px;
}

.location-pin {
  width: 25px;
  height: 25px;
  margin: 0 auto 8px;
  color: #8f806f;
}

.location-pin svg {
  width: 100%;
  height: 100%;
  display: block;
}

.location-pin path,
.location-pin circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.venue-text {
  font-family: var(--arabic-font);
  font-size: clamp(17px, 4.5vw, 22px);
  line-height: 1.75;
  letter-spacing: 0.3px;
  color: #81766d;
  margin-bottom: 22px;
  direction: rtl;
}

.map-card {
  width: 88%;
  max-width: 315px;
  aspect-ratio: 1.45 / 1;
  margin: 0 auto;
  overflow: hidden;
  background: white;
  border-radius: 18px;
  border: 1px solid rgba(129, 118, 109, 0.18);
  box-shadow: 0 12px 28px rgba(70, 58, 48, 0.14);
}

.map-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.maps-button {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 22px;
  border: 1px solid rgba(95, 86, 77, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: #6b6258;
  text-decoration: none;
  font-family: var(--arabic-font);
  font-size: clamp(12px, 3vw, 14px);
  letter-spacing: 0.4px;
  backdrop-filter: blur(4px);
}

.rsvp-text {
  margin-top: 38px;
  font-family: var(--arabic-font);
  font-size: clamp(15px, 3.6vw, 16px);
  line-height: 1.65;
  letter-spacing: 0.4px;
  color: #867c73;
  direction: rtl;
}

.rsvp-text p + p {
  margin-top: 14px;
}

.location-section[dir="rtl"] .location-content,
.location-section[dir="rtl"] .venue-text,
.location-section[dir="rtl"] .rsvp-text {
  text-align: center;
  direction: rtl;
}

.location-section[dir="rtl"] .maps-button {
  direction: rtl;
}

/* =========================
   White Transition
========================= */

.white-transition {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

.white-transition.show {
  display: block !important;
  animation: whiteFlash 0.2s ease forwards;
}

/* =========================
   Animations
========================= */

@keyframes softPulse {
  0% {
    opacity: 0.45;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-6px);
  }

  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
}

@keyframes textFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes introFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes slideUpFade {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes whiteFlash {
  0% {
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* =========================
   Small Phone Adjustments
========================= */

@media (max-width: 390px) {
  .vintage-countdown-section {
    padding: 60px 24px 70px;
  }

  .countdown-logo {
    width: clamp(205px, 76vw, 320px);
    margin-bottom: 36px;
  }

  .countdown-grid {
    gap: 18px 18px;
  }

  .countdown-box {
    min-height: 96px;
  }

  .map-card {
    width: 90%;
    max-width: 320px;
  }

  .rsvp-text {
    margin-top: 36px;
  }
}

/* =========================
   Mobile Only Website
========================= */

@media (min-width: 768px) {
  body > * {
    display: none !important;
  }

  body::before {
    content: "Please open this invitation on a mobile phone.";
    display: flex;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 20px;
    color: #8b6a3e;
    background: #efe8dc;
  }
}