/* =========================
   БАЗОВЫЕ СТИЛИ
========================= */
@font-face {
  font-family: 'wedFont'; 
  src: url('./fonts/wed-font.woff2') format('woff2'),
       url('./fonts/wed-font.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #faf6f1;
  --text: #3d342b;
  --accent: #c9a88c;
  --accent-dark: #8b7355;
  --muted: #8b7f72;
  --white: #ffffff;
  --error: #a05a5a;
  --success: #5a8a5a;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-weight: 400;
}

section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section-title {
  margin-bottom: 2.5rem;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  color: var(--accent-dark);
}


/* =========================
   HERO
========================= */

.hero {
  position: relative;

  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  padding: 2rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;

  background:
    linear-gradient(
      rgba(250, 246, 241, 0.7),
      rgba(250, 246, 241, 0.85)
    ),
    url('https://images.unsplash.com/photo-1519741497674-611481863552?w=1600')
      center / cover no-repeat;
}

.hero-content {
  width: 100%;
  max-width: 900px;
}

.hero-content .subtitle {
  margin-bottom: 1.5rem;

  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;

  letter-spacing: 0.4em;
  text-transform: uppercase;

  color: var(--muted);
}

.hero-content .names {
  margin-bottom: 1.5rem;

  /* font-family: 'Great Vibes', cursive; */
 font-family: 'wedFont', sans-serif;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1.1;

  color: var(--accent-dark);
}

.names {
  display: flex;
  flex-direction: column;
}

.hero-content .amp {
  /* margin: 0 0.3em; */
  font-style: italic;
  color: var(--accent);
}

/* .divider {
  width: 100px;
  height: 1px;
  margin: 1.5rem auto;
  background: var(--accent);
} */

.hero-content .date {
  margin-bottom: 0.5rem;

  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;

  letter-spacing: 0.3em;
}

.hero-content .location {
  font-style: italic;
  color: var(--muted);
}

.scroll-hint {
  position: absolute;

  bottom: 2rem;
  left: 50%;

  font-size: 2rem;
  color: var(--accent);

  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 10px);
  }
}


/* =========================
   ОБРАТНЫЙ ОТСЧЁТ
========================= */

.countdown-section {
  max-width: 100%;
  text-align: center;
  background: var(--white);
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 2rem;
}

.countdown-item {
  min-width: 100px;
  padding: 1.5rem;
}

.countdown-item span {
  display: block;

  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1;

  color: var(--accent-dark);
}

.countdown-item p {
  margin-top: 0.5rem;

  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;

  letter-spacing: 0.2em;
  text-transform: uppercase;

  color: var(--muted);
}


/* =========================
   О НАС
========================= */

.about-content {
  max-width: 700px;
  margin: 0 auto;

  font-size: 1.2rem;
  text-align: center;
}

.signature {
  margin-top: 2rem;
  font-style: italic;
  color: var(--accent-dark);
}


/* =========================
   ПРОГРАММА ДНЯ
   линия -> время -> текст
========================= */

.schedule {
  max-width: 100%;
}

.timeline {
  position: relative;

  max-width: 720px;
  margin: 0 auto;
}

.timeline-item {
  position: relative;

  display: grid;
  grid-template-columns: 28px 80px 1fr;
  column-gap: 22px;

  align-items: start;

  padding-bottom: 2.8rem;
}


/* ЛИНИЯ */

.timeline-item::after {
  content: '';

  position: absolute;

  left: 14px;
  top: 14px;
  bottom: -14px;

  width: 1px;

  background: var(--accent);

  transform: translateX(-50%);

  z-index: 1;
}

.timeline-item:last-child::after {
  display: none;
}


/* ТОЧКА */

.timeline-item::before {
  content: '';

  position: absolute;

  left: 14px;
  top: 3px;

  width: 11px;
  height: 11px;

  border-radius: 50%;

  background: var(--accent);

  transform: translateX(-50%);

  z-index: 2;
}


/* ВРЕМЯ */

.timeline-item .time {
  grid-column: 2;

  width: 80px;

  padding-top: 0;

  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;

  letter-spacing: 0.08em;

  text-align: left;

  color: var(--accent-dark);
}


/* ТЕКСТ СОБЫТИЯ */

.event {
  grid-column: 3;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  margin: 0;
  padding: 0;

  text-align: left;
}

.timeline-item h3 {
  margin: 0 0 0.3rem 0;
  padding: 0;

  font-size: 1.5rem;
  /* line-height: 1.3; */
   line-height: 1;

  color: var(--text);
}

.timeline-item p {
  margin: 0;

  font-size: 1rem;
  line-height: 1.5;

  color: var(--muted);
}


/* =========================
   МЕСТО ПРОВЕДЕНИЯ
========================= */

.venue {
  max-width: 100%;
  text-align: center;
  background: var(--white);
}

.venue-content h3 {
  margin-bottom: 1rem;

  font-size: 2rem;

  color: var(--accent-dark);
}

