/* =========================================================================
   Свадебная пригласительная — кинематографичный стиль
   тёмно-зелёный + кремовый, панорамы, рваные края
   ========================================================================= */

:root {
    --cream:    #F1EADC;
    --cream-2:  #E9E0CE;
    --green:    #26301F;   /* глубокий тёмно-зелёный */
    --green-2:  #313D27;
    --olive:    #6B7A56;
    --sage:     #9BA886;
    --ink:      #2C3122;
    --ink-soft: #5E6450;
    --gold:     #B79B6A;
    --line:     rgba(44,49,34,.18);

    --script: 'Marck Script', cursive;
    --serif:  'Cormorant Garamond', Georgia, serif;
    --sans:   'Montserrat', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--green);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }

.script { font-family: var(--script); font-weight: 400; overflow-wrap: normal; word-break: keep-all; }

.wrap { width: min(100% - 44px, 760px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 44px, 560px); }

/* =========================================================================
   ПАРАЛЛАКС / ФОТО-СЕКЦИИ
   ========================================================================= */
.parallax { position: relative; overflow: hidden; isolation: isolate; }
.parallax__img {
    position: absolute; left: 0; right: 0; top: -12%;
    height: 124%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: -2;
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
    min-height: 100svh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 60px 24px;
    color: #fff;
}
.hero__veil {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(180deg, rgba(20,26,16,.55) 0%, rgba(20,26,16,.25) 35%, rgba(20,26,16,.7) 100%);
}
.hero__inner { max-width: 1100px; padding-inline: 12px; }
.hero__script {
    font-size: clamp(26px, 7vw, 44px);
    color: #f3ecd9;
    margin-bottom: 18px;
    opacity: .95;
    text-shadow: 0 2px 18px rgba(0,0,0,.4);
}
.hero__eyebrow {
    font-family: var(--sans);
    letter-spacing: .42em; text-transform: uppercase;
    font-size: clamp(10px, 2.4vw, 13px);
    opacity: .85; margin-bottom: 14px;
}
.hero__names {
    font-size: clamp(44px, 11vw, 104px);
    line-height: 1.08;
    text-shadow: 0 4px 30px rgba(0,0,0,.45);
}
.hero__names span { font-size: .6em; vertical-align: middle; opacity: .9; }
.hero__line { width: 78px; height: 1px; background: rgba(255,255,255,.6); margin: 26px auto; }
.hero__date {
    font-family: var(--serif);
    font-size: clamp(20px, 5vw, 30px);
    letter-spacing: .26em;
    font-weight: 500;
}

.scrolldown {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 40px; border: 2px solid rgba(255,255,255,.7); border-radius: 13px;
}
.scrolldown span {
    position: absolute; top: 7px; left: 50%; margin-left: -2.5px;
    width: 5px; height: 8px; border-radius: 3px; background: #fff;
    animation: sd 1.6s infinite;
}
@keyframes sd { 0%{opacity:0;transform:translateY(0)} 40%{opacity:1} 80%{opacity:0;transform:translateY(13px)} }

/* =========================================================================
   ПАНЕЛИ (кремовые / зелёные) + РВАНЫЕ КРАЯ
   ========================================================================= */
.panel { position: relative; padding: clamp(70px, 13vw, 130px) 0; }
.panel--cream { background: var(--cream); color: var(--ink); }
.panel--green { background: var(--green); color: var(--cream); }

/* рваная бумага: png — низ сплошной, верх рваный */
.torn-top::before,
.torn-bottom::after,
.torn-top--green::before,
.torn-bottom--green::after {
    content: ''; position: absolute; left: -1px; right: -1px;
    height: 72px; pointer-events: none; z-index: 3;
}
.torn-top::before        { top: 0; transform: translateY(-70px);
    background: url('../img/torn-cream.png') 100% 100% / 100% 100% no-repeat; }
.torn-bottom::after      { bottom: 0; transform: translateY(70px) scaleY(-1);
    background: url('../img/torn-cream.png') 100% 100% / 100% 100% no-repeat; }
.torn-top--green::before { top: 0; transform: translateY(-70px);
    background: url('../img/torn-green.png') 100% 100% / 100% 100% no-repeat; }
.torn-bottom--green::after { bottom: 0; transform: translateY(70px) scaleY(-1);
    background: url('../img/torn-green.png') 100% 100% / 100% 100% no-repeat; }

