:root {
  --english-font: Arial, Helvetica, sans-serif;
  --script-font: Arial, Helvetica, sans-serif;
  --arabic-font: Arial, Helvetica, sans-serif;

  --off-white: #ffffff;
  --soft-beige: #ffffff;
  --paper-beige: #ffffff;

  --gold: #9b7b4d;
  --text-dark: #5f564d;
  --text-soft: #8b8178;
  --location-text: #747063;
  --location-line: #b8b0a4;
  --button-text: #6b6258;

  --logo-rose: #cf7f87;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: #ffffff;
}

body {
  font-family: var(--english-font);
  color: var(--text-dark);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

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: #ffffff;
}

.full-media {
  width: 100%;
  height: 100%;
  display: block;
  background: #ffffff;
}

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

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

.hidden {
  display: none !important;
}

/* =========================
   Smooth Scroll Section Transitions
========================= */

.section-animate {
  opacity: 1;
  transform: none;
  filter: none;
  will-change: auto;
}

.section-animate .countdown-logo,
.section-animate .countdown-box,
.section-animate .luxury-rsvp-card,
.section-animate .location-logo,
.section-animate .map-card,
.section-animate .maps-button {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
  will-change: opacity, transform;
}

.section-visible .countdown-logo,
.section-visible .luxury-rsvp-card,
.section-visible .location-logo {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.section-visible .countdown-box:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.08s;
}

.section-visible .countdown-box:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.14s;
}

.section-visible .countdown-box:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.section-visible .countdown-box:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.26s;
}

.section-visible .map-card {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.16s;
}

.section-visible .maps-button {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.24s;
}

.image-full-section.section-animate img {
  transform: scale(1.018);
  transition: transform 0.9s ease;
  will-change: transform;
}

.image-full-section.section-visible img {
  transform: scale(1);
}

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

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

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

#introScreen.fade-out-intro {
  animation: introFadeOut 1s 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);
  font-weight: 400;
  letter-spacing: 3px;
  line-height: 1.8;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.75);
  z-index: 5;
}

.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: #ffffff;
  overflow: hidden;
}

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

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

.vintage-countdown-section {
  width: 100%;
  min-height: auto;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 58px 28px 34px;
  overflow: hidden;
}

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

