/* ───────────────────────────────────────────────────────────────
   Свадебное приглашение — основные стили
   Цвета: nude, пудра, крем, беж, шампань, карамель, кофе
   ─────────────────────────────────────────────────────────────── */

:root {
    --cream: #FBF7F1;
    --powder: #F3E5E0;
    --champagne: #F7E7CE;
    --nude: #E6C8B3;
    --beige: #D4B896;
    --caramel: #B08D6F;
    --coffee: #2a2a2a;
    --mocha: #1a1a1a;
    --gold: #8a8a8a;
    --gold-light: #b5b5b5;
    --text: #1a1a1a;
    --text-light: #4a4a4a;
    --white: #FFFFFF;

    --font-script: 'Marggraff Kursiv Zarte', cursive;
    --font-serif: 'Marggraff Kursiv Zarte', Georgia, serif;
    --font-sans: 'Segoe UI', sans-serif;
    --font-subtitle: 'Akademie Alte', Georgia, serif;

    --radius: 24px;
    --radius-lg: 36px;
    --radius-xl: 48px;

    --shadow-soft: 0 8px 32px rgba(107, 78, 61, 0.06);
    --shadow-medium: 0 16px 48px rgba(107, 78, 61, 0.1);
    --shadow-premium: 0 24px 80px rgba(90, 63, 46, 0.14);
}

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

/* ─────────────────────────────────────────
   Локальные шрифты
   ───────────────────────────────────────── */
