@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Montserrat:wght@300;400&display=swap");

:root {
  /* ======================================================= */
  /* 🖼️ IMAGES */
  /* ======================================================= */
  --main: url("./images/main.jpg");

  --slika-2-cvece-bela-pozadina: url("./images/background.webp");

  --slika-3-cvece-mint-pozadina: url("./images/background.webp");

  --slika-4-donja-sa-prelazom: url("./images/bottom.jpg");

  /* ======================================================= */
  /* 🎨 COLOR PALETTE */
  /* ======================================================= */
  --col-main: #2e5d45;
  --col-main-light: #edf3ef;
  --white: #ffffff;
  --text-dark: #1a2e23;
  --text-light: #5c7a69;
}

body {
  margin: 0;
  background-color: var(--white);
  color: var(--text-dark);
  font-family: "Montserrat", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.huge-date {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  margin: 0;
}
.container {
  max-width: 90%;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
.section {
  padding: 100px 0;
  position: relative;
}

/* 1. Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: var(--main);
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent);
  mask-image: linear-gradient(to bottom, black 85%, transparent);
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
}
.hero-content {
  position: absolute;
  z-index: 1;
  top: 5%;
}
.hero-divider {
  display: none;
}
.pre-title {
  letter-spacing: 5px;
  font-size: 0.8rem;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  margin: 20px 0;
  letter-spacing: 2px;
}
.hero-date {
  font-size: 2rem;
  letter-spacing: 3px;
  font-family: "Cormorant Garamond", serif;
  font-weight: bold;
}
.hero-bottom {
  position: absolute;
  bottom: 10%;
}

.scroll-down-arrow {
  margin-top: 50px;
  font-size: 1.5rem;
  opacity: 0.7;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* 2. Quote Section */
.custom-text {
  font-size: 2rem;
  line-height: 1.9;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--text-light);
  max-width: 100%;
  margin: 0 auto;
}

/* 3. & 5. Floral Background Sections */
.floral-background-white {
  background-color: var(--white);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.98)),
    var(--slika-2-cvece-bela-pozadina);
  background-size: cover;
  background-attachment: fixed;
}
.floral-background-mint {
  background-color: var(--col-main);
  background-image:
    linear-gradient(rgba(46, 93, 69, 0.94), rgba(46, 93, 69, 0.98)),
    var(--slika-3-cvece-mint-pozadina);
  background-size: cover;
  background-attachment: fixed;
  color: var(--white);
}
.huge-date {
  font-size: 5rem;
  line-height: 1;
  color: var(--col-main);
  letter-spacing: -2px;
}
.calendar-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid rgba(46, 93, 69, 0.12);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(46, 93, 69, 0.08);
}
.calendar-month {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  color: var(--col-main);
  letter-spacing: 2px;
  margin: 0 0 20px;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.calendar-weekdays span {
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--text-light);
  text-transform: uppercase;
}
.calendar-grid {
  margin-top: 14px;
}
.calendar-grid span {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  color: var(--text-dark);
}
.calendar-grid .is-muted {
  color: rgba(92, 122, 105, 0.45);
}
.calendar-grid .is-selected {
  border: 2px solid var(--col-main);
  color: var(--col-main);
  font-weight: 600;
}
.expect-title {
  font-size: 3.5rem;
  letter-spacing: 4px;
}

/* 4. Info Section (Time & Location) */
.info-section {
  background-color: var(--white);
  overflow: hidden;
}
.info-cards {
  display: flex;
  flex-direction: column;
  gap: 50px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.info-card {
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(46, 93, 69, 0.1);
  border-radius: 16px;
  padding: 50px 40px 45px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(46, 93, 69, 0.06);
  transition:
    box-shadow 0.4s ease,
    transform 0.4s ease;
}
.info-card:hover {
  box-shadow: 0 12px 40px rgba(46, 93, 69, 0.12);
  transform: translateY(-4px);
}

.info-card-icon {
  color: var(--col-main);
  margin-bottom: 20px;
  opacity: 0.7;
}

.section-subtitle {
  font-size: 2rem;
  color: var(--col-main);
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.timeline {
  position: relative;
  padding-left: 28px;
  display: inline-block;
  text-align: left;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--col-main),
    rgba(46, 93, 69, 0.15)
  );
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
  position: relative;
}
.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 10px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--col-main);
  background: var(--white);
  flex-shrink: 0;
}
.timeline-item:first-child .timeline-dot {
  background: var(--col-main);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.time {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  color: var(--text-dark);
  line-height: 1.2;
}
.event {
  font-size: 0.95rem;
  color: var(--text-light);
}

.venue-photo {
  width: 100%;
  max-width: 340px;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 25px;
  box-shadow: 0 8px 30px rgba(26, 46, 35, 0.12);
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.location-name {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 5px;
}
.location-address {
  color: var(--text-light);
  margin-bottom: 20px;
}

.mint-link {
  color: var(--col-main);
  text-decoration: none;
  border-bottom: 1px solid var(--col-main);
  padding-bottom: 3px;
  transition: 0.3s;
}
.mint-link:hover {
  color: var(--text-dark);
  border-color: var(--text-dark);
}

/* 6. Countdown Section */
.countdown-section {
  background-color: var(--col-main-light);
}
.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cd-item {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  min-width: 70px;
  box-shadow: 0 10px 30px rgba(46, 93, 69, 0.12);
}
.cd-item span {
  font-size: 2.5rem;
  font-family: "Cormorant Garamond", serif;
  color: var(--col-main);
  display: block;
}
.cd-item p {
  margin: 5px 0 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-light);
}

/* 7. Faded Photo Section */
.faded-photo-container {
  width: 100%;
  height: 80vh;
  background-color: var(--white);
}
.faded-photo-bg {
  width: 100%;
  height: 100%;
  background-image: var(--slika-4-donja-sa-prelazom);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    black 15%,
    black 85%,
    transparent
  );
  mask-image: linear-gradient(
    to bottom,
    transparent,
    black 15%,
    black 85%,
    transparent
  );
}