.venue-content .note {
  margin: 1.5rem 0;

  font-style: italic;

  color: var(--muted);
}


/* =========================
   ДРЕСС-КОД
========================= */

.dresscode {
  text-align: center;
}

.palette {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 1rem;

  margin: 2rem 0;
}

.color {
  width: 70px;
  height: 70px;

  border-radius: 50%;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.3s ease;
}

.color:hover {
  transform: scale(1.1);
}

.dresscode .note {
  font-style: italic;
  color: var(--muted);
}


/* =========================
   RSVP
========================= */

.rsvp {
  width: 100%;
  max-width: 100%;

  text-align: center;

  background: var(--white);
}

.rsvp-intro {
  margin-bottom: 2.5rem;

  font-style: italic;

  color: var(--muted);
}

#rsvpForm {
  width: 100%;
  max-width: 520px;

  margin: 0 auto;

  display: flex;
  flex-direction: column;

  gap: 1.2rem;
}


/* =========================
   ПОЛЯ ФОРМЫ
========================= */

.form-field {
  width: 100%;

  display: flex;
  flex-direction: column;

  text-align: left;
}

.form-section {
  width: 100%;

  display: flex;
  flex-direction: column;

  gap: 0.7rem;

  text-align: left;
}

.form-label {
  font-size: 1.15rem;
  color: var(--text);
}


/* =========================
   INPUT
========================= */

#rsvpForm input[type='text'],
#rsvpForm input[type='tel'] {
  display: block;

  width: 100%;
  height: 58px;

  margin: 0;
  padding: 0 16px;

  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;

  line-height: 58px;

  color: var(--text);

  background: var(--bg);

  border: 1px solid #e0d5c7;
  border-radius: 4px;

  outline: none;

  box-sizing: border-box;

  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

#rsvpForm input[type='text']::placeholder,
#rsvpForm input[type='tel']::placeholder,
#rsvpForm textarea::placeholder {
  color: #9c9185;
  opacity: 1;
}

#rsvpForm input[type='text']:focus,
#rsvpForm input[type='tel']:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 2px rgba(201, 168, 140, 0.12);
}


/* =========================
   ТЕЛЕФОН
========================= */

#phone {
  display: block;

  width: 100%;
  height: 58px;

  margin: 0;
  padding: 0 16px;

  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;

  line-height: 58px;

  color: var(--text);

  background: var(--bg);

  border: 1px solid #e0d5c7;
  border-radius: 4px;

  outline: none;

  box-sizing: border-box;

  appearance: none;
  -webkit-appearance: none;
}

#phone:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 2px rgba(201, 168, 140, 0.12);
}


/* =========================
   TEXTAREA
========================= */

#rsvpForm textarea {
  display: block;

  width: 100%;
  min-height: 110px;

  padding: 14px 16px;

  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  line-height: 1.5;

  color: var(--text);

  background: var(--bg);

  border: 1px solid #e0d5c7;
  border-radius: 4px;

  outline: none;

  resize: vertical;

  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

#rsvpForm textarea:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 2px rgba(201, 168, 140, 0.12);
}


/* =========================
   RADIO / CHECKBOX
========================= */

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;

  gap: 0.65rem;

  text-align: left;
}

.radio-group label,
.checkbox-group label {
  display: flex;
  align-items: center;

  gap: 0.65rem;

  font-size: 1.05rem;
  line-height: 1.4;

  cursor: pointer;
}

.radio-group input[type='radio'],
.checkbox-group input[type='checkbox'] {
  width: 18px;
  height: 18px;

  min-width: 18px;
  flex: 0 0 18px;

  margin: 0;

  accent-color: var(--accent-dark);

  cursor: pointer;
}


/* =========================
   УСЛОВНЫЕ ПОЛЯ
========================= */

.conditional-field[hidden] {
  display: none !important;
}

.conditional-field:not([hidden]) {
  animation:
    showField 0.3s ease;
}

@keyframes showField {
  from {
    opacity: 0;

    transform:
      translateY(-8px);
  }

  to {
    opacity: 1;

    transform:
      translateY(0);
  }
}

.nested-options {
  margin-top: 0.4rem;

  padding: 1rem 1.2rem;

  border-left:
    1px solid var(--accent);

  border-radius:
    0 4px 4px 0;

  background:
    rgba(201, 168, 140, 0.08);
}

.option-title {
  margin-bottom: 0.3rem;

  font-style: italic;

  color: var(--accent-dark);
}


/* =========================
   ОШИБКИ ВАЛИДАЦИИ
========================= */

.field-error,
.group-error {
  display: block;

  min-height: 18px;

  margin-top: 5px;

  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;

  color: var(--error);
}

#rsvpForm .input-error {
  border-color:
    var(--error) !important;

  box-shadow:
    0 0 0 2px
    rgba(160, 90, 90, 0.08) !important;
}

