/* ============================================================
   Свадебное приглашение — mobile-first стили
   Палитра: красно-белая (референс — красно-белая свадьба)
   ============================================================ */

:root {
    --color-bg: #fdfbf7;
    --color-surface: #ffffff;
    --color-text: #3a2b2b;
    --color-muted: #8a7a7a;
    --color-primary: #a3162a;      /* глубокий красный */
    --color-primary-dark: #7e0f20;
    --color-line: #e7ddd6;
    --color-gold: #b8925a;

    --font-display: Georgia, "Times New Roman", serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --maxw: 640px;
    --radius: 14px;
    --shadow: 0 8px 30px rgba(120, 40, 40, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* --- Hero ------------------------------------------------- */
.hero {
    position: relative;
    width: 100%;
    min-height: 88vh;
    overflow: hidden;
}
.hero__media, .hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero__img { object-fit: cover; object-position: 45% top; }
.hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px 48px;
    text-align: center;
    color: #fff;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0.10) 0%,
        rgba(0,0,0,0.00) 35%,
        rgba(0,0,0,0.45) 100%);
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.hero__eyebrow {
    font-size: 0.82rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    margin: 0 0 10px;
    font-weight: 500;
}
.hero__date {
    font-family: var(--font-display);
    font-size: 2.4rem;
    letter-spacing: 0.1em;
    margin: 0;
}

/* --- Content / секции ------------------------------------- */
.content {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}
.section {
    padding: 54px 4px;
    text-align: center;
    border-bottom: 1px solid var(--color-line);
}
.section:last-child { border-bottom: none; }

.section__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 22px;
}
.section__title::after {
    content: "";
    display: block;
    width: 46px;
    height: 1px;
    background: var(--color-gold);
    margin: 14px auto 0;
}

.ornament {
    display: block;
    font-size: 1.7rem;
    color: var(--color-gold);
    margin: 0 auto 14px;
}

/* --- Intro ------------------------------------------------ */
.intro__greeting {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 16px;
}
.intro__message {
    font-size: 1.15rem;
    color: var(--color-muted);
    margin: 0;
}

/* --- Date ------------------------------------------------- */
.date__value {
    font-family: var(--font-display);
    font-size: 2.6rem;
    color: var(--color-primary);
    margin: 0;
    letter-spacing: 0.04em;
}
.date__weekday {
    color: var(--color-muted);
    margin: 4px 0 26px;
    letter-spacing: 0.1em;
}

/* --- Location --------------------------------------------- */
.location__venue {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 0 0 6px;
}
.location__address {
    color: var(--color-muted);
    margin: 0 0 20px;
}

/* --- Timeline --------------------------------------------- */
.timeline {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 340px;
    text-align: left;
    position: relative;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--color-line);
}
.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: baseline;
    padding: 12px 0 12px 30px;
    column-gap: 8px;
}
.timeline__dot {
    position: absolute;
    left: 0;
    top: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 3px solid var(--color-primary);
}
.timeline__time {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--color-primary);
    font-weight: 600;
}
.timeline__label { color: var(--color-text); }

/* --- Dresscode -------------------------------------------- */
.dresscode__text {
    max-width: 460px;
    margin: 0 auto 22px;
    color: var(--color-muted);
}
.dresscode__palette {
    display: flex;
    gap: 14px;
    justify-content: center;
}
.swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.swatch--red { background: var(--color-primary); }
.swatch--white { background: #fff; box-shadow: inset 0 0 0 1px var(--color-line); }
.swatch--black { background: #1a1a1a; }

/* --- Buttons ---------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 999px;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, transform .1s;
}
.btn:active { transform: scale(0.98); }
.btn--outline {
    padding: 12px 24px;
    color: var(--color-primary);
    background: transparent;
    border: 1.5px solid var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--primary {
    padding: 15px 32px;
    color: #fff;
    background: var(--color-primary);
    border: none;
    width: 100%;
    justify-content: center;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--primary:disabled { opacity: 0.6; cursor: default; }
.btn--text {
    color: var(--color-gold);
    background: none;
    border: none;
    padding: 4px;
    font-size: 0.98rem;
}
.btn--text:hover { color: var(--color-primary); }

/* --- RSVP form -------------------------------------------- */
.rsvp__hint {
    color: var(--color-muted);
    margin: -8px 0 26px;
}
.rsvp-form {
    max-width: 420px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.field__input {
    font: inherit;
    padding: 13px 15px;
    border: 1.5px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    width: 100%;
    transition: border-color .2s;
}
.field__input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.choice { display: flex; gap: 10px; }
.choice__option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1.5px solid var(--color-line);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--color-surface);
    transition: border-color .2s, background .2s;
    text-align: center;
}
.choice__option input {
    accent-color: var(--color-primary);
    margin: 0;
    flex-shrink: 0;
}
.choice__option span { line-height: 1; }
.choice__option:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(163, 22, 42, 0.05);
}

/* honeypot спрятан офф-экран, но не display:none (боты пропускают такие) */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.rsvp-form__error {
    color: var(--color-primary);
    font-size: 0.92rem;
    margin: 0;
}
.rsvp-thanks {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.3rem;
    padding: 20px 0;
    animation: fadeInUp .5s ease both;
}

/* --- Footer photo ----------------------------------------- */
.footer { margin-top: 8px; position: relative; }
.footer__media, .footer__img { width: 100%; }
.footer__note {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-primary);
    padding: 34px 20px 44px;
    margin: 0;
}
/* Неприметная ссылка для организаторов в правом нижнем углу. */
.footer__admin {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 0.72rem;
    color: var(--color-muted);
    text-decoration: none;
    opacity: 0.55;
    transition: opacity .2s, color .2s;
}
.footer__admin:hover { opacity: 1; color: var(--color-primary); }

/* --- Страница /guests (для организаторов) ----------------- */
.admin {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.admin__card {
    width: 100%;
    max-width: 380px;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 24px;
    text-align: center;
}
.admin__title {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--color-primary);
    margin: 0 0 8px;
}
.admin__hint {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin: 0 0 22px;
}
.admin__check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--color-text);
    cursor: pointer;
}
.admin__check input { accent-color: var(--color-primary); margin: 0; }
.admin__back { display: inline-block; margin-top: 18px; }

/* --- Reveal on scroll ------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

/* --- Desktop / планшет ------------------------------------ */
@media (min-width: 768px) {
    body { font-size: 18px; }
    .hero { min-height: 100vh; }
    .hero__date { font-size: 3.4rem; }
    .hero__eyebrow { font-size: 0.95rem; }
    .section { padding: 72px 4px; }
    .intro__greeting { font-size: 2.4rem; }
    .date__value { font-size: 3.4rem; }
    .footer__media {
        max-width: 720px;
        margin: 0 auto;
        border-radius: var(--radius);
        overflow: hidden;
    }
}

/* доступность: уважать prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    * { animation-duration: 0.001ms !important; }
}
