/* =============================================================
   WEDDING INVITATION — STYLE.CSS
   Дизайн: мінімалізм, luxury, пастельні тони, багато повітря.
   Легко редагувати кольори/шрифти через CSS-змінні нижче.
============================================================= */

/* ---------- 1. ДИЗАЙН-ТОКЕНИ (можна змінювати тут) ---------- */
:root {
    /* Кольори */
    --color-bg: #FAF8F2;         /* основний фон — молочний/кремовий */
    --color-bg-alt: #F1EEE2;     /* фон альтернативних секцій */
    --color-sage: #A9B79C;       /* приглушений шавлієвий зелений */
    --color-sage-dark: #7E9270;
    --color-blush: #E1E6D6;      /* блідий шавлієво-кремовий (замість рожевого) */
    --color-blush-dark: #C9D3B8; /* темніший шавлієвий відтінок */
    --color-text: #3B322B;       /* основний текст — теплий графіт */
    --color-text-soft: #766A5E;  /* другорядний текст */
    --color-gold: #C6A05C;       /* акцент — приглушене золото */
    --color-gold-light: #E4CFA3;
    --color-white: #F6F5EA;      /* легкий шавлієво-молочний відтінок замість чистого білого */
    --color-shadow: rgba(59, 50, 43, 0.12);

    /* Типографіка */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

    /* Розміри / ефекти */
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-full: 999px;
    --shadow-soft: 0 20px 60px -20px var(--color-shadow);
    --shadow-soft-sm: 0 8px 24px -8px var(--color-shadow);
    --transition-slow: 900ms cubic-bezier(0.22, 1, 0.36, 1);
    --transition-medium: 500ms cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 250ms ease;
    --max-width: 720px;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
            radial-gradient(circle at 15% 0%, var(--color-blush) 0%, transparent 45%),
            radial-gradient(circle at 90% 15%, var(--color-sage) 0%, transparent 40%),
            radial-gradient(circle at 20% 90%, var(--color-gold-light) 0%, transparent 35%),
            var(--color-bg);
    background-attachment: fixed;
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Повага до reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Видимий фокус для клавіатури — доступність */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 3px;
}

/* Заборона скролу, поки відкритий конверт / лайтбокс */
body.no-scroll { overflow: hidden; height: 100vh; }

/* =============================================================
   3. ЕКРАН КОНВЕРТА (перший екран)
============================================================= */
.envelope-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
            radial-gradient(circle at 30% 20%, var(--color-blush) 0%, transparent 55%),
            radial-gradient(circle at 75% 80%, var(--color-sage) 0%, transparent 50%),
            var(--color-bg);
    transition: opacity 1200ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 1200ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.envelope-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.04);
}

/* декоративні "пелюстки" на фоні */
.envelope-bg-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.petal {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 60% 0 60% 0;
    background: var(--color-blush);
    opacity: 0.5;
    animation: float-petal 14s ease-in-out infinite;
}
.petal--1 { top: 12%; left: 10%; background: var(--color-blush); animation-delay: 0s; }
.petal--2 { top: 70%; left: 85%; background: var(--color-sage); animation-delay: 3s; }
.petal--3 { top: 25%; left: 80%; background: var(--color-gold-light); animation-delay: 6s; }
.petal--4 { top: 80%; left: 15%; background: var(--color-blush-dark); animation-delay: 9s; }
@keyframes float-petal {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.envelope-wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 24px; }

/* ---------- Конверт (вертикальна, портретна орієнтація) ---------- */
.envelope {
    position: relative;
    width: min(270px, 68vw);
    height: min(370px, 62vh, 100vw);
    cursor: pointer;
    filter: drop-shadow(var(--shadow-soft));
    animation: envelope-idle 4s ease-in-out infinite;
}
.envelope:hover { animation-play-state: paused; transform: translateY(-4px); }
@keyframes envelope-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.envelope__back {
    position: absolute;
    inset: 0;
    background: var(--color-white);
    border-radius: 6px;
    border: 1px solid var(--color-blush-dark);
}

