:root {
    --text-main: #444444;
    --text-soft: #777777;
    --text-light: #b5b5b5;
    --border-soft: #e6e6e6;
    --accent: #c7a27e;
    --bg-page: #f3f3f3;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Comfortaa", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background: var(--bg-page);
}

body {
    min-height: 100vh;
    background-image: url("/img/bg_wedding_marble.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Лоадер */
.loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(243, 243, 243, 0.85);
    z-index: 9999;
}

.loader__icon {
    width: 80px;
    height: 80px;
    animation: heartBeat 1.5s infinite;
}

.loader__text {
    margin-top: 16px;
    font-size: 14px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-light);
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.2); }
    28% { transform: scale(1); }
    42% { transform: scale(1.2); }
    70% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* Обёртка */
.page-wrap {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0 8px;
}

.invite-card {
    max-width: 450px;
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 450px) {
    .invite-card { box-shadow: none; }
}

/* Секции-карточки */
.screen {
    padding: 32px 22px 40px;
    margin-bottom: 12px;
    border-radius: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    background-color: #ffffff;
    background-image: url("/img/wedding_block_bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 360px) {
    .screen { padding-inline: 18px; }
}

.names,
.greeting-title,
.section-title,
.dresscode-title,
.form-section-title,
.final-text .names-inline,
.quote span,
.date-big {
    font-family: "Great Vibes", cursive;
    text-align: center;
    color: #555555;
}

/* ЭКРАН 1 — фон фото */
.screen--cover {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 16px;
}

.cover-photo {
    position: relative;
    min-height: 100vh;
    max-height: 760px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
    background-image: url("/img/foto.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cover-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(0,0,0,0.65) 0%,
            rgba(0,0,0,0.4) 35%,
            rgba(0,0,0,0.15) 65%,
            rgba(0,0,0,0.05) 100%
    );
}

.cover-photo__inner {
    position: absolute;
    inset: 0;
    padding: 28px 22px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    color: #ffffff;
}

.cover-names {
    font-family: "Great Vibes", cursive;
    font-size: 40px;
    line-height: 1.2;
    margin: 0 0 10px;
    color: #ffffff;
}

.cover-subtitle {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    margin-bottom: 26px;
    font-family: "Comfortaa", system-ui;
}

.cover-date-grid {
    display: flex;
    justify-content: center;
    gap: 26px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.85);
    margin-bottom: 22px;
    font-family: "Comfortaa", system-ui;
}

.cover-date-grid__col { text-align: center; }

.cover-date-grid__day {
    font-size: 32px;
    color: #ffffff;
    letter-spacing: 0.08em;
}

.cover-date-grid__year { margin-top: 2px; }

.cover-place {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    margin-bottom: 14px;
    font-family: "Comfortaa", system-ui;
}

.cover-note {
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    font-family: "Comfortaa", system-ui;
}

/* Разделитель */
.section-divider {
    width: 70%;
    max-width: 320px;
    margin: 18px auto 0;
}

.section-divider img {
    width: 100%;
    display: block;
}

/* Экран 2 — обращение + календарь */
.greeting-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 12px;
    line-height: 1.1;
}

.greeting-title span { display: block; }

.greeting-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-soft);
    margin-bottom: 18px;
    text-align: center;
}

.greeting-text p { margin: 0 0 6px; }

.date-big {
    font-size: 30px;
    margin-bottom: 14px;
}

.calendar-image-wrap {
    text-align: center;
    margin-bottom: 10px;
}

.calendar-image-wrap img {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 32px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
}

/* Экран 3 — адрес + карта */
.section-title {
    font-size: 28px;
    margin-bottom: 14px;
}

.map-section-text {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 18px;
    text-align: center;
}

.map-section-text p { margin: 0 0 6px; }

.map-address {
    font-size: 13px;
    margin-bottom: 14px;
    text-align: center;
}

.map-address strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-main);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    padding: 8px 18px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    background: #ffffff;
    color: var(--text-soft);
    text-decoration: none;
    cursor: pointer;
    font-family: "Comfortaa", system-ui;
}

.btn span { font-size: 14px; }

/* Программа дня */
.program-section-title {
    font-size: 28px;
    margin-bottom: 18px;
}

.program-list {
    display: grid;
    grid-template-columns: 72px 32px 1fr;
    column-gap: 8px;
    row-gap: 22px;
    position: relative;
    margin-top: 8px;
}

.program-list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(72px + 16px);
    width: 2px;
    background: #e0d5c7;
}

.program-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-icon-wrap img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.program-center {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.program-center::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #c7a27e;
    box-shadow: 0 0 0 4px rgba(199,162,126,0.25);
}

.program-right { text-align: left; }

.program-time {
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 2px;
    font-family: "Comfortaa", system-ui;
}

.program-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    font-family: "Comfortaa", system-ui;
}

.program-text {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.6;
}

/* Блок О цветах */
.dresscode-title {
    font-size: 26px;
    margin: 10px 0 10px;
}

.dresscode-text {
    font-size: 13px;
    color: var(--text-soft);
    text-align: center;
    line-height: 1.6;
}

.dresscode-note {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-soft);
    text-align: center;
}

/* Экран 6 — цитата, таймер и форма */
.quote {
    text-align: center;
    font-size: 22px;
    color: var(--text-soft);
    margin-bottom: 10px;
}

.quote span { display: block; }

.quote small {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-light);
    display: block;
    margin-top: 4px;
    font-family: "Comfortaa", system-ui;
}

.countdown-wrap {
    margin: 18px 0 20px;
    text-align: center;
    font-size: 11px;
    color: var(--text-soft);
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.countdown-item {
    min-width: 60px;
    padding: 8px 6px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background-color: #fff;
}

.countdown-value {
    font-size: 18px;
    color: var(--text-main);
    font-family: "Comfortaa", system-ui;
}

.countdown-label {
    margin-top: 2px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-light);
    font-family: "Comfortaa", system-ui;
}

.form-section-title {
    font-size: 26px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text-soft);
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-family: "Comfortaa", system-ui;
}

.form-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    font-family: "Comfortaa", system-ui;
}

.form-options input[type="radio"],
.form-options input[type="checkbox"] {
    accent-color: var(--accent);
}

textarea {
    width: 100%;
    resize: vertical;
    min-height: 60px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    font-family: "Comfortaa", system-ui;
    font-size: 13px;
    color: var(--text-main);
}

textarea:focus,
input:focus {
    outline: none;
    border-color: var(--accent);
}

.submit-btn {
    margin-top: 16px;
    width: 100%;
    justify-content: center;
    border-color: var(--accent);
    color: var(--accent);
}

.submit-btn img {
    width: 16px;
    height: 16px;
}

.form-note {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
}

.form-message {
    margin-top: 10px;
    font-size: 12px;
    color: var(--accent);
    text-align: center;
    min-height: 16px;
}

/* Экран 7 — финальный */
.final-text {
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-soft);
}

.final-text .names-inline {
    font-size: 30px;
    margin: 10px 0 4px;
}

.final-text small {
    display: block;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-top: 4px;
    font-family: "Comfortaa", system-ui;
}