@font-face {
    font-family: 'Marggraff Kursiv Zarte';
    src: url('../fonts/Marggraff Kursiv Zarte.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vetrino';
    src: url('../fonts/Vetrino.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Akademie Alte';
    src: url('../fonts/Akademie Alte.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Подзаголовки и пожелания — Akademie Alte */
.hero-pretitle,
.hero-invitation,
.date-full,
.date-countdown,
.location-address,
.wish-text h3,
.wish-text p,
.second-day-text p,
.rsvp-intro,
.closing-text {
    font-family: var(--);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--cream);
    min-height: 100vh;
    position: relative;
    width: 100%;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────
   Фон: WebGL canvas и CSS fallback
   ───────────────────────────────────────── */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.bg-video.ready {
    opacity: 1;
}

.bg-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(251, 247, 241, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 80%, rgba(243, 229, 224, 0.3) 0%, transparent 55%),
        linear-gradient(180deg, rgba(251, 247, 241, 0.1) 0%, rgba(251, 247, 241, 0.35) 100%);
}

.fabric-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(230, 200, 179, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(247, 231, 206, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(212, 184, 150, 0.3) 0%, transparent 60%),
        linear-gradient(135deg, var(--cream) 0%, var(--powder) 50%, var(--champagne) 100%);
    background-size: 200% 200%, 200% 200%, 150% 150%, 100% 100%;
    animation: fabricFlow 15s ease-in-out infinite;
    opacity: 0.85;
}

@keyframes fabricFlow {
    0%, 100% { background-position: 0% 50%, 100% 50%, 50% 0%, 0 0; }
    50% { background-position: 100% 50%, 0% 50%, 50% 100%, 0 0; }
}

/* Когда видео готово, CSS-fallback скрывается */
body.video-ready .fabric-fallback {
    opacity: 0;
    transition: opacity 1.5s ease;
}

/* ─────────────────────────────────────────
   Стартовый экран: конверт
   ───────────────────────────────────────── */
.envelope-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(243, 229, 224, 0.9) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 70%, rgba(247, 231, 206, 0.8) 0%, transparent 55%),
        rgba(251, 247, 241, 0.96);
    backdrop-filter: blur(16px);
    transition: opacity 1.2s ease, visibility 1.2s ease;
}

.envelope-overlay.opened {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.envelope-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Видео-режим конверта — на весь экран */
.envelope-video-mode {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.envelope-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
}

/* На мобильных устройствах видео-интро уменьшается и центрируется
   по горизонтали, чтобы конверт полностью помещался на экране.
   Вместо transform: scale используем реальные размеры — так не появляется
   лишнего горизонтального прокрута и не ломается общий масштаб страницы. */
/* @media (max-width: 770px) {
    .envelope-video {
        width: 99vw;
        height: 99vh;
        object-fit: contain;
    }
} */

@media (max-width: 480px) {
    .envelope-video {
        width: 240vw;
    }
}

@media (max-width: 360px) {
    .envelope-video {
        width: 230vw;
    }
}

.envelope-flash {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, #FFFFFF 0%, #FFFBF5 60%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.envelope-overlay.opening .envelope-flash {
    animation: envelopeFlash 1.0s ease-out forwards;
}

@keyframes envelopeFlash {
    0% { opacity: 0; }
    40% { opacity: 0.95; }
    100% { opacity: 0; }
}

/* Fallback: CSS-конверт, если видео недоступно */
.envelope-fallback {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
}

body.envelope-fallback-active .envelope-video-mode {
    display: none;
}

body.envelope-fallback-active .envelope-fallback {
    display: flex;
}

.envelope {
    position: relative;
    width: min(360px, 88vw);
    height: min(240px, 58vw);
    cursor: pointer;
    perspective: 1800px;
    filter: drop-shadow(0 32px 64px rgba(90, 63, 46, 0.22)) drop-shadow(0 8px 20px rgba(90, 63, 46, 0.12));
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.envelope:hover,
.envelope:active {
    transform: translateY(-10px) scale(1.03);
}

/* Текстура бумаги */
.envelope-paper-texture {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 10;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

/* Задняя стенка конверта */
.envelope-back {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #E8D4C2 0%, #D9BFA8 50%, #C9A98D 100%);
    border-radius: 22px;
    z-index: 1;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 0 -8px 24px rgba(107, 78, 61, 0.08);
}

/* Открытка внутри */
.envelope-card {
    position: absolute;
    top: 8%;
    left: 4%;
    width: 92%;
    height: 82%;
    background: linear-gradient(145deg, #FFFCF8 0%, #FDF8F2 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
    box-shadow: 0 4px 20px rgba(74, 63, 58, 0.08);
    border: 1px solid rgba(230, 200, 179, 0.5);
    transform: translateY(0);
}

.envelope-card-text {
    text-align: center;
    padding: 1.5rem;
}

.envelope-card-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.envelope-card-names {
    display: block;
    font-family: var(--font-script);
    font-size: 2.8rem;
    color: var(--coffee);
    line-height: 1.15;
    margin-bottom: 0.8rem;
}

.envelope-card-date {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

/* Передняя стенка конверта (карман) */
.envelope-front {
    position: absolute;
    inset: 0;
    background: linear-gradient(170deg, #E6C8B3 0%, #D4B896 55%, #C4A684 100%);
    border-radius: 22px;
    z-index: 3;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -6px 20px rgba(107, 78, 61, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 93%, 0 100%);
}

.envelope-front::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 45%);
}

.envelope-pocket-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.2) 100%);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    opacity: 0.7;
}

/* Клапан сверху */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 56%;
    background: linear-gradient(160deg, #DCC3AD 0%, #D1B79C 60%, #C4A684 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top center;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1), z-index 0s linear 0.5s;
    z-index: 4;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 4px 12px rgba(90, 63, 46, 0.08);
}

.envelope-flap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, transparent 65%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
}

/* Сургучная печать — поверх всех элементов конверта */
.envelope-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #C9A075 0%, #9E7654 60%, #7A563D 100%);
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow:
        0 6px 18px rgba(90, 63, 46, 0.32),
        inset 0 -3px 8px rgba(0, 0, 0, 0.1),
        inset 0 3px 8px rgba(255, 255, 255, 0.2);
    z-index: 50;
    transition: transform 1.0s cubic-bezier(0.45, 0, 0.55, 1) 0.5s, opacity 0.5s ease 1.5s;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.envelope-seal::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.envelope-seal::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.envelope-hint {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text);
    opacity: 0.8;
    z-index: 6;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Анимация открытия конверта */
.envelope-overlay.opening .envelope-flap {
    transform: rotateX(180deg);
    z-index: 0;
}

.envelope-overlay.opening .envelope-seal {
    transform: translate(-50%, 420%) rotate(22deg);
    opacity: 0;
}

/* Открытка остаётся позади передней стенки, пока не выедет из конверта */
.envelope-overlay.opening .envelope-card {
    transform: translateY(-125%);
}

.envelope-overlay.opened .envelope-card {
    transform: translateY(-125%);
}

/* ─────────────────────────────────────────
   Основной контент
   ───────────────────────────────────────── */

   .intro-section {
    text-align: center;
}

.intro-text {
    max-width: 640px;
    margin: 0 auto;
    font-family: var(--font-script);
    font-size: 1.2rem;
    color: var(--text);
    line-height: 1.8;
}

.intro-text p + p {
    margin-top: 1.2rem;
}

.invitation-content {
    position: relative;
    z-index: 1;
    padding: 2rem 1rem 4rem;
    max-width: 720px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease 0.4s, transform 1.2s ease 0.4s;
}

.invitation-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.invitation-content.hidden {
    display: none;
}

.section {
    margin-bottom: 2rem;
    position: relative;
}

.section-inner {
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 3rem 1.5rem;
    overflow: visible;
    position: relative;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--text);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text), transparent);
    margin: 1rem auto 0;
    opacity: 0.3;
}