.countdown-title {
  margin: 0 0 42px;
  color: #111111;
  font-family: "Great Vibes", "Times New Roman", serif;
  font-size: clamp(38px, 11vw, 58px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.5px;
}

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

.countdown-box {
  min-height: 122px;
  background: #172112;
  border-radius: 10px;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.countdown-box span {
  display: block;
  color: #ffffff;
  font-family: "Courier New", monospace;
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: 9px;
  padding-left: 9px;
}

.countdown-box small {
  display: block;
  color: #ffffff;
  font-family: "Courier New", monospace;
  font-size: clamp(14px, 3.8vw, 18px);
  font-weight: 400;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 2px;
}
/* =========================
   Luxury RSVP Section
========================= */

.rsvp-section {
  width: 100%;
  min-height: auto;
  background: #ffffff;
  padding: 18px 22px 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.luxury-rsvp-section {
  background: #ffffff;
}

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

.luxury-rsvp-card {
  position: relative;
  width: 100%;
  padding: 42px 24px 40px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #172112;
  border-radius: 28px;
  box-shadow: none;
  backdrop-filter: none;
}

.luxury-rsvp-card::before,
.luxury-rsvp-card::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  border-color: #172112;
  border-style: solid;
  pointer-events: none;
  opacity: 0.45;
}

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

.luxury-rsvp-card h2 {
  margin: 0;
  color: #172112;
  font-family: var(--english-font);
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 1.2px;
}

.rsvp-subtitle {
  margin: 12px 0 28px;
  color: rgba(23, 33, 18, 0.68);
  font-family: var(--english-font);
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 400;
  line-height: 1.8;
}

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

.rsvp-choice-btn {
  min-width: 150px;
  padding: 13px 20px;
  border: 1px solid #172112;
  border-radius: 999px;
  background: #ffffff;
  color: #172112;
  font-family: var(--english-font);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.rsvp-choice-btn.secondary {
  background: #ffffff;
  color: #172112;
}

.rsvp-choice-btn.active {
  background: #172112;
  color: #ffffff;
  border-color: #172112;
  transform: translateY(-2px);
}

.luxury-rsvp-form {
  width: 100%;
  margin-top: 28px;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.45s ease,
    max-height 0.55s ease,
    transform 0.45s ease;
}

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

.luxury-rsvp-form.show-form {
  display: block;
  opacity: 1;
  max-height: 900px;
  transform: translateY(0);
}

.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(23, 33, 18, 0.55),
    transparent
  );
}

.rsvp-form-title {
  margin: 0 0 18px;
  color: rgba(23, 33, 18, 0.68);
  font-family: var(--english-font);
  font-size: 14px;
  letter-spacing: 0.3px;
}

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

.luxury-rsvp-form input,
.luxury-rsvp-form textarea,
.luxury-rsvp-form select {
  width: 100%;
  padding: 14px 17px;
  border: 1px solid #172112;
  border-radius: 16px;
  background: #ffffff;
  color: #172112;
  font-family: var(--english-font);
  font-size: 15px;
  text-align: left;
  direction: ltr;
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.luxury-rsvp-form select {
  appearance: none;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, #172112 50%),
    linear-gradient(135deg, #172112 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 11px) 50%;
  background-size:
    7px 7px,
    7px 7px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.luxury-rsvp-form input::placeholder,
.luxury-rsvp-form textarea::placeholder {
  color: rgba(23, 33, 18, 0.48);
}

.luxury-rsvp-form input:focus,
.luxury-rsvp-form textarea:focus,
.luxury-rsvp-form select:focus {
  border-color: #172112;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(23, 33, 18, 0.08);
}

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

.submit-rsvp {
  width: 100%;
  margin-top: 6px;
  padding: 15px 24px;
  border: 1px solid #172112;
  border-radius: 999px;
  background: #ffffff;
  color: #172112;
  font-family: var(--english-font);
  font-size: 16px;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.submit-rsvp:hover {
  transform: translateY(-2px);
  background: #172112;
  color: #ffffff;
}

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

.rsvp-status {
  margin-top: 16px;
  color: #172112;
  font-family: var(--english-font);
  font-size: 14px;
  line-height: 1.7;
}

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

.rsvp-status.success {
  color: #4f7a55;
}

.rsvp-submitted-message {
  margin-top: 22px;
  padding: 18px 14px;
  border: 1px solid #172112;
  border-radius: 18px;
  background: #ffffff;
  color: #172112;
  font-family: var(--english-font);
}

.submitted-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 1px solid #172112;
  background: #ffffff;
  color: #172112;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 18px;
}

.children-note {
  margin: -12px auto 28px;
  max-width: 330px;
  color: rgba(23, 33, 18, 0.68);
  font-family: var(--english-font);
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.3px;
  opacity: 0.8;
}

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

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

.location-bg-image {
  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:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.32) 0%,
      rgba(0, 0, 0, 0.12) 26%,
      rgba(0, 0, 0, 0.08) 100%
    );
  z-index: 1;
}

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

.location-content-lower {
  padding-top: 28px;
}

.location-title {
  margin: 0 0 28px;
  color: #ffffff;
  font-family: var(--english-font);
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 1.4px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.map-card {
  width: 88%;
  max-width: 315px;
  aspect-ratio: 1.45 / 1;
  margin: 0 auto;
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
}

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

.maps-button {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
  font-family: var(--english-font);
  font-size: clamp(12px, 3vw, 14px);
  letter-spacing: 0.4px;
  backdrop-filter: blur(4px);
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

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

.white-transition {
  position: fixed;
  inset: 0;
  background: #ffffff;
  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: 30px 24px 70px;
  }

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

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

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

  .location-logo {
    width: min(76%, 235px);
    margin-bottom: 20px;
  }

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

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

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

  .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,
  .luxury-rsvp-form select {
    font-size: 14px;
  }
}

/* =========================
   Reduce Motion
========================= */

@media (prefers-reduced-motion: reduce) {
  .section-animate,
  .section-animate .countdown-logo,
  .section-animate .countdown-box,
  .section-animate .luxury-rsvp-card,
  .section-animate .location-logo,
  .section-animate .map-card,
  .section-animate .maps-button,
  .image-full-section.section-animate img {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

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

@media (min-width: 1024px) {
  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: #ffffff;
  }
}

.location-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Same style as Google Maps button */
.road-video-button {
  display: inline-block;
  padding: 8px 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
  font-family: var(--english-font);
  font-size: clamp(12px, 3vw, 14px);
  letter-spacing: 0.4px;
  backdrop-filter: blur(4px);
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

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

.location-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  min-height: calc(100dvh - 112px);
  margin: 0 auto;
  text-align: center;
  color: #ffffff;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.location-title {
  margin: 28px 0 28px;
  color: #ffffff;
  font-family: "Times New Roman", serif;
  font-size: clamp(25px, 6.5vw, 34px);
  font-weight: 100;
  line-height: 1.8;
  letter-spacing: 1px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.arabic-location-title {
  font-family: "Simplified Arabic", "Tahoma", "Arial", sans-serif;
  font-weight: 100;
  letter-spacing: 0.5px;
}

.map-card {
  width: 88%;
  max-width: 315px;
  aspect-ratio: 1.45 / 1;
  margin: 0 auto;
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
}

.location-buttons {
  margin-top: auto;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}