@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;
  --readable-font: "Cormorant Garamond", serif;
  --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;
  -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;
}

/* =========================
   Scroll Animation System
========================= */

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

.section-animate .countdown-header,
.section-animate .countdown-heading,
.section-animate .countdown-layout,
.section-animate .contact-card,
.section-animate .location-content h2,
.section-animate .location-pin,
.section-animate .venue-text,
.section-animate .map-card,
.section-animate .maps-button,
.section-animate .rsvp-text {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
  will-change: opacity, transform;
}

.section-visible .countdown-header,
.section-visible .countdown-heading {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.section-visible .countdown-layout {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.18s;
}

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

.section-visible .location-content h2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.section-visible .location-pin {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}

.section-visible .venue-text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.18s;
}

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

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

.section-visible .rsvp-text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.42s;
}

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

.hidden {
  display: none !important;
}

/* =========================
   Intro / Stamp
========================= */

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

/* =========================
   Intro Image / Main Screen
========================= */

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

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

#mainVideo,
#mainIntroImage {
  pointer-events: none;
}

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

.scroll-text {
  position: absolute;
  bottom: calc(28px + env(safe-area-inset-bottom));
  left: 0;
  width: 100%;
  text-align: center;
  color: #7a6040;
  font-family: var(--english-font);
  font-size: clamp(12px, 3.4vw, 15px);
  letter-spacing: 3px;
  line-height: 1.8;
  text-shadow:
    0 1px 2px rgba(255, 255, 255, 0.95),
    0 3px 12px rgba(120, 85, 40, 0.28);
  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 Video 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,
.image-full-section video,
.invitation-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

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

.countdown-section {
  width: 100%;
  min-height: 66dvh;
  height: auto;
  background: #fbfaf6;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: calc(40px + env(safe-area-inset-top)) 24px 0;
}

.countdown-header,
.countdown-heading {
  width: 100%;
  text-align: center;
  margin-bottom: 16px;
  color: #5f564d;
}

.countdown-header h2,
.countdown-heading h2 {
  font-family: var(--script-font);
  font-size: clamp(42px, 12vw, 64px);
  font-weight: 400;
  line-height: 0.95;
  color: #5f564d;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  text-transform: none;
}

.countdown-header p,
.countdown-heading p {
  font-family: var(--readable-font);
  font-size: clamp(12px, 3.4vw, 16px);
  font-weight: 300;
  line-height: 1.2;
  color: #7a7066;
  letter-spacing: 3.5px;
  margin: 0;
}

.countdown-layout {
  position: relative;
  width: min(100%, 370px);
  height: 300px;
  min-height: 285px;
  margin: 0 auto;
}

.countdown-logo {
  position: absolute;
  width: clamp(130px, 42vw, 215px);
  height: auto;
  left: 50%;
  top: 49%;
  transform: translate(-50%, -50%);
  opacity: 0.42;
  z-index: 1;
}

.countdown-logo-wrap {
  position: absolute;
  width: clamp(130px, 42vw, 215px);
  height: auto;
  left: 50%;
  top: 49%;
  transform: translate(-50%, -50%);
  opacity: 0.42;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-logo-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.countdown-item {
  position: absolute;
  width: 108px;
  text-align: center;
  color: #5f564d;
  z-index: 2;
}

.countdown-item span {
  display: block;
  font-family: var(--readable-font);
  font-size: clamp(30px, 9.5vw, 48px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 4px;
  color: #5f564d;
  font-variant-numeric: lining-nums tabular-nums;
}

.countdown-item small {
  display: block;
  margin-top: 7px;
  font-family: var(--readable-font);
  font-size: clamp(11px, 3.1vw, 14px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 3px;
  color: #6f6458;
  text-transform: lowercase;
}

.countdown-days {
  top: 7%;
  left: 0;
}

.countdown-hours {
  top: 7%;
  right: 0;
}

.countdown-minutes {
  bottom: 8%;
  left: 0;
}

.countdown-seconds {
  bottom: 8%;
  right: 0;
}

/* =========================
   Contact Section
========================= */

.contact-section {
  padding: 0 18px 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fbfaf6;
}

.contact-card {
  position: relative;
  width: min(100%, 500px);
  padding: 24px 20px 24px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 252, 246, 0.9));
  border: 1px solid rgba(198, 160, 76, 0.28);
  box-shadow:
    0 14px 32px rgba(94, 73, 38, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  text-align: center;
  overflow: hidden;
  font-family: var(--readable-font);
}

.contact-card::before,
.contact-card::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 95px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c6a04c, transparent);
  transform: translateX(-50%);
}

.contact-card::before {
  top: 14px;
}

.contact-card::after {
  bottom: 14px;
}

.contact-ornament {
  width: 34px;
  height: 34px;
  margin: 0 auto 9px;
  border-radius: 50%;
  border: 1px solid rgba(198, 160, 76, 0.34);
  background:
    radial-gradient(circle, rgba(198, 160, 76, 0.24) 0 3px, transparent 4px),
    rgba(255, 250, 240, 0.8);
  position: relative;
}

.contact-ornament::before,
.contact-ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 1px;
  background: rgba(198, 160, 76, 0.32);
}

.contact-ornament::before {
  right: 38px;
}

.contact-ornament::after {
  left: 38px;
}

.contact-label {
  margin: 0 0 4px;
  color: #a8833a;
  font-family: var(--readable-font);
  font-size: 0.86rem;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 1px;
}

