/* ==========================================================================
   ВАДИМ И ВИКТОРИЯ — СВАДЕБНОЕ ПРИГЛАШЕНИЕ
   Изменения: обновлены детали, типографика и адаптивность.
   1. Переменные и база            7. Галерея
   2. Экран входа                  8. Детали
   3. Звук и подсказка поворота    9. Таймер
   4. Слайдер и общие блоки       10. Контакты и финал
   5. Обложка                     11. Появление и анимации
   6. История                     12. Адаптивность
   ========================================================================== */

/* 1. ПЕРЕМЕННЫЕ И БАЗА
   ========================================================================== */
:root {
    --emerald: #16513A;
    --emerald-deep: #0B3325;
    --emerald-soft: #2C7557;

    --gold: #C5A059;
    --gold-soft: #E7D3A6;
    --gold-deep: #A5813C;
    --gold-ink: #8A6A2F;

    --ivory: #FAF6EE;
    --paper: #FFFDF9;
    --white: #FFFFFF;

    --ink: #22302A;
    --body: #54625A;
    --muted: #6E7A72;

    --line: rgba(197, 160, 89, 0.42);

    --font-script: 'Great Vibes', cursive;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;

    --ease: cubic-bezier(0.22, 0.75, 0.28, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-sans);
    background: var(--ivory);
    color: var(--body);
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
}

button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

::selection {
    background: var(--gold-soft);
    color: var(--emerald-deep);
}

/* 2. ЭКРАН ВХОДА
   ========================================================================== */
.splash {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--emerald-deep);
    transition: opacity 1s var(--ease), visibility 1s var(--ease);
}

.splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-media,
.splash-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.splash-media img {
    object-fit: cover;
    object-position: 50% 28%;
}

.splash-veil {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 50% 12%, rgba(11, 51, 37, 0) 0%, rgba(6, 32, 23, 0.55) 100%),
        linear-gradient(180deg, rgba(6, 36, 26, 0.86) 0%, rgba(8, 45, 32, 0.58) 42%, rgba(5, 28, 20, 0.93) 100%);
}

.splash-frame {
    position: absolute;
    inset: clamp(14px, 3vw, 34px);
    border: 1px solid rgba(231, 211, 166, 0.42);
    pointer-events: none;
}

.splash-frame::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(231, 211, 166, 0.16);
}

.splash-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 780px;
    padding: clamp(26px, 6vw, 56px);
    text-align: center;
}

.splash-eyebrow {
    font-size: clamp(9px, 1.1vw, 11px);
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--gold-soft);
}

.splash-names {
    margin-top: 18px;
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(2.9rem, 10vw, 6rem);
    line-height: 1.12;
    color: var(--white);
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
    text-wrap: balance;
}

.amp {
    color: var(--gold-soft);
    font-size: 0.78em;
}

.splash .ornament {
    width: min(300px, 64vw);
    margin: 22px auto 20px;
}

.splash .ornament span {
    background: linear-gradient(90deg, transparent, rgba(231, 211, 166, 0.8));
}

.splash .ornament span:last-child {
    background: linear-gradient(90deg, rgba(231, 211, 166, 0.8), transparent);
}

.splash .ornament i {
    border-color: var(--gold-soft);
}

.splash-date {
    font-family: var(--font-serif);
    font-size: clamp(1.05rem, 2.4vw, 1.4rem);
    letter-spacing: 0.24em;
    color: var(--gold-soft);
}

.splash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: clamp(26px, 4.5vh, 42px);
    padding: 17px 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, #EAD9AE 0%, #C9A45C 55%, #B98F45 100%);
    color: var(--emerald-deep);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    box-shadow:
        0 18px 40px -18px rgba(201, 164, 92, 0.85),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.35s var(--ease);
}

.splash-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow:
        0 24px 46px -18px rgba(201, 164, 92, 0.95),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.splash-btn:active {
    transform: translateY(0);
}