#rsvpForm .input-error:focus {
  border-color:
    var(--error) !important;

  box-shadow:
    0 0 0 2px
    rgba(160, 90, 90, 0.12) !important;
}


/* =========================
   КНОПКИ
========================= */

.btn {
  display: inline-block;

  margin-top: 0.5rem;
  padding: 1rem 2.5rem;

  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;

  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;

  color: var(--white);

  background: var(--accent-dark);

  border: none;
  border-radius: 2px;

  cursor: pointer;

  transition:
    background 0.3s ease,
    transform 0.3s ease,
    opacity 0.3s ease;
}

.btn:hover {
  background: var(--text);

  transform:
    translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;

  cursor: not-allowed;

  transform: none;
}

#submitBtn {
  width: 100%;
}


/* =========================
   СТАТУС
========================= */

#status {
  min-height: 1.5em;

  margin-top: 1rem;

  font-style: italic;
  text-align: center;
}

.status-success {
  color: var(--success);
}

.status-error {
  color: var(--error);
}


/* =========================
   FOOTER
========================= */

footer {
  padding: 3rem 1rem;

  text-align: center;

  background: var(--accent-dark);

  color: var(--bg);
}

.footer-names {
  margin-bottom: 0.5rem;

  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
}

footer p:last-child {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;

  letter-spacing: 0.3em;
}


/* =========================
   АНИМАЦИЯ ПОЯВЛЕНИЯ
========================= */

.fade-in {
  opacity: 0;

  transform:
    translateY(30px);

  transition:
    opacity 1s ease,
    transform 1s ease;
}

.fade-in.visible {
  opacity: 1;

  transform:
    translateY(0);
}


/* =========================
   МОБИЛЬНАЯ ВЕРСИЯ
========================= */

@media (max-width: 600px) {

  body {
    font-size: 17px;
  }

  section {
    padding:
      4rem 1.2rem;
  }


  /* HERO */

  .hero {
    padding:
      2rem 1.2rem;
  }

  .hero-content .subtitle {
    font-size: 0.75rem;

    letter-spacing: 0.3em;
  }

  .hero-content .date {
    font-size: 0.95rem;

    letter-spacing: 0.2em;
  }


  /* COUNTDOWN */

  .countdown {
    gap: 0.5rem;
  }

  .countdown-item {
    min-width: 70px;

    padding: 1rem 0.5rem;
  }

  .countdown-item span {
    font-size: 2.5rem;
  }

  .countdown-item p {
    font-size: 0.65rem;

    letter-spacing: 0.1em;
  }


  /* ПРОГРАММА */

  .timeline {
    width: 100%;
    max-width: 100%;
  }

  .timeline-item {
    grid-template-columns: 24px 62px 1fr;
    column-gap: 14px;

    padding-bottom: 2.5rem;
  }

  .timeline-item::after {
    left: 12px;
    top: 14px;
    bottom: -14px;

    transform: translateX(-50%);
  }

  .timeline-item::before {
    left: 12px;
    top: 7px;

    width: 11px;
    height: 11px;

    transform: translateX(-50%);
  }

  .timeline-item .time {
    width: auto;

    font-size: 0.82rem;
    line-height: 1.3;

    text-align: left;
    white-space: nowrap;
  }

  .timeline-item h3 {
    font-size: 1.3rem;
    line-height: 1.3;
  }

  .timeline-item p {
    font-size: 0.95rem;
    line-height: 1.45;
  }


  /* DRESS CODE */

  .color {
    width: 50px;
    height: 50px;
  }


  /* RSVP */

  #rsvpForm {
    max-width: 100%;
  }

  #rsvpForm input[type='text'],
  #rsvpForm input[type='tel'],
  #phone {
    height: 56px;

    padding:
      0 14px;

    line-height: 56px;

    font-size: 16px;
  }

  #rsvpForm textarea {
    font-size: 16px;
  }

  .nested-options {
    padding: 0.9rem;
  }

  .radio-group label,
  .checkbox-group label {
    font-size: 1rem;
  }

  .btn {
    width: 100%;

    padding:
      1rem 1.2rem;
  }
}


/* =========================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
========================= */

@media (max-width: 380px) {

  .hero-content .names {
    font-size: 3.2rem;
  }

  .countdown-item {
    min-width: 60px;
  }

  .countdown-item span {
    font-size: 2.1rem;
  }


  /* ПРОГРАММА */

  .timeline-item {
    grid-template-columns: 22px 56px 1fr;
    column-gap: 11px;
  }

  .timeline-item::after {
    left: 11px;
  }

  .timeline-item::before {
    left: 11px;
  }

  .timeline-item .time {
    font-size: 0.76rem;
    letter-spacing: 0.04em;
  }

  .timeline-item h3 {
    font-size: 1.2rem;
  }

  .timeline-item p {
    font-size: 0.9rem;
  }


  /* ФОРМА */

  #rsvpForm input[type='text'],
  #rsvpForm input[type='tel'],
  #phone {
    height: 54px;
    line-height: 54px;
  }
}