/* SwissCarBuyer — Dr. Import. Design tokens inspired by Swiss motorway signage. */
:root {
  --paper: #f3f5f4;
  --surface: #ffffff;
  --ink: #18221d;
  --muted: #55625b;
  --line: #d3dbd6;
  --sign: #00703c;        /* motorway sign green */
  --sign-deep: #00552d;
  --route: #d52b1e;       /* route-number shield red */
  --mark: #ffcc00;        /* road-marking yellow */
  --radius: 6px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Segoe UI", "Frutiger", "Avenir Next", "Helvetica Neue", Roboto, "Noto Sans", Arial, sans-serif;
  --font-sign: "Roboto Condensed", "Avenir Next Condensed", "Arial Narrow", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:lang(ar) { --font: "Segoe UI", "Noto Sans Arabic", "Geeza Pro", "Dubai", Tahoma, Arial, sans-serif; --font-sign: var(--font); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  text-rendering: optimizeLegibility;
}
:lang(ar) body, body:lang(ar) { line-height: 1.8; }
img, svg { display: block; max-width: 100%; }
a { color: var(--sign-deep); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; clip-path: inset(50%); }
.skip:focus { clip-path: none; }

/* ---------- type ---------- */
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 18ch; letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); max-width: 30ch; }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 60ch; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul { padding-inline-start: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--sign); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; flex-shrink: 0; }
.logo svg { width: 34px; height: 34px; }
.logo small { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); letter-spacing: 0; line-height: 1.1; }
.logo span { line-height: 1.1; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: var(--radius); font-size: .95rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--sign); border-radius: var(--radius) var(--radius) 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--sign); color: #fff; border: 0; border-radius: var(--radius); padding: 12px 20px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--sign-deep); }
.btn.ghost { background: transparent; color: var(--sign-deep); box-shadow: inset 0 0 0 2px var(--sign); }
.btn.ghost:hover { background: var(--surface); }
.nav .btn { color: #fff; margin-inline-start: 6px; padding: 10px 16px; }
.nav .btn:hover { background: var(--sign-deep); }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: var(--radius); font-size: .9rem; display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); list-style: none; margin: 0; padding: 6px; min-width: 200px; box-shadow: 0 10px 30px rgba(24,34,29,.12); z-index: 30; }
.lang li a { display: block; padding: 7px 10px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.lang li a:hover { background: var(--paper); }
.lang li a[aria-current="true"] { font-weight: 700; }
.menu-btn { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font: inherit; cursor: pointer; color: var(--ink); }

@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px var(--gutter) 18px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1.05rem; }
  .nav .btn { margin: 8px 0 0; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--sign); border-radius: 0; }
  .lang { order: 1; }
  .lang ul { position: static; box-shadow: none; margin-top: 6px; display: grid; grid-template-columns: 1fr 1fr; }
}

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 18px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line); }
.crumbs a { color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(36px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.listing-form { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; max-width: 620px; margin-top: 26px; }
.listing-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.listing-row { display: flex; gap: 8px; }
.listing-row input { flex: 1; min-width: 0; }
.listing-form .hint { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 560px) { .listing-row { flex-direction: column; } }

input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid #b9c4be; border-radius: var(--radius); padding: 11px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--mark); outline-offset: 0; border-color: var(--ink); }
input[type="url"] { direction: ltr; text-align: start; }
textarea { min-height: 120px; resize: vertical; }

/* ---------- the sign ---------- */
.sign { background: var(--sign); color: #fff; border-radius: 10px; padding: 8px; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 18px 40px -18px rgba(0,85,45,.55); font-family: var(--font-sign); }
.sign-in { border: 2px solid #fff; border-radius: 6px; padding: 6px 4px; }
.sign-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; color: #fff; text-decoration: none; border-radius: 4px; }
.sign-row + .sign-row { border-top: 1px solid rgba(255,255,255,.35); }
a.sign-row:hover { background: rgba(255,255,255,.1); }
.sign-row .dest { font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 700; line-height: 1.1; letter-spacing: .005em; }
.sign-row .dest small { display: block; font-size: .82rem; font-weight: 400; opacity: .85; letter-spacing: .02em; margin-top: 2px; }
.sign-row .km { font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sign-row .km svg { width: 28px; height: 28px; }
.sign-row .arrow { width: 30px; height: 30px; }
[dir="rtl"] .sign-row .arrow { transform: scaleX(-1); }
.sign-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 8px; font-size: .9rem; opacity: .9; border-bottom: 1px solid rgba(255,255,255,.35); }
.sign-head .shield { background: var(--route); color: #fff; border: 2px solid #fff; border-radius: 4px; font-weight: 700; padding: 0 7px; font-size: .85rem; line-height: 1.5; }
.sign-note { font-size: .82rem; color: var(--muted); margin: 10px 2px 0; }
.sign.big .sign-row .dest { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.sign.big .sign-row .km { font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* ---------- sections ---------- */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 62ch; margin: 0; }

/* Steps: real sequence, numbered with route-number shields */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px 32px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 48px; }
.steps li::before { content: counter(step); position: absolute; top: 0; inset-inline-start: 0; min-width: 36px; height: 30px; padding: 0 8px; background: var(--route); color: #fff; border: 2px solid #fff; outline: 1px solid var(--route); border-radius: 5px; font-weight: 700; font-family: var(--font-sign); display: grid; place-items: center; font-size: 1.05rem; }
.steps li::after { content: ""; position: absolute; top: 15px; inset-inline-start: 52px; inset-inline-end: -20px; border-top: 2px dashed var(--line); }
.steps li:last-child::after { display: none; }
@media (max-width: 620px) { .steps:not(.long) li::after { display: none; } }
.steps:not(.long) { overflow-x: clip; }
.steps h3 { margin-bottom: .35em; }
.steps p { margin: 0; color: var(--muted); }
.steps.long { grid-template-columns: 1fr; gap: 0; max-width: 760px; }
.steps.long li { padding: 0 0 28px; padding-inline-start: 64px; }
.steps.long li::after { top: 40px; bottom: 6px; inset-inline-start: 18px; inset-inline-end: auto; border-top: 0; border-inline-start: 2px dashed var(--line); }

/* Facts list (why) */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.facts > div { padding: 18px 20px 20px 0; border-bottom: 1px solid var(--line); }
[dir="rtl"] .facts > div { padding: 18px 0 20px 20px; }
.facts h3 { margin-bottom: .3em; }
.facts p { margin: 0; color: var(--muted); }

/* Modes */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.mode { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.section.alt .mode { background: var(--paper); }
.mode svg { width: 44px; height: 44px; color: var(--sign); margin-bottom: 12px; }
.mode p { margin: 0; color: var(--muted); }

/* Destination board */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .board { grid-template-columns: 1fr; } }
.board h3 { font-size: 1rem; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.board ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 16px; }
.board li { break-inside: avoid; }
.board a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.board a:hover { color: var(--sign-deep); text-decoration: underline; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a, .tags span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .95rem; }
.tags a:hover { border-color: var(--sign); color: var(--sign-deep); }

.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.sources a, .sources div { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); margin-inline-end: 24px; }
.sources strong { display: block; }
.sources span { color: var(--muted); font-size: .9rem; }

.links-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 32px; }
.links-list li { border-bottom: 1px solid var(--line); }
.links-list a { display: block; padding: 14px 0; text-decoration: none; color: var(--ink); }
.links-list a strong { display: block; color: var(--sign-deep); }
.links-list a span { color: var(--muted); font-size: .95rem; }
.links-list a:hover strong { text-decoration: underline; }

/* FAQ */
.faq { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--sign); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 70ch; }

/* Page layout with aside */
.page { padding-block: 20px clamp(40px, 6vw, 80px); }
.page-head { padding-block: clamp(18px, 3vw, 36px) clamp(20px, 3vw, 32px); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } }
.cols > div > h2 { margin-top: 1.7em; }
.cols > div > h2:first-child { margin-top: 0; }
.aside { position: sticky; top: 92px; display: grid; gap: 18px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.box h2, .box h3 { font-size: 1.1rem; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box.cta { background: var(--sign); color: #fff; border: 0; }
.box.cta .btn { background: #fff; color: var(--sign-deep); width: 100%; }
.box.cta .btn:hover { background: var(--paper); }
.box.cta a:not(.btn) { color: #fff; }
.contact-lines { list-style: none; margin: 0; padding: 0; }
.contact-lines li { padding: 4px 0; }
.contact-lines a { direction: ltr; unicode-bidi: isolate; }

.opt { border-inline-start: 4px solid var(--sign); padding: 4px 0 4px 18px; margin-bottom: 18px; max-width: 70ch; }
[dir="rtl"] .opt { padding: 4px 18px 4px 0; }
.opt p { margin: 0; }
.note { background: #fff8d6; border-inline-start: 4px solid var(--mark); padding: 12px 16px; border-radius: 0 6px 6px 0; max-width: 70ch; font-size: .95rem; }
.checklist { list-style: none; padding: 0; max-width: 70ch; }
.checklist li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px solid var(--line); }
[dir="rtl"] .checklist li { padding: 8px 30px 8px 0; }
.checklist li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 15px; width: 14px; height: 8px; border-inline-start: 3px solid var(--sign); border-bottom: 3px solid var(--sign); transform: rotate(-45deg); }
[dir="rtl"] .checklist li::before { transform: rotate(45deg); }
.checklist.no li::before { border: 0; width: 14px; height: 3px; background: var(--muted); transform: none; top: 20px; }
.model-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1em; }
.model-list li { font-family: var(--font-sign); font-weight: 700; background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 4px; direction: ltr; }

/* CTA band */
.band { background: var(--ink); color: #fff; padding: clamp(40px, 6vw, 72px) 0; }
.band h2 { color: #fff; }
.band p { color: #c9d3cd; max-width: 60ch; }
.band .listing-form { background: transparent; border-color: rgba(255,255,255,.25); padding: 0; border: 0; }
.band .listing-form label { color: #fff; }
.band .listing-form .hint { color: #c9d3cd; }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; }
@media (max-width: 880px) { .band-grid { grid-template-columns: 1fr; } }

/* Contact form */
.form { display: grid; gap: 18px; max-width: 720px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form .two { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; margin-bottom: 6px; }
.form label .opt-label { font-weight: 400; color: var(--muted); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; }
.form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-error { display: none; background: #fdecea; border-inline-start: 4px solid var(--route); padding: 12px 16px; border-radius: 0 6px 6px 0; }
.form-error.show { display: block; }
.form [aria-invalid="true"] { border-color: var(--route); box-shadow: 0 0 0 1px var(--route); }

/* Footer */
.site-footer { background: #0f1713; color: #c4cec8; padding: 56px 0 28px; font-size: .95rem; }
.site-footer a { color: #e7ede9; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.site-footer .logo { color: #fff; margin-bottom: 14px; }
.site-footer .logo small { color: #9fb0a7; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .85rem; color: #9fb0a7; }
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* language suggestion */
.lang-hint { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 40; max-width: 520px; margin-inline: auto; background: var(--ink); color: #fff; border-radius: 10px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.lang-hint p { margin: 0; flex: 1 1 220px; }
.lang-hint .btn { padding: 9px 14px; }
.lang-hint button.close { background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: var(--radius); padding: 8px 12px; font: inherit; cursor: pointer; }

.center-page { min-height: 50vh; display: grid; align-content: center; padding-block: 60px; }
.sitemap-cols { columns: 3 260px; column-gap: 40px; }
.sitemap-cols section { break-inside: avoid; margin-bottom: 28px; }
.sitemap-cols ul { padding-inline-start: 1.1em; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .sign.anim .sign-row { animation: rowIn .5s cubic-bezier(.2,.7,.2,1) both; }
  .sign.anim .sign-row:nth-child(2) { animation-delay: .08s; }
  .sign.anim .sign-row:nth-child(3) { animation-delay: .16s; }
  .sign.anim .sign-row:nth-child(4) { animation-delay: .24s; }
  .sign.anim .sign-row:nth-child(5) { animation-delay: .32s; }
  @keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media print { .site-header, .site-footer, .band, .aside, .lang-hint { display: none !important; } body { background: #fff; } }