.splash-hint {
    margin-top: 18px;
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.splash-noscript {
    max-width: 340px;
    margin: 16px auto 0;
    padding: 10px 14px;
    border: 1px solid rgba(231, 211, 166, 0.5);
    font-size: 12px;
    line-height: 1.6;
    color: var(--white);
}

/* Появление экрана входа */
.splash-content > * {
    animation: splashRise 0.95s var(--ease) both;
}

.splash-content > *:nth-child(1) { animation-delay: 0.10s; }
.splash-content > *:nth-child(2) { animation-delay: 0.20s; }
.splash-content > *:nth-child(3) { animation-delay: 0.32s; }
.splash-content > *:nth-child(4) { animation-delay: 0.42s; }
.splash-content > *:nth-child(5) { animation-delay: 0.54s; }
.splash-content > *:nth-child(6) { animation-delay: 0.66s; }

@keyframes splashRise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* 3. ЗВУК И ПОДСКАЗКА ПОВОРОТА
   ========================================================================== */
.sound-toggle {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(197, 160, 89, 0.55);
    border-radius: 50%;
    background: rgba(255, 253, 249, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--emerald);
    box-shadow: 0 10px 30px -18px rgba(11, 51, 37, 0.45);
    opacity: 0;
    animation: soundIn 0.6s 0.35s var(--ease) forwards;
    transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.sound-toggle:hover {
    transform: scale(1.05);
    background: var(--white);
}

@keyframes soundIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

.eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.eq i {
    display: block;
    width: 2.5px;
    height: 100%;
    border-radius: 2px;
    background: currentColor;
    transform-origin: bottom;
    animation: eqBar 1.05s var(--ease) infinite;
}

.eq i:nth-child(1) { animation-delay: -0.22s; }
.eq i:nth-child(2) { animation-delay: -0.55s; }
.eq i:nth-child(3) { animation-delay: -0.36s; }

.sound-toggle:not(.is-playing) .eq i {
    animation-play-state: paused;
    transform: scaleY(0.32);
    opacity: 0.55;
}

@keyframes eqBar {
    0%, 100% { transform: scaleY(0.32); }
    50%      { transform: scaleY(1); }
}

.rotate-hint {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 32px;
    background: var(--emerald-deep);
    color: var(--gold-soft);
    text-align: center;
}

.rotate-hint svg {
    width: 40px;
    height: 40px;
}

.rotate-hint p {
    max-width: 26ch;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

@media (orientation: landscape) and (max-height: 520px) {
    .rotate-hint { display: flex; }
}

/* 4. СЛАЙДЕР И ОБЩИЕ БЛОКИ
   ========================================================================== */
.main-content {
    height: 100%;
}

.mySwiper {
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

.swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(54px, 8vh, 84px) clamp(18px, 5vw, 48px);
    background: var(--ivory);
}

.swiper-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60vw 60vw at 110% -10%, rgba(197, 160, 89, 0.10), transparent 65%),
        radial-gradient(50vw 50vw at -10% 110%, rgba(22, 81, 58, 0.08), transparent 65%);
    pointer-events: none;
}

.swiper-slide:nth-child(even) {
    background: var(--paper);
}

.slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 700px;
    text-align: center;
}

.eyebrow {
    margin-bottom: 10px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold-ink);
}

.section-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(1.9rem, 4.4vw, 2.9rem);
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--emerald-deep);
    text-wrap: balance;
}

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: min(260px, 62%);
    margin: 16px auto 22px;
}

.ornament span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament span:last-child {
    background: linear-gradient(90deg, var(--gold), transparent);
}

.ornament i {
    display: block;
    width: 6px;
    height: 6px;
    border: 1px solid var(--gold);
    transform: rotate(45deg);
}

.story-text {
    font-size: clamp(0.92rem, 1.5vw, 1rem);
    font-weight: 300;
    line-height: 1.9;
    color: var(--body);
}

.slide-content > .story-text {
    max-width: 520px;
    margin: 0 auto;
}

/* 5. ОБЛОЖКА
   ========================================================================== */
.slide-cover {
    padding: 0;
}

.slide-cover::before {
    display: none;
}

.cover-media,
.cover-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cover-media img {
    object-fit: cover;
    object-position: 50% 30%;
    transform: scale(1.02);
}

