:root {
    --primary-font: 'Marck Script', cursive;
    --secondary-font: 'Montserrat', sans-serif;
    
    /* Новая палитра */
    --bg-dark: #1a1c18;           /* Глубокий темный */
    --bg-light: #fdfcf9;          /* Мягкий кремовый */
    --primary-green: #4a5043;     /* Приглушенный лесной */
    --accent-gold: #c5a37d;       /* Деликатное золото */
    --text-main: #3d3d3d;
    --text-muted: #8a8a8a;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--secondary-font);
    background-color: var(--bg-dark);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    animation: zoomOut 12s ease-out forwards;
}

.overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.name {
    font-family: var(--primary-font);
    font-size: clamp(4.5rem, 18vw, 8rem);
    font-weight: 400;
    line-height: 0.8;
    margin: 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.date {
    margin-top: 25px;
    font-size: clamp(0.8rem, 3vw, 1.1rem);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-weight: 300;
    opacity: 0.9;
}

/* --- ТЕКСТ ПРИГЛАШЕНИЯ --- */
.invitation-text {
    background-color: var(--bg-light);
    color: var(--text-main);
    padding: 100px 24px;
    text-align: center;
}

.invitation-inner {
    max-width: 600px;
    margin: 0 auto;
}

.invitation-heading {
    font-family: var(--primary-font);
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 30px;
}

.invitation-inner p {
    font-size: 1.05rem;
    margin-bottom: 20px;
    color: #555;
}

.invitation-signature {
    font-family: var(--primary-font);
    font-size: 2rem;
    margin-top: 40px;
    color: var(--primary-green);
}

/* --- ФОТО-СТЕК --- */
.photo-stack {
    background-color: var(--bg-light);
    padding-bottom: 100px;
    display: flex;
    justify-content: center;
}

.photo-frame {
    position: relative;
    width: min(340px, 85vw);
    aspect-ratio: 3/4;
}

.photo-frame-image {
    position: absolute;
    inset: 0;
    border-radius: 2px;
    background: #e0e0e0 url('image-1.jpg') center/cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 2;
    border: 8px solid var(--white);
}

.photo-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary-green);
    transform: rotate(3deg) translate(10px, 10px);
    opacity: 0.2;
    z-index: 1;
}

/* --- МЕСТО (LOCATION) --- */
.location-section {
    background-color: var(--bg-light);
    color: var(--text-main);
    padding: 60px 24px 100px;
    text-align: center;
}

.location-heading {
    font-family: var(--primary-font);
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--primary-green);
}

.location-address {
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto 30px;
    color: var(--text-muted);
}

.location-button {
    padding: 14px 35px;
    border: 1px solid var(--primary-green);
    background: transparent;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.location-button:hover {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(74, 80, 67, 0.2);
}

/* --- ТАЙМЛАЙН --- */
.timeline-section {
    background-color: var(--bg-light);
    padding: 100px 24px;
}

.timeline-heading {
    font-family: var(--primary-font);
    font-size: 3rem;
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 60px;
}

.timeline-track {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    min-height: 500px; /* Увеличил, чтобы элементы не слипались */
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent-gold), transparent);
}

.timeline-item {
    position: absolute;
    width: 45%;
    font-size: 0.9rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 50%;
    top: 5px;
}

.timeline-time {
    font-weight: 700;
    display: block;
    color: var(--primary-green);
    margin-bottom: 5px;
}

.timeline-text {
    color: var(--text-main);
    font-weight: 400;
}

/* Расположение элементов таймлайна */
.timeline-item-1 { top: 0; left: 0; text-align: right; }
.timeline-item-1::before { right: -28px; }

.timeline-item-2 { top: 100px; right: 0; text-align: left; }
.timeline-item-2::before { left: -28px; }

.timeline-item-3 { top: 200px; left: 0; text-align: right; }
.timeline-item-3::before { right: -28px; }

.timeline-item-4 { top: 300px; right: 0; text-align: left; }
.timeline-item-4::before { left: -28px; }

.timeline-item-5 { top: 400px; left: 0; text-align: right; }
.timeline-item-5::before { right: -28px; }

