/*
 * thelovelycar.com
 *
 * Hand-written rather than built, for two reasons. The site is two pages, so a
 * toolchain would be the largest thing in it; and the privacy policy promises
 * the page loads nothing from anyone else, which rules out a font CDN and means
 * the type has to be set well rather than chosen well.
 *
 * Everything that has a side uses logical properties - padding-inline,
 * margin-inline, border-inline-start - so Arabic flips without a second
 * stylesheet. [dir="rtl"] appears only where direction is genuinely visual.
 */

:root {
    /* Brand - config/brand.php and docs/brand/palette.json hold the same values */
    --blue: #0F4C81;
    --blue-deep: #0A3A63;
    --blue-mid: #17629E;
    --glass: #9FC6E4;
    --orange: #F5891F;
    --amber: #FFB55C;

    /* Neutrals, biased very slightly blue so they read as chosen */
    --ground: #F7FAFC;
    --surface: #FFFFFF;
    --surface-2: #EDF3F9;
    --ink: #0B2436;
    --ink-2: #3D5871;
    --muted: #6E8BA3;
    --rule: #D9E5EF;
    --field: #EAF2F9;

    --brand: var(--blue);
    --on-brand: #FFFFFF;

    --measure: 66ch;
    --radius: 6px;

    --latin: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    --arabic: "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma,
        "Arabic Typesetting", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ground: #07141F;
        --surface: #0C1F2E;
        --surface-2: #112938;
        --ink: #E9F2F8;
        --ink-2: #AEC7D9;
        --muted: #7194AC;
        --rule: #1B3546;
        --field: #112938;

        --brand: #6BA8DA;
        color-scheme: dark;
    }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding-inline: 20px;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--latin);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

[lang="ar"] body,
body[dir="rtl"] { font-family: var(--arabic); }

/* Arabic runs a touch larger: the same point size reads smaller. */
body[dir="rtl"] { font-size: 18px; line-height: 1.85; }

.wrap { max-width: 1020px; margin-inline: auto; }
.narrow { max-width: var(--measure); }

h1, h2, h3 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 700;
    text-wrap: balance;
}
body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.3; }

h1 { font-size: clamp(33px, 5.2vw, 54px); }
h2 { font-size: clamp(24px, 3.2vw, 33px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--orange); }
a:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
    border-radius: 2px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
body[dir="rtl"] .eyebrow { letter-spacing: 0; font-family: var(--arabic); }

.skip {
    position: absolute;
    inset-inline-start: -9999px;
}
.skip:focus {
    inset-inline-start: 20px;
    top: 12px;
    z-index: 10;
    padding: 10px 14px;
    background: var(--brand);
    color: var(--on-brand);
    border-radius: var(--radius);
}

/* ---------- header ---------- */

.site-header {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-block: 20px;
    max-width: 1020px;
    margin-inline: auto;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--ink);
}
.brand img { display: block; height: 30px; width: auto; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
body[dir="rtl"] .brand-name { letter-spacing: 0; }

.header-links {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    font-size: 15px;
}

.header-links .signin {
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--brand);
    color: var(--on-brand);
    font-weight: 600;
    text-decoration: none;
}
.header-links .signin:hover { background: var(--blue-deep); color: #fff; }

.langs { display: flex; gap: 4px; flex-wrap: wrap; }
.langs a,
.langs span {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 100px;
    font-size: 14px;
    text-decoration: none;
    color: var(--ink-2);
}
.langs a:hover { background: var(--surface-2); color: var(--ink); }
.langs [aria-current="true"] {
    background: var(--brand);
    color: var(--on-brand);
    font-weight: 600;
}

/* ---------- hero ---------- */

.hero {
    background: linear-gradient(160deg, var(--blue-mid) 0%, var(--blue-deep) 100%);
    border-radius: 10px;
    color: #fff;
    padding: clamp(28px, 4vw, 46px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 250px);
    gap: clamp(24px, 4vw, 44px);
    align-items: center;
}
.hero h1 { color: #fff; }
.hero-lede {
    font-size: clamp(18px, 2vw, 21px);
    color: #CEE2F2;
    margin-top: 16px;
    max-width: 44ch;
}
.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 10px;
    margin-bottom: 20px;
    border-radius: 100px;
    background: rgba(245, 137, 31, 0.16);
    color: var(--amber);
    font-size: 13.5px;
    font-weight: 600;
}
.hero-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
    flex: none;
}
.hero-cta {
    display: flex;
    align-items: center;
    gap: 14px 18px;
    flex-wrap: wrap;
    margin-top: 26px;
}
.hero-cta .button { margin-top: 0; background: var(--orange); }
.hero-cta .button:hover { background: var(--amber); color: var(--lc-blue-deep, #0A3A63); }
.hero-cta-note { font-size: 14px; color: #BBD5EC; }

.hero-points {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: grid;
    gap: 11px;
    font-size: 16px;
    color: #DCEAF6;
}
.hero-points li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 11px;
    align-items: start;
}
.hero-points li::before {
    content: "";
    margin-top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--orange);
    transform: rotate(45deg);
}
.hero-points em { color: #fff; font-style: normal; font-weight: 600; }
.hero-mark { display: flex; justify-content: center; }
.hero-mark img {
    width: 100%;
    max-width: 210px;
    height: auto;
    filter: drop-shadow(0 12px 30px rgba(2, 18, 32, 0.42));
}

@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; }
    .hero-mark { order: -1; justify-content: flex-start; }
    .hero-mark img { max-width: 122px; }
}