/* лист всередині конверта — спочатку схований за клапаном */
.envelope__letter {
    position: absolute;
    left: 6%;
    right: 6%;
    top: 8%;
    height: 84%;
    background: linear-gradient(180deg, #FFFDFA, var(--color-bg-alt));
    border-radius: 4px;
    box-shadow: 0 4px 18px rgba(59, 50, 43, 0.15);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    transform: translateY(0);
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}
.letter-mini-text { display: flex; flex-direction: column; gap: 4px; }
.letter-mini-names {
    font-family: var(--font-display);
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    color: var(--color-text);
}
.letter-mini-sub {
    font-family: var(--font-script);
    font-size: 1.1rem;
    color: var(--color-gold);
}

/* клапан конверта (трикутник зверху) */
.envelope__flap {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 34%;
    background: linear-gradient(135deg, var(--color-blush), var(--color-blush-dark));
    clip-path: polygon(0 0, 100% 0, 50% 88%);
    border-radius: 6px 6px 0 0;
    transform-origin: top center;
    z-index: 3;
    transition: transform var(--transition-slow);
}

.envelope__monogram {
    position: absolute;
    top: 9%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: var(--color-text);
    opacity: 0;
    transition: opacity var(--transition-fast) 400ms;
}
.envelope__monogram span { color: var(--color-gold); font-style: normal; margin: 0 2px; }
.envelope:not(.is-open) .envelope__monogram { opacity: 1; }

/* нижня частина конверта (кишеня), перекриває низ листа */
.envelope::after {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: -1px;
    height: 42%;
    background: var(--color-white);
    border: 1px solid var(--color-blush-dark);
    border-top: none;
    border-radius: 0 0 6px 6px;
    clip-path: polygon(0 100%, 0 15%, 50% 62%, 100% 15%, 100% 100%);
    z-index: 2;
}

.envelope-hint {
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--color-text-soft);
    animation: hint-pulse 2.4s ease-in-out infinite;
}
@keyframes hint-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* ---------- Стан "конверт відкривається" ---------- */
.envelope.is-open .envelope__flap {
    transform: rotateX(180deg);
}
.envelope.is-open .envelope__letter {
    transform: translateY(-160%) scale(1.05);
}

/* =============================================================
   4. ОСНОВНИЙ КОНТЕНТ
============================================================= */
.main-content {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}
.main-content.is-visible { opacity: 1; transform: translateY(0); }

section {
    padding: 96px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.section-eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    color: var(--color-gold);
    margin: 0 0 10px;
}
.section-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin: 0 0 40px;
}

/* scroll-reveal утиліта (JS додає is-visible через IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =============================================================
   5. HERO / КАРТКА ЗАПРОШЕННЯ (у стилі елегантної рамки з овальним фото)
============================================================= */
.hero {
    padding-top: 56px;
    position: relative;
}

/* ---------- Картка з подвійною рамкою ---------- */
.invite-card { margin: 0 auto 40px; max-width: 420px; position: relative; z-index: 1; }
.invite-card__frame {
    position: relative;
    border: 1px solid var(--color-gold);
    border-radius: 2px;
    padding: 40px 26px 34px;
    background: var(--color-white);
    box-shadow: var(--shadow-soft);
}
.invite-card__frame::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid var(--color-gold);
    opacity: 0.55;
    pointer-events: none;
}

/* кутові орнаменти - маленькі елегантні "дужки" по кутах рамки */
.invite-card__corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--color-gold);
    border-style: solid;
    border-width: 0;
    z-index: 1;
}
.invite-card__corner--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.invite-card__corner--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.invite-card__corner--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.invite-card__corner--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.invite-card__eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.7rem;
    color: var(--color-text-soft);
    margin: 0 0 14px;
    position: relative;
    z-index: 2;
}
.invite-card__names {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    margin: 0 0 6px;
    position: relative;
    z-index: 2;
}
.invite-card__amp { color: var(--color-gold); margin: 0 8px; }
.invite-card__date {
    font-family: var(--font-body);
    letter-spacing: 2px;
    font-size: 0.82rem;
    color: var(--color-text-soft);
    margin: 0 0 26px;
    position: relative;
    z-index: 2;
}

/* ---------- Фото-медальйон зі scratch-ефектом ---------- */
.scratch-wrap {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(59, 50, 43, 0.18);
    border: 3px solid var(--color-bg-alt);
}
.scratch-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scratch-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
    transition: opacity 600ms ease;
}
.scratch-hint {
    font-size: 0.74rem;
    color: var(--color-text-soft);
    letter-spacing: 0.3px;
    margin: 0 0 22px;
    position: relative;
    z-index: 2;
    transition: opacity var(--transition-medium);
}
.scratch-hint.is-hidden { opacity: 0; height: 0; margin: 0; overflow: hidden; }