/* --- ДРЕСС-КОД --- */
/* --- СЕКЦИЯ ДРЕСС-КОД --- */
/* --- ДРЕСС-КОД --- */
.dresscode-section {
    background-color: var(--primary-green);
    padding: 180px 24px 100px; /* Увеличил верхний отступ (120px наложения + 60px воздуха) */
    text-align: center;

    position: relative;
    z-index: 1; /* Слой НИЖЕ, чем картинка */
}


.dresscode-heading {
    font-family: var(--primary-font);
    font-size: 3rem;
    margin-bottom: 30px;
}

.dresscode-text {
    max-width: 500px;
    margin: 0 auto 40px;
    font-weight: 300;
    opacity: 0.9;
}

.dresscode-palette {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.dresscode-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.circle-1 { background: #FFFFFF; }
.circle-2 { background: #6b7a63; }
.circle-3 { background: #3d4538; }
.circle-4 { background: #1a1c18; }




/* --- RSVP (ИНТУИТИВНАЯ АНКЕТА) --- */
.rsvp-section {
    background-color: var(--primary-green);
    padding: 0 24px 120px;
}

.rsvp-card-container {
    background: var(--bg-light);
    max-width: 500px;
    margin: 0 auto;
    padding: 60px 45px;
    border-radius: 4px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
    color: var(--text-main);
    transform: rotate(-0.5deg); /* Сделал наклон чуть меньше для удобства чтения */
}

.rsvp-heading {
    font-family: var(--primary-font);
    font-size: 3.2rem;
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 5px;
}

.rsvp-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

.rsvp-field {
    margin-bottom: 30px;
}

.rsvp-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #999;
    display: block;
    margin-bottom: 12px;
}

/* Поля ввода */
.rsvp-input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
}

.rsvp-input:focus {
    border-bottom-color: var(--primary-green);
}

.rsvp-textarea {
    min-height: 60px;
    resize: none;
}

/* Группа кнопок присутствия */
.rsvp-presence-toggle {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.presence-option {
    flex: 1;
    cursor: pointer;
}

.presence-option input {
    display: none;
}

.presence-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.presence-box .emoji {
    font-size: 1.4rem;
    margin-bottom: 5px;
    filter: grayscale(1);
    transition: all 0.3s;
}

.presence-box .text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Состояние при выборе */
.presence-option input:checked + .presence-box {
    border-color: var(--primary-green);
    background-color: #f9faf8;
    box-shadow: 0 10px 20px rgba(74, 80, 67, 0.1);
}

.presence-option input:checked + .presence-box .emoji {
    filter: grayscale(0);
    transform: scale(1.2);
}

.presence-option input:checked + .presence-box .text {
    color: var(--primary-green);
}

/* Кнопка */
.rsvp-button {
    width: 100%;
    padding: 18px;
    margin-top: 10px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rsvp-button:hover {
    background: #3a4035;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Адаптив */
@media (max-width: 480px) {
    .rsvp-card-container {
        padding: 45px 25px;
        transform: none;
    }
    .rsvp-presence-toggle {
        gap: 10px;
    }
    .presence-box {
        padding: 15px 5px;
    }
}



/* --- ANIMATIONS --- */
@keyframes zoomOut {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.fade-in-delayed {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- MOBILE --- */
@media (max-width: 480px) {
    .timeline-track { min-height: 700px; }
    .timeline-item { width: 40%; }
    .rsvp-card-container {
        padding: 40px 20px;
        transform: none;
    }
}

/* --- НОВАЯ ОБЕРТКА ДЛЯ ДЛИННОГО ФОНА --- */


/* --- ВАЖНО: ДЕЛАЕМ СЕКЦИИ ПРОЗРАЧНЫМИ --- */
/* Найдите в коде эти классы и уберите у них background-color,
   либо добавьте этот код ниже, чтобы перезаписать старый стиль */

.long-bg-wrapper {
    position: relative;

    background-image: url('background-image.svg');
    background-repeat: no-repeat;
    background-position: top center;

    /* ВАЖНО */
    background-size: cover;

    /* ФИКСИРОВАННАЯ ВЫСОТА */
    min-height: 3000px;

    z-index: 10;

    margin-top: -80px;
    padding-top: 80px;

    margin-bottom: -120px;
    padding-bottom: 120px;
}

