@font-face {
    font-family: "Patriciana";
    src: url("/static/fonts/patriciana.otf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-main: "Segoe UI", Arial, sans-serif;
    --font-title: Georgia, "Times New Roman", serif;

    --bg: #050505;
    --card: #111111;
    --card-soft: #181818;

    --text: #f6f1e7;
    --muted: #b8ad9c;

    --gold: #d8c985;
    --gold-dark: #a9954f;

    --line: rgba(216, 201, 133, 0.28);
    --danger: #ff8e8e;

    --shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.55;
    overflow-x: hidden;
}

body,
button,
input,
textarea {
    font: inherit;
}

button,
input,
textarea {
    color: inherit;
}

a {
    color: inherit;
}

p {
    margin: 0;
}

code {
    padding: 2px 6px;
    border-radius: 7px;
    background: #222;
    color: var(--gold);
}

.site {
    width: min(1040px, calc(100% - 24px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

/* =========================
   Общие секции
========================= */

.hero {
    min-height: auto;
    display: grid;
    align-items: center;
    padding: 34px 0 44px;
}

.section,
.single-section {
    padding: clamp(18px, 4vw, 44px) 0;
}

/* =========================
   Первый экран — мозаика
========================= */

.hero--mosaic {
    min-height: auto;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 24px;
    padding: 34px 0 44px;
}

.wedding-mosaic {
    position: relative;
    width: 100%;
    max-width: 1040px;
    height: 1200px;
    aspect-ratio: auto;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);

    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;

    background:
        radial-gradient(circle at top left, rgba(216, 201, 133, 0.09), transparent 34%),
        linear-gradient(135deg, #151515, #090909);

    box-shadow: var(--shadow);
}

.wedding-mosaic::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(216, 201, 133, 0.12);
    border-radius: 24px;
    pointer-events: none;
    z-index: 5;
}

.mosaic-cell {
    position: relative;
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow: hidden;
}

.mosaic-photo {
    background: #050505;
}

.mosaic-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.85) contrast(1.05);
}

.mosaic-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #151515;
    color: var(--gold);
    text-align: center;

    padding: clamp(16px, 4vw, 34px);
}

.mosaic-text span {
    width: 42%;
    height: 2px;
    background: currentColor;
    opacity: 0.8;
}

.mosaic-date {
    gap: 12px;
    color: #f1efe5;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.mosaic-date p {
    margin: 0;
    color: inherit;
    font-size: clamp(9px, 1.8vw, 13px);
    font-weight: 700;
}

.mosaic-date strong {
    color: #ffffff;
    font-family: "Patriciana", Georgia, "Times New Roman", serif;
    font-size: clamp(44px, 5vw, 72px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.12em;
}

.mosaic-title h1 {
    margin: 0;
    color: var(--gold);
    font-family: "Patriciana", Georgia, "Times New Roman", serif;
    font-size: clamp(44px, 4.6vw, 70px);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mosaic-names {
    gap: 14px;
    color: #f1efe5;
    text-transform: uppercase;
}

.mosaic-names p {
    margin: 0;
    color: inherit;
    font-size: clamp(12px, 1.4vw, 16px);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.13em;
}

.mosaic-names strong {
    color: #ffffff;
    font-family: "Patriciana", Georgia, "Times New Roman", serif;
    font-size: clamp(11px, 1.2vw, 14px);
    letter-spacing: 0.12em;
}

.hero-mosaic-button {
    margin-top: 4px;
}

/* =========================
   Черные карточки
========================= */

.black-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at top left, rgba(216, 201, 133, 0.09), transparent 34%),
        linear-gradient(135deg, #151515, #090909);
    box-shadow: var(--shadow);
}

.black-card::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(216, 201, 133, 0.12);
    border-radius: 24px;
    pointer-events: none;
    z-index: 2;
}

.card-text {
    position: relative;
    z-index: 3;
    padding: clamp(28px, 5vw, 70px);
    display: grid;
    align-content: center;
    gap: 18px;
}

