@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;
  --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);
  animation: softPulse 2.2s ease-in-out infinite;
  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(160px, 65vw, 280px);
  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: #f4f2ed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(155, 123, 77, 0.04);
  box-shadow: none;
}

.countdown-box span {
  display: block;
  font-family: var(--arabic-font);
  color: var(--gold-soft);
  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(--gold-soft);
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 1px;
}

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

.location-section {
  width: 100%;
  min-height: 100dvh;
  background-image: url("assets/download (3).png");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  padding: calc(54px + env(safe-area-inset-top)) 24px calc(42px + env(safe-area-inset-bottom));
}

.location-content {
  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 1px;
  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(14px, 3.8vw, 18px);
  line-height: 1.65;
  letter-spacing: 0.4px;
  color: #81766d;
  margin-bottom: 22px;
}

.map-card {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1.55 / 1;
  margin: 0 auto;
  overflow: hidden;
  background: white;
  border: none;
  box-shadow: none;
}

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

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

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

.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;
}

/* =========================
   Luxury Vintage RSVP Section
========================= */

.rsvp-section {
  width: 100%;
  min-height: 100dvh;
  background: var(--off-white);
  padding: calc(54px + env(safe-area-inset-top)) 24px calc(54px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
}

.luxury-rsvp-section {
  min-height: 100vh;
  padding: 90px 20px;
  background:
    radial-gradient(circle at top, rgba(255, 248, 232, 0.95), rgba(246, 241, 234, 0.96)),
    linear-gradient(135deg, #f6f1ea, #efe4d7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rsvp-content {
  width: 100%;
  max-width: 430px;
  text-align: center;
}

.luxury-rsvp-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 46px 28px 42px;
  text-align: center;
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid rgba(138, 134, 96, 0.35);
  border-radius: 28px;
  box-shadow:
    0 24px 70px rgba(58, 44, 30, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  animation: rsvpCardEnter 1s ease both;
}

.luxury-rsvp-card::before,
.luxury-rsvp-card::after {
  content: "";
  position: absolute;
  width: 82px;
  height: 82px;
  border-color: rgba(138, 134, 96, 0.55);
  border-style: solid;
  pointer-events: none;
}

.luxury-rsvp-card::before {
  top: 16px;
  right: 16px;
  border-width: 1px 1px 0 0;
  border-radius: 0 18px 0 0;
}

.luxury-rsvp-card::after {
  bottom: 16px;
  left: 16px;
  border-width: 0 0 1px 1px;
  border-radius: 0 0 0 18px;
}

.rsvp-ornament {
  color: #8a8660;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.95;
}

.luxury-rsvp-card h2 {
  margin: 0;
  color: #4b3b2c;
  font-family: var(--arabic-font);
  font-size: clamp(30px, 7vw, 48px);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.rsvp-subtitle {
  margin: 12px 0 30px;
  color: #7b6a58;
  font-family: var(--arabic-font);
  font-size: 16px;
  line-height: 1.9;
}

.rsvp-choice {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.rsvp-choice-btn {
  min-width: 150px;
  padding: 14px 22px;
  border: 1px solid rgba(138, 134, 96, 0.65);
  border-radius: 999px;
  background: linear-gradient(135deg, #8a8660, #b8a875);
  color: #fff;
  font-family: var(--arabic-font);
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(138, 134, 96, 0.22);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease,
    color 0.35s ease;
}

.rsvp-choice-btn.secondary {
  background: transparent;
  color: #6c604c;
}

.rsvp-choice-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(138, 134, 96, 0.28);
}

.rsvp-choice-btn.active {
  background: linear-gradient(135deg, #6f6a48, #9c9063);
  color: #fff;
  transform: translateY(-2px) scale(1.02);
}

.luxury-rsvp-form {
  width: 100%;
  margin-top: 30px;
  overflow: hidden;
}

.luxury-rsvp-form.hidden {
  display: none;
}

.luxury-rsvp-form.show-form {
  display: block;
  animation: formReveal 0.75s ease both;
}

.form-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 22px;
}

.form-divider span {
  width: 150px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(138, 134, 96, 0.75),
    transparent
  );
}

.rsvp-form-title {
  margin: 0 0 18px;
  color: #7b6a58;
  font-family: var(--arabic-font);
  font-size: 14px;
}

.form-group {
  width: 100%;
  margin-bottom: 14px;
}

.luxury-rsvp-form input,
.luxury-rsvp-form textarea {
  width: 100%;
  padding: 14px 17px;
  border: 1px solid rgba(138, 134, 96, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: #4b3b2c;
  font-family: var(--arabic-font);
  font-size: 15px;
  text-align: right;
  outline: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.luxury-rsvp-form input::placeholder,
.luxury-rsvp-form textarea::placeholder {
  color: rgba(75, 59, 44, 0.55);
}

.luxury-rsvp-form input:focus,
.luxury-rsvp-form textarea:focus {
  border-color: rgba(138, 134, 96, 0.8);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 4px rgba(138, 134, 96, 0.12);
}

.luxury-rsvp-form textarea {
  min-height: 100px;
  resize: vertical;
}

.submit-rsvp {
  width: 100%;
  margin-top: 6px;
  padding: 15px 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #4b3b2c, #8a8660);
  color: #fff;
  font-family: var(--arabic-font);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(75, 59, 44, 0.22);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    opacity 0.3s ease;
}

.submit-rsvp:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(75, 59, 44, 0.28);
}

.submit-rsvp:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.rsvp-status {
  margin-top: 16px;
  color: #6f6a48;
  font-family: var(--arabic-font);
  font-size: 14px;
  line-height: 1.8;
}

.rsvp-status.error {
  color: #9f3b3b;
}

.rsvp-status.success {
  color: #5f6f48;
}

.luxury-rsvp-section.submitted {
  animation: rsvpSectionExit 1s ease forwards;
}

/* =========================
   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.7s 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;
  }
}

@keyframes rsvpCardEnter {
  from {
    opacity: 0;
    transform: translateY(36px) scale(0.97);
  }

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

@keyframes formReveal {
  from {
    opacity: 0;
    transform: translateY(-12px);
    max-height: 0;
  }

  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 700px;
  }
}

@keyframes rsvpSectionExit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 1200px;
  }

  100% {
    opacity: 0;
    transform: translateY(-35px) scale(0.96);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
  }
}

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

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

  .countdown-logo {
    width: clamp(175px, 66vw, 280px);
    margin-bottom: 36px;
  }

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

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

  .map-card {
    max-width: 330px;
  }

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

  .rsvp-section {
    padding: 44px 22px 46px;
  }
}

/* =========================
   RSVP Mobile Adjustments
========================= */

@media (max-width: 600px) {
  .luxury-rsvp-section {
    padding: 70px 16px;
  }

  .luxury-rsvp-card {
    padding: 38px 20px 36px;
    border-radius: 24px;
  }

  .rsvp-choice {
    flex-direction: column;
  }

  .rsvp-choice-btn {
    width: 100%;
  }

  .luxury-rsvp-form input,
  .luxury-rsvp-form textarea {
    font-size: 14px;
  }
}

/* =========================
   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;
  }
}