/* ─────────────────────────────────────────────────────────────────
   WorkDone 2 — широкий світлий лендинг воронки.
   Відрізняється від landing.css компонуванням: лавандове тло сторінки,
   одна широка картка, герой-ілюстрація праворуч, смуга відгуків.
   Палітра — та сама фіолетово-індіго, що і в решти шаблонів.
   ───────────────────────────────────────────────────────────────── */
:root {
    /* Фірмова палітра сторінки: #7147CD — акцент, #29242B — текст
       і темні поверхні (кнопка сабміту), #F2EDFD — світлий бузковий
       поверх (поля форми, чипи, іконки). */
    --lp-dark: #29242B;
    --lp-primary: #7147CD;
    --lp-primary-light: rgb(146, 91, 255);
    --lp-primary-deep: rgb(88, 52, 168);

    --lp-page: #E9E6FB;
    --lp-surface: #FCFBFE;
    --lp-surface-soft: #F2EDFD;
    --lp-surface-tint: #F2EDFD;

    --lp-text: var(--lp-dark);
    --lp-text-soft: #5C5873;
    --lp-text-muted: #918DA8;

    --lp-border: rgba(113, 71, 205, .14);
    --lp-divider: rgba(113, 71, 205, .16);

    --lp-radius-card: 36px;
    --lp-radius-lg: 24px;
    --lp-radius-md: 18px;
    --lp-radius-pill: 999px;

    --lp-shadow-card: 0 30px 70px rgba(59, 38, 122, .12);
    --lp-shadow-cta: 0 14px 30px rgba(113, 71, 205, .32);
    --lp-shadow-soft: 0 6px 18px rgba(113, 71, 205, .12);

    --lp-grad-cta: linear-gradient(135deg, var(--lp-primary-light) 0%, var(--lp-primary) 100%);

    --lp-hand: 'Caveat', 'Segoe Script', cursive;
}

/* ─── Сторінка ─── */
.lp {
    min-height: 100vh;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lp-page);
    color: var(--lp-text);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lp-card {
    width: 100%;
    max-width: 1060px;
    background: var(--lp-surface);
    border-radius: var(--lp-radius-card);
    box-shadow: var(--lp-shadow-card);
    padding: 44px 48px 36px;
}

/* Останній блок картки не додає свій margin до нижнього падінга —
   склад блоків різний (контакти можуть бути вимкнені в адмінці). */
.lp-card > *:last-child { margin-bottom: 0; }

/* ─── Шапка ─── */
.lp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

/* flex: none — інакше логотип стискається сусіднім блоком і пропорції їдуть.
   Загальний logo.dark — вертикальний замок 140x118, тому нижчий;
   якщо покладено горизонтальний landing/logo-wide — він ширший і нижчий. */
.lp-logo { flex: none; }
.lp-logo img { display: block; height: 52px; width: auto; max-width: none; }
.lp-logo--wide img { height: 40px; }

/* ─── Герой ─── */
.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    align-items: center;
    gap: 24px;
    margin-bottom: 38px;
}

.lp-heading {
    margin: 0 0 18px;
    font-size: clamp(38px, 5.4vw, 66px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.02em;
}

.lp-heading-accent { display: block; color: var(--lp-primary); }

.lp-desc {
    margin: 0;
    max-width: 34ch;
    font-size: clamp(15px, 1.5vw, 19px);
    font-weight: 500;
    line-height: 1.5;
    color: var(--lp-text-soft);
}

.lp-hero-art { position: relative; }

.lp-hero-art img {
    display: block;
    width: 100%;
    height: auto;
}

/* Заглушка, поки герой-ілюстрація не покладена в public/assets/img/landing. */
.lp-hero-stub {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    border-radius: var(--lp-radius-lg);
    background: var(--lp-surface-soft);
    border: 2px dashed var(--lp-border);
    color: var(--lp-text-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 16px;
}

.lp-hero-note {
    position: absolute;
    top: -6px;
    left: -8px;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    pointer-events: none;
}

.lp-hero-note span {
    font-family: var(--lp-hand);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--lp-text);
    white-space: nowrap;
}

.lp-hero-note svg { color: var(--lp-primary); flex: none; margin-top: 6px; }

/* ─── CTA ─── */
.lp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.lp-btn {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border-radius: var(--lp-radius-lg);
    background: var(--lp-grad-cta);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--lp-shadow-cta);
    transition: transform .18s ease, box-shadow .18s ease;
}

