@font-face {
    font-family: Miami; /* Гарнитура шрифта */
    src: url(fonts/MiamaNueva.ttf); /* Путь к файлу со шрифтом */
}

@font-face {
    font-family: Nexa; /* Гарнитура шрифта */
    src: url(fonts/Nexa.ttf); /* Путь к файлу со шрифтом */
}

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

:root {
    --navy: #1c2535;
    --navy-deep: #141c29;
    --navy-light: #243040;
    --cream: #d4d4a8;
    --cream-light: #e8e8c8;
    --cream-dim: #a8a880;
    --gold: #c8b870;
    --gold-light: #dfd08a;
    --names-font: "Nexa", serif;
    --common-font: "EB Garamond", serif;
    --cream-border: rgba(212,212,168,0.18);
    --cream-border-focus: rgba(212,212,168,0.55);
    --cream-faint: rgba(212,212,168,0.12);
    --ampersand-font: 'Cormorant Garamond', serif;
}

html {
    /* Убираем скролл у html */
    width: 100%;
    overscroll-behavior: none;
    background-color: black;
    scroll-behavior: smooth;
}

body {
    background-color: black;
    overflow-x: hidden;
    overscroll-behavior: none;
    overflow-y: scroll;
    /* Весь скролл на body */
    height: 120lvh;
    width: 100vw;
    /* Убираем возможные отступы */
    margin: 0;
    padding: 0;
    color: var(--cream);
    font-family: var(--common-font);
}

.hero-holder {
    width: 100vw;
    /* Страховка, если JS не загрузится */
    height: 120lvh;  /* lvh = large viewport height */
    overflow: visible;
    /* Убираем возможные отступы */
    margin-top: 0;
    margin-bottom: 0;
    /* Основная высота — задаётся через JS */
}

/* HERO */
.hero-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120lvh;
    background-image: url("img/hero-image.jpg");
    background-size: cover;
    background-position: bottom;
}

@media screen and (max-width: 767px) {
    .hero-back {
        background-image: url("img/hero-image-mobile.png");
    }
}

.hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120lvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120lvh;
    background-color: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid #373d40;
}

.top-ornament {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 1s ease 0.2s forwards;
}

.line-ornament {
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--cream-dim));
}

.line-ornament.right {
    background: linear-gradient(to left, transparent, var(--cream-dim));
}

.diamond {
    width: 6px;
    height: 6px;
    background: var(--cream-dim);
    transform: rotate(45deg);
}

.invitation-label {
    font-family: var(--common-font);
    font-size: 20px;
    margin-left: -4px;
    margin-right: -8px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--cream-dim);
    font-weight: 300;
}

.names {
    opacity: 0;
    animation: fadeUp 1.1s ease 0.5s forwards;
}

.name-and {
    font-family: var(--names-font); 
    font-weight:300;
    font-size: clamp(64px, 13vw, 130px);
    color: var(--cream-light);
    line-height: 0.9;
    letter-spacing: -1px;
}

.hero-left-branch {
    height: 100%;
    background-position: left center;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url("img/branch.png");
    transform:scaleX(-1);
}

.hero-right-branch {
    background-image: url("img/branch.png");
    height: 100%;
    background-position: left center;
    background-size: contain;
    background-repeat: no-repeat;
}

.name-and .ampersand {
    font-style: italic;
    font-family: var(--ampersand-font);
    color: var(--cream-dim);
    font-size: 0.75em;
    display: block;
    margin: 8px 0;
}

.name-and .name-second {
    display: block;
}

.tagline {
    font-family: var(--common-font);
    font-size: 22px;
    letter-spacing: 3px;
    color: var(--cream-dim);
    font-weight: 300;
    margin-top: 32px;
    opacity: 0;
    animation: fadeUp 1s ease 0.9s forwards;
}

/* Laurel wreath SVG */
.hero-laurel {
    margin-top: 10px;
    opacity: 0;
    height: 130px;
    width: 80%;
    animation: fadeUp 1s ease 1.1s forwards;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.scroll-down span {
    display: block;
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--cream-dim), transparent);
    margin: 0 auto;
}

