/*
 * DVLA Dealer Listings — public landing page CSS
 *
 * Design language mirrors the UK Plate Tracker page (dvla-mvmt):
 *   navy hero, white content sections, Poppins font, light grey accents.
 *   But uses our gold (--bpp-gold) for primary CTAs instead of the
 *   tracker's red, since this is a dealer-side acquisition page rather
 *   than a buyer-side tool.
 *
 * Naming: BEM-ish, prefixed `ddl-landing`.
 *
 * Sections:
 *   1. Page width overrides (Hello Elementor constraint override)
 *   2. Root + utilities
 *   3. Hero
 *   4. Stats row
 *   5. How it works
 *   6. Benefits / why
 *   7. Pricing table
 *   8. FAQ
 *   9. Signup form
 *  10. Mobile
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ── 1. Page width overrides ─────────────────────────────── */
/* Same pattern as the plate tracker: override Hello Elementor's
   max-width constraints so the hero and sections render edge-to-edge.
   We add the .ddl-landing-page class to body when on this page. */

body.ddl-landing-page main,
body.ddl-landing-page main.site-main,
body.ddl-landing-page .site-main,
body.ddl-landing-page #content,
body.ddl-landing-page .page-content,
body.ddl-landing-page .entry-content,
body.ddl-landing-page article.page,
body.ddl-landing-page .elementor-section-wrap {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.ddl-landing-page {
    overflow-x: hidden;
}

/* Hide the default page title that Hello Elementor / WP renders
   above the_content. The hero replaces it. */
body.ddl-landing-page .page-title,
body.ddl-landing-page .entry-title,
body.ddl-landing-page .elementor-widget-theme-post-title,
body.ddl-landing-page header.entry-header {
    display: none !important;
}

/* ── 2. Root + utilities ─────────────────────────────────── */

.ddl-landing {
    --navy: #1a2744;
    --navy-soft: #2c326b;
    --gold: #f5c518;
    --gold-deep: #d4a813;
    --blue: #2E3687;
    --light: #f7f8fb;
    --border: #e5e7eb;
    --text-dark: #1a2744;
    --text-body: #3a3f55;
    --text-muted: #64748b;
    --subtitle: #c7cbe6;
    --green: #16a34a;

    line-height: 1.5;
    background: #ffffff;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}

.ddl-landing,
.ddl-landing * { box-sizing: border-box; }

.ddl-landing__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    color: var(--text-body);
}

.ddl-landing__h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 54px;
    font-weight: 800;
    color: #ffffff;
    margin: 12px 0 18px;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.ddl-landing__h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.ddl-landing__h2--center { text-align: center; }

.ddl-landing__h2-sub {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
    margin: 0 0 36px;
}
.ddl-landing__h2-sub--center { text-align: center; }

.ddl-landing__eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.ddl-landing__lede {
    font-size: 19px;
    color: var(--subtitle);
    font-weight: 300;
    line-height: 1.55;
    margin: 0 0 28px;
    max-width: 640px;
}

.ddl-landing__btn {
    display: inline-block;
    padding: 14px 28px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, transform .1s;
    line-height: 1.3;
}
.ddl-landing__btn:active { transform: translateY(1px); }

.ddl-landing__btn--primary {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.ddl-landing__btn--primary:hover {
    background: var(--gold-deep);
    border-color: var(--gold-deep);
    color: var(--navy);
}

.ddl-landing__btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}
.ddl-landing__btn--ghost:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.6);
    color: #fff;
}

/* ── 3. Hero ─────────────────────────────────────────────── */

.ddl-landing__hero {
    background: linear-gradient(135deg, var(--navy) 0%, #232f55 100%);
    padding: 100px 0 90px;
    border-bottom: 1px solid var(--navy-soft);
    position: relative;
    overflow: hidden;
}

/* Subtle decorative element — a gold accent line */
.ddl-landing__hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, transparent 70%);
}

.ddl-landing__hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── 4. Stats row ────────────────────────────────────────── */

.ddl-landing__stats {
    background: var(--light);
    padding: 50px 0;
    border-bottom: 1px solid var(--border);
}

.ddl-landing__stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ddl-landing__stat-tile {
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.ddl-landing__stat-value {
    font-size: 38px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.ddl-landing__stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.4;
}

/* ── 5. How it works ─────────────────────────────────────── */

.ddl-landing__how {
    background: #fff;
    padding: 80px 0;
}

.ddl-landing__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 16px;
}

.ddl-landing__step {
    background: var(--light);
    border-radius: 14px;
    padding: 28px 24px;
    border: 1px solid var(--border);
    position: relative;
}

.ddl-landing__step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--navy);
    color: var(--gold);
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.ddl-landing__step-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 10px;
}

.ddl-landing__step-body {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.6;
    margin: 0;
}

/* ── 6. Benefits / why ───────────────────────────────────── */

.ddl-landing__why {
    background: var(--light);
    padding: 80px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.ddl-landing__benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 16px;
}

.ddl-landing__benefit {
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--gold);
}

.ddl-landing__benefit-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 12px;
    line-height: 1.3;
}

.ddl-landing__benefit p {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.65;
    margin: 0;
}