.section-title::before {
    display: block;
    font-size: 1rem;
    color: var(--text);
    opacity: 0.5;
    margin-bottom: 0.6rem;
}

/* Иллюстрации для блоков */
.block-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.block-illustration img,
.block-illustration svg {
    max-width: 220px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
    opacity: 0.95;
}

.hero-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.hero-illustration img,
.hero-illustration svg {
    max-width: 180px;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

/* ─────────────────────────────────────────
   Hero / полноэкранная открытка
   ───────────────────────────────────────── */
.hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    margin: -2rem -1rem 1.5rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-premium);
    padding-bottom: 12vh;
}

.hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    filter: brightness(0.85) saturate(0.95);
    transform: scale(1.05);
    animation: heroImageZoom 12s ease-in-out infinite alternate;
}

@keyframes heroImageZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.12); }
}

.hero-image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--nude), var(--beige), var(--caramel));
    color: var(--white);
    font-size: 1.2rem;
    text-align: center;
    padding: 2rem;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 0%, rgba(74, 63, 58, 0.25) 100%),
        linear-gradient(180deg, rgba(74, 63, 58, 0.25) 0%, transparent 25%, transparent 45%, rgba(74, 63, 58, 0.55) 100%);
    z-index: 1;
}

.hero-grain {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    z-index: 2;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 700px;
    color: var(--white);
    text-shadow: 0 2px 20px rgba(74, 63, 58, 0.3);
    animation: heroContentFade 1.4s ease 0.4s both;
}

@keyframes heroContentFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-ornament {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.9;
    line-height: 1;
}

.hero-ornament.top { margin-bottom: 1.5rem; }
.hero-ornament.bottom { margin-top: 1.5rem; }

.hero-pretitle {
    font-family: var(--font-subtitle);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1.2rem;
    opacity: 0.9;
}

.hero-names {
    font-family: var(--font-script);
    font-size: 5.2rem;
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero-names .name {
    display: block;
}

.hero-names .ampersand {
    display: block;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0.4rem 0;
    line-height: 1;
}

.hero-date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-date-divider .divider-line {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.hero-date-divider .divider-text {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    /* text-transform: uppercase; */
    color: rgba(255, 255, 255, 0.9);
}

.hero-invitation {
    font-size: 1.1rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 400;
    opacity: 0.95;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    animation: scrollHintBounce 2s ease-in-out infinite;
}

@keyframes scrollHintBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

.scroll-hint:hover {
    opacity: 1;
}

.scroll-hint-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.scroll-hint-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(45deg);
}

/* ─────────────────────────────────────────
   Блок даты
   ───────────────────────────────────────── */
.calendar-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 320px;
    margin: 0 auto 2rem;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--nude);
}

.calendar-header {
    background: var(--text);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    letter-spacing: 0.15em;
    /* text-transform: uppercase; */
}

.calendar-body {
    padding: 1.2rem;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 0.7rem;
}

.weekdays span {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-light);
    /* text-transform: uppercase; */
    font-weight: 400;
    letter-spacing: 0.05em;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.days span {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--text);
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.days span:hover:not(.highlighted) {
    background: rgba(230, 200, 179, 0.2);
}

.days span.highlighted {
    background: var(--text);
    color: var(--white);
    font-weight: 400;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.date-full {
    text-align: center;
    font-family: var(--font-subtitle);
    font-size: 1.4rem;
    color: var(--coffee);
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

.date-countdown {
    text-align: center;
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

/* ─────────────────────────────────────────
   Блок места
   ───────────────────────────────────────── */
.location-name {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--coffee);
    margin-bottom: 0.6rem;
}

.location-address {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

.btn-map {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--text);
    color: var(--white);
    padding: 1rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 400;
    margin: 0 auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.btn-map:hover,
.btn-map:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    background: var(--mocha);
}

.location-section .section-inner {
    text-align: center;
}

/* ─────────────────────────────────────────
   Таймлайн
   ───────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    bottom: 0.6rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.15) 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.8rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.35rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--text);
    transform: translateX(-6px);
}

.timeline-time {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text);
    font-weight: 400;
    margin-bottom: 0.3rem;
}

.timeline-content h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--coffee);
    margin-bottom: 0.4rem;
    font-weight: 400;
}

.timeline-content p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ─────────────────────────────────────────
   Дресс-код
   ───────────────────────────────────────── */
/* ─────────────────────────────────────────
   Пожелания гостям
   ───────────────────────────────────────── */
.wishes-list {
    display: grid;
    gap: 1.2rem;
}

.wish-item {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    padding: 1.2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.wish-item:hover {
    transform: translateX(4px);
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.72);
}

.wish-text h3 {
    font-family: var(--font-subtitle);
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 0.4rem;
    font-weight: 400;
}

.wish-text p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ─────────────────────────────────────────
   Форма RSVP
   ───────────────────────────────────────── */
.rsvp-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.rsvp-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 400;
    color: var(--coffee);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    font-family: var(--font-sans);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    /* Жёстко 16px, чтобы iOS Safari не делал авто-зум при фокусе на input,
       после которого страница часто «застревает» сдвинутой влево. */
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.8rem;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.4rem;
}

.guest-names-container {
    display: grid;
    gap: 1.2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.guest-names-container:empty {
    display: none;
}

.guest-name-field {
    margin-bottom: 0;
}

.second-day-block {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.4s ease;
}

.second-day-text {
    margin-bottom: 1.2rem;
}

.second-day-text p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

.second-day-text p:last-child {
    margin-bottom: 0;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.radio-option,
.checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text);
    transition: all 0.2s ease;
}

.radio-option:hover,
.checkbox-option:hover {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.85);
}

