
:root {
    --bg:     #faf5ef;
    --rose:   #c0566e;
    --rose2:  #e8879a;
    --rose3:  #f5d0da;
    --terra:  #a03520;
    --ink:    #1a120e;
    --dim:    #8a7060;
    --soft:   #f5eae5;
    --softer: #fdf8f5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    color: var(--ink);
}

#inv {
    overflow-x: hidden;
    max-width: 520px;
    margin: 0 auto;
}

.watermark {
    content: "ya-invite";
    position: fixed;
    font-size: 80px;
    color: rgba(0,0,0,0.08);
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 55555;
    white-space: nowrap;
    font-weight: 600; /* выглядит аккуратнее */
}



body::after {
    content: "ya-invite";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 80px;
    color: rgba(0,0,0,0.08);
    pointer-events:none;
    z-index:5555555;
    white-space:nowrap;
}

html::after {
    content: "ya-invite";
    position: fixed;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 80px;
    color: rgba(0,0,0,0.08);
    pointer-events:none;
    z-index:555555;
    white-space:nowrap;
}
/* ── HERO ── */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 640px;
    overflow: hidden;
    background: linear-gradient(160deg, #e8d5d0 0%, #d4b8b0 40%, #c8a098 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}


.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20,10,8,.75) 0%, rgba(20,10,8,.15) 55%, transparent 100%);
}

.hero-text {
    position: relative;
    z-index: 2;
    padding: 40px 40px 48px;
    color: #faf5ef;
}

.hero-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(52px, 14vw, 80px);
    font-style: italic;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 14px;
}
.hero-date {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: .75;
    font-weight: 300;
}

/* ── 30 / thirty ── */
.thirty-sec {
    padding: 0px 40px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.thirty-wrap {
    position: relative;
    display: inline-block;
    line-height: 1;
}
.thirty-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(160px, 32vw, 220px);
    font-weight: 600;
    color: var(--rose2);
    line-height: 1;
    display: block;
    letter-spacing: -8px;
    user-select: none;
}
.thirty-script {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(56px, 12vw, 86px);
    color: var(--terra);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 0%);
    white-space: nowrap;
    z-index: 2;
}
.thirty-sub {
    font-size: 11px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--dim);
    margin-top: 30px;
    font-weight: 400;
}

/* ── DIVIDER ── */
.dvd {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 40px;
    margin: 4px 0;
}
.dvd::before, .dvd::after {
    content: '';
    flex: 1;
    height: .5px;
    background: rgba(192,86,110,.2);
}
.dvd-orn { font-size: 10px; color: var(--rose2); }

/* ── INVITE TEXT ── */
.invite-sec {
    padding: 44px 40px;
    text-align: center;
    background: var(--softer);
}
.inv-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 6vw, 40px);
    font-style: italic;
    color: var(--rose);
    margin-bottom: 18px;
    font-weight: 300;
}
.inv-body {
    font-size: 13px;
    line-height: 1.85;
    color: var(--dim);
    max-width: 400px;
    margin: 0 auto 22px;
    font-weight: 300;
}
.inv-accent {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 19px;
    color: var(--rose);
    font-weight: 300;
}

/* ── SEC HEAD ── */
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-label {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(36px, 7vw, 52px);
    color: var(--rose);
    display: block;
}

/* ── TIMELINE ── */
.timeline-sec { padding: 52px 40px; background: var(--soft); }
.tl-items { max-width: 360px; margin: 0 auto; }
.tl-item {
    display: grid;
    grid-template-columns: 72px 1px 1fr;
    gap: 0 18px;
    padding-bottom: 28px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-time { text-align: right; padding-top: 2px; }
.tl-h {
    font-size: 19px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--rose);
    line-height: 1;
}

.tl-line {
    background: rgba(192,86,110,.2);
    position: relative;
}
.tl-line::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rose2);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
}
.tl-content {
    padding-bottom: 28px;
    border-bottom: .5px dashed rgba(192,86,110,.15);
}
.tl-item:last-child .tl-content { border-bottom: none; padding-bottom: 0; }
.tl-ttl { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.tl-desc { font-size: 12px; color: var(--dim); line-height: 1.65; font-weight: 300; }

/* ── PHOTOS ── */
.grid-sec { padding: 52px 40px; background: var(--softer); }
.pgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 24px auto 0;
}
.pf {
    background: #e8ddd8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: filter .3s;
}
.pf:hover { filter: brightness(.93); }
.pf img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pf.wide { grid-column: 1/3; aspect-ratio: 16/9; }
.pf:not(.wide) { aspect-ratio: 4/5; }