/* ---------- Міні-таймер у картці ---------- */
.mini-countdown {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin: 0 0 22px;
    position: relative;
    z-index: 2;
}
.mini-countdown__unit { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 46px; }
.mini-countdown__number {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-sage-dark);
    font-variant-numeric: tabular-nums;
}
.mini-countdown__label {
    font-size: 0.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text-soft);
}
.mini-countdown__sep { color: var(--color-gold); font-size: 0.9rem; }
.mini-countdown__finished {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--color-gold);
    margin: 0 0 22px;
    position: relative;
    z-index: 2;
}

/* ---------- Меню "Додати в календар" ---------- */
.calendar-menu {
    position: relative;
    display: inline-block;
    z-index: 3;
}
.calendar-menu__options {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: var(--color-white);
    border: 1px solid var(--color-gold);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}
.calendar-menu__options.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.calendar-menu__option {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--color-text);
    text-align: left;
    white-space: nowrap;
    transition: background var(--transition-fast);
}
.calendar-menu__option:hover { background: var(--color-bg-alt); }

/* ---------- Весільний ефект (пелюстки/іскри) навколо картки при відкритті ---------- */
.hero__fx {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 620px;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}
.hero__fx-item {
    position: absolute;
    top: -30px;
    width: 10px;
    height: 10px;
    border-radius: 60% 0 60% 0;
    opacity: 0;
    background: var(--color-gold-light);
}
/* Розкидаємо кожен елемент по горизонталі, кольору, розміру й затримці */
.hero__fx-item:nth-child(1) { left: 2.0%; width: 13px; height: 13px; background: var(--color-gold-light); }
.hero__fx-item:nth-child(2) { left: 98.0%; width: 13px; height: 13px; background: var(--color-blush-dark); }
.hero__fx-item:nth-child(3) { left: 4.0%; width: 13px; height: 13px; background: var(--color-gold); }
.hero__fx-item:nth-child(4) { left: 96.0%; width: 9px; height: 9px; background: var(--color-sage-dark); }
.hero__fx-item:nth-child(5) { left: 6.0%; width: 8px; height: 8px; background: var(--color-sage); }
.hero__fx-item:nth-child(6) { left: 94.0%; width: 13px; height: 13px; background: var(--color-gold-light); }
.hero__fx-item:nth-child(7) { left: 8.0%; width: 8px; height: 8px; background: var(--color-blush-dark); }
.hero__fx-item:nth-child(8) { left: 92.0%; width: 7px; height: 7px; background: var(--color-gold); }
.hero__fx-item:nth-child(9) { left: 10.0%; width: 13px; height: 13px; background: var(--color-sage-dark); }
.hero__fx-item:nth-child(10) { left: 90.0%; width: 10px; height: 10px; background: var(--color-sage); }
.hero__fx-item:nth-child(11) { left: 12.0%; width: 8px; height: 8px; background: var(--color-gold-light); }
.hero__fx-item:nth-child(12) { left: 88.0%; width: 7px; height: 7px; background: var(--color-blush-dark); }
.hero__fx-item:nth-child(13) { left: 14.0%; width: 6px; height: 6px; background: var(--color-gold); }
.hero__fx-item:nth-child(14) { left: 86.0%; width: 12px; height: 12px; background: var(--color-sage-dark); }
.hero__fx-item:nth-child(15) { left: 16.0%; width: 13px; height: 13px; background: var(--color-sage); }
.hero__fx-item:nth-child(16) { left: 84.0%; width: 8px; height: 8px; background: var(--color-gold-light); }
.hero__fx-item:nth-child(17) { left: 18.0%; width: 6px; height: 6px; background: var(--color-blush-dark); }
.hero__fx-item:nth-child(18) { left: 82.0%; width: 7px; height: 7px; background: var(--color-gold); }
.hero__fx-item:nth-child(19) { left: 20.0%; width: 6px; height: 6px; background: var(--color-sage-dark); }
.hero__fx-item:nth-child(20) { left: 80.0%; width: 6px; height: 6px; background: var(--color-sage); }
.hero__fx-item:nth-child(21) { left: 22.0%; width: 9px; height: 9px; background: var(--color-gold-light); }
.hero__fx-item:nth-child(22) { left: 78.0%; width: 9px; height: 9px; background: var(--color-blush-dark); }
.hero__fx-item:nth-child(23) { left: 24.0%; width: 6px; height: 6px; background: var(--color-gold); }
.hero__fx-item:nth-child(24) { left: 76.0%; width: 13px; height: 13px; background: var(--color-sage-dark); }

@keyframes fx-fall {
    0% { transform: translateY(-30px) translateX(0) rotate(0deg); opacity: 0; }
    12% { opacity: 0.9; }
    100% { transform: translateY(560px) translateX(var(--fx-drift, 24px)) rotate(240deg); opacity: 0; }
}