.cover-veil {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(90% 70% at 50% 40%, rgba(11, 51, 37, 0.05) 0%, rgba(5, 28, 20, 0.55) 100%),
        linear-gradient(180deg, rgba(6, 36, 26, 0.78) 0%, rgba(7, 42, 30, 0.42) 45%, rgba(5, 28, 20, 0.9) 100%);
}

.cover-frame {
    position: absolute;
    inset: clamp(14px, 3vw, 34px);
    z-index: 2;
    border: 1px solid rgba(231, 211, 166, 0.4);
    pointer-events: none;
}

.cover-frame::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(231, 211, 166, 0.16);
}

.cover-content {
    position: relative;
    z-index: 3;
    max-width: 780px;
    padding: 0 8px;
    color: var(--white);
}

.cover-eyebrow {
    color: var(--gold-soft);
}

.cover-names {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(2.9rem, 10.5vw, 6rem);
    line-height: 1.12;
    color: var(--white);
    text-shadow: 0 2px 34px rgba(0, 0, 0, 0.3);
    text-wrap: balance;
}

.cover-content .ornament span {
    background: linear-gradient(90deg, transparent, rgba(231, 211, 166, 0.85));
}

.cover-content .ornament span:last-child {
    background: linear-gradient(90deg, rgba(231, 211, 166, 0.85), transparent);
}

.cover-content .ornament i {
    border-color: var(--gold-soft);
}

.cover-date {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.15rem, 2.8vw, 1.55rem);
    letter-spacing: 0.22em;
    color: var(--gold-soft);
}

.cover-subtitle {
    max-width: 32ch;
    margin: 12px auto 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.84);
    text-wrap: balance;
}

.cover-place {
    margin-top: clamp(18px, 3.5vh, 28px);
    font-size: clamp(9px, 1.2vw, 10.5px);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    margin: clamp(22px, 4.5vh, 40px) auto 0;
    padding: 6px;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.3s var(--ease);
}

.scroll-hint span {
    font-size: 8.5px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.scroll-hint svg {
    width: 18px;
    height: 18px;
    color: var(--gold-soft);
    animation: scrollBounce 2.2s var(--ease) infinite;
}

.scroll-hint:hover {
    color: var(--white);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(7px); }
}

/* 6. ИСТОРИЯ
   ========================================================================== */
.slide-story .slide-content {
    max-width: 960px;
}

.story-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(26px, 4vw, 56px);
    align-items: center;
    text-align: left;
}

.arch-photo {
    padding: 8px;
    border: 1px solid rgba(197, 160, 89, 0.45);
    border-radius: 200px 200px 16px 16px;
    background: linear-gradient(180deg, var(--white), #FBF7EE);
    box-shadow: 0 30px 60px -40px rgba(11, 51, 37, 0.55);
}

.arch-photo img {
    width: 100%;
    height: clamp(280px, 44vh, 440px);
    border-radius: 190px 190px 10px 10px;
    object-fit: cover;
    object-position: 50% 25%;
}

.story-copy {
    text-align: left;
}

.story-copy .story-text {
    margin-bottom: 14px;
}

.story-copy .story-text:last-child {
    margin-bottom: 0;
}

/* 7. ГАЛЕРЕЯ
   ========================================================================== */
.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 2.4vw, 22px);
    align-items: start;
    max-width: 620px;
    margin: clamp(20px, 4vh, 32px) auto 0;
}

.gallery-item {
    overflow: hidden;
    padding: 7px;
    border: 1px solid rgba(197, 160, 89, 0.42);
    background: var(--paper);
    box-shadow: 0 30px 60px -46px rgba(11, 51, 37, 0.65);
}