.radio-option input,
.checkbox-option input {
    accent-color: var(--text);
    width: 16px;
    height: 16px;
}

.radio-option:has(input:checked),
.checkbox-option:has(input:checked) {
    background: var(--text);
    border-color: var(--text);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.radio-option:has(input:checked) input,
.checkbox-option:has(input:checked) input {
    accent-color: var(--white);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1.1rem 1.8rem;
    border: none;
    border-radius: 50px;
    background: var(--text);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 400;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

.btn-submit:hover,
.btn-submit:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    background: var(--mocha);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .btn-text {
    opacity: 0.8;
}

.btn-submit.loading .btn-loader {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-success {
    text-align: center;
    padding: 2.5rem 1.5rem;
    animation: fadeIn 0.6s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--text);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 1.2rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.form-success h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.form-success p {
    color: var(--text-light);
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
}

.btn-reset {
    padding: 0.9rem 1.6rem;
    border: 1px solid var(--text);
    border-radius: 50px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    background: var(--text);
    color: var(--white);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────
   Заключительный блок
   ───────────────────────────────────────── */
.closing-section {
    text-align: center;
    margin-bottom: 0;
}

.closing-title {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.closing-title::after {
    display: none;
}

.closing-text {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.closing-date {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text);
    letter-spacing: 0.12em;
}

/* ─────────────────────────────────────────
   Адаптивность
   ───────────────────────────────────────── */
@media (min-width: 768px) {
    .invitation-content {
        padding: 3rem 2rem 5rem;
        max-width: 800px;
    }

    .section-inner {
        padding: 3.5rem 2rem;
    }

    .section-title {
        font-size: 2.4rem;
    }

    .section {
        margin-bottom: 3rem;
    }

    .hero-names {
        font-size: 7.5rem;
    }

    .hero-names .ampersand {
        font-size: 4.5rem;
    }

    .hero-pretitle {
        font-size: 1rem;
    }

    .hero-invitation {
        font-size: 1.2rem;
    }

    .hero-date-divider .divider-text {
        font-size: 1.3rem;
    }

    .hero-date-divider .divider-line {
        width: 80px;
    }

    .block-illustration img,
    .block-illustration svg {
        max-width: 260px;
        max-height: 200px;
    }

    .hero-illustration img,
    .hero-illustration svg {
        max-width: 220px;
        max-height: 180px;
    }

    .timeline {
        padding-left: 2rem;
    }

    .wishes-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .hero-section {
        justify-content: flex-end;
        padding-bottom: 8vh;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero-illustration {
        margin-bottom: 1rem;
    }

    .hero-illustration img,
    .hero-illustration svg {
        max-width: 110px;
        max-height: 90px;
    }

    .hero-ornament.top {
        margin-bottom: 1rem;
    }

    .hero-pretitle {
        font-size: 0.75rem;
        margin-bottom: 0.8rem;
    }

    .hero-names {
        font-size: 3.2rem;
    }

    .hero-names .ampersand {
        font-size: 2.2rem;
        margin: 0.2rem 0;
    }

    .hero-date-divider .divider-line {
        width: 30px;
    }

    .hero-date-divider .divider-text {
        font-size: 0.95rem;
    }

    .hero-invitation {
        font-size: 0.9rem;
        max-width: 340px;
    }

    .hero-ornament.bottom {
        margin-top: 1rem;
    }

    .scroll-hint {
        bottom: 1rem;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
        align-items: stretch;
    }

    .radio-option,
    .checkbox-option {
        width: 100%;
    }

    .block-illustration img,
    .block-illustration svg {
        max-width: 180px;
        max-height: 140px;
    }
}

/* ─────────────────────────────────────────
   Утилиты и анимации появления
   ───────────────────────────────────────── */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
