/* Шрифт Hamilton Signature */
@font-face {
  font-family: "Hamilton";
  src: url("assets/fronts/Hamilton Signature Cyrillic/Hamiltone1.otf")
    format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Шрифт Miama Nueva */
@font-face {
  font-family: "Miama Nueva";
  src: url("assets/fronts/Miama Nueva/miamanueva.otf") format("opentype"),
    url("assets/fronts/Miama Nueva/miamanueva.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Прелоадер */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f2efe6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.preloader-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preloader-letter {
  height: 40px;
  animation: preloader-pulse 1.2s ease-in-out infinite;
}

.preloader-letter:nth-child(2) {
  animation-delay: 0.2s;
}
.preloader-letter:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes preloader-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Общие стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root,
body {
  color-scheme: only light !important;
}

body {
  font-family: "Manrope", Arial, sans-serif;
  color: #544843;
  background-color: #f2efe6;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Spacer */
.spacer {
  height: 32px;
  background-color: #f2efe6;
}

/* ========================================
   Scroll-triggered animations
   ======================================== */
.animate-on-scroll {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 1s;
  transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}

.animate-on-scroll.anim-fadein {
  opacity: 0;
}

.animate-on-scroll.anim-fadeinup {
  transform: translateY(60px);
}

.animate-on-scroll.anim-fadeindown {
  transform: translateY(-60px);
}

.animate-on-scroll.anim-fadeinleft {
  transform: translateX(-80px);
}

.animate-on-scroll.anim-fadeinright {
  transform: translateX(80px);
}

.animate-on-scroll.anim-zoomin {
  transform: scale(0.9);
}

.animate-on-scroll.anim-visible {
  opacity: 1;
  transform: none;
}

/* Delay utilities */
.anim-delay-1 {
  transition-delay: 0.1s;
}
.anim-delay-2 {
  transition-delay: 0.2s;
}
.anim-delay-3 {
  transition-delay: 0.3s;
}
.anim-delay-4 {
  transition-delay: 0.4s;
}
.anim-delay-5 {
  transition-delay: 0.5s;
}
.anim-delay-6 {
  transition-delay: 0.6s;
}

/* Duration utilities */
.anim-slow {
  transition-duration: 1.4s;
}
.anim-fast {
  transition-duration: 0.6s;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  position: relative;
  height: 700px;
  background-color: #ffffff;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  height: 100%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-image-left {
  left: 0;
  width: 540px;
  animation: hero-slide-left 1.5s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.hero-image-center {
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
  width: 540px;
  animation: hero-fadein 1.5s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.hero-image-right {
  right: 0;
  width: 540px;
  animation: hero-slide-right 1.5s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.letter-d {
  width: 42px;
  margin-top: 110px;
  animation: hero-fadein 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.3s both;
}

.letter-and {
  width: 97px;
  margin-top: 20px;
  margin-bottom: 20px;
  animation: hero-fadein 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.5s both;
}

.letter-m {
  width: 50px;
  animation: hero-fadein 1.5s cubic-bezier(0.19, 1, 0.22, 1) 0.7s both;
}

.arrow-down {
  width: 35px;
  margin-top: auto;
  margin-bottom: 104px;
  opacity: 0.7;
  animation: floating 2s ease-in-out infinite;
}

/* ========================================
   Invitation Section
   ======================================== */
.invitation-section {
  background-color: #f2efe6;
  padding: 64px 0;
  text-align: center;
  position: relative;
}

.invitation-title {
  width: 343px;
  display: block;
  margin: 0 auto;
}

.divider {
  width: 260px;
  display: block;
  margin: 26px auto 0;
}

.flower {
  width: 74px;
  display: block;
  margin: -17px auto 0;
}

.invitation-text {
  font-size: 18px;
  font-weight: 300;
  color: #544843;
  line-height: 1.45;
  margin: 16px auto 0;
  max-width: 560px;
}

.date-script {
  font-family: "Miama Nueva", cursive;
  font-size: 55px;
  font-weight: 400;
  color: #544843;
  margin-top: 48px;
}

.contact-name {
  font-family: "Miama Nueva", cursive;
  font-size: 42px;
  font-weight: 400;
  color: #544843;
  display: block;
  text-align: center;
  margin-top: 16px;
}

/* ========================================
   Location Photo (parallax)
   ======================================== */
.location-photo {
  height: 500px;
  position: relative;
  overflow: hidden;
}

.parallax-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
}

/* ========================================
   Time Section (Программа дня)
   ======================================== */
.time-section {
  background-color: #f2efe6;
  padding: 64px 0;
  position: relative;
}

.time-section .section-title {
  width: 299px;
  margin: 0 auto;
  display: block;
}

.section-heading {
  font-family: "Tenor Sans", "Manrope", serif;
  font-size: 36px;
  font-weight: 400;
  color: #544843;
  text-align: center;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.timeline {
  max-width: 600px;
  margin: 50px auto 0;
  padding: 0 20px;
}

.timeline-row {
  display: flex;
  align-items: center;
  padding: 20px 0;
}

.timeline-time {
  width: 160px;
  height: 50px;
  flex-shrink: 0;
  text-align: center;
  position: relative;
}

.timeline-time img {
  width: 120px;
  height: auto;
}

.time-script {
  font-family: "Miama Nueva", cursive;
  font-size: 42px;
  font-weight: 400;
  color: #544843;
  letter-spacing: 2px;
  position: absolute;
  top: 20%;
  left: 10%;
  white-space: nowrap;
}

.timeline-divider-v {
  width: 1px;
  height: 50px;
  background-color: #544843;
  opacity: 0.3;
  flex-shrink: 0;
  margin: 0 30px;
}

.timeline-desc {
  flex: 1;
}

.timeline-line {
  width: 100%;
  height: 1px;
  background-color: #544843;
  opacity: 0.15;
}

.time-label {
  font-size: 20px;
  font-weight: 300;
  color: #544843;
}

/* ========================================
   Address Section
   ======================================== */
.address-section {
  background-color: #f2efe6;
  padding: 64px 0;
  text-align: center;
  position: relative;
}

.address-section .section-title {
  width: 352px;
  margin: 0 auto;
  display: block;
}

.address-text {
  font-size: 18px;
  font-weight: 300;
  color: #544843;
  line-height: 1.55;
  margin: 40px auto 12px;
}

.map-button-oval {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 35px;
  padding: 14px 40px;
  border: 1px solid #544843;
  border-radius: 50px;
  color: #544843;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  font-family: "Manrope", Arial, sans-serif;
  transition: background-color 0.3s ease;
}

.map-button-oval:hover {
  background-color: rgba(84, 72, 67, 0.07);
}

.map-button-oval svg {
  flex-shrink: 0;
}

/* Outlined link with SVG stroke */
.outlined-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: #544843;
  margin-top: 10px;
  padding: 15px 50px;
}

.outlined-link-text {
  position: relative;
  z-index: 1;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #544843;
}

.outlined-link-stroke {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  height: 150%;
  z-index: 0;
}

.outlined-link:hover .outlined-link-stroke path {
  stroke: #3d2d23;
}

.pin-icon {
  vertical-align: middle;
  margin-right: 4px;
}

/* Social icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: #544843;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.social-icon:hover {
  background-color: #3d2d23;
}

/* ========================================
   Venue Photo
   ======================================== */
.venue-photo {
  background-color: #f2efe6;
  padding: 0;
  text-align: center;
}

.venue-photo img {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: cover;
}

/* ========================================
   Dresscode Section
   ======================================== */
.dresscode-section {
  background-color: #f2efe6;
  padding: 64px 0;
  text-align: center;
}

.dresscode-section .section-title {
  width: 352px;
  margin: 0 auto;
  display: block;
}

.dresscode-text {
  font-size: 18px;
  font-weight: 300;
  color: #544843;
  line-height: 1.55;
  margin: 59px auto 0;
  max-width: 600px;
}

/* ========================================
   Colors Section
   ======================================== */
.colors-section {
  background-color: #f2efe6;
  padding: 28px 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 90px;
}

.colors-section img {
  width: 70px;
  height: 70px;
}

/* ========================================
   Wishes Section
   ======================================== */
.wishes-section {
  background-color: #f2efe6;
  padding: 64px 0;
  position: relative;
}

.wishes-section .section-title {
  width: 352px;
  margin: 0 auto 42px;
  display: block;
}

.wishes-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 0 57px;
}

.wish-item {
  text-align: left;
  position: relative;
  padding-left: 10px;
}

.wish-number {
  position: absolute;
  top: -15px;
  left: -10px;
  width: 120px;
  opacity: 0.1;
  z-index: 0;
}

.wish-item p {
  font-size: 18px;
  font-weight: 300;
  color: #544843;
  line-height: 1.55;
  position: relative;
  z-index: 1;
  padding-top: 30px;
}

.decoration {
  position: absolute;
  top: 61px;
  right: 10px;
  width: 159px;
  opacity: 0.7;
  transform: rotate(-12deg);
}

/* ========================================
   Form Section (Анкета гостя)
   ======================================== */
.form-section {
  background-color: #f2efe6;
  padding: 64px 0;
  text-align: center;
}

.form-section .section-title {
  width: 393px;
  margin: 0 auto 10px;
  display: block;
}

.form-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: #544843;
  line-height: 1.55;
  margin-bottom: 40px;
}

.wedding-form {
  max-width: 460px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 400;
  color: #544843;
  margin-bottom: 5px;
  font-family: "Manrope", Arial, sans-serif;
}

.form-group textarea {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  font-weight: 400;
  color: #544843;
  background-color: transparent;
  border: 1px solid rgba(84, 72, 67, 0.3);
  border-radius: 0;
  font-family: "Manrope", Arial, sans-serif;
  resize: none;
}

.form-group textarea::placeholder {
  color: #544843;
  opacity: 0.4;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  color: #544843;
  cursor: pointer;
  font-family: "Manrope", Arial, sans-serif;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
  display: none;
}

.radio-indicator,
.checkbox-indicator {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(84, 72, 67, 0.4);
  margin-right: 10px;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.radio-indicator {
  border-radius: 50%;
}

.checkbox-indicator {
  border-radius: 0;
}

.radio-label input[type="radio"]:checked + .radio-indicator::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: #544843;
  border-radius: 50%;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-indicator::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid #544843;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.submit-button {
  width: 100%;
  height: 50px;
  background-color: #544843;
  color: #f2efe6;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Manrope", Arial, sans-serif;
  text-align: center;
  letter-spacing: 2px;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.submit-button:hover {
  background-color: #3d2d23;
}

.form-deadline {
  margin-top: 16px;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: #544843;
  text-align: center;
  letter-spacing: 0.3px;
}

/* ========================================
   Contacts Section
   ======================================== */
.contacts-section {
  background-color: #f2efe6;
  padding: 64px 0;
  text-align: center;
}

.contacts-section .section-title {
  width: 352px;
  margin: 0 auto 10px;
  display: block;
}

.contacts-section p {
  font-size: 18px;
  font-weight: 300;
  color: #544843;
  line-height: 1.55;
  margin: 59px auto 0;
}

.contact-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.contact-phone {
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #544843;
  text-decoration: none;
  padding: 14px 40px;
  border: 1px solid #544843;
  border-radius: 50px;
  transition: background-color 0.3s ease;
}

.contact-phone:hover {
  background-color: rgba(84, 72, 67, 0.07);
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery-section {
  background-color: #f2efe6;
  padding: 12px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-section img {
  height: 228px;
  width: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-section img:hover {
  transform: scale(1.03);
}

/* ========================================
   Final Section
   ======================================== */
.final-section {
  background-color: #f2efe6;
  padding: 64px 0;
  text-align: center;
  position: relative;
}

/* Calendar */
.calendar {
  max-width: 380px;
  margin: 0 auto 60px;
}

.calendar-header {
  font-family: "Tenor Sans", "Manrope", serif;
  font-size: 36px;
  font-weight: 400;
  color: #544843;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  color: #544843;
}

.calendar-table th {
  font-weight: 400;
  font-size: 15px;
  color: rgba(84, 72, 67, 0.6);
  padding: 4px 0 6px;
  text-align: center;
}

.calendar-table td {
  text-align: center;
  padding: 5px 0;
  font-weight: 300;
  font-size: 18px;
}

.calendar-highlight {
  position: relative;
  font-weight: 700 !important;
  font-size: 20px !important;
}

.calendar-highlight span {
  position: relative;
  z-index: 1;
}

.calendar-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-42%, -50%) rotate(-5deg) scale(1);
  transform-origin: center center;
  width: 52px;
  height: 62px;
  animation: calendar-heartbeat 2s ease-in-out infinite;
}

@keyframes calendar-heartbeat {
  0% {
    transform: translate(-42%, -50%) rotate(-5deg) scale(1);
  }
  50% {
    transform: translate(-42%, -50%) rotate(-5deg) scale(1.12);
  }
  100% {
    transform: translate(-42%, -50%) rotate(-5deg) scale(1);
  }
}

.final-photos {
  max-width: 700px;
  margin: 60px auto 0;
  padding: 0 40px;
  display: flex;
  justify-content: center;
  gap: 40px;
}

.final-photo {
  width: 190px;
  height: 289px;
  border-radius: 5px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.final-text {
  font-size: 20px;
  font-weight: 300;
  color: #544843;
  line-height: 1.4;
  margin: 60px auto 0;
}

.final-signature {
  width: 328px;
  margin: 61px auto 0;
}

.final-flower {
  width: 107px;
  margin: 80px auto 0;
}

/* ========================================
   Hero-only keyframes (play on load)
   ======================================== */
@keyframes hero-fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hero-slide-left {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hero-slide-right {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Infinite animations */
@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1) rotate(-7deg);
  }
  50% {
    transform: scale(1.15) rotate(-7deg);
  }
  100% {
    transform: scale(1) rotate(-7deg);
  }
}

/* ========================================
   Responsive Design
   ======================================== */
@media screen and (max-width: 1199px) {
  .wishes-grid {
    padding: 0 40px;
  }
}

@media screen and (max-width: 959px) {
  .hero-image-left,
  .hero-image-right {
    width: 0;
  }

  .hero-image-center {
    width: 100%;
  }

  .wishes-grid {
    grid-template-columns: 1fr;
    padding: 0 40px;
    max-width: 600px;
  }

  .wish-item-2 {
    order: 3;
  }

  .wish-item-3 {
    order: 2;
  }

  .decoration {
    position: relative;
    top: auto;
    right: auto;
    display: block;
    margin-left: auto;
    margin-right: 20px;
    margin-top: -30px;
    width: 140px;
  }

  .timeline-time {
    width: 120px;
  }

  .timeline-time img {
    width: 90px;
  }

  .timeline-divider-v {
    margin: 0 20px;
  }
}

@media screen and (max-width: 639px) {
  .location-photo {
    height: 350px;
  }

  .invitation-text,
  .dresscode-text,
  .address-text {
    font-size: 17px;
    padding: 0 20px;
  }

  .colors-section {
    gap: 40px;
    flex-wrap: wrap;
    padding: 0 20px;
  }

  .gallery-section {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 15px 20px 0;
  }

  .gallery-section img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    grid-column: span 2;
  }

  .gallery-section img:nth-child(7) {
    grid-column: span 3;
  }

  .gallery-section img:nth-child(8) {
    grid-column: span 3;
  }

  .venue-photo img {
    max-width: 100%;
  }
}

@media screen and (max-width: 479px) {
  .hero-section {
    height: 600px;
  }

  .letter-d {
    width: 35px;
  }

  .letter-and {
    width: 80px;
  }

  .letter-m {
    width: 42px;
  }

  .arrow-down {
    width: 28px;
  }

  .invitation-title,
  .section-title {
    width: 90%;
    max-width: 300px;
  }

  .divider {
    width: 200px;
  }

  .flower {
    width: 60px;
  }

  .date {
    width: 180px;
  }

  .invitation-text,
  .dresscode-text,
  .address-text,
  .final-text {
    font-size: 16px;
  }

  .date-script {
    font-size: 36px;
    margin-top: 32px;
  }

  .contact-name {
    font-size: 32px;
  }

  .time-script {
    font-size: 32px;
  }

  .time-label {
    font-size: 17px;
  }

  .colors-section img {
    width: 60px;
    height: 60px;
  }

  .wish-number {
    width: 100px;
  }

  .wedding-form {
    max-width: 90%;
    padding: 0 20px;
  }

  .submit-button {
    width: 100%;
  }

  .final-photos {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
  }

  .final-photo {
    width: 146px;
    height: 224px;
  }

  .final-text {
    margin-top: 40px;
  }

  .final-signature {
    width: 260px;
  }

  .final-flower {
    width: 86px;
    margin-top: 50px;
  }

  .decoration {
    width: 120px;
    margin-right: 10px;
  }
}
