* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
font-family: 'DolomanPavljenko';
src: url('../fonts/DolomanPavljenko.otf') format('opentype');
font-style: normal;
font-display: swap;

}
@font-face {
font-family: 'PoiretOne';
src: url('../fonts/PoiretOne-Regular.ttf') format('truetype');
font-weight: 600;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'KalissaRegular_0';
src: url('../fonts/KalissaRegular_0.otf') format('opentype');
font-weight: 400;
font-style: normal;
font-display: swap;
}

/* Лоадер */
#page-loader {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100dvh;           /* важно для мобильных */
    background: #f8f5f0;
    z-index: 99999 !important;    /* очень высокий приоритет */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: all;          /* чтобы клики не проходили сквозь */
    transition: opacity 0.8s ease;
}

/* Дополнительная страховка для мобильных */
@media (max-width: 768px) {
    #page-loader {
        height: 100dvh;
    }
}

.heart-pulse {
    font-size: 120px;               /* большое сердечко */
    color: #d4a373;
    animation: heartbeat 1.6s ease-in-out infinite;
    margin-bottom: 1.2rem;
}

@keyframes heartbeat {
    0%   { transform: scale(1.0); }
    14%  { transform: scale(1.3); }
    28%  { transform: scale(1.0); }
    42%  { transform: scale(1.3); }
    70%  { transform: scale(1.0); }
    100% { transform: scale(1.0); }
}

#page-loader p {
    font-size: 1.4rem;
    color: #3a2a1f;
    margin: 0;
    font-family: 'DolomanPavljenko', sans-serif;
}

body {
    font-family: 'DolomanPavljenko', sans-serif;
    background: url('img/paper-bg.jpg') repeat, #f8f5f0;
    background-blend-mode: multiply;
    color: #3a2a1f;
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: bold;
    -webkit-text-stroke: 0.35px currentColor;
    paint-order: stroke fill;
    -webkit-font-smoothing: antialiased;
    text-size-adjust: 100%;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    padding: 40px 20px;
    background: transparent;
}

.content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

/* Анимация появления */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.1s ease-out, transform 1.1s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Слайд 1: Фото целиком видно */
.hero {
    height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    height: 100vh;
    object-fit: contain;
    object-position: top;
    display: block;
    margin-top: 5vh;
}


/* Слайд 2: Приглашение */
.invitation-section h1 {
    font-family: 'bickhamscripttwo', serif;
    font-size: clamp(5rem, 8vw, 8rem);
    font-weight: 400;
    color: #3a1f0f;
    line-height: 0.9;
    margin-bottom: 0.3rem;
}

.invitation-section h1 span {
    font-size: 1.3em;
    opacity: 0.8;
}

.invitation-section .date {
    font-size: clamp(3rem, 9vw, 6rem);
    color: #d4a373;
    margin: 1rem 0 2rem;
}

.invitation-section .greeting {
    font-size: clamp(2rem, 5vw  , 3rem);
    color: #5c4033;
    margin-bottom: 1.5rem;
    font-weight: 00;
}

.invitation-section p {
    font-size: clamp(1.25rem, 3.8vw , 1.6rem);
    line-height: 1.7;
    max-width: 760px;
    margin: 0 auto 1.5rem;
}
.calendar {
      font-family: 'KalissaRegular_0';
      width: 320px;
      background: transparent;
      color: #3a1f0f;
      margin: 20px auto;
      user-select: none;
      
    }

    .month {
      text-align: center;
      
      font-size: 3rem;
      font-weight: bold;
      margin-bottom: 12px;
      color: #3a1f0f;
    }

    .weekdays {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      text-align: center;
      font-weight: bold;
      font-size: 1.5rem;
      margin-bottom: 6px;
      color: #3a1f0f;
    }

    .days {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 2px;
      text-align: center;
    }

    .day {
      aspect-ratio: 1 / 1;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.3rem;
      border-radius: 50%;
      position: relative;
    }

    /* Пустые клетки до 1 июня */
    .day.empty {
      background: transparent;
    }

    /* Обычный день */
    .day:not(.empty):not(.special) {
      color: #3a1f0f;
    }

    /* Выходные — чуть светлее */
    .day.weekend {
      color: #3a1f0f;
    }

    /* Сердечко на 19 */
    .day.special {
      position: relative;
      color: transparent;          /* скрываем само число */
      font-weight: bold;
    }

    .day.special svg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }

    .day.special text {
      font-size: 0.8rem;
    }

/* Слайд 3: План дня */
.plan-section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #3a1f0f;
    margin-bottom: 2.5rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    gap: 1.8rem;
    text-align: left;
}

.timeline .time {
    font-size: 1.5rem;
    font-weight: 600;
    color: #d4a373;
    min-width: 90px;
    text-align: right;
}

.timeline .desc {
    font-size: 1.25rem;
    line-height: 1.6;
}

/* Слайд 4: Дресс-код общая палитра */
.split-container {
    text-align: center;
    display: flex;
    font-size: 1.25rem;
    line-height: 1.6;
    /*line-height: 2;*/
    p {margin-top: 20px; margin-bottom: 20px;}
    gap: 15rem;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

.split-section .text {
    flex: 1;
}

.split-section .image img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* Слайд 5: Отдельные цвета — 2 столбца на мобильных */
.colors-section {
    padding: 30px 15px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.colors-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 7vw, 3.8rem);
    color: #3a1f0f;
    margin-bottom: 1.5rem;
}

.color-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.2rem 1rem;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.color-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.10);
}

.color-item span {
    margin-top: 0.5rem;
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    font-weight: 500;
    color: #4a372c;
}

@media (max-width: 768px) {
    .color-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 0.9rem;
    }
    
    .color-item img {
        max-height: 110px;
    }
    
    .color-item span {
        font-size: clamp(0.95rem, 3.2vw, 1.15rem);
        line-height: 1.3;
    }
    
    .colors-section h2 {
        margin-bottom: 1.2rem;
    }
}

@media (min-width: 769px) {
    .color-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.6rem 1.2rem;
    }
    
    .color-item img {
        max-height: 140px;
    }
}

/* Слайд 6: Таймер */
#countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: bold;
    color: #d4a373;
}


#countdown div {
    text-align: center;
    min-width: 100px;
}

#countdown small {
    display: block;
    font-size: 0.35em;
    color: #6b4e31;
    margin-top: -0.6rem;
}

/* Музыка */
.music-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #d4a373;
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

@media (max-width: 768px) {
    .music-btn {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-body {
    position: relative;
    text-align: center;
}

.modal-content {
    max-width: 92%;
    max-height: 78vh;
    border-radius: 12px;
}

.close, .nav {
    color: #f0f0f0;
    font-size: 48px;
    cursor: pointer;
    position: absolute;
}

.close { top: 20px; right: 30px; }
.prev { left: 30px; top: 50%; transform: translateY(-50%); }
.next { right: 30px; top: 50%; transform: translateY(-50%); }

.thumbnails {
    margin-top: 20px;
    text-align: center;
}

.thumbnails img {
    width: 80px;
    margin: 6px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.25s;
}

.thumbnails img:hover,
.thumbnails img.active {
    opacity: 1;
    transform: scale(1.08);
}

.thumbnails img.active {
    border: 3px solid #d4a373;
}

/* Мобильная адаптация общая */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .timeline-item {
        flex-direction: column;
        text-align: center;
        gap: 0.6rem;
    }
    
    .timeline .time {
        min-width: auto;
        text-align: center;
    }
}