:root {
    --brand-blue: #1f50d8;
    --brand-blue-dark: #1a43b5;
    --brand-blue-soft: #eef2fe;
    --brand-orange: #f15a22;
    --brand-orange-dark: #d8480f;
    --ink: #1b2333;
    --muted: #667085;
    --line: #e7eaf0;
    --card: #ffffff;
    --error: #d92d20;
    --wa: #25d366;
    --wa-dark: #1da851;
    --radius: 22px;
    --shadow: 0 24px 60px -18px rgba(31, 80, 216, 0.30), 0 8px 24px -12px rgba(241, 90, 34, 0.18);
}

/* ---------- Tema Europlanet Casa (negozi NEXT RETAIL, codici 2xx) ---------- */
.theme-europlanet {
    --brand-blue: #1c2a66;
    --brand-blue-dark: #14204d;
    --brand-blue-soft: #eaedf8;
    --brand-orange: #ffd100;
    --brand-orange-dark: #e6bc00;
    --shadow: 0 24px 60px -18px rgba(28, 42, 102, 0.32), 0 8px 24px -12px rgba(255, 209, 0, 0.22);
}

body.theme-europlanet {
    background: radial-gradient(1200px 600px at 15% -10%, #fff3bf 0%, rgba(255,243,191,0) 55%),
                radial-gradient(1100px 650px at 110% 10%, #dbe1f7 0%, rgba(219,225,247,0) 55%),
                linear-gradient(180deg, #f7f8fe 0%, #eef0f8 100%);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: radial-gradient(1200px 600px at 15% -10%, #ffe6da 0%, rgba(255,230,218,0) 55%),
                radial-gradient(1100px 650px at 110% 10%, #dfe7ff 0%, rgba(223,231,255,0) 55%),
                linear-gradient(180deg, #f6f8fe 0%, #eef1f9 100%);
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
}

.engage {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

/* ---------- Card ---------- */
.card {
    position: relative;
    width: 100%;
    max-width: 470px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card::before {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-orange) 0%, var(--brand-orange) 45%, var(--brand-blue) 55%, var(--brand-blue) 100%);
}

.card__head {
    display: flex;
    justify-content: center;
    padding: 26px 24px 6px;
}

.logo { max-width: 230px; width: 78%; height: auto; }

/* ---------- Hero ---------- */
.hero { padding: 6px 26px 4px; text-align: center; }

.wa-emblem {
    width: 64px;
    height: 64px;
    margin: 6px auto 14px;
    border-radius: 50%;
    box-shadow: 0 10px 24px -8px rgba(37, 211, 102, 0.7);
}

.hero h1 {
    font-size: 1.55rem;
    line-height: 1.2;
    margin: 0 0 10px;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.hero h1 .accent { color: var(--brand-blue); }

.store-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--brand-blue-soft);
    color: var(--brand-blue-dark);
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.store-pill::before { content: "📍"; }

.lead { color: var(--muted); line-height: 1.55; margin: 12px 4px 4px; font-size: 1rem; }

/* ---------- Benefits ---------- */
.benefits {
    list-style: none;
    margin: 18px 0 4px;
    padding: 0 26px;
    display: grid;
    gap: 10px;
}

.benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: #fafbff;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 0.94rem;
    text-align: left;
}

.benefits .ic {
    flex: 0 0 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--brand-blue-soft);
    font-size: 1.05rem;
}

/* ---------- Form ---------- */
form { text-align: left; padding: 18px 26px 4px; }

.field { margin-bottom: 15px; }

.field > label {
    display: block;
    font-weight: 600;
    font-size: 0.86rem;
    margin-bottom: 6px;
    color: var(--ink);
}

.field input[type="text"],
.field input[type="tel"] {
    width: 100%;
    padding: 14px 14px;
    font-size: 1rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}

.field input:focus, .phone:focus-within {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(31, 80, 216, 0.14);
}

.phone {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.phone .prefix {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 13px;
    background: #f4f6fb;
    color: var(--ink);
    font-weight: 700;
    border-right: 1.5px solid var(--line);
}

.phone .prefix::before { content: "🇮🇹"; font-size: 1.05rem; }

.phone input { border: none; border-radius: 0; flex: 1; }
.phone input:focus { box-shadow: none; }

.field--consent .consent {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
    cursor: pointer;
}

.consent input[type="checkbox"] {
    margin-top: 1px;
    width: 20px;
    height: 20px;
    accent-color: var(--brand-blue);
    flex-shrink: 0;
}

.consent a { color: var(--brand-blue); font-weight: 600; }

/* ---------- CTA ---------- */
.btn-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 4px;
    font-size: 1.06rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, var(--wa) 0%, var(--wa-dark) 100%);
    box-shadow: 0 12px 22px -10px rgba(37, 211, 102, 0.85);
    cursor: pointer;
    transition: transform .05s, filter .15s, box-shadow .15s;
}

.btn-submit:hover { filter: brightness(1.04); box-shadow: 0 14px 26px -10px rgba(37,211,102,0.95); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit svg { width: 22px; height: 22px; }

.reassure {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    margin: 12px 26px 4px;
}

/* ---------- Validation ---------- */
.field-error, .validation-summary {
    color: var(--error);
    font-size: 0.83rem;
    display: block;
    margin-top: 6px;
}
.validation-summary { padding: 0 26px; }
.validation-summary:empty { display: none; }
.validation-summary ul { margin: 0; padding-left: 18px; }
input.input-validation-error, .phone:has(.input-validation-error) { border-color: var(--error) !important; }

/* ---------- Divider + Stores ---------- */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 0.82rem;
    margin: 24px 26px 18px;
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.app-block { padding: 0 26px; text-align: center; }
.app-block h2 { font-size: 1.08rem; margin: 0 0 4px; color: var(--ink); }
.app-block p { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; }

.stores {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.stores a {
    display: inline-block;
    transition: transform .12s, filter .12s;
}
.stores a:hover { transform: translateY(-2px); filter: brightness(1.06); }
.stores img { height: 48px; width: auto; display: block; }

/* ---------- Success ---------- */
.success { padding: 10px 26px 6px; text-align: center; }
.success .check {
    width: 76px; height: 76px; margin: 6px auto 12px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--wa) 0%, var(--wa-dark) 100%);
    color: #fff; font-size: 2.4rem; line-height: 76px;
    box-shadow: 0 14px 30px -10px rgba(37,211,102,0.8);
}
.success h1 { font-size: 1.5rem; margin: 0 0 8px; color: var(--ink); }
.success p { color: var(--muted); line-height: 1.5; margin: 0 0 8px; }
.success .store-pill { margin-top: 6px; }

/* ---------- Footer ---------- */
.card__foot {
    padding: 18px 24px 22px;
    margin-top: 18px;
    text-align: center;
    font-size: 0.76rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

@media (max-width: 380px) {
    .hero h1 { font-size: 1.35rem; }
    .stores img { height: 44px; }
}
