/* Mobile */
:root {
    --primary-font: "Literata", serif; /* Light 300, Regular 400, Medium 500, SemiBold 600, Bold 700 */
    --secondary-font: "Nunito", sans-serif; /* Light 300, Regular 400, Medium 500, SemiBold 600, Bold 700 */
    --primary-color: #FFFBDB;
    --secondary-color: #979372;
    --border-color: #E9E6B9;
    --max-width: 100vw;
}

/* Tablet */
@media (min-width: 800px) {
    :root {
        --max-width: 30rem;
    }
}
/* Desktop */
@media (min-width: 1280px) {
    :root {
        --max-width: 30rem;
    }
}

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

html {
    scroll-behavior: smooth; /* Плавная прокрутка при клике на якорные ссылки */
    scroll-snap-type: y mandatory;
}

/* Изображения никогда не вылезут за пределы своего контейнера */
img, 
picture, 
video, 
canvas, 
svg {
    display: block;
    max-width: 100%;
}

/* Убираем стандартные маркеры у списков */
ul, 
ol {
    list-style: none;
}

/* Сбрасываем стили ссылок */
a {
    text-decoration: none;
    color: inherit;
}

/* Наследуем шрифты для элементов форм (по умолчанию они используют свои) */
input, 
button, 
textarea, 
select {
    font: inherit;
}

body {
    background-color: var(--primary-color);
    -webkit-font-smoothing: antialiased; /* Делает шрифты более гладкими на macOS */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
}

.container {
    width: var(--max-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
}

.screen {
    height: 100vh; /* 100vh означает 100% от высоты видимой части окна браузера (Viewport Height) */
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем элементы по горизонтали */
    justify-content: space-evenly; /* Центрируем элементы по вертикали */
    text-align: center; /* Центрируем сам текст внутри его контейнера */
    padding: 20px; /* Добавляем внутренние отступы, чтобы на телефонах текст не прилипал к краям экрана */
    scroll-snap-align: start; /* Примагничиваемся верхним краем (началом) блока */
}

.screen-first {
    background-color: #3B2F28;
}

.max-width {
    width: 100%;
}

.block-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 calc(var(--max-width) * 0.2) 0;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 0 0 calc(var(--max-width) * 0.5) calc(var(--max-width) * 0.5);
}

.image-1 {
    border-radius: 0 0 calc(var(--max-width) * 0.5) calc(var(--max-width) * 0.5);
    margin-bottom: 3rem;
}

.large-name {
    font-family: var(--primary-font);
    font-weight: 400;
    font-size: 3.5rem;
    line-height: 1;
}

.ampersand {
    font-family: var(--secondary-font);
    font-style: italic;
    font-weight: 400;
    line-height: 1.2;
    font-size: 1.5rem;
    translate: 0 0.2em;
}

.divider {
    width: 50%;
    height: 0.0625rem;
    margin: 4rem 0 4rem 0;
    background-color: var(--primary-color);
}

.dear-guests {
    font-family: var(--primary-font);
    font-weight: 400;
    font-size: 2rem;
    text-align: center;
    letter-spacing: -0.03em;
    line-height: 1;
}

.dear-guests-description {
    font-family: var(--secondary-font);
    text-align: center;
    line-height: 1.2;
    margin: 2rem 0 2rem 0;
    padding: 0 3rem;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.date-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.date-text {
    font-family: var(--secondary-font);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.date-number {
    font-family: var(--primary-font);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1;
    translate: 0 -0.1em;
}

.divider-vertical {
    height: 3rem;
    width: 0.0625rem;
    margin: 0 1rem 0 1rem;
    background-color: var(--primary-color);
}

.outlined {
    outline-width: 0.5rem;
    outline: 0.5rem solid var(--border-color);
}

.block-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(var(--max-width) * 0.3) 3rem;
    text-align: center;
    color: var(--secondary-color);
}

.route-button {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 1.2rem;
    border: 0.0625rem solid var(--secondary-color);
    padding: 0.7rem 0;
    width: 80%;
    font-family: var(--secondary-font);
    font-weight: 500;
    line-height: 1;
    font-size: 1rem;
}

.block-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(var(--max-width) * 0.3) 3rem;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: calc(var(--max-width) * 0.5);
}

.time {
    font-family: var(--primary-font);
    font-weight: 400;
    font-size: 2rem;
    text-align: center;
    line-height: 1;
    margin-top: 3rem;
}

.time-description {
    font-family: var(--secondary-font);
    text-align: center;
    line-height: 1.2;
    font-size: 1rem;
    letter-spacing: -0.02em;
    margin-top: 0.5rem;
}

.block-4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(var(--max-width) * 0.3) 0 0 0;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: calc(var(--max-width) * 0.5) calc(var(--max-width) * 0.5) 0 0;
}

.timer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.timer-block-top {
    font-family: var(--primary-font);
    font-weight: 400;
    font-size: 2rem;
    text-align: center;
    line-height: 1;
}

.timer-block-bottom {
    font-family: var(--secondary-font);
    text-align: center;
    line-height: 1;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.divider-timer {
    font-family: var(--primary-font);
    font-weight: 400;
    font-size: 1.5rem;
    text-align: center;
    line-height: 1;
    margin: 0 0.5rem;
    translate: 0 -0.3rem;
}

.image-2 {
    border-radius: calc(var(--max-width) * 0.5) calc(var(--max-width) * 0.5) 0 0;
    margin-top: 3rem;
}

#rsvpForm {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.form-label {
    font-family: var(--secondary-font);
    font-size: 0.8rem;
    font-weight: 500;
}

#name {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 1.2rem;
    border: 0.0625rem solid var(--secondary-color);
    padding: 0.2rem;
    width: 100%;
    font-family: var(--secondary-font);
    font-weight: 500;
    line-height: 1;
    font-size: 1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 0.6rem;
}

.checkbox-subgroup {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--secondary-font);
    font-size: 0.8rem;
    font-weight: 500;
}

#submitBtn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 1.2rem;
    border: 0.0625rem solid var(--primary-color);
    padding: 0.7rem 0;
    width: 100%;
    font-family: var(--secondary-font);
    font-weight: 500;
    line-height: 1;
    font-size: 1rem;
}

#submitBtn:active {
    opacity: 0.9;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  border: 0.0625rem solid var(--secondary-color);
  border-radius: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

input[type="checkbox"]:checked {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

input[type="checkbox"]:checked::after {
  content: '✔';
  color: var(--primary-color);
  font-size: 0.8rem;
}