.lp-btn:hover { transform: translateY(-3px); box-shadow: 0 20px 38px rgba(113, 71, 205, .38); }
.lp-btn:focus-visible { outline: 3px solid var(--lp-primary-deep); outline-offset: 3px; }

.lp-btn--alt {
    background: var(--lp-surface-soft);
    color: var(--lp-text);
    box-shadow: none;
}

.lp-btn--alt:hover { box-shadow: var(--lp-shadow-soft); }

.lp-btn-icon {
    flex: none;
    width: 62px;
    height: 62px;
    border-radius: var(--lp-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .22);
}

.lp-btn--alt .lp-btn-icon { background: var(--lp-surface-tint); color: var(--lp-primary); }

.lp-btn-content { flex: 1 1 auto; min-width: 0; }

.lp-btn-title {
    display: block;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.15;
}

.lp-btn-sub {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    opacity: .88;
}

.lp-btn--alt .lp-btn-sub { color: var(--lp-text-soft); opacity: 1; }

.lp-btn-arrow {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--lp-primary);
}

.lp-btn--alt .lp-btn-arrow { background: var(--lp-primary); color: #fff; }

/* ─── Форма (режим модерації) ─── */
.lp-form-wrap { margin-bottom: 30px; }

.lp-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lp-field { position: relative; display: flex; align-items: center; }
.lp-field--area { grid-column: 1 / -1; align-items: flex-start; }

/* Email може бути єдиним контактом у заявці, тому тягнеться на всю
   ширину: у половині ряду поруч із ним лишалася б порожня клітинка. */
.lp-field--wide { grid-column: 1 / -1; }

.lp-field-icon {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--lp-primary);
    pointer-events: none;
    display: flex;
}

.lp-input,
.lp-textarea {
    width: 100%;
    padding: 15px 16px 15px 46px;
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius-md);
    background: var(--lp-surface-soft);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--lp-text);
    transition: border-color .15s ease, background .15s ease;
}

.lp-textarea { resize: vertical; min-height: 96px; }

.lp-input::placeholder,
.lp-textarea::placeholder { color: var(--lp-text-muted); }

.lp-input:hover,
.lp-textarea:hover { border-color: rgba(113, 71, 205, .3); }

.lp-input:focus,
.lp-textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--lp-primary-light);
    box-shadow: 0 0 0 4px rgba(113, 71, 205, .13);
}

/* Поле, на яке скаржиться валідація: помітна рамка, щоб було видно,
   куди повертатись, навіть коли текст помилки стоїть окремим блоком. */
.lp-input[aria-invalid="true"],
.lp-textarea[aria-invalid="true"] {
    border-color: #d92d5e;
    background: #fff;
}

.lp-form-error {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #d92d5e;
}

.lp-submit {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 17px 24px;
    border: 0;
    border-radius: var(--lp-radius-md);
    background: var(--lp-dark);
    box-shadow: 0 14px 30px rgba(41, 36, 43, .28);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.lp-submit:hover:not(:disabled) { transform: translateY(-2px); }
.lp-submit:disabled { opacity: .6; cursor: default; }

.lp-success { display: none; text-align: center; padding: 34px 20px; }

.lp-form-wrap.is-sent .lp-form { display: none; }
.lp-form-wrap.is-sent .lp-success { display: block; }

.lp-success-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lp-surface-tint);
    color: var(--lp-primary);
}