.gallery-item img {
    width: 100%;
    height: clamp(210px, 34vh, 340px);
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-note {
    max-width: 480px;
    margin: clamp(14px, 2.5vh, 22px) auto 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(0.92rem, 1.7vw, 1.05rem);
    line-height: 1.6;
    color: var(--body);
    text-wrap: pretty;
}

/* 8. ДЕТАЛИ
   ========================================================================== */
.details-card {
    position: relative;
    max-width: 560px;
    margin: clamp(22px, 4vh, 32px) auto 0;
    border: 1px solid rgba(197, 160, 89, 0.45);
    background: var(--paper);
    box-shadow: 0 30px 60px -44px rgba(11, 51, 37, 0.6);
    text-align: left;
}

.details-card::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(197, 160, 89, 0.16);
    pointer-events: none;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: clamp(14px, 3vw, 24px);
    padding: clamp(16px, 2.6vh, 24px) clamp(18px, 3vw, 32px);
}

.detail-row + .detail-row {
    border-top: 1px solid rgba(197, 160, 89, 0.22);
}

.detail-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(197, 160, 89, 0.5);
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.06);
    color: var(--gold-deep);
}

.detail-icon svg {
    width: 21px;
    height: 21px;
}

.detail-label {
    display: block;
    margin-bottom: 3px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-ink);
}

.detail-value {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(1.15rem, 2.2vw, 1.4rem);
    line-height: 1.3;
    color: var(--emerald-deep);
}

.detail-sub {
    margin-top: 2px;
    font-size: 0.78rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--body);
}

/* 9. ТАЙМЕР
   ========================================================================== */
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(8px, 1.6vw, 16px);
    max-width: 560px;
    margin: clamp(22px, 4vh, 32px) auto 0;
}

.countdown-item {
    position: relative;
    padding: clamp(16px, 2.6vh, 24px) 6px;
    border: 1px solid rgba(197, 160, 89, 0.5);
    background: var(--paper);
    box-shadow: 0 18px 40px -34px rgba(11, 51, 37, 0.6);
}

.countdown-item::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(197, 160, 89, 0.16);
    pointer-events: none;
}

.countdown-item span {
    display: block;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    line-height: 1;
    color: var(--emerald);
    font-variant-numeric: tabular-nums;
}

.countdown-item small {
    display: block;
    margin-top: 8px;
    font-size: 8.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.countdown-note {
    margin-top: clamp(16px, 3vh, 22px);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--body);
}

.countdown-done {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--emerald);
}

/* 10. КОНТАКТЫ И ФИНАЛ
   ========================================================================== */
.rsvp-deadline {
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--body);
}

.rsvp-deadline strong {
    padding-bottom: 2px;
    border-bottom: 1px solid var(--gold);
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--emerald-deep);
    white-space: nowrap;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: clamp(20px, 3.5vh, 28px) auto 0;
    text-align: left;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(197, 160, 89, 0.45);
    background: var(--paper);
    text-decoration: none;
    box-shadow: 0 16px 34px -30px rgba(11, 51, 37, 0.7);
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.contact-btn:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 22px 40px -30px rgba(11, 51, 37, 0.6);
}

.contact-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(22, 81, 58, 0.06);
    color: var(--emerald);
}

.contact-icon svg {
    width: 19px;
    height: 19px;
}

.contact-btn.vk .contact-icon {
    background: rgba(47, 111, 178, 0.08);
    color: #2F6FB2;
}

