@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;
  --calligraphy-font: "Great Vibes", 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;
}

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

/* 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(--readable-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);
  font-weight: 500;
  z-index: 5;
}

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

/* Invitation image */
.image-full-section {
  width: 100%;
  min-height: auto;
  height: auto;
  display: block;
  background: #fbfaf6;
  overflow: hidden;
  line-height: 0;
 
}

.image-full-section img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  display: block;
}

/* Countdown section */
.countdown-section {
  width: 100%;
  min-height: 72dvh;
  height: auto;
  background: #fbfaf6;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  /* this creates space after the invitation card */
  padding: calc(55px + env(safe-area-inset-top)) 24px 12px;
}

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

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

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

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

/* RSVP luxury section */
.luxury-rsvp-section {
  width: 100%;
  min-height: auto;
  background: #fbfaf6;
  padding: 22px 24px 35px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.luxury-rsvp-card {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  text-align: center;
  color: #6b6258;
  padding: 28px 22px 34px;
  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);
}

.luxury-rsvp-card h2 {
  font-family: var(--script-font);
  font-size: clamp(34px, 9.5vw, 52px);
  font-weight: 400;
  line-height: 0.95;
  color: #6b6258;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: none;
}

.rsvp-subtitle {
  font-family: var(--readable-font);
  font-size: clamp(15px, 4vw, 19px);
  line-height: 1.45;
  letter-spacing: 0.5px;
  color: #7c7167;
  margin-bottom: 26px;
}

.children-note {
  font-family: var(--readable-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: 22px;
}

.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(--readable-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 .rsvp-select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(120, 100, 80, 0.35);
  background: rgba(255, 255, 255, 0.55);
  color: #777;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;

  background-image: linear-gradient(45deg, transparent 50%, #8a7a5c 50%),
                    linear-gradient(135deg, #8a7a5c 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px,
                       calc(100% - 14px) 22px;
  background-size: 6px 6px,
                   6px 6px;
  background-repeat: no-repeat;
}

.luxury-rsvp-form .rsvp-select:focus {
  border-color: rgba(138, 122, 92, 0.75);
  box-shadow: 0 0 0 3px rgba(138, 122, 92, 0.12);
}

.luxury-rsvp-form .rsvp-select:valid {
  color: #222;
}

.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(--readable-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(--readable-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);
  font-family: var(--readable-font);
}

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

.rsvp-status {
  margin-top: 18px;
  font-family: var(--readable-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(--script-font);
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 400;
  color: #5f564d;
  margin-bottom: 8px;
  line-height: 0.95;
}

.rsvp-submitted-message p {
  font-family: var(--readable-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;
}

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

.map-card {
  width: 92%;
  height: 205px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
}

.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(--readable-font);
  font-size: clamp(13px, 3.4vw, 16px);
  letter-spacing: 0.5px;
}

.rsvp-text {
  margin-top: 38px;
  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 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-section {
    min-height: 68dvh;
    height: auto;
    padding: calc(22px + env(safe-area-inset-top)) 20px 8px;
  }

  .countdown-header {
    margin-bottom: 16px;
  }

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

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

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

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

.luxury-rsvp-section {
  min-height: auto;
  padding: 18px 22px 30px;
}

  .luxury-rsvp-card {
    padding: 26px 20px 32px;
  }

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

  .location-content h2,
  .luxury-rsvp-card h2 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .rsvp-submitted-message h3 {
    font-size: clamp(34px, 10vw, 48px);
  }

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

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

.gift-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(95, 86, 77, 0.22);
  text-align: center;
  color: #6b6258;
}

.gift-note p {
  font-family: var(--readable-font);
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 100;
  line-height: 1.45;
  letter-spacing: 0.6px;
  color: #7c7167;
  margin-bottom: 12px;
}

.gift-details {
  display: grid;
  gap: 6px;
}

.gift-details span {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(13px, 3.6vw, 16px);
  font-weight: 100;
  line-height: 1.45;
  letter-spacing: 0.2px;
  color: #7c7167;
}