.hero__fx--active .hero__fx-item { animation: fx-fall 2.6s ease-in forwards; }
.hero__fx--active .hero__fx-item:nth-child(1) { animation-delay: 265ms; --fx-drift: -14px; }
.hero__fx--active .hero__fx-item:nth-child(2) { animation-delay: 700ms; --fx-drift: 20px; }
.hero__fx--active .hero__fx-item:nth-child(3) { animation-delay: 190ms; --fx-drift: 16px; }
.hero__fx--active .hero__fx-item:nth-child(4) { animation-delay: 236ms; --fx-drift: 16px; }
.hero__fx--active .hero__fx-item:nth-child(5) { animation-delay: 150ms; --fx-drift: 22px; }
.hero__fx--active .hero__fx-item:nth-child(6) { animation-delay: 230ms; --fx-drift: 16px; }
.hero__fx--active .hero__fx-item:nth-child(7) { animation-delay: 191ms; --fx-drift: -18px; }
.hero__fx--active .hero__fx-item:nth-child(8) { animation-delay: 72ms; --fx-drift: 12px; }
.hero__fx--active .hero__fx-item:nth-child(9) { animation-delay: 219ms; --fx-drift: 18px; }
.hero__fx--active .hero__fx-item:nth-child(10) { animation-delay: 301ms; --fx-drift: -24px; }
.hero__fx--active .hero__fx-item:nth-child(11) { animation-delay: 441ms; --fx-drift: -18px; }
.hero__fx--active .hero__fx-item:nth-child(12) { animation-delay: 700ms; --fx-drift: 14px; }
.hero__fx--active .hero__fx-item:nth-child(13) { animation-delay: 14ms; --fx-drift: -14px; }
.hero__fx--active .hero__fx-item:nth-child(14) { animation-delay: 150ms; --fx-drift: -20px; }
.hero__fx--active .hero__fx-item:nth-child(15) { animation-delay: 268ms; --fx-drift: 22px; }
.hero__fx--active .hero__fx-item:nth-child(16) { animation-delay: 461ms; --fx-drift: 18px; }
.hero__fx--active .hero__fx-item:nth-child(17) { animation-delay: 447ms; --fx-drift: -18px; }
.hero__fx--active .hero__fx-item:nth-child(18) { animation-delay: 262ms; --fx-drift: -12px; }
.hero__fx--active .hero__fx-item:nth-child(19) { animation-delay: 239ms; --fx-drift: 10px; }
.hero__fx--active .hero__fx-item:nth-child(20) { animation-delay: 562ms; --fx-drift: 14px; }
.hero__fx--active .hero__fx-item:nth-child(21) { animation-delay: 439ms; --fx-drift: 16px; }
.hero__fx--active .hero__fx-item:nth-child(22) { animation-delay: 372ms; --fx-drift: 24px; }
.hero__fx--active .hero__fx-item:nth-child(23) { animation-delay: 440ms; --fx-drift: 16px; }
.hero__fx--active .hero__fx-item:nth-child(24) { animation-delay: 321ms; --fx-drift: 16px; }

/* =============================================================
   5B. ТЕКСТ ЗАПРОШЕННЯ, ДЕТАЛІ, ПОБАЖАННЯ (під карткою)
============================================================= */
.hero__invite-text {
    max-width: 480px;
    margin: 0 auto 36px;
    color: var(--color-text-soft);
    font-size: 1.02rem;
}

.hero__details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 22px 28px;
    box-shadow: var(--shadow-soft-sm);
    margin: 0 auto 40px;
}
.hero__detail { display: flex; flex-direction: column; gap: 4px; min-width: 90px; }
.hero__detail-label {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-soft);
}
.hero__detail-value {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--color-text);
}
.hero__divider { width: 1px; height: 34px; background: var(--color-blush-dark); }

.hero__wish {
    max-width: 460px;
    margin: 0 auto 48px;
    font-style: italic;
    color: var(--color-sage-dark);
    font-size: 0.98rem;
}

.hero__scroll-cue {
    width: 22px;
    height: 36px;
    border: 1.5px solid var(--color-gold);
    border-radius: var(--radius-full);
    margin: 0 auto;
    position: relative;
}
.hero__scroll-cue span {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-gold);
    animation: scroll-cue 1.8s ease-in-out infinite;
}
@keyframes scroll-cue {
    0% { top: 6px; opacity: 1; }
    70% { top: 18px; opacity: 0; }
    100% { top: 18px; opacity: 0; }
}

