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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.is-loading {
  overflow: hidden;
}

html.is-loading body > *:not(.page-loader) {
  opacity: 0;
  pointer-events: none;
}

body > *:not(.page-loader) {
  transition: opacity 0.6s ease;
}

/* ===== Page loader ===== */
.page-loader {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 393px;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff url("../img/back.png") repeat top left;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

html:not(.is-loading) .page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.page-loader-logo {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 1;
  color: #061b0e;
  animation: loaderPulse 1.6s ease-in-out infinite;
}

.page-loader-line {
  width: 48px;
  height: 1px;
  background: rgba(6, 27, 14, 0.25);
  position: relative;
  overflow: hidden;
}

.page-loader-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #38644f;
  animation: loaderSlide 1.2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes loaderSlide {
  0% { left: -100%; }
  100% { left: 100%; }
}

body {
  font-family: "Playfair Display", serif;
  color: #434843;
  background: #ffffff;
  margin: 0 auto;
  overflow-x: hidden;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.3s, transform 0.3s;
}
button:hover:not(:disabled) {
  opacity: 0.85;
}

/* ===== Animations ===== */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-scale.animate-visible {
  transform: scale(1);
}
.animate-fade {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
.animate-fade.animate-visible {
  opacity: 1;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.hero-text {
  animation: fadeInUp 0.8s ease-out;
}
.countdown-timer {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* ===== Top Nav ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 393px;
  height: 37px;
  background: rgba(211, 219, 215, 0.8);
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 100%;
}

.logo {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 32px;
  color: #061b0e;
}

.music-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  max-width: 393px;
  margin: 0 auto;
  background: #ffffff url("../img/back.png") repeat top left;
}

.hero-frame {
  position: relative;
  width: 100%;
  max-width: 393px;
  aspect-ratio: 393 / 766;
}

.hero-svg {
  display: block;
  width: 100%;
  height: auto;
}

.hero-content {
  position: absolute;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  width: 294px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
}

.date-time {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.date {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  color: #434843;
}

.time {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  color: #434843;
}

.heading-1 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 36px;
  line-height: 52px;
  text-align: center;
  color: #434843;
  margin: 8px 0;
}

.invitation {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  color: #434843;
  margin-top: 12px;
}

.countdown-timer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 54px;
}

.countdown-number {
  font-family: "Times New Roman", serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 36px;
  text-align: center;
  color: #434843;
}

.countdown-label {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  color: #434843;
}

/* ===== Event Details ===== */
.event-details {
  position: relative;
  width: 100%;
  max-width: 393px;
  margin: 0 auto;
  padding: 40px 40px 68px;
  background: #ffffff url("../img/back.png") repeat top left;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  overflow: hidden;
}



.event-card {
  width: 100%;
  max-width: 313px;
  margin: 0 auto;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon img {
  display: block;
  width: 24px;
  height: 24px;
}

.card-title {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 32px;
  color: #061b12;
}

.card-text {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 28px;
  color: #434846;
}

/* ===== Confirm ===== */
.confirm {
  position: relative;
  width: 100%;
  max-width: 393px;
  margin: 0 auto;
  min-height: 731px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 40px 68px;
  background: #ffffff;
  overflow: hidden;
}

.confirm-bg-img {
  position: absolute;
  width: 302px;
  height: 252px;
  bottom: 0;
  left: -51px;
  background: url("../img/pigeons.png") no-repeat center / cover;
  pointer-events: none;
  z-index: 2;
}

.confirm-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 313px;
  margin-bottom: 64px;
}

.confirm-heading {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 40px;
  color: #061b0e;
  text-align: left;
}

.confirm-text {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 28px;
  color: #434846;
  text-align: left;
}

.confirm-message {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 28px;
  color: #061b0e;
  text-align: left;
}

.confirm-contacts {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.contact-icon {
  width: 100%;
  height: 52px;
  border: 1px solid #061b0e;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #061b0e;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}

.contact-icon-letter {
  font-family: "DM Sans", sans-serif;
  font-weight: 900;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
}

.btn-primary {
  width: 100%;
  max-width: 313px;
  height: 52px;
  background: #38644f;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #ffffff;
}

/* ===== Calendar ===== */
.calendar-widget {
  position: relative;
  width: 100%;
  max-width: 313px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.calendar-widget img {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== Venue ===== */
.venue {
  width: 100%;
  max-width: 393px;
  margin: 0 auto;
  background: #f5f5f5 url("../img/back.png") repeat top left;
  padding: 60px 40px 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.venue-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 313px;
}

.venue-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.section-heading {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 40px;
  text-align: center;
  color: #061b0e;
}

.venue-description {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 28px;
  text-align: center;
  color: #434846;
}

.venue-image-wrapper {
  position: relative;
  width: 313px;
  margin-bottom: 32px;
}

.venue-image {
  width: 313px;
  height: 404px;
  overflow: hidden;
  box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.25);
  border: 2px solid #ffffff;
}

.venue-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn-map {
  width: 100%;
  max-width: 313px;
  height: 52px;
  background: transparent;
  border: 1px solid #061b0e;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #061b0e;
}

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #061b0e;
  background: transparent;
  border: none;
}

/* ===== Photos ===== */
.photos {
  width: 100%;
  max-width: 393px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 124px 40px 68px;
  background: #ffffff url("../icons/Upload Section.png") repeat top left;
}

.photos-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 313px;
}

.photos-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.photos-description {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 28px;
  text-align: center;
  color: #424745;
}

.photos-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.btn-outline {
  width: 100%;
  max-width: 313px;
  height: 64px;
  background: rgba(225, 235, 230, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: rgba(67, 72, 67, 0.5);
  border: none;
}

.photos .btn-primary {
  width: 100%;
  max-width: 313px;
  height: 64px;
}

/* ===== Closing ===== */
.closing {
  position: relative;
  width: 100%;
  max-width: 393px;
  margin: 0 auto;
  min-height: 860px;
  background: #061b0e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/730d62088f944a256fa9a25cc72e0e63.jpeg") no-repeat center / cover;
  z-index: 1;
}

.closing-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.closing-frame {
  display: block;
  width: 241px;
  height: auto;
}

.closing-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
}

.closing-title {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 44px;
  text-align: center;
  color: #0c2013;
  margin-bottom: 24px;
}

.divider {
  width: 128px;
  height: 1px;
  background: rgba(12, 32, 19, 0.3);
  margin-bottom: 24px;
}

.closing-signature {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: #0c2013;
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(123, 152, 139, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  padding: 32px 24px;
  max-width: 350px;
  width: 100%;
}
.modal-overlay.active .modal-content {
  animation: scaleIn 0.3s ease-out;
}

.modal-title {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 32px;
  color: #061b0e;
  margin-bottom: 24px;
}

.modal-field {
  margin-bottom: 20px;
  position: relative;
}

.modal-label {
  display: block;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #434843;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.modal-error {
  display: none;
  position: absolute;
  right: 0;
  top: 0;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 16px;
  color: #d32f2f;
  text-transform: uppercase;
}

.modal-error.visible {
  display: block;
}

.modal-input {
  width: 100%;
  height: 40px;
  border: none;
  border-bottom: 1px solid rgba(67, 72, 67, 0.3);
  font-family: "Playfair Display", serif;
  font-size: 15px;
  color: #434843;
  outline: none;
  background: transparent;
}

.modal-input::placeholder {
  color: rgba(67, 72, 67, 0.4);
}

.modal-input.error {
  border-bottom-color: #d32f2f;
}

.modal-submit {
  width: 100%;
  margin-top: 8px;
  background: #e5ebe8;
  color: rgba(67, 72, 67, 0.5);
  cursor: not-allowed;
}

.modal-submit:not(:disabled) {
  background: #38644f;
  color: #ffffff;
  cursor: pointer;
}