/* =========================
   Блоки по 2 в ряд
========================= */

.pair-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 3vw, 34px);
    padding: clamp(18px, 4vw, 44px) 0;
}

.text-only-card {
    display: block;
    min-height: 520px;
}

.text-only-card .card-text {
    height: 100%;
}

/* =========================
   Типографика
========================= */

.label,
.section-title {
    margin: 0;
    color: var(--gold);
    font: 700 13px / 1.5 var(--font-main);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

h2,
h3,
.script {
    font-family: var(--font-title);
    font-weight: 400;
}

h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
}

h3 {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 26px;
}

.script {
    margin: 0;
    color: var(--gold);
    font-size: clamp(28px, 3vw, 38px);
    font-style: italic;
    line-height: 1.1;
}

.card-text p:not(.label):not(.section-title) {
    color: var(--muted);
    font-size: 18px;
}

strong {
    color: var(--text);
}

/* =========================
   Кнопки
========================= */

.button,
.mini-button {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    border: 1px solid rgba(216, 201, 133, 0.55);
    border-radius: 999px;

    background: var(--gold);
    color: #080808;

    text-decoration: none;
    font-weight: 800;
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.button {
    padding: 0 32px;
}

.mini-button {
    min-height: 46px;
    margin-top: 10px;
    padding: 0 24px;
    font-size: 15px;
}

.button:hover,
.mini-button:hover {
    transform: translateY(-2px);
    background: transparent;
    color: var(--gold);
    box-shadow: 0 14px 36px rgba(216, 201, 133, 0.16);
}

.button--wide {
    width: 100%;
}

/* =========================
   Программа
========================= */

.timing__list {
    display: grid;
    gap: 22px;
    margin-top: 10px;
}

.timing__item {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: start;
    gap: 18px;
    text-align: left;
}

.timing__item time {
    min-height: 54px;
    display: grid;
    place-items: center;

    border: 1px solid var(--line);
    border-radius: 999px;

    background: var(--card-soft);
    color: var(--gold);

    font: 400 25px / 1 var(--font-title);
}

.timing__item h2 {
    margin-bottom: 4px;
    font-size: 30px;
}

.timing__item p {
    color: var(--muted);
}

/* =========================
   Фото места под текстом
========================= */

.place-photo-under {
    width: 100%;
    margin: 12px 0 6px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #111;
}

.place-photo-under img {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* =========================
   Dress-code
========================= */

.dress-text {
    margin: 0;
    padding: 20px;

    border: 1px solid var(--line);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);

    font-family: Georgia, Cambria, "Times New Roman", serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* =========================
   Анкета
========================= */

.rsvp-card {
    width: 100%;
}

.rsvp-card .card-text {
    max-width: 760px;
    margin: 0 auto;
}

.rsvp-card h2 {
    max-width: 620px;
}

.form {
    display: grid;
    gap: 22px;
    margin-top: 10px;
    text-align: left;
}

.field {
    display: grid;
    gap: 10px;
    margin-bottom: 1rem;
}

.field > span,
legend {
    color: var(--gold);
    font-weight: 700;
}

fieldset {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 18px;

    border: 1px solid var(--line);
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.03);
}

legend {
    padding: 0 10px;
    margin-bottom: 0.5rem;
}

.form input[type="text"],
.form .text-input,
.form textarea {
    width: 100%;
    min-height: 64px;
    padding: 18px 22px;

    border: 1px solid var(--line);
    border-radius: 20px;
    outline: none;

    background: #090909;
    color: var(--text);

    font: 500 clamp(17px, 2vw, 20px) / 1.3 var(--font-main);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.form input[type="text"]:focus,
.form .text-input:focus,
.form textarea:focus {
    border-color: var(--gold);
    background: #111;
    box-shadow: 0 0 0 4px rgba(216, 201, 133, 0.13);
}

.form textarea {
    min-height: 128px;
    resize: vertical;
}

.choice {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;

    margin-bottom: 0.5rem;
    color: var(--muted);
}

input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 4px 0 0;
    padding: 0;
    accent-color: var(--gold);
}

.validation {
    color: var(--danger);
    font-size: 14px;
}

.success {
    margin: 20px 0 0;
    padding: 16px 18px;

    border: 1px solid rgba(137, 210, 122, 0.35);
    border-radius: 18px;

    background: rgba(137, 210, 122, 0.12);
    color: #b8efad;

    text-align: center;
}

.guest-block {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.guest-block:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.guest-block h3 {
    font-size: 1.2rem;
}

/* =========================
   Footer
========================= */

.footer {
    margin-top: 44px;
    padding: 54px 16px 72px;

    border-top: 1px solid var(--line);

    color: var(--muted);
    text-align: center;
}

.footer p {
    margin-bottom: 10px;
    font: 400 25px / 1.2 var(--font-title);
}

.footer a {
    color: var(--gold);
    text-underline-offset: 5px;
}

.footer hr {
    width: min(100%, 420px);
    margin: 28px auto;

    border: 0;
    border-top: 1px solid var(--line);
}

/* =========================
   Анимация
========================= */

.reveal {
    opacity: 0;
    transform: translateY(24px);

    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* =========================
   Адаптив
========================= */

@media (max-width: 860px) {
    .pair-section {
        grid-template-columns: 1fr;
    }

    .text-only-card {
        min-height: auto;
    }

    .rsvp-card .card-text {
        max-width: none;
    }

    .wedding-mosaic {
        width: min(100%, 720px);
        height: auto;
        aspect-ratio: 2.15 / 3;
    }
}

@media (max-width: 560px) {
    .site {
        width: min(100% - 18px, 1040px);
        padding-top: 12px;
    }

    .hero {
        min-height: auto;
        padding: 10px 0 22px;
    }

    .hero--mosaic {
        min-height: auto;
        padding: 10px 0 28px;
    }

    .wedding-mosaic {
        width: min(100%, 430px);
        height: auto;
        aspect-ratio: 2.15 / 3.15;
        border-radius: 24px;
    }

    .wedding-mosaic::before {
        inset: 8px;
        border-radius: 18px;
    }

    .mosaic-title h1 {
        font-size: clamp(24px, 7.6vw, 36px);
        letter-spacing: 0.07em;
        line-height: 1.2;
    }

    .mosaic-date strong {
        font-size: clamp(34px, 12vw, 54px);
    }

    .mosaic-text {
        padding: 14px;
    }

    .black-card {
        border-radius: 24px;
    }

    .black-card::before {
        inset: 8px;
        border-radius: 18px;
    }

    .card-text {
        padding: 28px 22px;
    }

    h2 {
        font-size: clamp(30px, 11vw, 44px);
    }

    .script {
        font-size: clamp(30px, 10vw, 42px);
    }

    .pair-section,
    .single-section {
        padding: 18px 0;
    }

    .timing__item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .timing__item time {
        width: 118px;
        margin: 0 auto;
    }

    .place-photo-under {
        border-radius: 18px;
    }

    fieldset {
        padding: 16px;
    }

    .form input[type="text"],
    .form .text-input,
    .form textarea {
        min-height: 62px;
        padding: 16px 18px;
        font-size: 18px;
    }

    .footer p {
        font-size: 21px;
    }
}
/* Более аккуратные отступы в анкете */

.guest-block {
    display: grid;
    gap: 22px;
}

.form fieldset {
    gap: 16px;
    padding: 28px 22px 22px;
}

.form legend {
    padding: 0 10px;
    margin-left: 8px;
    background: #151515;
    color: var(--gold);
    line-height: 1.2;
}

.choice {
    min-height: 34px;
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.choice span {
    line-height: 1.35;
}

input[type="radio"],
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
}

.field {
    gap: 12px;
    margin-bottom: 0;
}

.field > span {
    color: var(--gold);
    line-height: 1.2;
}

.form textarea {
    margin-top: 2px;
}