/* ===== ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ (цвета и общие настройки) ===== */
:root {
  color-scheme: light;
  --bg: #ececec;
  --paper: #ffffff;
  --wine: #4d0000;
  --text: #431717;
  --text-light: #f4f4f4;
  --line: rgba(255, 255, 255, 0.5);
  --hero-title-offset: -10px;
  --hero-image-top-gap: 0px;
  --hero-image-crop-top: 100px;
}

/* ===== ШРИФТЫ =====
   InterLocal — базовый текст
   GogolLocal — крупные декоративные заголовки (.script)
*/
@font-face {
  font-family: "InterLocal";
  src: url("./fonts/Inter-4.1/web/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "InterLocal";
  src: url("./fonts/Inter-4.1/web/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "GogolLocal";
  src: url("./fonts/ofont.ru_Gogol.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== БАЗОВЫЙ RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  font-family: "InterLocal", "Inter", sans-serif;
  font-weight: 400;
  color: var(--text);
}

p,
h1,
h2 {
  margin: 0;
}

/* ===== ВНЕШНИЙ КОНТЕЙНЕР СТРАНИЦЫ ===== */
.invitation {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

@media (max-width: 767px) {
  .invitation {
    max-width: none;
  }
}

/* Светлый и бордовый фоновые модификаторы секций */
.section-light {
  background: var(--bg);
  color: var(--text);
}

.section-wine {
  background: var(--wine);
  color: var(--text-light);
}

/* Декоративный шрифт для крупных заголовков/времени */
.script {
  font-family: "GogolLocal", "Marck Script", "Segoe Script", cursive;
  font-weight: 400;
}

/* ===== HERO (верхняя часть с именами и картинкой) ===== */
.hero {
  position: relative;
  text-align: center;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

/* Верхняя подпись "Приглашение..." */
.hero__lead {
  position: absolute;
  top: calc(var(--hero-title-offset) + 90px);
  left: 0;
  right: 0;
  z-index: 2;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

/* Имена */
.hero__names {
  position: absolute;
  top: calc(var(--hero-title-offset) + 170px);
  left: 0;
  right: 0;
  z-index: 2;
  margin-top: 0;
  font-size: clamp(42px, 14.5vw, 52px);
  line-height: 0.98;
}

/* Обертка картинки (можно расширять за пределы контейнера) */
.hero__image-wrap {
  margin: 0 -50px 0;
  padding-top: var(--hero-image-top-gap);
  background: transparent;
  overflow: hidden;
}

/* Главная картинка в hero */
.hero__image {
  display: block;
  width: 100%;
  margin-left: 0%;
  height: calc(800px + var(--hero-image-crop-top));
  margin-top: calc(-1 * var(--hero-image-crop-top));
  object-fit: cover;
  object-position: center top;
  user-select: none;
  -webkit-user-drag: none;
  transform: scale(0.96);
  transform-origin: center top;
}

/* ===== ОСНОВНОЙ КРАСНЫЙ БЛОК ("колбаса") ===== */
.event {
  position: relative;
  z-index: 4;
  margin-top: -20px;
  text-align: center;
  padding: 0 26px 0;
  height: 1900px;
}

/* Псевдоэлементы для скруглений сверху/снизу */
.event::before,
.event::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  background: var(--wine);
  pointer-events: none;
  z-index: 0;
}

/* Верхняя дуга красного блока */
.event::before {
  top: -167px;
  height: 350px;
  border-radius: 100% 100% 0 0;
}

/* Нижняя дуга красного блока
.event::after {
  bottom: -150px;
  height: 200px;
  border-radius: 0 0 100% 100%;
} */ 

/* Контент всегда поверх псевдоэлементов */
.event > * {
  position: relative;
  z-index: 1;
}

/* Дата */
.event__day {
  font-size: clamp(78px, 22vw, 92px);
  font-weight: 400;
  line-height: 0.92;
}

/* Месяц */
.event__month {
  margin-top: 8px;
  font-size: clamp(58px, 16vw, 68px);
  line-height: 0.92;
}

/* Год */
.event__year {
  margin-top: 6px;
  font-size: clamp(84px, 24vw, 104px);
  font-weight: 400;
  line-height: 0.92;
}

/* Заголовок приглашения в красном блоке */
.event__title {
  margin-top: 34px;
  font-size: clamp(56px, 16vw, 66px);
  line-height: 0.95;
}

/* Описание */
.event__text {
  margin-top: 34px;
  font-size: 18px;
  line-height: 1.45;
}

/* Вертикальная разделительная линия */
.divider {
  width: 1px;
  height: 108px;
  margin: 50px auto;
  background: var(--line);
}

/* Подпись "Место встречи" */
.event__label {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

/* Название лофта */
.event__place {
  margin-top: 20px;
  font-size: clamp(62px, 17vw, 72px);
  line-height: 0.95;
}

/* Кнопки-контуры в красных блоках */
.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 30px;
  padding: 0 36px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.01em;
}

/* ===== РАСПИСАНИЕ ===== */
.schedule {
  display: grid;
  gap: 58px;
  margin-top: 0px;
}

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

/* Время (17:00 и т.д.) */
.schedule__time {
  font-size: clamp(74px, 20vw, 88px);
  line-height: 0.98;
}

/* Подпись под временем */
.schedule__text {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.2;
}

/* ===== КРУЖЕВО ===== */
.lace-band {
  position: relative;
  z-index: 1;
  margin-top: -10px;
  overflow: hidden;
}

.lace-band img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center bottom;
  user-select: none;
  -webkit-user-drag: none;
}

/* ===== ТИПОВЫЕ СТИЛИ СВЕТЛЫХ СЕКЦИЙ ===== */
.section-script {
  font-size: clamp(58px, 16vw, 66px);
  text-align: center;
  line-height: 0.98;
}

.section-text {
  margin-top: 30px;
  font-size: 18px;
  line-height: 1.42;
  text-align: center;
}

/* ===== ДРЕСС-КОД ===== */
.dress-code {
  padding: 112px 20px 74px;
}

.palette {
  margin-top: 44px;
  display: flex;
  justify-content: center;
}

/* Палитра кружков */
.swatch {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: block;
}

.swatch + .swatch {
  margin-left: -8px;
}

/* Цвета палитры */
.swatch-1 {
  background: #5a0000;
}

.swatch-2 {
  background: #7a0404;
}

.swatch-3 {
  background: #813848;
}

.swatch-4 {
  background: #5f673d;
}

.swatch-5 {
  background: #908a44;
}

.swatch-6 {
  background: #bfc08f;
}

/* ===== ДЕТАЛИ ===== */
.details {
  padding: 70px 20px 64px;
}

/* ===== ТАЙМЕР ===== */
.countdown {
  padding: 62px 20px 248px;
}

.countdown .section-script {
  font-size: clamp(52px, 14.4vw, 59px);
  line-height: 1;
  padding-inline: 8px;
}

.countdown-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  text-align: center;
}

.countdown-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-item__value {
  font-size: clamp(45px, 10.5vw, 50px);
  font-weight: 400;
  line-height: 1;
}

.countdown-item:not(:last-child)::after {
  content: ":";
  position: absolute;
  top: 0;
  right: -1px;
  transform: translateX(50%);
  font-size: clamp(45px, 10.5vw, 50px);
  font-weight: 400;
  line-height: 1;
}

.countdown-item__label {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.03em;
}

/* ===== ВТОРОЙ КРАСНЫЙ БЛОК (чат) ===== */
.chat {
  position: relative;
  z-index: 3;
  margin-top: -20px;
  text-align: center;
  padding: 0px 22px 80px;
}

/* Верхняя дуга блока чата */
.chat::before {
  content: "";
  position: absolute;
  top: -167px;
  left: 0;
  right: 0;
  height: 350px;
  background: var(--wine);
  border-radius: 100% 100% 0 0;
  z-index: 0;
}

/* Контент поверх дуги */
.chat > * {
  position: relative;
  z-index: 1;
}

.chat__title {
  margin-top: -10px;
  font-size: clamp(45px, 16vw, 50px);
  line-height: 1;
}

.chat__text {
  margin-top: 38px;
  font-size: 18px;
  line-height: 1.45;
}

.chat .outline-btn {
  margin-top: 44px;
  min-height: 54px;
  font-size: 17px;
  padding: 0 44px;
}

/* ===== ФОРМА RSVP ===== */
.rsvp {
  padding: 84px 24px 100px;
  background: var(--paper);
}

.rsvp__title {
  text-align: center;
  font-size: clamp(64px, 17vw, 74px);
  line-height: 0.96;
  color: #3f3936;
}

.rsvp-form {
  margin-top: 82px;
}

.rsvp-field {
  display: block;
  margin-bottom: 28px;
}

.rsvp-field__label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #968f89;
}

.rsvp-field__control {
  width: 100%;
  border: none;
  border-bottom: 1px solid #d5cfc9;
  background: transparent;
  padding: 0 0 10px;
  margin: 0;
  color: #4b433d;
  font-family: "InterLocal", "Inter", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  outline: none;
}

.rsvp-field__control::placeholder {
  color: #b9b1aa;
  font-style: italic;
}

.rsvp-field__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M2 2L8 8L14 2' stroke='%23b4aa9d' stroke-width='1.6' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 26px;
  cursor: pointer;
}

.rsvp-field__textarea {
  min-height: 56px;
  line-height: 1.45;
  resize: vertical;
}

/* Кнопка "ОТПРАВИТЬ" */
.rsvp-submit {
  display: block;
  width: 172px;
  height: 46px;
  margin: 18px auto 0;
  border: none;
  border-radius: 999px;
  background: var(--wine);
  color: #e6ddd8;
  font-size: 16px;
  letter-spacing: 0.16em;
  font-weight: 400;
  cursor: pointer;
}

.rsvp-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.rsvp-status {
  min-height: 24px;
  margin: 14px auto 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: #7e756e;
}

.rsvp-status--ok {
  color: #4c6d5a;
}

.rsvp-status--error {
  color: #8a4a45;
}

/* ===== НИЖНИЙ КРАСНЫЙ ФУТЕР ===== */
.closing {
  text-align: center;
  /* Отступ контента от НАЧАЛА красного блока (верх "колбаски") */
  padding: 0px 20px 64px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.closing__line {
  font-size: clamp(44px, 12vw, 54px);
  line-height: 0.95;
}

.closing__date {
  /* Это отступ между "С любовью..." и строкой "27 июня 2026" */
  margin-top: 16px;
  font-size: 18px;
  letter-spacing: 0.03em;
  color: rgba(244, 244, 244, 0.92);
}