.lp-success-heading { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.lp-success-text { margin: 0; font-size: 15px; font-weight: 500; color: var(--lp-text-soft); }

/* ─── Контакти (спільний partial _contacts.blade.php) ─── */
.lp-contacts { margin-bottom: 30px; }

.lp-contacts-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

.lp-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.lp-contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 14px;
    border-radius: var(--lp-radius-md);
    background: var(--lp-surface-soft);
    color: var(--lp-text);
    text-decoration: none;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease;
}

.lp-contact-card:hover { transform: translateY(-2px); box-shadow: var(--lp-shadow-soft); }
.lp-contact-icon { color: var(--lp-primary); display: flex; margin-bottom: 4px; }
.lp-contact-label { font-size: 12px; font-weight: 600; color: var(--lp-text-muted); }
.lp-contact-value { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* ─── Адаптив ─── */
@media (max-width: 900px) {
    /* На вузькому екрані порядок блоків інший, ніж у розмітці: одразу за
       заголовком ідуть кнопки переходу, і лише потім ілюстрація та докази.
       Інакше картинка з'їдає весь перший екран, а клікати нема по чому.
       display: contents розкриває .lp-hero, щоб його половини можна було
       розставити окремо; вертикальні відступи віддаємо row-gap, бо
       візуально останній блок тепер не збігається з останнім у DOM. */
    .lp-card {
        display: flex;
        flex-direction: column;
        row-gap: 24px;
        padding: 34px 28px 28px;
        border-radius: 30px;
    }

    .lp-card > *,
    .lp-hero-copy,
    .lp-hero-art { margin-bottom: 0; }

    .lp-hero { display: contents; }

    .lp-top { order: 1; }
    .lp-hero-copy { order: 2; }
    .lp-form-wrap { order: 3; }
    .lp-actions { order: 3; }
    .lp-hero-art { order: 4; }
    .lp-contacts { order: 5; }

    .lp-hero-art { max-width: 380px; width: 100%; margin-inline: auto; }
    .lp-hero-note { top: -2px; left: 0; }
    .lp-desc { max-width: none; }

    .lp-actions { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 620px) {
    /* На телефоні все стискаємо: десктопні розміри тут читаються як
       розсипані по екрану острівці, а сторінці треба бути щільною. */
    .lp { padding: 14px; }
    .lp-card { padding: 22px 18px; border-radius: 24px; row-gap: 18px; }

    .lp-top { gap: 12px; }
    .lp-logo img { height: 38px; }
    .lp-logo--wide img { height: 28px; }

    .lp-heading { font-size: 34px; margin-bottom: 12px; }
    .lp-desc { font-size: 15px; }

    /* Кнопки переходу — компактні рядки, а не повітряні картки. */
    .lp-actions { gap: 10px; }
    .lp-btn { padding: 14px 16px; gap: 13px; border-radius: 18px; }
    .lp-btn-icon { width: 44px; height: 44px; border-radius: 13px; }
    .lp-btn-icon svg { width: 22px; height: 22px; }
    .lp-btn-title { font-size: 19px; }
    .lp-btn-sub { font-size: 13px; margin-top: 2px; }
    .lp-btn-arrow { width: 36px; height: 36px; }
    .lp-btn-arrow svg { width: 18px; height: 18px; }

    /* На телефоні колонка вузька — ілюстрація тягнеться на всю ширину
       контенту, щоб у стовпчику не було різних лівих країв. */
    .lp-hero-art { max-width: none; }
    .lp-hero-note span { font-size: 18px; }
    .lp-hero-note svg { width: 36px; height: 32px; }

    .lp-form { grid-template-columns: minmax(0, 1fr); }
    .lp-contacts-grid { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-btn, .lp-submit, .lp-contact-card { transition: none; }
    .lp-btn:hover, .lp-submit:hover, .lp-contact-card:hover { transform: none; }
}
