/* ===== Базовые переменные ===== */
:root {
    --lilac-50:  #f7f1fb;
    --lilac-100: #ece1f5;
    --lilac-200: #d9c4ec;
    --lilac-300: #c0a3df;
    --lilac-400: #a986cf;
    --lilac-500: #8e6bba;
    --lilac-600: #6e4f99;
    --ink:       #3b2c52;
    --ink-soft:  #5b4a78;
    --cream:     #fbf8ff;
    --gold:      #b89c6a;
    --shadow:    0 14px 40px rgba(86, 56, 130, .15);
    --radius:    18px;
    --radius-lg: 26px;

    --serif:  'Cormorant Garamond', 'Times New Roman', serif;
    --script: 'Great Vibes', cursive;
    --sans:   'Montserrat', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    color: var(--ink);
    background:
        radial-gradient(1100px 700px at 50% -10%, #ece1f5 0%, transparent 60%),
        radial-gradient(900px 600px at 100% 30%, #e3d2f1 0%, transparent 55%),
        linear-gradient(180deg, #f3e8fa 0%, #ece0f7 35%, #e2d0f3 65%, #d9c4ec 100%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.55;
    font-size: 16px;
}

/* Декоративные blob'ы */
.bg-decor {
    position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-blob {
    position: absolute; border-radius: 50%;
    filter: blur(70px); opacity: .35; mix-blend-mode: screen;
    animation: float 18s ease-in-out infinite;
}
.blob1 { width: 380px; height: 380px; background: #c9a8e8; top: -100px; left: -120px; }
.blob2 { width: 460px; height: 460px; background: #e6d3f3; bottom: -120px; right: -150px; animation-delay: -6s; }
.blob3 { width: 320px; height: 320px; background: #d8bfee; top: 45%; left: 60%; animation-delay: -12s; }

@keyframes float {
    0%, 100% { transform: translate(0,0) scale(1); }
    50%      { transform: translate(20px, -30px) scale(1.08); }
}

/* ===== Секции ===== */
.page {
    position: relative; z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 72px 24px;
    text-align: center;
}

.title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 34px;
    color: var(--ink);
    margin: 0 0 22px;
    letter-spacing: .5px;
}
.title.light { color: #fff; }

.paragraph {
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin: 0 0 16px;
}

.ornament {
    font-family: var(--serif);
    color: var(--lilac-500);
    font-size: 28px;
    margin: 6px 0 18px;
    opacity: .8;
}

/* ===== Reveal анимация ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.1s ease, transform 1.1s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ===== 1. Обложка ===== */
.page-cover {
    padding: 0;
    min-height: 100vh;
    min-height: 100svh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.cover-photo {
    position: absolute; inset: 0; z-index: 0;
}
.cover-photo img {
    width: 100%; height: 100%; object-fit: cover;
    animation: kenburns 18s ease-out infinite alternate;
}
.cover-overlay {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(40, 20, 70, .55) 0%, rgba(40, 20, 70, .25) 55%, rgba(40, 20, 70, .15) 80%),
        linear-gradient(180deg, rgba(60,40,100,.35) 0%, rgba(60,40,100,.15) 40%, rgba(60,40,100,.65) 100%);
}
@keyframes kenburns {
    0%   { transform: scale(1) translate(0,0); }
    100% { transform: scale(1.12) translate(-2%, -2%); }
}

.cover-content {
    position: relative; z-index: 1;
    color: #fff;
    padding: 32px;
    /* мульти-тенью эмулируем мягкую обводку + глубокую тень для читаемости поверх фото */
    text-shadow:
        0 0 1px rgba(40, 20, 70, .9),
        0 1px 2px rgba(40, 20, 70, .9),
        0 2px 6px rgba(40, 20, 70, .85),
        0 6px 22px rgba(40, 20, 70, .75),
        0 12px 40px rgba(40, 20, 70, .55);
    animation: fadeUp 1.6s .3s both ease;
}
.cover-pre {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 6px;
    font-size: 12px;
    opacity: .9;
    margin: 0 0 20px;
}
.cover-names {
    margin: 0;
    font-family: var(--script);
    font-weight: 400;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.cover-name {
    font-size: 72px;
    line-height: 1;
    /* тонкая обводка для скриптового шрифта, чтобы не «съедался» фоном */
    -webkit-text-stroke: 0.5px rgba(40, 20, 70, .45);
    paint-order: stroke fill;
}
.cover-and {
    font-size: 42px;
    color: #fff;
    opacity: .9;
    margin: -4px 0;
}
.cover-date {
    margin-top: 28px;
    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: 4px;
    display: flex; align-items: center; justify-content: center;
    gap: 12px;
    text-transform: uppercase;
}
.cover-date-num {
    /* учитываем letter-spacing визуально, сдвигая текст влево */
    padding-left: 4px;
}
.cover-date-mid {
    letter-spacing: 4px;
}
.cover-date-dash {
    display: inline-block;
    width: 26px;
    height: 1px;
    background: rgba(255, 255, 255, .85);
    flex-shrink: 0;
}

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

.scroll-hint {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    width: 26px; height: 42px;
    border: 1.5px solid rgba(255,255,255,.85);
    border-radius: 14px;
    z-index: 1;
}
.scroll-hint span {
    display: block; width: 3px; height: 8px;
    background: #fff; border-radius: 2px;
    margin: 8px auto 0;
    animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
    0%   { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

/* ===== 3. Локации ===== */
.location-card {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.6);
}
.location-num {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 11px;
    color: var(--lilac-600);
    margin-bottom: 8px;
}
.location-name {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 24px;
    margin: 6px 0 4px;
}
.location-sub {
    font-family: var(--serif);
    font-size: 19px;
    color: var(--ink-soft);
    margin: 0 0 6px;
    font-style: italic;
}
.location-addr {
    margin: 4px 0 16px;
    color: var(--ink-soft);
    font-size: 15px;
}
.map-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    background: var(--lilac-500);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: .5px;
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
    box-shadow: 0 8px 20px rgba(142, 107, 186, .35);
}
.map-link:hover, .map-link:active {
    transform: translateY(-2px);
    background: var(--lilac-600);
    box-shadow: 0 12px 28px rgba(142, 107, 186, .45);
}
.note {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--ink-soft);
    font-style: italic;
    opacity: .85;
}
.aster { color: var(--lilac-500); }

.divider {
    display: flex; align-items: center; gap: 14px;
    color: var(--lilac-500); margin: 28px 0;
}
.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, var(--lilac-300), transparent);
}
.divider span { font-size: 18px; }

/* ===== 4. Программа ===== */
.timeline {
    list-style: none; padding: 0; margin: 18px 0 0;
    text-align: left;
    position: relative;
}
.timeline::before {
    content: ''; position: absolute;
    left: 70px; top: 8px; bottom: 8px;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--lilac-300), transparent);
}
.timeline-item {
    display: flex; align-items: center; gap: 18px;
    padding: 14px 0;
    position: relative;
}
.timeline-time {
    flex: 0 0 60px;
    font-family: var(--serif);
    font-size: 22px;
    color: var(--lilac-600);
    text-align: right;
}
.timeline-dot {
    flex: 0 0 12px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--lilac-500);
    box-shadow: 0 0 0 4px rgba(142,107,186,.18);
    margin-left: 4px;
    z-index: 1;
}
.timeline-text {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink);
    line-height: 1.35;
}

/* ===== 5. Дресс-код ===== */
.colors {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 36px 18px; /* row-gap × column-gap — больше места под подписи при переносе */
    margin: 26px 0 22px;
}
.color-circle {
    width: 72px; height: 72px;
    border-radius: 50%;
    box-shadow: var(--shadow), inset 0 0 0 3px rgba(255,255,255,.6);
    position: relative;
    display: flex; align-items: flex-end; justify-content: center;
    transition: transform .4s ease;
}
.color-circle:hover { transform: scale(1.08) rotate(-3deg); }
.color-name {
    position: absolute; bottom: -22px;
    font-size: 11px; color: var(--ink-soft);
    white-space: nowrap;
    letter-spacing: .5px;
}
.dress-image {
    margin-top: 36px;
}
.dress-image img {
    width: 100%; max-width: 420px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ===== 6. Анкета ===== */
.form {
    text-align: left;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.6);
    margin-top: 8px;
}
.field {
    display: block;
    margin-bottom: 22px;
}
.field-label {
    display: block;
    font-family: var(--serif);
    font-size: 19px;
    color: var(--ink);
    margin-bottom: 6px;
}
.field-hint {
    display: block;
    font-size: 12px;
    color: var(--ink-soft);
    opacity: .8;
    margin-bottom: 10px;
}
.form input[type="text"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--lilac-200);
    background: #fff;
    border-radius: 12px;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border .25s ease, box-shadow .25s ease;
}
.form input[type="text"]:focus {
    border-color: var(--lilac-400);
    box-shadow: 0 0 0 4px rgba(169,134,207,.18);
}
.radio, .checkbox {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 15px;
    color: var(--ink);
}
.radio input, .checkbox input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border: 1.5px solid var(--lilac-300);
    background: #fff;
    border-radius: 50%;
    margin: 0;
    display: grid; place-content: center;
    transition: border .2s, background .2s;
    flex-shrink: 0;
}
.checkbox input { border-radius: 6px; }
.radio input:checked, .checkbox input:checked {
    border-color: var(--lilac-500);
    background: var(--lilac-500);
}
.radio input:checked::after,
.checkbox input:checked::after {
    content: '';
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
}
.checkbox input:checked::after {
    width: 6px; height: 10px;
    background: transparent;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    border-radius: 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.btn-submit {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--lilac-500), var(--lilac-600));
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
    box-shadow: 0 10px 24px rgba(142,107,186,.4);
}
.btn-submit:hover, .btn-submit:active {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(142,107,186,.5);
    filter: brightness(1.05);
}