.pf-cap {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px 10px 10px;
    background: linear-gradient(transparent, rgba(20,10,8,.5));
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(250,245,239,.85);
    text-align: center;
}

/* ── LOCATION ── */
.loc-sec { padding: 52px 40px; }
.loc-photo {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e0cfc8, #cdb8b0);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.loc-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loc-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 30px;
    font-style: italic;
    color: var(--ink);
    margin-bottom: 8px;
    font-weight: 300;
}
.loc-addr { font-size: 13px; color: var(--dim); font-weight: 300; line-height: 1.7; }
.loc-map-btn {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 28px;
    border: .5px solid var(--rose);
    color: var(--rose);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    transition: background .3s, color .3s;
    font-weight: 400;
}
.loc-map-btn:hover { background: var(--rose); color: #fff; }

/* ── DRESS CODE ── */
.dress-sec { padding: 52px 40px; background: var(--soft); text-align: center; }
.dress-body {
    font-size: 13px;
    color: var(--dim);
    line-height: 1.85;
    max-width: 360px;
    margin: 16px auto 32px;
    font-weight: 300;
}
.palette { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sw-dot { width: 48px; height: 48px; border-radius: 50%; }
.sw-lbl { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); }

/* ── COUNTDOWN ── */
.cd-sec {
    padding: 52px 40px;
    text-align: center;
    background: var(--soft);
}
.cd-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 auto 20px;
}
.cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
   /*  min-width: 64px; */
}
.cd-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(48px, 12vw, 72px);
    font-weight: 600;
    color: var(--rose);
    line-height: 1;
    display: block;
    transition: transform .15s ease;
}
.cd-num.tick {
    transform: scale(1.08);
}
.cd-lbl {
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--dim);
    font-weight: 400;
}
.cd-sep {
    font-size: 10px;
    color: var(--rose2);
    opacity: .5;
    margin-bottom: 22px;
    animation: ornPulse 3s ease-in-out infinite;
}


/* ── RSVP ── */
.rsvp-sec {
    padding: 50px 40px 0px;
    text-align: center;
    background: var(--rose);
    color: #fff;
}
.rsvp-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(42px, 9vw, 60px);
    margin-bottom: 8px;
    color: #fff;
}
.rsvp-date {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: .72;
    font-weight: 300;
}



/* ── FOOTER ── */
.foot {
    padding: 22px 40px;
    text-align: center;
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--dim);
    background: var(--bg);
}

.wedding-form {
    color: white;
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
    padding: 50px 0;
    font-size: 30px;


    fieldset {
        border: none;
        margin-bottom: 15px;
    }

    legend {

        display: block;
        margin-bottom: 5px;
    }

    label {

        margin: 5px 0;
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }

    input[type="text"] {

        width: 100%;
        border: 1px solid white;
        outline: none;
        background: transparent;
        padding: 15px;
        font-size: 16px;
        margin-top: 5px;


    }
    .wedding-form input::placeholder {
        color: white;
    }
    .wedding-form input[type="radio"],
    .wedding-form input[type="checkbox"],
    textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    textarea {
        min-height: 100px;
    }

    button {

        -webkit-appearance: none; /* Убирает дефолтные стили в Safari */
        -moz-appearance: none; /* Для Firefox */
        appearance: none;
        width: 100%;
        padding: 10px;
        background: transparent;
        color: white;
        border: 1px solid white;
        cursor: pointer;
        font-size: 16px;

        &:hover {
            background: #e6ddd7;
        }
    }
}

