*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background-color: #fbfbf3;
  color: #5c543f;
  font-family: Georgia, "Times New Roman", serif;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bg-reveal {
  from {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

.save-the-date {
  position: relative;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  animation: bg-reveal 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.5rem 1rem;
}

.text-overlay {
  display: block;
  width: min(92vw, 34rem);
  height: auto;
  pointer-events: none;
  animation: fade-up 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s both;
}

.title-el {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #c1c5b3;
  width: min(92vw, 34rem);
}

.title-el-names {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 9vw, 4rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.title-el-std {
  margin-top: 1.1rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(0.7rem, 2.6vw, 1rem);
  letter-spacing: 0.36em;
}

.title-el-date {
  margin-top: 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 3.6vw, 1.4rem);
  letter-spacing: 0.08em;
}

/* Show the title variant that matches the active language. */
html.lang-el .text-overlay {
  display: none;
}

html.lang-el .title-el {
  display: flex;
  animation: fade-up 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.3s both;
}

.calendar-cta {
  display: flex;
  justify-content: center;
  width: min(72vw, 22rem);
  margin-top: 1.25rem;
  animation: fade-up 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.9s both;
}

.calendar-ios-link {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 16rem;
  max-width: none;
  padding: 0.85em 2.8em;
  border: 1px solid rgba(188, 181, 167, 0.55);
  border-radius: 999px;
  background-color: rgba(251, 251, 243, 0.55);
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(210, 210, 210, 0.12) 45%,
    rgba(255, 255, 255, 0.28) 100%
  );
  backdrop-filter: blur(1px);
  color: #bcb5a7;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.35s ease, border-color 0.35s ease,
    background-color 0.35s ease, transform 0.2s ease, box-shadow 0.35s ease;
}

html.ios .calendar-ios-link {
  display: inline-flex;
}

html.ios add-to-calendar-button {
  display: none !important;
}

html.ios .calendar-cta {
  width: min(72vw, 22rem);
}

.calendar-ios-link:hover,
.calendar-ios-link:focus-visible {
  border-color: rgba(188, 181, 167, 0.75);
  background-color: rgba(251, 251, 243, 0.75);
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(210, 210, 210, 0.16) 45%,
    rgba(255, 255, 255, 0.38) 100%
  );
  color: #a69e90;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(92, 84, 63, 0.4);
}

.calendar-ios-link:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.site-version {
  position: fixed;
  right: 0.75rem;
  bottom: 0.6rem;
  z-index: 2;
  margin: 0;
  color: rgba(92, 84, 63, 0.45);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  pointer-events: none;
  user-select: none;
  animation: fade-in 1.5s ease 1.6s both;
}

@media (min-width: 768px) {
  .content {
    padding: 2.5rem 2rem;
  }

  .text-overlay {
    width: min(80vw, 40rem);
  }

  .calendar-cta {
    width: min(50vw, 20rem);
    margin-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .background,
  .text-overlay,
  .title-el,
  .calendar-cta,
  .site-version {
    animation: none;
    clip-path: none;
    opacity: 1;
  }

  html.lang-el .title-el {
    animation: none;
  }

  .calendar-ios-link {
    transition: none;
  }

  .calendar-ios-link:hover,
  .calendar-ios-link:focus-visible,
  .calendar-ios-link:active {
    transform: none;
  }
}