.form-thanks {
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.6);
    animation: fadeUp .8s ease both;
}
.thanks-icon {
    font-size: 56px;
    color: var(--lilac-500);
    animation: beat 1.6s ease-in-out infinite;
}
@keyframes beat {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.15); }
}

/* ===== 7. Обратный отсчёт ===== */
.page-countdown {
    padding: 0;
    min-height: 100vh;
    min-height: 100svh;
    max-width: none;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}
.countdown-photo {
    position: absolute; inset: 0; z-index: 0;
}
.countdown-photo img {
    width: 100%; height: 100%; object-fit: cover;
    object-position: 70% 50%; /* сдвигаем кадр правее, чтобы шкатулка с кольцом была по центру */
    /* без анимации, чтобы кадр с кольцом не уползал */
}
.countdown-overlay {
    position: absolute; inset: 0;
    /* верх — затемнён под текстом, ниже — почти прозрачно, чтобы кольцо было видно */
    background: linear-gradient(180deg,
        rgba(50, 28, 90, .80) 0%,
        rgba(50, 28, 90, .68) 22%,
        rgba(50, 28, 90, .30) 45%,
        rgba(50, 28, 90, .12) 65%,
        rgba(50, 28, 90, .08) 100%);
}
.countdown-content {
    position: relative; z-index: 1;
    color: #fff;
    text-align: center;
    padding: 60px 24px 0;
    width: 100%;
    /* поднимаем контент вверх, чтобы кольцо внизу не перекрывалось */
    align-self: flex-start;
    margin-top: 8vh;
}
.page-countdown {
    align-items: flex-start;
}
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 480px;
    margin: 30px auto 0;
}
.cd-cell {
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius);
    padding: 18px 4px 14px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.cd-num {
    font-family: var(--serif);
    font-size: 38px;
    font-weight: 500;
    line-height: 1;
}
.cd-lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: .9;
}

