/* ── Base ────────────────────────────────────────────────── */
.app-page {
    background: #fff7f2;
}

.app-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 120px 96px;
}

/* ── Header ──────────────────────────────────────────────── */
.app-head {
    margin-bottom: 48px;
    text-align: center;
}

.app-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 5.6vw, 80px);
    font-weight: 400;
    color: #805d5b;
    line-height: 1.02;
    margin: 0 0 20px;
}

.app-subtitle {
    font-family: 'Golos Text', sans-serif;
    font-size: clamp(18px, 1.8vw, 26px);
    font-weight: 400;
    color: #b08d8a;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0;
}

/* ── Section heads ───────────────────────────────────────── */
.app-section {
    margin: 44px 0 22px;
}

.app-section-num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 400;
    color: #805d5b;
    line-height: 1.1;
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e6d6d3;
}

.app-section-cap,
.app-subcap {
    font-family: 'Golos Text', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #b02828;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0;
}

.app-subcap {
    margin: 28px 0 14px;
}

/* ── Grid ────────────────────────────────────────────────── */
.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    align-items: start;
}

.app-field-wrap--full {
    grid-column: 1 / -1;
}

/* ── Field (single line, label as placeholder) ───────────── */
.app-field {
    position: relative;
    display: block;
    background: #ffffff;
    border: 1px solid #ece0dd;
    border-radius: 4px;
    transition: border-color .2s, box-shadow .2s;
}

.app-field:focus-within {
    border-color: #805d5b;
    box-shadow: 0 0 0 2px rgba(128, 93, 91, 0.10);
}

/* плейсхолдер-лейбл задаёт высоту поля */
.app-ph {
    position: relative;
    display: block;
    padding: 18px 52px 18px 20px;
    font-family: 'Golos Text', sans-serif;
    font-size: 14px;
    color: #606078;
    letter-spacing: -0.01em;
    line-height: 1.3;
    pointer-events: none;
    transition: opacity .15s;
}

.app-req {
    font-style: normal;
    color: #d9534f;
}

.app-hint-inline {
    color: #b4a2a1;
    font-size: 13px;
}

/* инпут лежит поверх лейбла */
.app-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Golos Text', sans-serif;
    font-size: 16px;
    color: #3a3a3a;
    letter-spacing: -0.01em;
    padding: 18px 52px 18px 20px;
}

/* прячем лейбл при фокусе/вводе */
.app-input:focus ~ .app-ph,
.app-input:not(:placeholder-shown) ~ .app-ph {
    opacity: 0;
}

/* ── Файловое поле ───────────────────────────────────────── */
.app-file {
    cursor: pointer;
}

.app-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.app-clip {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    pointer-events: none;
}

