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

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

  --off-white: #fbfaf6;
  --soft-beige: #f7f4ee;
  --paper-beige: #f0e9df;
  --gold: #9b7b4d;
  --text-dark: #5f564d;
  --text-soft: #8b8178;
  --location-text: #747063;
  --location-line: #b8b0a4;
}

* {
  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;
}

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

.hidden {
  display: none !important;
}

/* Intro click text */
.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);
}

/* Main video */
#mainVideoScreen {
  transform: translateY(100%);
  opacity: 0;
}

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

#mainVideo {
  pointer-events: none;
}

.fade-out-video {
  animation: videoFadeOut 3s ease forwards;
}

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

/* Countdown section */
.countdown-section {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  background: #d8cdbc;
  background-image: url("assets/countdown-bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(25, 20, 16, 0.08);
  z-index: 1;
  pointer-events: none;
}

.countdown-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-stack {
  width: min(100%, 320px);
  min-height: 58%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(65px, 12vh, 120px);
  color: #ffffff;
  text-align: center;
  transform: translateY(-2px);
}

.countdown-item {
  width: 100%;
  text-align: center;
  color: #ffffff;
}

.countdown-item span {
  display: block;
  font-family: var(--english-font);
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.countdown-item small {
  display: block;
  margin-top: 8px;
  font-family: var(--english-font);
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 4px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

/* Location section */
.location-section {
  width: 100%;
  min-height: 100dvh;
  background-color: #f0e9df;
  background-image:
    linear-gradient(rgba(240, 233, 223, 0.18), rgba(240, 233, 223, 0.18)),
    url("assets/location.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  padding: calc(18px + env(safe-area-inset-top)) 24px calc(42px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

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

.location-content h2 {
  font-family: var(--english-font);
  font-size: clamp(30px, 11vw, 48px);
  font-weight: 400;
  line-height: 1;
  color: #6b6258;
  margin-bottom: 18px;
  letter-spacing: 2px;
  text-transform: none;
}
.location-pin {
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  color: #7a7066;
}

.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(--english-font);
  font-size: clamp(14px, 3.5vw, 18px);
  line-height: 1.35;
  letter-spacing: 0.7px;
  color: #6b6258;
  margin-bottom: 26px;
}

.map-card {
  width: 100%;
  max-width: 365px;
  aspect-ratio: 1.45 / 1;
  margin: 0 auto;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(107, 98, 88, 0.18);
  box-shadow: 0 12px 28px rgba(70, 60, 50, 0.12);
}

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

.maps-button {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 24px;
  border: 1px solid rgba(95, 86, 77, 0.75);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.55);
  color: #6b6258;
  text-decoration: none;
  font-family: var(--english-font);
  font-size: clamp(13px, 3.4vw, 16px);
  letter-spacing: 0.5px;
}

.rsvp-text {
  margin-top: 38px;
  font-family: var(--english-font);
  font-size: clamp(17px, 4.4vw, 22px);
  line-height: 1.45;
  letter-spacing: 0.7px;
  color: #6b6258;
}

.rsvp-text p {
  margin: 0;
}

/* Celebration image section */
.celebration-section {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  background: #f0e9df;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.celebration-full-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* RSVP luxury section */
.luxury-rsvp-section {
  width: 100%;
  min-height: 100dvh;
  background: #fbfaf6;
  padding: calc(54px + env(safe-area-inset-top)) 24px calc(54px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.luxury-rsvp-card {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  text-align: center;
  color: #6b6258;
  padding: 34px 22px 36px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(125, 112, 96, 0.22);
  box-shadow: 0 18px 45px rgba(85, 72, 58, 0.08);
  backdrop-filter: blur(2px);
}

.rsvp-ornament {
  display: none;
}

.luxury-rsvp-card h2 {
  font-family: var(--english-font);
  font-size: clamp(42px, 12vw, 58px);
  font-weight: 300;
  line-height: 1;
  color: #6b6258;
  margin-bottom: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.rsvp-subtitle {
  font-family: var(--english-font);
  font-size: clamp(16px, 4.2vw, 20px);
  line-height: 1.45;
  letter-spacing: 0.5px;
  color: #7c7167;
  margin-bottom: 30px;
}

.children-note {
  font-family: var(--english-font);
  font-size: clamp(14px, 3.6vw, 17px);
  line-height: 1.45;
  letter-spacing: 0.5px;
  color: #8b8178;
  margin: -14px auto 28px;
  max-width: 320px;
}

.rsvp-choice {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.rsvp-choice-btn,
.submit-rsvp {
  width: 100%;
  border: 1px solid rgba(95, 86, 77, 0.55);
  background: rgba(255, 255, 255, 0.55);
  color: #6b6258;
  font-family: var(--english-font);
  font-size: clamp(15px, 4vw, 18px);
  padding: 13px 18px;
  cursor: pointer;
  letter-spacing: 0.5px;
  border-radius: 0;
  transition: 0.25s ease;
}

.rsvp-choice-btn.active,
.rsvp-choice button.active {
  background: #6b6258;
  color: #ffffff;
}

.rsvp-choice-btn.secondary {
  background: rgba(255, 255, 255, 0.38);
}

.luxury-rsvp-form {
  width: 100%;
  margin-top: 12px;
}

.form-divider {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 6px 0 18px;
}

.form-divider span {
  width: 86px;
  height: 1px;
  background: rgba(107, 98, 88, 0.35);
}

.rsvp-form-title {
  font-family: var(--english-font);
  font-size: clamp(15px, 3.8vw, 18px);
  color: #7c7167;
  margin-bottom: 18px;
  letter-spacing: 0.4px;
}

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

.rsvp-form input,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid rgba(95, 86, 77, 0.35);
  background: rgba(255, 255, 255, 0.72);
  color: #5f564d;
  font-family: var(--english-font);
  font-size: clamp(15px, 4vw, 18px);
  padding: 13px 14px;
  outline: none;
  border-radius: 0;
  text-align: left;
}

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

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
  color: rgba(95, 86, 77, 0.62);
}

.submit-rsvp {
  margin-top: 6px;
  background: #5f564d;
  color: #ffffff;
}

.rsvp-status {
  margin-top: 18px;
  font-family: var(--english-font);
  font-size: clamp(14px, 3.8vw, 17px);
  color: #5f564d;
  line-height: 1.5;
}

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

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

/* RSVP submitted message */
.rsvp-submitted-message {
  margin-top: 24px;
  padding: 26px 20px;
  text-align: center;
  color: #5f564d;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(95, 86, 77, 0.22);
}

.submitted-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1px solid rgba(79, 122, 85, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4f7a55;
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
}

.rsvp-submitted-message h3 {
  font-family: var(--english-font);
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 500;
  color: #5f564d;
  margin-bottom: 8px;
}

.rsvp-submitted-message p {
  font-family: var(--english-font);
  font-size: clamp(15px, 4vw, 18px);
  line-height: 1.45;
  color: #7c7167;
}

.rsvp-choice-btn.disabled,
.rsvp-choice button.disabled,
.rsvp-choice button:disabled,
.submit-rsvp:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 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: whiteFadeInHold 1.3s ease forwards;
}

.white-transition.fade-away {
  animation: whiteFadeOut 0.75s 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 slideUpFade {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

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

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

  70% {
    opacity: 1;
  }

  100% {
    opacity: 1;
  }
}

@keyframes whiteFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes videoFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Small phone adjustments */
@media (max-width: 390px) {
  .countdown-stack {
    gap: clamp(58px, 11vh, 105px);
  }

  .countdown-item {
    width: 100%;
  }

  .countdown-item span {
    font-size: clamp(28px, 8vw, 38px);
    letter-spacing: 4px;
  }

  .countdown-item small {
    font-size: clamp(11px, 3vw, 14px);
    letter-spacing: 4px;
  }

  .location-section {
    padding: calc(8px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
  }

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

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

  .children-note {
    margin-top: -10px;
  }
}

/* Mobile only */
@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;
  }
}

/* Force countdown font */
.countdown-section .countdown-item span,
.countdown-section #days,
.countdown-section #hours,
.countdown-section #minutes,
.countdown-section #seconds {
  font-family: "Cormorant Garamond", serif !important;
  font-size: clamp(30px, 8vw, 42px) !important;
  font-weight: 300 !important;
  line-height: 0.9 !important;
  letter-spacing: 4px !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
}

.countdown-section .countdown-item small {
  font-family: "Cormorant Garamond", serif !important;
  font-size: clamp(12px, 3vw, 15px) !important;
  font-weight: 300 !important;
  letter-spacing: 4px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
}