.vk-mark {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.contact-btn.phone .contact-icon {
    background: rgba(197, 160, 89, 0.1);
    color: var(--gold-deep);
}

.contact-meta {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.contact-meta small {
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact-meta strong {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--emerald-deep);
}

.contact-arrow {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: var(--gold-deep);
    opacity: 0.55;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.contact-btn:hover .contact-arrow {
    transform: translate(2px, -2px);
    opacity: 1;
}

.final-message {
    max-width: 460px;
    margin: clamp(22px, 4vh, 34px) auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(197, 160, 89, 0.32);
}

.final-text {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--body);
}

.signature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    font-family: var(--font-script);
    font-size: clamp(1.7rem, 4vw, 2.1rem);
    line-height: 1.3;
    color: var(--emerald);
}

.signature svg {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    color: var(--gold-deep);
}

/* 11. ПОЯВЛЕНИЕ И АНИМАЦИИ
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.9s var(--ease),
        transform 0.9s var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
}

.swiper-slide-active .reveal {
    opacity: 1;
    transform: none;
}

/* 12. ПАГИНАЦИЯ
   ========================================================================== */
.mySwiper .swiper-pagination {
    right: clamp(10px, 2vw, 22px);
}

.swiper-pagination-bullet {
    width: 2px;
    height: 18px;
    border-radius: 2px;
    background: var(--gold);
    opacity: 0.32;
    transition: height 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}

.swiper-pagination-bullets .swiper-pagination-bullet {
    margin: 7px 0 !important;
}

.swiper-pagination-bullet-active {
    height: 34px;
    background: var(--gold-deep);
    opacity: 1;
}

/* 13. АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 820px) {
    .story-layout {
        grid-template-columns: 1fr;
        gap: 22px;
        text-align: center;
    }

    .arch-photo {
        max-width: 300px;
        margin: 0 auto;
    }

    .arch-photo img {
        height: clamp(220px, 30vh, 300px);
    }

    .story-copy {
        max-width: 560px;
        margin: 0 auto;
        text-align: center;
    }

    .slide-story .slide-content {
        max-width: 580px;
    }
}

@media (max-width: 640px) {
    .swiper-slide {
        padding-left: 18px;
        padding-right: 18px;
        padding-bottom: 74px;
    }

    .splash-names,
    .cover-names {
        font-size: clamp(2.7rem, 11vw, 3.6rem);
    }

    .cover-place {
        letter-spacing: 0.22em;
    }

    .gallery-item img {
        height: clamp(160px, 24vh, 230px);
    }

    .details-card {
        max-width: 100%;
    }

    .detail-row {
        gap: 13px;
        padding: 14px 16px;
    }

    .detail-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .countdown {
        gap: 7px;
    }

    .countdown-item small {
        font-size: 7.5px;
        letter-spacing: 0.14em;
    }

    .contact-buttons {
        max-width: 100%;
    }

    .contact-btn {
        gap: 11px;
    }

    .final-message {
        padding-bottom: 4px;
    }

    /* Пагинация внизу по центру */
    .swiper-pagination-bullets.swiper-pagination-vertical {
        top: auto !important;
        bottom: calc(14px + env(safe-area-inset-bottom)) !important;
        left: 50% !important;
        right: auto !important;
        flex-direction: row !important;
        align-items: center;
        transform: translateX(-50%) !important;
    }

    .swiper-pagination-bullets .swiper-pagination-bullet {
        width: 16px !important;
        height: 2px !important;
        margin: 0 4px !important;
    }

    .swiper-pagination-bullets .swiper-pagination-bullet-active {
        width: 30px !important;
        height: 2px !important;
    }
}

@media (max-height: 720px) {
    .swiper-slide {
        padding-top: 44px;
        padding-bottom: 54px;
    }

    .section-title {
        font-size: clamp(1.55rem, 4.2vh, 2.1rem);
    }

    .eyebrow {
        margin-bottom: 7px;
    }

    .ornament {
        margin: 12px auto 16px;
    }

    .story-text {
        font-size: 0.9rem;
        line-height: 1.75;
    }

    .arch-photo img {
        height: clamp(170px, 26vh, 260px);
    }

    .gallery {
        margin-top: 18px;
    }

    .gallery-item img {
        height: clamp(170px, 25vh, 260px);
    }

    .details-card {
        margin-top: 16px;
    }

    .detail-row {
        padding: 12px 20px;
    }

    .detail-value {
        font-size: 1.1rem;
    }

    .detail-sub {
        font-size: 0.76rem;
    }

    .countdown {
        margin-top: 18px;
    }

    .countdown-item {
        padding: 12px 4px;
    }

    .countdown-note {
        margin-top: 12px;
        font-size: 0.85rem;
    }

    .contact-buttons {
        gap: 9px;
        margin-top: 16px;
    }

    .contact-btn {
        padding: 9px 14px;
    }

    .contact-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .contact-meta strong {
        font-size: 0.98rem;
    }

    .final-message {
        margin-top: 16px;
        padding-top: 14px;
    }

    .signature {
        margin-top: 4px;
        font-size: 1.6rem;
    }

    .scroll-hint {
        margin-top: 18px;
    }

    .cover-place {
        margin-top: 14px;
    }

    .splash-date {
        font-size: 1.05rem;
    }
}

