: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;

  --card-green: #123322;
  --card-gold: #b58a3c;
  --card-soft-green: rgba(18, 51, 34, 0.68);
  --card-light-gold: rgba(181, 138, 60, 0.35);
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  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;
  margin: 0;
  padding: 0;
  border: 0;
}

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

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

.hidden {
  display: none !important;
}

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

.screen {
  width: 100vw;
  height: 100dvh;
  min-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;
}

/* =========================
   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: 600;
  letter-spacing: 1.6px;
  line-height: 1.7;
  z-index: 5;
}

#firstVideo {
  opacity: 1;
  pointer-events: none;
}

#firstVideo,
#mainVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  background: #ffffff;
}

#introScreen,
#mainVideoScreen {
  background: #ffffff;
}

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

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

.scroll-text {
  position: absolute;
  bottom: calc(28px + env(safe-area-inset-bottom));
  left: 0;
  width: 100%;
  text-align: center;
  color: #ffffff;
  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.45);
  animation: softPulse 2.2s ease-in-out infinite;
  z-index: 5;
}

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

/* =========================
   Full Image Sections
   The image height is automatic so the full image is shown.
   This removes gaps between image sections without cropping.
========================= */

.image-full-section,
.timeline-section,
.dresscode-section {
  width: 100%;
  height: auto;
  min-height: 0;
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.image-full-section img,
.timeline-section img,
.dresscode-section img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center center;
  margin: 0;
  padding: 0;
  border: 0;
  background: #ffffff;
}

/* =========================
   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,
.timeline-section.section-animate img,
.dresscode-section.section-animate img,
.image-full-section.section-visible img,
.timeline-section.section-visible img,
.dresscode-section.section-visible img {
  transform: none;
  transition: none;
  will-change: auto;
}

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

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

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

.countdown-title {
  margin: 0 0 42px;
  color: var(--card-green);
  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: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.countdown-box span {
  display: block;
  color: var(--card-green);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: 2px;
  padding-left: 0;
}

.countdown-box small {
  display: block;
  color: var(--card-green);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(14px, 3.8vw, 18px);
  font-weight: 400;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 1px;
}

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

.rsvp-section {
  width: 100%;
  height: auto;
  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: none;
  border-radius: 28px;
  box-shadow: none;
  backdrop-filter: none;
}

.luxury-rsvp-card::before,
.luxury-rsvp-card::after {
  display: none;
}

.luxury-rsvp-card h2 {
  margin: 0;
  color: var(--card-green);
  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: var(--card-soft-green);
  font-family: var(--english-font);
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 400;
  line-height: 1.8;
}

.children-note {
  margin: -12px auto 28px;
  max-width: 330px;
  color: var(--card-soft-green);
  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;
}

.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 var(--card-green);
  border-radius: 999px;
  background: #ffffff;
  color: var(--card-green);
  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 {
  border: 1px solid var(--card-green);
  background: #ffffff;
  color: var(--card-green);
}

.rsvp-choice-btn.active,
.rsvp-choice-btn:hover {
  background: var(--card-green);
  color: #ffffff;
  border-color: var(--card-green);
  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,
    var(--card-gold),
    transparent
  );
}

.rsvp-form-title {
  margin: 0 0 18px;
  color: var(--card-soft-green);
  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 var(--card-green);
  border-radius: 16px;
  background: #ffffff;
  color: var(--card-green);
  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 input::placeholder,
.luxury-rsvp-form textarea::placeholder {
  color: rgba(18, 51, 34, 0.45);
}

.luxury-rsvp-form input:focus,
.luxury-rsvp-form textarea:focus,
.luxury-rsvp-form select:focus {
  background-color: #ffffff;
  border-color: var(--card-green);
  box-shadow: 0 0 0 4px rgba(18, 51, 34, 0.08);
}

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

.luxury-rsvp-form select,
#guestsCount {
  height: 50px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--card-green) 50%),
    linear-gradient(135deg, var(--card-green) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 13px) 50%;
  background-size:
    7px 7px,
    7px 7px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

#guestsCountWrapper {
  width: 100%;
}

#guestsCount option {
  color: var(--card-green);
  background: #ffffff;
  font-family: var(--english-font);
}

.submit-rsvp {
  width: 100%;
  margin-top: 6px;
  padding: 15px 24px;
  border: 1px solid var(--card-green);
  border-radius: 999px;
  background: #ffffff;
  color: var(--card-green);
  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,
    border-color 0.25s ease;
}

.submit-rsvp:hover {
  transform: translateY(-2px);
  background: var(--card-green);
  color: #ffffff;
  border-color: var(--card-green);
}

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

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

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

.rsvp-status.success {
  color: var(--card-green);
}

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

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

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

.location-section {
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #ffffff;
}

.location-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  z-index: 1;
  background: #ffffff;
}

.location-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 2;
  pointer-events: none;
}

.location-view-map-button {
  position: absolute;
  left: 50%;
  bottom: 20.5%;
  transform: translateX(-50%);
  z-index: 5;

  min-width: 175px;
  height: 46px;
  padding: 0 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border-radius: 999px;
  border: 1px solid rgba(190, 167, 125, 0.5);
  background: rgba(255, 255, 255, 0.86);

  color: #6f745e;
  text-decoration: none;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3px;
  white-space: nowrap;

  box-shadow:
    0 10px 25px rgba(115, 95, 62, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75);

  backdrop-filter: blur(4px);
}

.location-view-map-button span:last-child {
  display: inline-block;
  white-space: nowrap;
}

.map-pin-icon {
  width: 20px;
  height: 20px;
  color: #c2a36c;
  flex: 0 0 auto;
}

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

.map-pin-icon path,
.map-pin-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.location-view-map-button:hover {
  transform: translateX(-50%) translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
}

/* Old location content classes kept safe in case they exist in HTML */
.location-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  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: none;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
}

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

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

.location-kids-note {
  width: 88%;
  max-width: 320px;
  margin: 18px auto 0;
  color: #ffffff;
  font-family: var(--arabic-font);
  font-size: clamp(13px, 3.3vw, 15px);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.2px;
  text-align: center;
  opacity: 0.9;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

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

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

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

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

  .location-view-map-button {
    bottom: 20%;
    min-width: 165px;
    height: 44px;
    font-size: 11px;
    letter-spacing: 2.5px;
  }

  .map-pin-icon {
    width: 18px;
    height: 18px;
  }

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

/* =========================
   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,
  .timeline-section.section-animate img,
  .dresscode-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;
  }
}

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

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

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

@keyframes textFadeOut {
  from {
    opacity: 1;
  }

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

@keyframes introFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

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

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

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

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

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