/* 8. RSVP Form Section */
.rsvp-section {
  background-color: var(--white);
  padding: 60px 0 !important;
}
.rsvp-title {
  font-size: 2.5rem;
  color: var(--col-main);
  margin-bottom: 15px;
}

/* 9. Partners Section */
.partners-section {
  padding: 60px 0;
  background-color: var(--white);
}
.partners-text {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text-light);
  margin: 20px 0;
  letter-spacing: 1px;
}
.partners-divider {
  width: 60px;
  height: 1px;
  background-color: var(--col-main);
  opacity: 0.4;
  margin: 0 auto;
}
.rsvp-text {
  color: var(--text-light);
  margin-bottom: 40px;
}
.minimal-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 400px;
  margin: 0 auto;
}
input,
select {
  width: 100%;
  padding: 15px 0;
  border: none;
  border-bottom: 1px solid #ddd;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
  transition: 0.3s;
  border-radius: 0;
}
input:focus,
select:focus {
  border-bottom: 1px solid var(--col-main);
}
.mint-btn {
  background-color: var(--col-main);
  color: var(--white);
  border: none;
  padding: 18px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
  font-family: inherit;
  font-weight: 400;
  border-radius: 2px;
}
.mint-btn:hover {
  background-color: var(--text-dark);
}
.mint-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.form-message {
  min-height: 1.2rem;
  margin: 6px 0 0;
  font-size: 0.92rem;
}
.form-message.success {
  color: var(--col-main);
}
.form-message.error {
  color: var(--text-dark);
}
.hidden-iframe {
  display: none;
}
.honeypot-field {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.checkbox-wrapper {
  display: flex;
  align-items: center;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-light);
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-custom {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid #ddd;
  border-radius: 2px;
  transition: 0.3s;
  display: inline-block;
  position: relative;
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background-color: var(--col-main);
  border-color: var(--col-main);
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ======================================================= */
/* ENVELOPE INTRO ANIMATION */
/* ======================================================= */

.envelope-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--col-main);
  background-image:
    linear-gradient(rgba(46, 93, 69, 0.94), rgba(46, 93, 69, 0.98)),
    var(--slika-3-cvece-mint-pozadina);
  background-size: cover;
  background-position: center;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}
.envelope-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-hint {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: hintPulse 2s ease-in-out infinite;
  margin: 0;
}
.envelope-arrow {
  font-size: 2.2rem;
  letter-spacing: 0;
  text-transform: none;
  animation: bounce 2s infinite;
}
@keyframes hintPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.envelope-wrapper {
  cursor: pointer;
}

#envelope {
  position: relative;
  width: 280px;
  height: 180px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  background-color: #dce8e0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
}

.front {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 3;
}