@supports (-webkit-appearance: none) {
    .wedding-form {
        max-width: 700px;
        margin: 0 auto;
        padding: 50px 0;
        font-size: 30px;

    }
    /* Скрываем стандартный checkbox */
    .wedding-form input[type="checkbox"] {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border: 1px solid white; /* рамка */
        border-radius: 50%;
        background-color: transparent;
        cursor: pointer;
        position: relative;
    }

    /* Галочка при выборе */
    .wedding-form input[type="checkbox"]:checked::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 14px;
        height: 14px;
        background-color: white; /* цвет галочки */
        border-radius: 50%;
    }

    /* Для радио */
    .wedding-form input[type="radio"] {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border: 1px solid white;
        border-radius: 50%;
        background-color: transparent;
        cursor: pointer;
        position: relative;
    }

    /* Точка при выборе */
    .wedding-form input[type="radio"]:checked::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 10px;
        height: 10px;
        background-color: white; /* цвет точки */
        border-radius: 50%;
    }
    .wedding-form input::placeholder {
        color: white;
    }
    fieldset {
        border: none !important;
        padding: 0;
    }

    legend {
        margin-bottom: 5px;
    }

    label {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }

    input[type="text"],
    textarea {
        width: 100%;
        padding: 8px;
        border: 1px solid white;
        font-size: 16px;
        background-color: transparent;
        color: white;
    }

    textarea {
        min-height: 100px;
    }

    button {
        -webkit-appearance: none; /* Убирает дефолтные стили в Safari */
        -moz-appearance: none; /* Для Firefox */
        appearance: none; /* Общий сброс */
        background: white;
        width: 100%;
        padding: 10px;
        border: 1px solid white;
        color: white;
        border-radius: 5px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;

        &:hover {
            background: gray;
        }

        &:focus {
            outline: none; /* Убирает синюю рамку при фокусе */
        }
    }
}

/* ── REVEAL ── */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .95s ease, transform .95s ease; }
.rv.vi { opacity: 1; transform: none; }
@keyframes fin { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-text > * { animation: fin 1s ease forwards; opacity: 0; }
.hero-text > *:nth-child(1) { animation-delay: .3s; }
.hero-text > *:nth-child(2) { animation-delay: .6s; }
.hero-text > *:nth-child(3) { animation-delay: .9s; }

/* ── INTRO SPLASH ── */
#intro {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: all;
    transition: opacity 1s ease, visibility 1s ease;
}
#intro.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.intro-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.intro-eyebrow {
    font-size: 9px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    font-weight: 300;
    opacity: 0;
    animation: introFadeUp .8s ease .3s forwards;
}
.intro-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(52px, 16vw, 96px);
    font-weight: 300;
    font-style: italic;
    color: #fff;
    line-height: 1;
    opacity: 0;
    animation: introFadeUp 1s ease .6s forwards;
}
.intro-sub {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(24px, 6vw, 38px);
    color: var(--rose2);
    opacity: 0;
    animation: introFadeUp .8s ease 1s forwards;
}
@keyframes introFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* ── MARQUEE ── */
.marquee-wrap {
    overflow: hidden;
    border-top: .5px solid rgba(192,86,110,.15);
    border-bottom: .5px solid rgba(192,86,110,.15);
    padding: 10px 0;
    background: var(--softer);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 22s linear infinite;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--dim);
    font-weight: 400;
    white-space: nowrap;
    padding: 0 18px;
    font-family: 'Montserrat', sans-serif;
}
.marquee-dot {
    font-size: 8px;
    color: var(--rose2);
    padding: 0 4px;
    align-self: center;
}
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── LIGHTBOX ── */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 8000;
    background: rgba(20,10,8,.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}
#lightbox.open { opacity: 1; visibility: visible; }

#lb-close, #lb-prev, #lb-next {
    position: absolute;
    background: transparent;
    border: none; outline: none;
    -webkit-appearance: none; appearance: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    color: rgba(255,255,255,.55);
    transition: color .2s;
    line-height: 1;
}
#lb-close:hover, #lb-prev:hover, #lb-next:hover { color: #fff; }
#lb-close:active, #lb-prev:active, #lb-next:active,
#lb-close:focus,  #lb-prev:focus,  #lb-next:focus { background: transparent; outline: none; }

#lb-close { top: 18px; right: 18px; font-size: 20px; padding: 8px; }
#lb-prev   { left: 12px; top: 50%; transform: translateY(-50%); font-size: 52px; font-weight: 200; padding: 16px 20px; }
#lb-next   { right: 12px; top: 50%; transform: translateY(-50%); font-size: 52px; font-weight: 200; padding: 16px 20px; }

.lb-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 90px 40px;
    pointer-events: none;
}
#lb-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
    transition: opacity .25s ease;
    pointer-events: none;
}
#lb-cap {
    position: absolute;
    bottom: 20px; left: 0; right: 0;
    text-align: center;
    font-size: 9px; letter-spacing: 4px; text-transform: uppercase;
    color: rgba(255,255,255,.35); font-weight: 300;
}