/* ── 7. Pricing table ────────────────────────────────────── */

.ddl-landing__pricing {
    background: #fff;
    padding: 80px 0;
}

.ddl-landing__pricing-table {
    width: 100%;
    max-width: 720px;
    margin: 24px auto 24px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    font-size: 15px;
}

.ddl-landing__pricing-table th,
.ddl-landing__pricing-table td {
    padding: 16px 22px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-body);
}
.ddl-landing__pricing-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--navy);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ddl-landing__pricing-table td:last-child,
.ddl-landing__pricing-table th:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--navy);
}
.ddl-landing__pricing-table tr:last-child td { border-bottom: none; }

.ddl-landing__pricing-row-highlight td {
    background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
    font-weight: 600;
}

.ddl-landing__pricing-note {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.65;
}

/* ── 8. FAQ ──────────────────────────────────────────────── */

.ddl-landing__faq {
    background: var(--light);
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.ddl-landing__faq-list {
    max-width: 820px;
    margin: 16px auto 0;
}

.ddl-landing__faq-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 12px;
}

.ddl-landing__faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
    font-size: 16px;
    list-style: none;
    padding-right: 30px;
    position: relative;
    user-select: none;
}
.ddl-landing__faq-item summary::-webkit-details-marker { display: none; }
.ddl-landing__faq-item summary::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: var(--text-muted);
    font-weight: 300;
    transition: transform 0.2s;
}
.ddl-landing__faq-item[open] summary::after {
    content: '−';
}
.ddl-landing__faq-item p {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.7;
    margin: 14px 0 4px;
}

/* ── 9. Signup form ──────────────────────────────────────── */

.ddl-landing__apply {
    background: #fff;
    padding: 80px 0 100px;
}

.ddl-landing__signup {
    max-width: 760px;
    margin: 24px auto 0;
    background: var(--light);
    padding: 36px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.ddl-landing__signup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.ddl-landing__signup-field {
    display: block;
}
.ddl-landing__signup-field--full {
    display: block;
    margin-bottom: 18px;
}

.ddl-landing__signup-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}
.ddl-landing__signup-label em {
    color: #ef4444;
    font-style: normal;
    margin-left: 2px;
}

.ddl-landing__signup input[type="text"],
.ddl-landing__signup input[type="email"],
.ddl-landing__signup input[type="tel"],
.ddl-landing__signup textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--text-dark);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ddl-landing__signup input:focus,
.ddl-landing__signup textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(46, 54, 135, 0.12);
}
.ddl-landing__signup textarea {
    resize: vertical;
    min-height: 100px;
}

.ddl-landing__signup-submit {
    text-align: center;
    margin-top: 12px;
}

.ddl-landing__signup-fineprint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 14px 0 0;
    line-height: 1.5;
}

.ddl-landing__signup-errors {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    color: #7f1d1d;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.ddl-landing__signup-errors strong { display: block; margin-bottom: 6px; }
.ddl-landing__signup-errors ul {
    margin: 0;
    padding-left: 18px;
}

.ddl-landing__signup-success {
    max-width: 640px;
    margin: 24px auto 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #d4edda 100%);
    border: 1px solid #86c79b;
    padding: 36px;
    border-radius: 16px;
    text-align: center;
}
.ddl-landing__signup-success h3 {
    color: #155724;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
}
.ddl-landing__signup-success p {
    font-size: 15px;
    color: #2d4a35;
    line-height: 1.65;
    margin: 8px 0 0;
}
.ddl-landing__signup-success a {
    color: var(--blue);
    text-decoration: underline;
}

/* ── 10. Mobile ──────────────────────────────────────────── */

@media (max-width: 1024px) {
    .ddl-landing__benefits { grid-template-columns: repeat(2, 1fr); }
    .ddl-landing__steps { grid-template-columns: repeat(2, 1fr); }
    .ddl-landing__stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .ddl-landing__hero { padding: 70px 0 60px; }
    .ddl-landing__h1 { font-size: 38px; }
    .ddl-landing__lede { font-size: 17px; }
    .ddl-landing__h2 { font-size: 26px; }
    .ddl-landing__how,
    .ddl-landing__why,
    .ddl-landing__pricing,
    .ddl-landing__faq,
    .ddl-landing__apply { padding: 56px 0; }
    .ddl-landing__benefits { grid-template-columns: 1fr; }
    .ddl-landing__signup-grid { grid-template-columns: 1fr; }
    .ddl-landing__signup { padding: 24px; }
    .ddl-landing__pricing-table th,
    .ddl-landing__pricing-table td { padding: 12px 14px; font-size: 14px; }
    .ddl-landing__stats { padding: 32px 0; }
    .ddl-landing__stat-tile { padding: 20px 14px; }
    .ddl-landing__stat-value { font-size: 28px; }
}

@media (max-width: 480px) {
    .ddl-landing__h1 { font-size: 32px; }
    .ddl-landing__hero-cta { flex-direction: column; }
    .ddl-landing__hero-cta .ddl-landing__btn {
        width: 100%;
        text-align: center;
    }
    .ddl-landing__steps { grid-template-columns: 1fr; }
    .ddl-landing__stats-grid { grid-template-columns: 1fr; }
}
