/* Michael Miller | 19 July 2026
 * WHAT: Add responsive light and dark presentation for ITN 2.0 dealer profiles.
 * WHY: Each eligible dealer needs a polished self-managed page that remains
 * readable across brand styles, mobile devices and incomplete listing data.
 */

:root {
    --profile-page: #f3f6f8;
    --profile-surface: #ffffff;
    --profile-soft: #eef3f7;
    --profile-ink: #10263d;
    --profile-text: #4d6275;
    --profile-muted: #718190;
    --profile-line: #d6e0e8;
    --profile-dark: #1b2228;
    --profile-yellow: #ffdf18;
    --profile-blue: #1763a5;
    --profile-shadow: 0 20px 55px rgba(16, 38, 61, 0.12);
    --profile-radius: 16px;
}

.theme-dark {
    --profile-page: #11171c;
    --profile-surface: #1b232a;
    --profile-soft: #232d35;
    --profile-ink: #f5f7f8;
    --profile-text: #c4cdd4;
    --profile-muted: #9ba8b1;
    --profile-line: #35424c;
    --profile-blue: #69aee4;
    --profile-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--profile-page);
    color: var(--profile-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

img {
    max-width: 100%;
}

a {
    color: var(--profile-blue);
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 102px;
    padding: 12px max(24px, calc((100vw - 1120px) / 2));
    background: var(--profile-dark);
}

.profile-brand {
    display: block;
    width: 250px;
    height: 76px;
    overflow: hidden;
}

.profile-brand img {
    display: block;
    width: 100%;
    transform: translateY(-20%);
}

.profile-back {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.profile-back:hover,
.profile-back:focus {
    color: var(--profile-yellow);
}

.profile-shell,
.unavailable-shell,
.profile-footer__inner {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.profile-shell {
    padding: 54px 0 68px;
}

.business-intro {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 30px;
}

.business-logo {
    display: grid;
    width: 150px;
    height: 150px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--profile-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--profile-shadow);
}

.business-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #557b2a;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.theme-dark .profile-eyebrow {
    color: var(--profile-yellow);
}

.business-summary h1,
.profile-card h2,
.quote-preview h2,
.unavailable-card h1 {
    color: var(--profile-ink);
    letter-spacing: -0.025em;
}

.business-summary h1 {
    margin: 0;
    font-size: clamp(2.15rem, 5vw, 4.1rem);
    line-height: 1.02;
}

.business-location {
    margin: 10px 0 12px;
    color: var(--profile-muted);
    font-weight: 700;
}

.business-summary > p:last-of-type {
    max-width: 780px;
    margin-bottom: 0;
}

.business-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.primary-button {
    background: var(--profile-yellow);
    color: #172026;
}

.primary-button:hover,
.primary-button:focus {
    background: #f1ce00;
    transform: translateY(-1px);
}

.secondary-button {
    border-color: var(--profile-line);
    background: var(--profile-surface);
    color: var(--profile-ink);
}

.secondary-button:hover,
.secondary-button:focus {
    border-color: var(--profile-blue);
}

.business-hero {
    height: clamp(300px, 42vw, 510px);
    margin: 0 0 30px;
    overflow: hidden;
    border-radius: var(--profile-radius);
    background: var(--profile-soft);
    box-shadow: var(--profile-shadow);
}

.business-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.profile-card,
.quote-preview,
.profile-note,
.unavailable-card {
    border: 1px solid var(--profile-line);
    border-radius: var(--profile-radius);
    background: var(--profile-surface);
    box-shadow: var(--profile-shadow);
}

.profile-card {
    padding: 28px;
}

.profile-card h2,
.quote-preview h2 {
    margin: 0 0 14px;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.service-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-list li {
    position: relative;
    padding: 13px 15px 13px 42px;
    border-radius: 9px;
    background: var(--profile-soft);
    color: var(--profile-ink);
    font-weight: 700;
}

.service-list li::before {
    position: absolute;
    top: 13px;
    left: 15px;
    color: #5c8d35;
    content: '\2713';
    font-weight: 900;
}

.theme-dark .service-list li::before {
    color: var(--profile-yellow);
}

.address-line {
    color: var(--profile-ink);
    font-weight: 700;
}

.text-link {
    font-weight: 800;
}

.quote-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 22px;
    padding: 28px;
}

.quote-preview p {
    margin: 0;
}

.profile-note {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 20px 24px;
}

.profile-note strong {
    color: var(--profile-ink);
    white-space: nowrap;
}

.profile-footer {
    padding: 30px 0;
    background: var(--profile-dark);
    color: #cbd4da;
    text-align: center;
}

.profile-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
}

.profile-powered > span {
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-powered a {
    display: block;
    width: 190px;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
}

.profile-powered img {
    display: block;
    width: 100%;
    height: auto;
}

.profile-footer p {
    margin: 18px 0 0;
    font-size: 0.78rem;
}

.unavailable-shell {
    display: grid;
    min-height: calc(100vh - 260px);
    padding: 70px 0;
    place-items: center;
}

.unavailable-card {
    max-width: 690px;
    padding: 50px;
    text-align: center;
}

.unavailable-card h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4rem);
}

.unavailable-card p {
    margin: 12px 0 28px;
}

@media (max-width: 760px) {
    .profile-header {
        min-height: 82px;
        padding: 8px 20px;
    }

    .profile-brand {
        width: 180px;
        height: 58px;
    }

    .profile-back {
        max-width: 105px;
        font-size: 0.78rem;
        line-height: 1.2;
        text-align: right;
    }

    .profile-shell {
        padding: 34px 0 48px;
    }

    .business-intro {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 18px;
    }

    .business-logo {
        width: 92px;
        height: 92px;
        border-radius: 13px;
    }

    .business-summary h1 {
        font-size: clamp(1.85rem, 9vw, 2.8rem);
    }

    .business-summary > p:last-of-type,
    .business-actions {
        grid-column: 1 / -1;
    }

    .business-actions {
        display: grid;
    }

    .business-hero {
        height: 260px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-card,
    .quote-preview {
        padding: 22px;
    }

    .quote-preview,
    .profile-note {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-note strong {
        white-space: normal;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .profile-powered {
        flex-direction: column;
    }

    .unavailable-card {
        padding: 34px 22px;
    }
}

@media (max-width: 430px) {
    .profile-shell,
    .unavailable-shell,
    .profile-footer__inner {
        width: min(100% - 26px, 1120px);
    }

    .business-intro {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 13px;
    }

    .business-logo {
        width: 74px;
        height: 74px;
    }

    .business-hero {
        height: 220px;
        border-radius: 12px;
    }
}