/* SECTION SHARED */
section {
    padding: 100px 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-label {
    font-family: var(--common-font);
    font-size: 11px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--cream-dim);
    font-weight: 400;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.section-label::before,
.section-label::after {
    content: '';
    display: block;
    width: 50px;
    height: 1px;
    background: var(--cream-dim);
    opacity: 0.5;
}

.section-title {
    font-family: var(--common-font);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 300;
    color: var(--cream-light);
    margin-bottom: 24px;
    font-style: italic;
}

.section-body {
    font-size: 25px;
    line-height: 1.9;
    color: var(--cream-dim);
    font-weight: 400;
}

/* DIVIDER */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 20px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(212,212,168,0.25));
    max-width: 300px;
}
.divider-line.right {
    background: linear-gradient(to left, transparent, rgba(212,212,168,0.25));
}

/* DATE BLOCK */
.date-block {
    background: var(--navy-light);
    border: 1px solid rgba(212,212,168,0.18);
    padding: 60px 40px;
    margin: 0 auto;
    max-width: 700px;
    position: relative;
}

.date-block::before,
.date-block::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--cream-dim);
    border-style: solid;
    opacity: 0.5;
}
.date-block::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.date-block::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.date-number {
    font-family: var(--common-font);
    font-size: clamp(72px, 16vw, 140px);
    font-weight: 300;
    color: var(--cream-light);
    line-height: 1;
    letter-spacing: -4px;
    opacity: 0.75;
}

.date-month-year {
    font-family: var(--common-font);
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--cream-dim);
    margin-top: 8px;
    opacity: 0.75;
}

.date-time {
    font-family: var(--common-font);
    font-size: 15px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--cream-dim);
    margin-top: 28px;
    opacity: 0.7;
}

/* VENUE */
.venue-name {
    font-family: var(--common-font);
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 300;
    font-style: italic;
    color: var(--cream-light);
    line-height: 1.1;
    margin: 20px 0 12px;
}

.venue-city {
    font-family: var(--common-font);
    font-size: 15px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--cream-dim);
    font-weight: 300;
    margin-bottom: 60px;
}

/* INFO GRID */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: rgba(212,212,168,0.12);
    border: 1px solid rgba(212,212,168,0.12);
    margin: 80px auto 0;
    max-width: 700px;
}

.info-cell {
    background: var(--navy-deep);
    padding: 36px 24px;
    text-align: center;
}

.info-cell-label {
    font-family: var(--common-font);
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--cream-dim);
    opacity: 0.6;
    margin-bottom: 12px;
}

.info-cell-value {
    font-family: var(--common-font);
    font-size: 22px;
    font-weight: 400;
    color: var(--cream-light);
    line-height: 1.3;
}

/* RSVP */
.rsvp-section {
    background: var(--navy-light);
    border-top: 1px solid rgba(212,212,168,0.12);
    border-bottom: 1px solid rgba(212,212,168,0.12);
    padding: 100px 20px;
    text-align: center;
}

.rsvp-section .section-body {
    max-width: 500px;
    margin: 0 auto 48px;
}

.map-btn {
    margin-top: 50px;
    display: inline-block;
    border: 1px solid var(--cream-dim);
    color: var(--cream);
    font-family: var(--common-font);
    font-size: 14px;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 30px;
    transition: all 0.4s ease;
    font-weight: 400;
    cursor: pointer;
    background: transparent;
}

.map-btn:hover {
    background: var(--cream);
    color: var(--navy-deep);
}

.rsvp-btn {
    display: inline-block;
    border: 1px solid var(--cream-dim);
    color: var(--cream);
    font-family: var(--common-font);
    font-size: 14px;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 18px 48px;
    transition: all 0.4s ease;
    font-weight: 400;
    cursor: pointer;
    background: transparent;
}

.rsvp-btn:hover {
    background: var(--cream);
    color: var(--navy-deep);
}

/* FOOTER */
footer {
    padding: 60px 20px;
    text-align: center;
    color: var(--cream-dim);
    opacity: 0.4;
    font-family: var(--common-font);
    font-size: 13px;
    letter-spacing: 2px;
}

/* ANIMATIONS */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.3; }
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.thank-you {
    display: none;
    font-family: var(--common-font);
    font-size: 28px;
    font-weight: 300;
    font-style: italic;
    color: var(--cream-light);
}

/* Laurel SVG inline */
.laurel-svg { fill: var(--cream); opacity: 0.7; }