/* =========================================================================
   ТИПОГРАФИКА СЕКЦИЙ
   ========================================================================= */
.h-title {
    font-family: var(--serif);
    font-weight: 500;
    text-align: center;
    font-size: clamp(28px, 7vw, 56px);
    line-height: 1.12;
    letter-spacing: .02em;
    margin-bottom: 26px;
    color: var(--ink);
    overflow-wrap: break-word;
}
.h-title--light { color: var(--cream); }

.overline {
    text-align: center; font-family: var(--sans);
    letter-spacing: .3em; text-transform: uppercase;
    font-size: clamp(11px, 2.6vw, 13px);
    color: var(--olive); margin-bottom: 28px;
}
.overline--light { color: var(--sage); }

.prose {
    max-width: 56ch; margin: 0 auto;
    text-align: center; font-size: clamp(15px, 2.7vw, 18px);
    color: var(--ink-soft); line-height: 1.9;
}
.prose--light { color: rgba(241,234,220,.85); }
.prose p + p { margin-top: 1em; }

.big-date {
    font-family: var(--serif);
    text-align: center; font-weight: 500;
    font-size: clamp(30px, 8vw, 54px);
    letter-spacing: .08em;
    color: var(--ink);
    margin-top: 38px;
}

/* =========================================================================
   ПАРАЛЛАКС-БЭНД (пара / место)
   ========================================================================= */
.band { position: relative; min-height: 60svh; display: grid; place-items: center; padding: 80px 24px; }
.band--tall { min-height: 86svh; }
.band__veil { position: absolute; inset: 0; z-index: -1; background: rgba(20,26,16,.42); }
.band__veil--soft { background: linear-gradient(180deg, rgba(20,26,16,.25), rgba(20,26,16,.5)); }
.band__content { text-align: center; color: #fff; }
.band__script { font-size: clamp(40px, 12vw, 92px); text-shadow: 0 4px 30px rgba(0,0,0,.45); }

/* карточка места поверх фото */
.venue-card {
    background: rgba(241,234,220,.95);
    color: var(--ink);
    padding: clamp(34px, 7vw, 56px) clamp(26px, 6vw, 48px);
    text-align: center;
    max-width: 460px;
    box-shadow: 0 30px 70px -30px rgba(0,0,0,.6);
}
.venue-card__name { font-size: clamp(34px, 9vw, 58px); line-height: 1.05; margin-bottom: 14px; color: var(--green); }
.venue-card__addr { color: var(--ink-soft); }
.venue-card__time { color: var(--ink-soft); margin-top: 4px; margin-bottom: 24px; }

/* =========================================================================
   ОТСЧЁТ
   ========================================================================= */
.countdown { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(8px, 2.6vw, 22px); }
.cd {
    min-width: clamp(66px, 19vw, 116px);
    padding: clamp(16px, 3.4vw, 26px) 6px;
    border: 1px solid var(--line);
    text-align: center;
}
.cd span {
    display: block; font-family: var(--serif); font-weight: 500;
    font-size: clamp(34px, 9vw, 60px); line-height: 1; color: var(--green);
}
.cd small {
    display: block; margin-top: 10px; font-size: 11px;
    letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft);
}

/* =========================================================================
   ПРОГРАММА
   ========================================================================= */
.timeline { list-style: none; max-width: 520px; margin: 10px auto 0; }
.timeline__item {
    display: grid; grid-template-columns: 84px 20px 1fr; align-items: start; gap: 16px;
    padding: 20px 0;
}
.timeline__item + .timeline__item { border-top: 1px solid var(--line); }
.timeline__time { font-family: var(--serif); font-size: clamp(20px,5vw,26px); font-weight: 500; color: var(--green); }
.timeline__dot {
    width: 11px; height: 11px; border-radius: 50%; margin: 8px auto 0;
    background: var(--olive); box-shadow: 0 0 0 4px rgba(107,122,86,.18);
}
.timeline__body strong { display: block; font-weight: 600; color: var(--ink); font-size: 16px; }
.timeline__body small { color: var(--ink-soft); }

/* =========================================================================
   ДРЕСС-КОД
   ========================================================================= */