/* 14. ТОЧНАЯ ПОДГОНКА ПОД ТЕЛЕФОНЫ
   ========================================================================== */
@media (max-width: 820px) {
    .arch-photo img {
        height: clamp(150px, 24vh, 280px);
    }

    .story-copy .story-text {
        margin-bottom: 11px;
    }
}

/* Невысокие экраны (iPhone SE, бюджетные Android) */
@media (max-width: 640px) and (max-height: 720px) {
    .slide-story .section-title {
        font-size: 1.5rem;
    }

    .slide-story .ornament {
        margin: 8px auto 12px;
    }

    .story-layout {
        gap: 14px;
    }

    .arch-photo {
        max-width: 240px;
        padding: 6px;
    }

    .arch-photo img {
        height: clamp(140px, 26vh, 220px);
    }

    .story-copy .story-text {
        margin-bottom: 8px;
        font-size: 0.84rem;
        line-height: 1.6;
    }

    .slide-gallery .story-text {
        font-size: 0.84rem;
        line-height: 1.6;
    }

    .gallery {
        margin-top: 14px;
    }

    .gallery-item img {
        height: clamp(140px, 23vh, 190px);
    }

    .gallery-note {
        margin-top: 10px;
        font-size: 0.86rem;
        line-height: 1.5;
    }

    .slide-rsvp .eyebrow {
        margin-bottom: 4px;
    }

    .slide-rsvp .section-title {
        font-size: 1.35rem;
    }

    .slide-rsvp .ornament {
        margin: 8px auto 10px;
    }

    .slide-rsvp .story-text {
        font-size: 0.82rem;
        line-height: 1.55;
    }

    .rsvp-deadline {
        margin-top: 8px;
        font-size: 0.78rem;
    }

    .rsvp-deadline strong {
        font-size: 0.95rem;
    }

    .contact-buttons {
        gap: 7px;
        margin-top: 12px;
    }

    .contact-btn {
        gap: 10px;
        padding: 7px 12px;
    }

    .contact-icon {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }

    .contact-icon svg {
        width: 16px;
        height: 16px;
    }

    .contact-meta small {
        font-size: 7.5px;
    }

    .contact-meta strong {
        font-size: 0.92rem;
    }

    .final-message {
        margin-top: 10px;
        padding-top: 10px;
    }

    .final-text {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .signature {
        margin-top: 3px;
        font-size: 1.35rem;
    }
}

/* Совсем небольшие телефоны (320×568) */
@media (max-width: 360px) and (max-height: 620px) {
    .slide-story .eyebrow {
        margin-bottom: 3px;
    }

    .slide-story .section-title {
        font-size: 1.35rem;
    }

    .slide-story .ornament {
        margin: 6px auto 8px;
    }

    .story-layout {
        gap: 10px;
    }

    .arch-photo {
        max-width: 220px;
        padding: 5px;
    }

    .arch-photo img {
        height: clamp(115px, 22vh, 150px);
    }

    .story-copy .story-text {
        margin-bottom: 6px;
        font-size: 0.8rem;
        line-height: 1.55;
    }
}

/* 15. ЗАПАСНОЙ РЕЖИМ БЕЗ SWIPER (нет интернета / CDN)
   ========================================================================== */
.no-swiper .main-content {
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.no-swiper .mySwiper,
.no-swiper .swiper-wrapper {
    height: auto;
    overflow: visible;
}

.no-swiper .swiper-wrapper {
    display: block;
}

.no-swiper .swiper-slide {
    min-height: 100vh;
    min-height: 100dvh;
}

.no-swiper .swiper-pagination {
    display: none;
}

.no-swiper .reveal {
    opacity: 1;
    transform: none;
}

.no-swiper .sound-toggle {
    position: fixed;
}

/* 16. УМЕНЬШЕННОЕ ДВИЖЕНИЕ
   ========================================================================== */@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