.contact-card h2 {
  margin: 0 0 8px;
  color: #7c5f2a;
  font-family: var(--readable-font);
  font-size: clamp(27px, 8vw, 40px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 1.2px;
  text-transform: none;
}

.contact-subtitle {
  max-width: 340px;
  margin: 0 auto 16px;
  color: #6d5b43;
  font-family: var(--readable-font);
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.35px;
}

.contact-phone-grid {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 auto 18px;
}

.contact-phone {
  width: min(100%, 220px);
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fffaf0;
  border: 1px solid rgba(198, 160, 76, 0.26);
  color: #6d5426;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(94, 73, 38, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.contact-phone span {
  display: none;
}

.contact-phone strong {
  color: #5f4a22;
  font-family: var(--readable-font);
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: 3px;
  font-variant-numeric: lining-nums tabular-nums;
}

.contact-phone:hover {
  background: #fffdf7;
  border-color: #c6a04c;
  box-shadow:
    0 12px 24px rgba(94, 73, 38, 0.1),
    inset 0 0 0 1px rgba(198, 160, 76, 0.4);
  transform: translateY(-2px);
}

.adults-note {
  margin: 12px auto 0;
  max-width: 350px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.adults-note span {
  display: block;
  margin-bottom: 8px;
  color: #9a7430;
  font-family: var(--readable-font);
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 300;
  text-transform: none;
  letter-spacing: 1.2px;
}

.adults-note p {
  margin: 0 auto;
  color: #6b6258;
  font-family: var(--readable-font);
  font-size: clamp(12.5px, 3.3vw, 15px);
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.3px;
}

/* Small phone contact */

@media (max-width: 390px) {
  .contact-section {
    padding: 0 15px 30px;
  }

  .contact-card {
    width: min(100%, 360px);
    padding: 22px 18px 24px;
    border-radius: 20px;
  }

  .contact-ornament {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
  }

  .contact-card h2 {
    font-size: clamp(26px, 8vw, 36px);
    margin-bottom: 7px;
  }

  .contact-subtitle {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .contact-phone-grid {
    margin-bottom: 16px;
  }

  .contact-phone {
    width: min(100%, 210px);
    min-height: 54px;
    padding: 9px 12px;
    border-radius: 15px;
  }

  .contact-phone strong {
    font-size: clamp(17px, 5vw, 24px);
    letter-spacing: 2.4px;
  }

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

  .adults-note span {
    font-size: 13px;
    margin-bottom: 7px;
  }

  .adults-note p {
    font-size: 12.5px;
    line-height: 1.5;
  }
}

/* =========================
   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(42px + 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(--script-font);
  font-size: clamp(42px, 12vw, 64px);
  font-weight: 400;
  line-height: 0.95;
  color: #6b6258;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  text-transform: none;
}

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

.map-card {
  width: 84%;
  max-width: 320px;
  aspect-ratio: 1.45 / 1;
  margin: 0 auto;
  overflow: hidden;
  background: white;
  border-radius: 18px;
  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: 24px;
  padding: 10px 24px;
  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(--readable-font);
  font-size: clamp(13px, 3.4vw, 16px);
  letter-spacing: 0.5px;
}

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

.rsvp-text p {
  margin: 0;
}

/* =========================
   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 0.45s ease forwards;
}

.white-transition.fade-away {
  animation: whiteFadeOut 0.45s 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-section {
    min-height: 64dvh;
    padding: calc(22px + env(safe-area-inset-top)) 20px 0;
  }

  .countdown-header,
  .countdown-heading {
    margin-bottom: 14px;
  }

  .countdown-header h2,
  .countdown-heading h2 {
    font-size: clamp(40px, 12vw, 58px);
    margin-bottom: 8px;
  }

  .countdown-header p,
  .countdown-heading p {
    font-size: clamp(12px, 3.3vw, 15px);
    letter-spacing: 3px;
  }

  .countdown-layout {
    width: 100%;
    height: 285px;
    min-height: 270px;
  }

  .countdown-logo,
  .countdown-logo-wrap {
    width: clamp(120px, 40vw, 190px);
  }

  .countdown-item {
    width: 100px;
  }

  .countdown-item span {
    font-size: clamp(28px, 9vw, 44px);
  }

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

  .contact-section {
    padding: 2px 15px 42px;
  }

  .contact-card {
    padding: 30px 20px 30px;
    border-radius: 24px;
  }

  .contact-card h2 {
    font-size: clamp(32px, 10vw, 46px);
  }

  .contact-subtitle {
    margin-bottom: 22px;
  }

  .contact-phone {
    width: min(100%, 240px);
    min-height: 70px;
    padding: 14px 18px;
  }

  .contact-phone strong {
    font-size: clamp(21px, 6vw, 30px);
    letter-spacing: 3px;
  }

  .adults-note {
    margin-top: 16px;
  }

  .adults-note span {
    margin-bottom: 10px;
  }

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

  .map-card {
    width: 82%;
    max-width: 300px;
    border-radius: 16px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .section-animate .countdown-header,
  .section-animate .countdown-heading,
  .section-animate .countdown-layout,
  .section-animate .contact-card,
  .section-animate .location-content h2,
  .section-animate .location-pin,
  .section-animate .venue-text,
  .section-animate .map-card,
  .section-animate .maps-button,
  .section-animate .rsvp-text {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================
   Mobile Only Message
========================= */

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