/* ===== 8. Финал ===== */
.page-final {
    padding: 0;
    min-height: 100vh;
    min-height: 100svh;
    max-width: none;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}
.final-photo {
    position: absolute; inset: 0; z-index: 0;
}
.final-photo img {
    width: 100%; height: 100%; object-fit: cover;
    animation: kenburns 25s ease-out infinite alternate;
}
.final-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(70,45,110,.45), rgba(50,30,90,.7));
}
.final-content {
    position: relative; z-index: 1;
    color: #fff;
    text-align: center;
    padding: 60px 28px;
}
.final-text {
    font-family: var(--script);
    font-size: 54px;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 4px 30px rgba(40,20,70,.6);
}
.final-heart {
    font-size: 36px;
    color: #fff;
    margin: 22px 0;
    animation: beat 1.8s ease-in-out infinite;
}
.final-sign {
    font-family: var(--serif);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 13px;
    margin: 0;
    opacity: .92;
}

/* ===== Адаптив ===== */
@media (max-width: 380px) {
    .cover-name { font-size: 58px; }
    .cover-and  { font-size: 34px; }
    .title      { font-size: 28px; }
    .paragraph  { font-size: 17px; }
    .cd-num     { font-size: 30px; }
    .cd-lbl     { font-size: 10px; letter-spacing: 1px; }
    .final-text { font-size: 44px; }
    .timeline::before { left: 60px; }
    .timeline-time { flex-basis: 50px; font-size: 19px; }
    .timeline-text { font-size: 16px; }
    .color-circle { width: 62px; height: 62px; }
}