.app-file-name {
    position: absolute;
    left: 20px;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    font-family: 'Golos Text', sans-serif;
    font-size: 16px;
    color: #3a3a3a;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-file.has-file .app-ph { opacity: 0; }
.app-file.has-file .app-file-name { display: block; }

/* ── Подробнее ───────────────────────────────────────────── */
.app-more {
    display: inline-block;
    margin-top: 8px;
    font-family: 'Golos Text', sans-serif;
    font-size: 14px;
    color: #9a8a88;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .2s;
}
.app-more:hover { color: #805d5b; }

/* Подсказка-tooltip на «Подробнее» */
.app-more--tip {
    position: relative;
    cursor: help;
    outline: none;
}
.app-tip {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 20;
    width: max-content;
    max-width: min(340px, 80vw);
    padding: 12px 14px;
    background: #fff;
    color: #4a3b39;
    border: 1px solid #e0d0ce;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(128, 93, 91, .18);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    text-decoration: none;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .2s, transform .2s, visibility .2s;
    pointer-events: none;
}
.app-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 16px;
    border: 7px solid transparent;
    border-top-color: #fff;
    filter: drop-shadow(0 1px 0 #e0d0ce);
}
.app-more--tip:hover .app-tip,
.app-more--tip:focus .app-tip,
.app-more--tip:focus-visible .app-tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ── Кнопка «Далее» ──────────────────────────────────────── */
.app-submit {
    width: 100%;
    border: none;
    background: #8b6f6c;
    color: #fff7f2;
    font-family: 'Golos Text', sans-serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 18px;
    margin-top: 40px;
    cursor: pointer;
    transition: background .2s;
}
.app-submit:hover { background: #7a5e5b; }

/* ── Согласия (тумблеры) ─────────────────────────────────── */
.app-consents {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

.app-switch {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
}

.app-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.app-switch-track {
    flex-shrink: 0;
    position: relative;
    width: 44px;
    height: 24px;
    background: #d9c9c6;
    border-radius: 999px;
    margin-top: 1px;
    transition: background .2s;
}

.app-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: left .2s;
}

.app-switch input:checked + .app-switch-track {
    background: #805d5b;
}
.app-switch input:checked + .app-switch-track .app-switch-knob {
    left: 23px;
}
.app-switch input:focus-visible + .app-switch-track {
    box-shadow: 0 0 0 3px rgba(128, 93, 91, 0.25);
}

.app-switch-label {
    font-family: 'Golos Text', sans-serif;
    font-size: 15px;
    color: #6d5d5b;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* ── Honeypot ────────────────────────────────────────────── */
.app-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* ── Messages ────────────────────────────────────────────── */
.app-success {
    position: relative;
    overflow: hidden;
    max-width: 640px;
    margin: 24px auto 40px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #efe2de;
    border-radius: 20px;
    padding: 64px 56px 60px;
    box-shadow: 0 30px 70px -40px rgba(128, 93, 91, 0.45);
    animation: app-success-in .6s cubic-bezier(.2, .7, .3, 1) both;
}

/* тёплый блик сверху */
.app-success::before {
    content: "";
    position: absolute;
    top: -160px;
    left: 50%;
    width: 420px;
    height: 320px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(128, 93, 91, 0.10), transparent 70%);
    pointer-events: none;
}

.app-success-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: 28px;
    border-radius: 50%;
    background: #805d5b;
    box-shadow: 0 0 0 10px rgba(128, 93, 91, 0.10), 0 0 0 20px rgba(128, 93, 91, 0.05);
    animation: app-pop .5s .15s cubic-bezier(.2, .9, .3, 1.4) both;
}

.app-success-icon svg path {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: app-check .5s .5s ease forwards;
}

.app-success-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    color: #805d5b;
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
}

.app-success-text {
    font-family: 'Golos Text', sans-serif;
    font-size: clamp(16px, 1.6vw, 19px);
    color: #9a8784;
    line-height: 1.5;
    letter-spacing: -0.01em;
    margin: 0 auto;
    max-width: 420px;
}

@keyframes app-success-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes app-pop {
    from { opacity: 0; transform: scale(.5); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes app-check {
    to { stroke-dashoffset: 0; }
}

@media (max-width: 768px) {
    .app-success { padding: 48px 24px 44px; border-radius: 16px; }
    .app-success-icon { width: 74px; height: 74px; }
}

.app-errors {
    background: #fff;
    border: 1px solid #e9c9c7;
    border-left: 4px solid #d9534f;
    padding: 20px 26px;
    border-radius: 4px;
    margin-bottom: 32px;
    font-family: 'Golos Text', sans-serif;
    color: #8a4a47;
}
.app-errors p { margin: 0 0 8px; font-weight: 500; }
.app-errors ul { margin: 0 0 8px; padding-left: 20px; }
.app-errors li { margin: 2px 0; }
.app-errors-note { font-size: 13px; color: #b07a77; font-weight: 400; }

/* ── Блокировка приёма заявок ────────────────────────────── */
.app-lockwrap {
    position: relative;
}

/* Затемнение и размытие формы, когда приём ещё не открыт */
.app-lockwrap.is-locked .app-form {
    filter: blur(3px);
    opacity: .55;
    pointer-events: none;
    user-select: none;
}

.app-lockwrap.is-locked::before {
    content: "";
    position: absolute;
    inset: -24px;
    background: rgba(64, 40, 38, .35);
    border-radius: 18px;
    z-index: 2;
    pointer-events: none;
}

/* Карточка-уведомление */
.app-lock {
    position: sticky;
    top: 96px;
    z-index: 3;
    max-width: 560px;
    margin: 0 auto 48px;
    padding: 40px 44px 36px;
    text-align: center;
    background: #fff7f2;
    border: 1px solid #805d5b;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(64, 40, 38, .28);
}

.app-lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #f3e3df;
    color: #805d5b;
}

.app-lock-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 400;
    color: #805d5b;
    line-height: 1.1;
    margin: 0 0 14px;
}

.app-lock-text {
    font-family: 'Golos Text', sans-serif;
    font-size: 17px;
    line-height: 1.4;
    color: #b08d8a;
    margin: 0 0 26px;
}

.app-lock-date {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    color: #b02828;
}

.app-lock-timer {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.app-lock-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    padding: 12px 8px;
    background: #f3e3df;
    border-radius: 12px;
}

.app-lock-unit b {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    color: #805d5b;
    font-variant-numeric: tabular-nums;
}

.app-lock-unit i {
    margin-top: 6px;
    font-family: 'Golos Text', sans-serif;
    font-style: normal;
    font-size: 12px;
    letter-spacing: .02em;
    color: #b08d8a;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .app-inner { padding: 48px 48px 72px; }
}

@media (max-width: 768px) {
    .app-inner { padding: 32px 16px 56px; }
    .app-grid { grid-template-columns: 1fr; gap: 14px; }
    .app-field-wrap--full { grid-column: auto; }
    .app-section { margin-top: 32px; }

    .app-lock { padding: 32px 20px 28px; }
    .app-lock-timer { gap: 8px; }
    .app-lock-unit { min-width: 0; flex: 1; padding: 10px 4px; }
    .app-lock-unit b { font-size: 26px; }
    .app-lock-unit i { font-size: 11px; }
}