.main-color {
    background: var(--navy-deep);
    width: 100vw;
}

/* Guest form */
.form-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

/* ===== INTRO ===== */
.intro {
    text-align: center;
    padding: 64px 0 56px;
    border-bottom: 1px solid var(--cream-border);
}

.intro-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(30px, 6vw, 44px);
    font-weight: 300;
    font-style: italic;
    color: var(--cream-light);
    margin-bottom: 20px;
}

.intro-text {
    font-size: 18px;
    line-height: 1.85;
    color: var(--cream-dim);
    max-width: 480px;
    margin: 0 auto;
}

/* ===== FORM SECTIONS ===== */
.form-section {
    padding: 52px 0;
    border-bottom: 1px solid var(--cream-border);
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.form-section.visible { opacity: 1; transform: none; }

.fs-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 64px;
    font-weight: 300;
    color: rgba(212,212,168,0.15);
    line-height: 1;
    margin-bottom: 10px;
    user-select: none;
}

.fs-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 34px;
    font-weight: 300;
    font-style: italic;
    color: var(--cream-light);
    margin-bottom: 10px;
}

.fs-label-additional {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 300;
    font-style: italic;
    color: var(--cream-light);
    margin-bottom: 0px;
}

.fs-hint {
    font-size: 16px;
    color: var(--cream-dim);
    line-height: 1.6;
    margin-bottom: 32px;
    opacity: 0.75;
}

/* ===== TEXT INPUT ===== */
.field-wrap {
    position: relative;
    margin-bottom: 8px;
}

.text-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--cream-border);
    padding: 14px 0;
    font-family: 'EB Garamond', serif;
    font-size: 20px;
    color: var(--cream-light);
    outline: none;
    transition: border-color 0.3s;
    caret-color: var(--cream);
}

.text-input::placeholder { color: rgba(212,212,168,0.25); font-style: italic; }
.text-input:focus { border-color: var(--cream-border-focus); }

.field-underline {
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--cream-dim);
    transition: width 0.4s ease;
}
.text-input:focus ~ .field-underline { width: 100%; }

/* ===== CHOICE CARDS ===== */
.choice-grid {
    display: grid;
    gap: 10px;
}

.choice-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 420px) {
    .choice-grid.cols-2,
    .choice-grid.cols-3 { grid-template-columns: 1fr; }
}

.choice-card {
    position: relative;
    cursor: pointer;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1px solid var(--cream-border);
    background: var(--cream-faint);
    transition: all 0.25s ease;
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    color: var(--cream-dim);
}

.choice-card input:checked + .choice-inner {
    border-color: var(--cream-dim);
    background: rgba(212,212,168,0.1);
    color: var(--cream-light);
}

.choice-card:hover .choice-inner {
    border-color: rgba(212,212,168,0.35);
    color: var(--cream);
}

.choice-radio {
    width: 16px; height: 16px;
    border: 1px solid var(--cream-border);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.25s;
    display: flex; align-items: center; justify-content: center;
}

.choice-card input:checked + .choice-inner .choice-radio {
    border-color: var(--cream-dim);
}

.choice-card input:checked + .choice-inner .choice-radio::after {
    content: '';
    width: 6px; height: 6px;
    background: var(--cream-dim);
    border-radius: 50%;
}

.choice-check {
    width: 16px; height: 16px;
    border: 1px solid var(--cream-border);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.25s;
}

.choice-card input:checked + .choice-inner .choice-check {
    border-color: var(--cream-dim);
    background: rgba(212,212,168,0.15);
}

.choice-card input:checked + .choice-inner .choice-check::after {
    content: '';
    position: absolute;
    top: 2px; left: 5px;
    width: 5px; height: 8px;
    border-right: 1px solid var(--cream-dim);
    border-bottom: 1px solid var(--cream-dim);
    transform: rotate(45deg);
}

/* ===== CONDITIONAL BLOCK ===== */
.conditional {
    margin-top: 16px;
    max-height: 200px;
    overflow: hidden;
}