/* ---------- sections ---------- */

section { padding-block: clamp(44px, 6vw, 76px); }
.section-head { max-width: var(--measure); }
.section-head h2 { margin-top: 8px; }
.section-lede { color: var(--ink-2); margin-top: 14px; font-size: 18px; }

.cards {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
}
.card { background: var(--surface); padding: 24px; }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--ink-2); font-size: 16px; }

/* Numbered, because these really are four steps in order. */
.steps { margin-top: 34px; display: grid; gap: 1px; background: var(--rule);
    border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.step {
    background: var(--surface);
    padding: 24px 26px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.step-n {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    padding-top: 3px;
}
.step h3 { margin-bottom: 7px; }
.step p { color: var(--ink-2); font-size: 16px; max-width: var(--measure); }

@media (max-width: 560px) {
    .step { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- notification cards ---------- */

.notes {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
    gap: 16px;
}
.note {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 15px 17px;
    box-shadow: 0 1px 2px rgba(11, 36, 54, 0.05);
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 13px;
    align-items: start;
}
.note img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.note-lang {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}
.note-title { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.note-body { color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }
.note[dir="rtl"] { font-family: var(--arabic); }
.note[dir="rtl"] .note-lang { font-family: var(--arabic); letter-spacing: 0; }
.caption { margin-top: 16px; color: var(--muted); font-size: 14.5px; }

/* ---------- privacy teaser ---------- */

.teaser {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-inline-start: 4px solid var(--orange);
    border-radius: var(--radius);
    padding: clamp(24px, 3vw, 34px);
}
.teaser p { color: var(--ink-2); margin-top: 12px; max-width: var(--measure); }
.button {
    display: inline-block;
    margin-top: 22px;
    padding: 11px 20px;
    border-radius: var(--radius);
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
}
.button:hover { background: var(--blue-deep); color: #fff; }

/* ---------- policy ---------- */

.policy { padding-block: clamp(28px, 4vw, 48px) }
.policy-head { max-width: var(--measure); }
.policy-updated { color: var(--muted); font-size: 15px; margin-top: 12px; }
.policy-summary {
    margin-top: 26px;
    padding: 20px 22px;
    background: var(--field);
    border-radius: var(--radius);
    color: var(--ink-2);
    max-width: var(--measure);
}

.toc {
    margin-top: 34px;
    padding: 20px 22px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    max-width: var(--measure);
}
.toc .eyebrow { display: block; margin-bottom: 12px; }
.toc ol {
    margin: 0;
    padding-inline-start: 22px;
    display: grid;
    gap: 6px;
    font-size: 16px;
    color: var(--ink-2);
}

.policy article { margin-top: 40px; max-width: var(--measure); }
.policy article h2 {
    font-size: clamp(21px, 2.4vw, 26px);
    padding-top: 22px;
    border-top: 1px solid var(--rule);
}
.policy article p { margin-top: 14px; color: var(--ink-2); }
.policy article ul {
    margin: 14px 0 0;
    padding-inline-start: 22px;
    display: grid;
    gap: 8px;
    color: var(--ink-2);
}
.policy article li { padding-inline-start: 2px; }

.contact {
    margin-top: 44px;
    padding: 24px 26px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    max-width: var(--measure);
}
.contact p { color: var(--ink-2); margin-top: 10px; }
.contact .email {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 600;
}

/* ---------- footer ---------- */

.site-footer {
    margin-top: clamp(40px, 6vw, 70px);
    padding-block: 30px 46px;
    border-top: 1px solid var(--rule);
    max-width: 1020px;
    margin-inline: auto;
    display: grid;
    gap: 22px;
    font-size: 15px;
    color: var(--muted);
}
.footer-top {
    display: flex;
    gap: 18px 28px;
    flex-wrap: wrap;
    align-items: center;
}
.footer-top .brand { color: var(--ink); }
.footer-nav { margin-inline-start: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.footer-langs { display: grid; gap: 8px; }
.footer-langs .eyebrow { font-size: 10.5px; }
.footer-langs div { display: flex; gap: 14px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
