/* ===========================================
   Свадебный сайт Давида и Анастасии
   Стили в духе шаблона wedwed.ru
   =========================================== */

:root {
    --color-text: #333333;
    --color-text-light: #666666;
    --color-white: #ffffff;
    --color-bg: #faf9f7;
    --color-accent: #8B5A2B;
    --color-accent-light: #c9a87c;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-bg);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

h2 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text);
}

/* ===========================================
   Экран приветствия
   =========================================== */

.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #5C3A2E 0%, #3d2820 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.welcome-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    color: var(--color-white);
    padding: 20px;
}

.welcome-photo {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.welcome-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.welcome-names {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

.welcome-btn {
    padding: 16px 48px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.welcome-btn:hover {
    background: var(--color-white);
    color: #5C3A2E;
    border-color: var(--color-white);
}

/* ===========================================
   Кнопка музыки
   =========================================== */

.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    background: var(--color-white);
}

.music-btn.playing {
    animation: pulse 2s infinite;
}

.music-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-accent);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 4px 25px rgba(139, 90, 43, 0.4); }
}

/* ===========================================
   Блок 1: Обложка (Hero)
   =========================================== */

.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--color-white);
    padding: 20px;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-names {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-names span {
    display: block;
}

.hero-names .amp {
    font-size: 2rem;
    opacity: 0.7;
    margin: 0.3rem 0;
}

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

.date-line {
    width: 50px;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
}

.date-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 100% { opacity: 1; top: 8px; }
    50% { opacity: 0.3; top: 16px; }
}

/* ===========================================
   Блок 2: Библейский стих
   =========================================== */

.verse {
    padding: 80px 20px;
    background: var(--color-white);
}

.verse blockquote {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.verse blockquote p {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.verse blockquote cite {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.9rem;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

/* ===========================================
   Блок 3: Приглашение
   =========================================== */

.invitation {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.invitation-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.invitation-content {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
    max-width: 500px;
}

.invitation-content p {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.8;
    text-align: center;
    color: var(--color-white);
}

/* ===========================================
   Блок 4: Календарь
   =========================================== */

.calendar-section {
    padding: 60px 20px;
    background: var(--color-white);
}

.calendar {
    max-width: 350px;
    margin: 0 auto;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-header span {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 10px 0;
}

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

.calendar-days span {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-text);
    border-radius: 50%;
}

.calendar-days span.empty {
    visibility: hidden;
}

.calendar-days span.wedding-day {
    background: var(--color-accent);
    color: var(--color-white);
    font-weight: 500;
    position: relative;
}

.calendar-days span.wedding-day::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
}

/* ===========================================
   Блок 5: Локация
   =========================================== */

.location {
    padding: 60px 20px;
    background: var(--color-bg);
}

.location-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.location-photo {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.location-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.location-info {
    text-align: center;
}

.location-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.location-info .address {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn:hover {
    background: var(--color-text);
    transform: translateY(-2px);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* ===========================================
   Блок 6: Тайминг
   =========================================== */

.timing {
    padding: 60px 20px;
    background: var(--color-white);
}

.timeline {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-accent-light);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

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

.timeline-icon {
    position: absolute;
    left: -40px;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--color-white);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-accent);
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-content .time {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--color-accent);
}

.timeline-content .event {
    font-size: 1rem;
    color: var(--color-text-light);
}

/* ===========================================
   Блок 7: Дресс-код
   =========================================== */

.dresscode {
    padding: 60px 20px;
    background: var(--color-bg);
}

.dresscode-text {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.colors {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.color-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.color-item span {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ===========================================
   Блок 8: Таймер
   =========================================== */

.countdown-section {
    padding: 60px 20px;
    background: var(--color-white);
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.countdown-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 500;
    color: var(--color-accent);
    line-height: 1;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

/* ===========================================
   Блок 9: Пожелания
   =========================================== */

.wishes {
    padding: 60px 20px;
    background: var(--color-bg);
}

.wishes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.wish-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.wish-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--color-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wish-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-accent);
}

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

/* ===========================================
   Блок 10: Контакты
   =========================================== */

.contacts {
    padding: 60px 20px;
    background: var(--color-white);
}

.contacts-text {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn-phone {
    background: var(--color-accent);
}

.btn-telegram {
    background: #0088cc;
}

.btn-telegram:hover {
    background: #006699;
}

.phone-number {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 400;
}

/* ===========================================
   Блок 11: Анкета
   =========================================== */

.questionnaire {
    padding: 60px 20px;
    background: var(--color-bg);
}

.rsvp-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--color-white);
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--color-white);
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: var(--color-accent-light);
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}

.radio-label input[type="radio"]:checked + span {
    color: var(--color-accent);
    font-weight: 400;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    margin-top: 1rem;
}

.form-message {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
}

.form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}

/* ===========================================
   Футер
   =========================================== */

.footer {
    padding: 60px 20px;
    background: var(--color-text);
    color: var(--color-white);
    text-align: center;
}

.footer-names {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.footer-date {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.footer-heart svg {
    width: 24px;
    height: 24px;
    fill: var(--color-accent);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===========================================
   Адаптивность
   =========================================== */

/* ===========================================
   Анимации
   =========================================== */

/* Появление при скролле */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Задержки для последовательного появления */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* Анимация заставки */
.welcome-photo {
    animation: welcomeFadeIn 1s ease forwards;
    opacity: 0;
}

.welcome-subtitle {
    animation: welcomeFadeIn 1s ease 0.3s forwards;
    opacity: 0;
}

.welcome-names {
    animation: welcomeFadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

.welcome-btn {
    animation: welcomeFadeIn 1s ease 0.7s forwards;
    opacity: 0;
}

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

/* Анимация timeline */
.timeline-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(2) { transition-delay: 0.2s; }
.timeline-item:nth-child(3) { transition-delay: 0.4s; }

/* Анимация цветов дресс-кода */
.color-item {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.color-item.visible {
    opacity: 1;
    transform: scale(1);
}

.color-item:nth-child(1) { transition-delay: 0.1s; }
.color-item:nth-child(2) { transition-delay: 0.2s; }
.color-item:nth-child(3) { transition-delay: 0.3s; }

/* Анимация пожеланий */
.wish-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.wish-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.wish-item:nth-child(1) { transition-delay: 0.1s; }
.wish-item:nth-child(2) { transition-delay: 0.2s; }
.wish-item:nth-child(3) { transition-delay: 0.3s; }

/* Анимация countdown */
.countdown-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.countdown-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.countdown-item:nth-child(1) { transition-delay: 0.1s; }
.countdown-item:nth-child(2) { transition-delay: 0.2s; }
.countdown-item:nth-child(3) { transition-delay: 0.3s; }
.countdown-item:nth-child(4) { transition-delay: 0.4s; }

/* Параллакс эффект */
.invitation {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    /* Отключаем параллакс на мобильных */
    .invitation {
        background-attachment: scroll;
    }
}

/* ===========================================
   Адаптивность
   =========================================== */

@media (max-width: 480px) {
    h2 {
        font-size: 2rem;
    }

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

    .verse blockquote p {
        font-size: 1.2rem;
    }

    .invitation-content p {
        font-size: 1.1rem;
    }

    .countdown-number {
        font-size: 2.2rem;
    }

    .countdown-item {
        min-width: 60px;
    }

    .colors {
        gap: 1.5rem;
    }

    .color-circle {
        width: 50px;
        height: 50px;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}
