:root {
  --color-forest: #3d4a3d;
  --bg-page: #e0e5de;
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Montserrat", sans-serif;
  --card-shadow: 0 0px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 0, 0, 0.2);
  --parallax-color-1: rgba(121, 134, 121, 0.15);
  --parallax-color-2: rgba(255, 255, 255, 0.5);
  --petal-color: rgba(255, 255, 255, 0.6);
}

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

html {
  min-height: 100%;
  background: linear-gradient(135deg, #3a1c4a 0%, #d4af37 100%);
}

html::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  z-index: -1;
}

body {
  font-family: var(--font-sans);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  overflow-x: hidden;
  position: relative;
  background: transparent;
}



.save-the-date-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 9 / 12;
  /* Adjusted for portrait photo */
  /* Background handles via ::before for better mobile rendering */
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  text-align: center;
  color: var(--color-forest);
  overflow: hidden;
}

/* For browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 9/12) {
  .save-the-date-card {
    min-height: 666px;
    overflow: hidden;
  }
}

.bg-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  z-index: 1;
  pointer-events: none;
}

.content-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: auto;
  /* Allow content to stay at the top */
  z-index: 2;
}

/* HERO HEADER */
.hero-header {
  margin-bottom: 22px;
  margin-top: 0;
}

.main-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: 0.1em;
  text-shadow: 0 4px 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.6);
}

.main-title .save,
.main-title .date {
  font-size: 4.8rem;
  text-transform: uppercase;
}

.main-title .the {
  font-size: 0.85rem;
  letter-spacing: 0.6em;
  margin: 5px 0;
  opacity: 0.9;
  padding-left: 0.6em;
}

/* INFO SECTION */
.info-container {
  margin-bottom: 18px;
}

.names {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  margin-bottom: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.85), 0 0 15px rgba(255, 255, 255, 0.4);
}

.date-numbers {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  font-family: var(--font-sans);
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.85), 0 0 15px rgba(255, 255, 255, 0.4);
}

.subtitle {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  opacity: 0.8;
  text-transform: uppercase;
  padding-left: 0.35em;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.85), 0 0 15px rgba(255, 255, 255, 0.4);
}

/* ACTIONS / GLASS BUTTON */
.actions {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.btn-card {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--color-forest);
  font-weight: 500;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-transform: uppercase;
  line-height: 1.4;
  width: 260px;
  text-align: center;
}

.btn-card:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Responsive Scaling */
@media (max-width: 480px) {
  body {
    padding: 20px;
  }

  .save-the-date-card {
    padding: 40px 20px;
    aspect-ratio: auto;
    min-height: 85vh;
  }

  .bg-card-image {
    object-position: center bottom;
  }

  .main-title .save,
  .main-title .date {
    font-size: 4rem;
  }

  .names {
    font-size: 1.3rem;
  }

  .date-numbers {
    font-size: 1.8rem;
  }

  .actions {
    margin-bottom: 180px;
  }
}

/* MODAL STYLES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Liquid glass panel */
.modal-content {
  position: relative;
  width: 92%;
  max-width: 380px;
  border-radius: 28px;
  padding: 36px 28px 32px;
  text-align: left;
  transform: translateY(24px) scale(0.97);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Liquid glass base */
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.18) 100%);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);

  /* Iridescent border */
  border: 1px solid rgba(255, 255, 255, 0.45);
  outline: 1px solid rgba(255, 255, 255, 0.1);

  /* Layered shadows for depth */
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.15) inset,
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 32px 64px rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.2);
}

.modal-overlay.is-visible .modal-content {
  transform: translateY(0) scale(1);
}

/* Sheen overlay */
.modal-content::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0.18) 0%,
      transparent 50%,
      rgba(255, 255, 255, 0.07) 100%);
  pointer-events: none;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-close:hover {
  color: #fff;
}

.modal-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.modal-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Calendar row cards */
.cal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.28s ease;
  font-family: var(--font-sans);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.cal-card:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.cal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  text-align: left;
}

.cal-name {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.95);
}

.cal-sub {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.cal-arrow {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.25s ease, color 0.25s ease;
  margin-left: auto;
}

.cal-card:hover .cal-arrow {
  transform: translateX(4px);
  color: rgba(255, 255, 255, 0.8);
}