/* =============================================================
   6. ТАЙМЕР (застарілий блок, більше не використовується в HTML —
   таймер тепер міні-версія всередині картки; лишено про всяк випадок)
============================================================= */
.countdown { background: var(--color-bg-alt); border-radius: var(--radius-lg); max-width: calc(var(--max-width) + 48px); }
.countdown__grid {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 3vw, 28px);
    flex-wrap: wrap;
}
.countdown__unit {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 20px 18px;
    min-width: 84px;
    box-shadow: var(--shadow-soft-sm);
}
.countdown__number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    color: var(--color-sage-dark);
    font-variant-numeric: tabular-nums;
}
.countdown__label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-soft);
    margin-top: 4px;
}
.countdown__finished {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-gold);
}

/* =============================================================
   7. ГАЛЕРЕЯ
============================================================= */
.gallery { max-width: 960px; }
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.gallery__item {
    position: relative;
    aspect-ratio: 1;
    border: none;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-soft-sm);
}
.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
}
.gallery__item:hover img { transform: scale(1.08); }

/* ---------- Іконка відтворення для відео в галереї ---------- */
.gallery__item--video::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.9);
    box-shadow: var(--shadow-soft-sm);
}
.gallery__item--video::before {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(50% + 3px);
    transform: translate(-50%, -50%);
    z-index: 1;
    border-style: solid;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent var(--color-sage-dark);
}

.lightbox__video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

/* =============================================================
   8. КАРТА
============================================================= */
.location { max-width: 800px; }
.location__time {
    display: inline-block;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-gold);
    margin: 0 0 10px;
}
.location__address {
    color: var(--color-text-soft);
    margin: 0 0 32px;
}
.location__map-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 6px solid var(--color-white);
    margin-bottom: 28px;
}
.location__map-frame iframe {
    width: 100%;
    height: 340px;
    border: 0;
    display: block;
}

/* =============================================================
   9. КНОПКИ
============================================================= */
.btn {
    display: inline-block;
    padding: 15px 38px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.btn--filled {
    background: var(--color-sage-dark);
    color: var(--color-white);
    box-shadow: var(--shadow-soft-sm);
}
.btn--filled:hover { background: var(--color-sage); transform: translateY(-2px); }
.btn--outline {
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
}
.btn--outline:hover { background: var(--color-gold); color: var(--color-white); transform: translateY(-2px); }
.btn--sm {
    padding: 10px 24px;
    font-size: 0.7rem;
    position: relative;
    z-index: 2;
}

/* =============================================================
   11. ФУТЕР
============================================================= */
.footer {
    text-align: center;
    padding: 56px 24px 80px;
    color: var(--color-text-soft);
}
.footer__names {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--color-gold);
    margin: 0 0 6px;
}
.footer__sub { font-size: 0.85rem; margin: 0; }

/* =============================================================
   12. КНОПКА МУЗИКИ (плаваюча)
============================================================= */
.music-toggle {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-white);
    border: 1px solid var(--color-blush-dark);
    border-radius: var(--radius-full);
    padding: 12px 20px;
    box-shadow: var(--shadow-soft-sm);
    font-size: 0.8rem;
    color: var(--color-text);
    transition: transform var(--transition-fast), background var(--transition-fast), opacity var(--transition-medium);
}
.music-toggle:hover { transform: translateY(-2px); background: var(--color-bg-alt); }
.music-toggle__icon { color: var(--color-gold); font-size: 1rem; }
.music-toggle[aria-pressed="true"] .music-toggle__icon { animation: note-bounce 1s ease-in-out infinite; }
@keyframes note-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* =============================================================
   13. LIGHTBOX ГАЛЕРЕЇ
============================================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(59, 50, 43, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
}
.lightbox.is-visible { opacity: 1; visibility: visible; }
.lightbox__image {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transform: scale(0.92);
    transition: transform var(--transition-medium);
}
.lightbox.is-visible .lightbox__image { transform: scale(1); }
.lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2.2rem;
    line-height: 1;
}

/* =============================================================
   14. АДАПТИВНІСТЬ
============================================================= */
@media (max-width: 640px) {
    section { padding: 72px 18px; }
    .hero__details { flex-direction: row; gap: 12px; padding: 18px 16px; }
    .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .music-toggle .music-toggle__text { display: none; }
    .music-toggle { padding: 12px; }
}

@media (max-width: 380px) {
    .hero__details { flex-wrap: wrap; }
    .countdown__unit { min-width: 70px; padding: 14px 10px; }
}

@media (min-width: 900px) {
    .gallery__grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}