.wrap--split {
    width: min(100% - 44px, 980px);
    display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
}
.dc__text { text-align: center; }
.dc__text .h-title, .dc__text .prose { text-align: center; }
.swatches { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.swatch {
    width: clamp(40px, 11vw, 58px); height: clamp(40px, 11vw, 58px); border-radius: 50%;
    box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.25);
}
.dc__photo img {
    width: 100%; height: clamp(360px, 70vw, 520px); object-fit: cover;
    box-shadow: 0 30px 70px -30px rgba(0,0,0,.7);
}
@media (min-width: 820px) {
    .wrap--split { grid-template-columns: 1.05fr .95fr; gap: 60px; }
    .dc__text, .dc__text .h-title, .dc__text .prose { text-align: left; }
    .swatches { justify-content: flex-start; }
}

/* =========================================================================
   ФОРМА RSVP
   ========================================================================= */
.rsvp__note { text-align: center; color: var(--ink-soft); margin-top: -8px; }
.rsvp__deadline { text-align: center; color: var(--olive); font-weight: 500; margin-top: 6px; }
.form { margin-top: 36px; display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field__label { font-weight: 500; font-size: 14px; color: var(--ink); }
.field__label i { color: var(--olive); font-style: normal; }
.field input, .field textarea {
    width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
    background: #fff; border: 1px solid var(--line); border-radius: 2px;
    padding: 14px 16px; transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(107,122,86,.15);
}
.field textarea { resize: vertical; }
.field--radio { border: 0; }
.radio {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-top: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 2px; cursor: pointer;
    transition: border-color .2s, background .2s;
}
.radio input { position: absolute; opacity: 0; }
.radio__mark {
    width: 19px; height: 19px; flex: none; border: 2px solid var(--olive); border-radius: 50%;
    display: grid; place-items: center;
}
.radio__mark::after { content:''; width:9px; height:9px; border-radius:50%; background: var(--green); transform: scale(0); transition: transform .2s; }
.radio input:checked + .radio__mark::after { transform: scale(1); }
.radio:has(input:checked) { border-color: var(--green); background: rgba(107,122,86,.07); }
.field__error { color: #b23a2e; font-size: 13px; }

.btn {
    position: relative; justify-self: center; margin-top: 8px;
    font-family: var(--sans); letter-spacing: .22em; text-transform: uppercase; font-size: 13px;
    color: #fff; background: var(--green); border: 0; border-radius: 2px;
    padding: 17px 56px; cursor: pointer; transition: background .3s, transform .2s, box-shadow .3s;
    box-shadow: 0 16px 30px -18px rgba(0,0,0,.7);
}
.btn:hover { background: var(--green-2); transform: translateY(-2px); }
.btn--ghost {
    background: transparent; border: 1px solid var(--green); color: var(--green); box-shadow: none;
}
.btn--ghost:hover { background: var(--green); color: #fff; }
.btn[disabled] { opacity: .7; cursor: default; }
.btn__loader {
    display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
    border-radius: 50%; animation: spin .8s linear infinite; position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -9px;
}
.btn.is-loading .btn__text { opacity: 0; }
.btn.is-loading .btn__loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success {
    margin-top: 30px; text-align: center; background: #fff; border: 1px solid var(--line);
    padding: 44px 28px; animation: pop .5s ease;
}
.success__mark {
    width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
    background: var(--green); color: #fff; font-size: 28px; display: grid; place-items: center;
}
.success p { font-family: var(--serif); font-size: 22px; color: var(--ink); }
@keyframes pop { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* =========================================================================
   ФИНАЛ
   ========================================================================= */
.closing { min-height: 92svh; display: grid; place-items: center; text-align: center; color: #fff; padding: 80px 24px; }
.closing__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,26,16,.45), rgba(20,26,16,.7)); }
.closing__inner { max-width: 100%; padding-inline: 6px; }
.closing__date { font-family: var(--serif); letter-spacing: .3em; font-size: clamp(16px,4vw,22px); opacity: .9; }
.closing__names { font-size: clamp(38px, 11vw, 92px); line-height: 1.08; margin: 10px 0 18px; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.closing__text { font-size: clamp(19px, 5vw, 36px); opacity: .95; }

/* =========================================================================
   REVEAL
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s ease, transform 1s ease; transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .parallax__img { top: 0; height: 100%; }
    .scrolldown span { animation: none; }
    html { scroll-behavior: auto; }
}

@media (max-width: 480px) {
    .timeline__item { grid-template-columns: 66px 16px 1fr; gap: 12px; }
    .cd { min-width: 70px; }
}