/* ── SCROLL PROGRESS BAR ── */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--rose3), var(--rose), var(--terra));
    z-index: 1000;
    transition: width .1s linear;
}

/* ── PARALLAX HERO PHOTO ── */
.hero-photo {
    will-change: transform;
    transition: none;
}

/* ── "30" SHIMMER ── */
@keyframes shimmer30 {
    0%   { color: var(--rose2); text-shadow: none; }
    50%  { color: var(--rose);  text-shadow: 0 0 60px rgba(192,86,110,.35), 0 0 120px rgba(232,135,154,.15); }
    100% { color: var(--rose2); text-shadow: none; }
}
.thirty-num { animation: shimmer30 4s ease-in-out infinite; }

/* ── "thirty" FLOAT ── */
@keyframes floatScript {
    0%,100% { transform: translate(-50%, 0%) rotate(-2deg); }
    50%      { transform: translate(-50%, -8px) rotate(1deg); }
}
.thirty-script { animation: floatScript 5s ease-in-out infinite; }

/* ── TIMELINE STAGGER ── */
.tl-item {
    opacity: 0;
    transform: translateX(-18px);
    transition: opacity .6s ease, transform .6s ease;
}
.tl-item.vi { opacity: 1; transform: none; }
.tl-item:nth-child(1) { transition-delay: 0s; }
.tl-item:nth-child(2) { transition-delay: .18s; }
.tl-item:nth-child(3) { transition-delay: .36s; }

/* ── TL-LINE GROW ── */
@keyframes lineGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.tl-item.vi .tl-line { animation: lineGrow .7s ease forwards; transform-origin: top; }

/* ── PHOTO HOVER TILT ── */
.pf { transition: transform .35s ease, filter .3s, box-shadow .35s; transform-style: preserve-3d; }
.pf:hover { transform: scale(1.03) rotate(.6deg); box-shadow: 0 12px 36px rgba(192,86,110,.18); filter: brightness(.96); }
.pf.wide:hover { transform: scale(1.02) rotate(-.3deg); }

/* ── PALETTE DOTS POP ── */
@keyframes popIn {
    0%   { opacity: 0; transform: scale(0) translateY(12px); }
    70%  { transform: scale(1.15) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.sw-dot {
    opacity: 0;
    animation: none;
}
.dress-sec.vi .sw-dot {
    animation: popIn .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
.dress-sec.vi .sw:nth-child(1) .sw-dot { animation-delay: .1s; }
.dress-sec.vi .sw:nth-child(2) .sw-dot { animation-delay: .22s; }
.dress-sec.vi .sw:nth-child(3) .sw-dot { animation-delay: .34s; }
.dress-sec.vi .sw:nth-child(4) .sw-dot { animation-delay: .46s; }

/* ── DVR ORNAMENT PULSE ── */
@keyframes ornPulse {
    0%,100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50%      { transform: scale(1.4) rotate(180deg); opacity: .7; }
}
.dvd-orn { display: inline-block; animation: ornPulse 3s ease-in-out infinite; }


/* ── CURSOR SPARKLE ── */
.spark {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--rose2);
    transform: translate(-50%, -50%);
    animation: sparkFade .6s ease forwards;
}
@keyframes sparkFade {
    0%   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(0) translateY(-16px); }
}

/* ── RSVP BUTTON PULSE ── */
@keyframes btnPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(250,245,239,.3); }
    50%      { box-shadow: 0 0 0 10px rgba(250,245,239,0); }
}
.rsvp-sec button[type="submit"] { animation: btnPulse 2.4s ease infinite; }

/* ── LOCATION PHOTO ZOOM-IN ── */
.loc-photo { overflow: hidden; }
.loc-photo img { transition: transform 6s ease; }
.loc-sec.vi .loc-photo img { transform: scale(1.06); }

@media (max-width: 625px) {
    .wedding-form {
        font-size: 28px;
    }
}
@media (max-width: 575px) {
    .wedding-form {
        font-size: 22px;
    }
}
@media (max-width: 443px) {
    .wedding-form {
        font-size: 18px;
    }

}
@media (max-width: 368px) {
    .cd-num {
        font-family: 'Cormorant Garamond', serif;
        font-size: 30px;
    }

}