.flap {
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-bottom: 82px solid transparent;
  border-top: 98px solid #dce8e0;
  transform-origin: top;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.pocket {
  border-left: 140px solid #c8d9cd;
  border-right: 140px solid #c8d9cd;
  border-bottom: 90px solid #bdd0c3;
  border-top: 90px solid transparent;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.envelope-seal {
  position: absolute;
  width: 50px;
  height: 50px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  border-radius: 50%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  transition: opacity 0.5s 0.3s ease;
}

.seal-bg {
  fill: var(--col-main);
  stroke: #1a3a2a;
  stroke-width: 2;
}
.seal-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1;
}
.seal-initial {
  text-anchor: middle;
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  fill: #ffffff;
  font-weight: 600;
}
.seal-ampersand {
  text-anchor: middle;
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  fill: rgba(255, 255, 255, 0.7);
}

.open .envelope-seal {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.letter {
  position: relative;
  background-color: var(--white);
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  height: 90%;
  top: 5%;
  border-radius: 6px;
  box-shadow: 0 2px 26px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.card-pretitle {
  font-family: "Montserrat", sans-serif;
  font-size: 0.5rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 0;
}
.card-names {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  color: var(--col-main);
  margin: 0;
  letter-spacing: 1px;
}
.card-date {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

/* Closed state */
.close .flap {
  transform: rotateX(0deg);
  transition:
    transform 0.8s 0.8s ease,
    z-index 1s;
  z-index: 5;
}
.close .letter {
  transform: translateY(0px);
  transition:
    transform 0.8s ease,
    z-index 1s;
  z-index: 1;
}

/* Open state */
.open .flap {
  transform: rotateX(180deg);
  transition:
    transform 0.8s ease,
    z-index 0.8s;
  z-index: 1;
}
.open .letter {
  transform: translateY(-80px);
  transition:
    transform 0.8s 0.8s ease,
    z-index 0.8s;
  z-index: 2;
}

/* Body hidden until envelope opens */
.main-wrapper {
  transition: opacity 0.6s ease;
}
.main-wrapper.hidden-content {
  opacity: 0;
}

@media (min-width: 769px) {
  #envelope {
    width: 680px;
    height: 440px;
  }
  .flap {
    border-left-width: 340px;
    border-right-width: 340px;
    border-bottom-width: 200px;
    border-top-width: 240px;
  }
  .pocket {
    border-left-width: 340px;
    border-right-width: 340px;
    border-bottom-width: 220px;
    border-top-width: 220px;
  }
  .open .letter {
    transform: translateY(-200px);
  }
  .envelope-seal {
    width: 120px;
    height: 120px;
  }
  .card-names {
    font-size: 3.7rem;
  }
  .card-pretitle {
    font-size: 1rem;
  }
  .card-date {
    font-size: 1.55rem;
  }
  .envelope-hint {
    font-size: 3rem;
  }
  .envelope-arrow {
    font-size: 4rem;
  }
}

/* �💫 ANIMATIONS */
/* ======================================================= */

/* Fade in from bottom (for text, dates) */
.reveal,
.reveal-hero {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(30px);
  transition: all 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.active,
.reveal-hero.active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Slide in from the LEFT (for Schedule) */
.reveal-left {
  opacity: 0;
  filter: blur(10px);
  transform: translateX(-60px);
  transition: all 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.active {
  opacity: 1;
  filter: blur(0);
  transform: translateX(0);
}

/* Slide in from the RIGHT (for Location) */
.reveal-right {
  opacity: 0;
  filter: blur(10px);
  transform: translateX(60px);
  transition: all 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right.active {
  opacity: 1;
  filter: blur(0);
  transform: translateX(0);
}

/* Mobile */
@media (max-width: 768px) {
  .huge-date {
    font-size: 3.5rem;
  }
  .calendar-card {
    padding: 20px 14px;
  }
  .calendar-month {
    font-size: 1.8rem;
  }
  .calendar-weekdays,
  .calendar-grid {
    gap: 6px;
  }
  .calendar-grid span {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
  .expect-title {
    font-size: 2.3rem;
    letter-spacing: 2px;
  }
  .faded-photo-container {
    height: 50vh;
  }
  .section {
    padding: 80px 0;
  }
  .custom-text {
    font-size: 1.2rem !important;
  }
  .partners-text {
    width: 70% !important;
    margin: 20px auto !important;
  }
  .partners-section {
    padding: 0 !important;
    margin: 30px !important;
  }
}

/* Desktop */
@media (min-width: 769px) {
  /* Hero - content centered vertically */
  .hero-content {
    position: relative;
    top: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  h1 {
    font-size: clamp(3rem, 6vw, 6.5rem);
    letter-spacing: 8px;
  }
  h1 br {
    display: none;
  }
  .hero-divider {
    display: block;
    width: 70px;
    height: 1px;
    background: rgba(255, 255, 255, 0.45);
  }
  .pre-title {
    font-size: 2rem;
  }
  .scroll-down-arrow {
    font-size: 3rem !important;
  }

  /* Info section - side by side cards on desktop */
  .info-cards {
    flex-direction: row;
    gap: 40px;
    align-items: stretch;
  }
  .info-card {
    flex: 1;
    max-width: none;
  }

  /* Countdown - larger boxes */
  .cd-item {
    padding: 28px 38px;
    min-width: 90px;
  }
  .cd-item span {
    font-size: 3.5rem;
  }

  /* Faded photo - show heads on desktop */
  .faded-photo-bg {
    background-position: center 20%;
  }
}