/* ===== TEXTAREA ===== */
.text-area {
    width: 100%;
    background: var(--cream-faint);
    border: 1px solid var(--cream-border);
    padding: 16px 20px;
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    color: var(--cream-light);
    outline: none;
    resize: none;
    min-height: 100px;
    transition: border-color 0.3s;
    caret-color: var(--cream);
    margin-top: 16px;
}
.text-area::placeholder { color: rgba(212,212,168,0.25); font-style: italic; }
.text-area:focus { border-color: var(--cream-border-focus); }

/* ===== SUBMIT ===== */
.submit-section {
    padding: 64px 0 0;
    text-align: center;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.submit-section.visible { opacity: 1; transform: none; }

.submit-note {
    font-size: 17px;
    color: var(--cream-dim);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.submit-btn {
    display: inline-block;
    border: 1px solid var(--cream-dim);
    color: var(--navy-deep);
    background: var(--cream-dim);
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px; letter-spacing: 5px;
    text-transform: uppercase;
    padding: 20px 60px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.35s ease;
}

.submit-btn:hover {
    background: var(--cream-light);
    border-color: var(--cream-light);
}

/* ===== THANK YOU ===== */
.thankyou {
    display: none;
    text-align: center;
    padding: 80px 24px 120px;
}

.ty-laurel { margin-bottom: 40px; }

.ty-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(40px, 9vw, 72px);
    font-weight: 300;
    font-style: italic;
    color: var(--cream-light);
    line-height: 1.1;
    margin-bottom: 20px;
}

.ty-text {
    font-size: 19px;
    color: var(--cream-dim);
    line-height: 1.8;
    max-width: 400px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--cream-border);
    padding: 40px 24px;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--cream-dim);
    opacity: 0.4;
}

.overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 340px;
    background: rgba(14,20,30,0.88);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10;
    animation: fadeInBg 0.35s ease forwards;
}

@keyframes fadeInBg {
    from { opacity: 0; } to { opacity: 1; }
}

.overlay-card {
    background: #1c2535;
    border: 1px solid rgba(212,212,168,0.2);
    max-width: 380px; width: 100%;
    padding: 44px 40px 40px;
    text-align: center;
    position: relative;
    animation: slideUp 0.35s ease forwards;
}

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

.overlay-card::before, .overlay-card::after {
    content: ''; position: absolute;
    width: 14px; height: 14px;
    border-color: rgba(168,168,128,0.35); border-style: solid;
}
.overlay-card::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.overlay-card::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.overlay-close {
    position: absolute; top: 14px; right: 18px;
    background: none; border: none;
    color: rgba(168,168,128,0.4);
    font-size: 22px; cursor: pointer;
    line-height: 1; font-family: serif;
    transition: color 0.2s; padding: 0;
}
.overlay-close:hover { color: #a8a880; }

.overlay-icon {
    width: 80px; height: 80px;
    border: 1px solid rgba(180,100,80,0.4);
    border-radius: 50%; margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(200,120,100,0.9); font-size: 20px;
}

.overlay-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 30px; font-weight: 300;
    font-style: italic; color: #e8e8c8;
    margin-bottom: 12px; line-height: 1.2;
}

.overlay-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px; letter-spacing: 1px;
    color: #6e7a60; margin-bottom: 28px;
    line-height: 1.7;
}

.overlay-errors {
    list-style: none; text-align: left;
    border-top: 1px solid rgba(212,212,168,0.1);
    padding-top: 20px; margin-bottom: 28px;
}

.overlay-errors li {
    display: flex; align-items: flex-start;
    gap: 12px; padding: 10px 0;
    border-bottom: 1px solid rgba(212,212,168,0.07);
    font-family: 'EB Garamond', serif;
    font-size: 17px; color: #a8a880; line-height: 1.4;
}

.overlay-errors li:last-child { border-bottom: none; }

.err-dot {
    width: 5px; height: 5px;
    background: rgba(200,120,100,0.7);
    border-radius: 50%; flex-shrink: 0;
    margin-top: 7px;
}

.overlay-ok {
    width: 100%; background: transparent;
    border: 1px solid rgba(168,168,128,0.35);
    color: #d4d4a8; padding: 14px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px; letter-spacing: 5px;
    text-transform: uppercase; cursor: pointer;
    transition: all 0.25s; font-weight: 300;
}
.overlay-ok:hover {
    background: rgba(168,168,128,0.1);
    border-color: rgba(168,168,128,0.6);
}