@media (min-width: 720px) {
    .page { padding: 100px 32px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ===== Desktop gate (QR) ===== */
.desktop-gate {
    position: fixed; inset: 0; z-index: 9999;
    display: none;
    align-items: center; justify-content: center;
    background:
        radial-gradient(900px 600px at 30% 20%, #ece1f5 0%, transparent 60%),
        radial-gradient(800px 500px at 80% 80%, #e3d2f1 0%, transparent 55%),
        linear-gradient(135deg, #ede0f7 0%, #d9c4ec 60%, #c0a3df 100%);
    padding: 32px;
    animation: fadeUp .8s ease both;
}
.dg-card {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(86, 56, 130, .25);
    padding: 48px 44px;
    max-width: 460px;
    width: 100%;
    text-align: center;
}
.dg-ornament {
    font-family: var(--serif);
    font-size: 30px;
    color: var(--lilac-500);
    margin-bottom: 10px;
}
.dg-title {
    font-family: var(--script);
    font-size: 56px;
    font-weight: 400;
    margin: 0 0 6px;
    color: var(--ink);
    line-height: 1;
}
.dg-sub {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink-soft);
    margin: 0 0 26px;
}
.dg-qr {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(86, 56, 130, .18);
    margin: 0 auto 22px;
    line-height: 0;
}
.dg-qr img,
.dg-qr canvas,
.dg-qr svg { display: block; width: 220px; height: 220px; }
.dg-hint {
    font-size: 13px;
    color: var(--ink-soft);
    margin: 0 0 10px;
    line-height: 1.5;
}
.dg-link {
    display: inline-block;
    word-break: break-all;
    font-size: 13px;
    color: var(--lilac-600);
    text-decoration: none;
    border-bottom: 1px dashed var(--lilac-300);
    padding-bottom: 2px;
    margin-bottom: 24px;
}
.dg-link:hover { color: var(--lilac-500); }
.dg-date {
    font-family: var(--serif);
    text-transform: uppercase;
    letter-spacing: 6px;
    font-size: 13px;
    color: var(--ink);
    margin: 18px 0 0;
}

/* Активируем заглушку только на широких экранах (десктоп/планшет) */
@media (min-width: 720px) {
    .desktop-gate { display: flex; }
    #app { display: none; }
}

















