/* =========================================================
   CAR-EX AD — company website
   Clean & modern, responsive, accessible. Brand red #AB2328.
   ========================================================= */

:root {
  --accent: #ab2328;
  --accent-dark: #8e1d22;
  --accent-darker: #74171b;
  --accent-tint: #fbeeef;

  --ink: #14161a;
  --ink-soft: #3f4651;
  --muted: #6b7280;

  --bg: #ffffff;
  --surface: #f7f7f9;
  --surface-2: #eef0f3;
  --border: #e4e6eb;

  --footer-bg: #14161a;
  --footer-ink: #d7dade;
  --footer-muted: #9aa0aa;
  --footer-border: #2a2e35;

  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow: 0 12px 34px rgba(16, 24, 40, 0.10);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Liberation Sans", sans-serif;

  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Bilingual visibility ---------- */
[data-lang="en"] .t-bg { display: none; }
[data-lang="bg"] .t-en { display: none; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 32px);
}

.section { padding-block: clamp(56px, 9vw, 104px); scroll-margin-top: var(--header-h); }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.section__title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; max-width: 22ch; }
.section__lead {
  margin-top: 16px;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 1.075rem;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 14px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; margin-right: auto; }
.brand__logo { height: 34px; width: auto; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 9px 12px;
  border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #fff;
}
.lang__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang__btn:hover { color: var(--ink); }
.lang__btn[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 520px at 88% -10%, var(--accent-tint), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__motif {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: min(560px, 60%);
  color: var(--accent);
  opacity: 0.07;
}
.hero__inner { position: relative; padding-block: clamp(64px, 11vw, 132px); }
.hero__title {
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  font-weight: 800;
  max-width: 18ch;
  letter-spacing: -0.02em;
}
.hero__lead {
  margin-top: 22px;
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
}
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Cards (services) ---------- */
.cards {
  margin-top: 44px;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d7dae0; }
.card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-tint);
  color: var(--accent);
  margin-bottom: 18px;
}
.card__title { font-size: 1.22rem; font-weight: 700; margin-bottom: 10px; }
.card__text { color: var(--ink-soft); }
.icon { width: 26px; height: 26px; }
.card__icon .icon { width: 26px; height: 26px; }

/* ---------- About ---------- */
.about {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  grid-template-columns: 1.5fr 1fr;
  align-items: start;
}
.about__main > p { margin-top: 18px; color: var(--ink-soft); font-size: 1.06rem; }
.about__main .section__title { margin-bottom: 4px; }

.factcard {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 12px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.factcard__title {
  font-size: 1.05rem;
  font-weight: 700;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.factcard__list { margin: 0; }
.factcard__row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.factcard__row:last-child { border-bottom: 0; }
.factcard__row dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 3px;
}
.factcard__row dd { margin: 0; font-weight: 600; color: var(--ink); }

/* ---------- Contact ---------- */
.contact__list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.contact__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px;
}
.section--alt .contact__item { background: #fff; }
.contact__icon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent);
}
.contact__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact__label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.contact__value { font-weight: 600; color: var(--ink); }
.contact__value--link { text-decoration: none; }
.contact__value--link:hover { color: var(--accent); }
.contact__link { font-size: 0.92rem; font-weight: 600; margin-top: 4px; align-self: flex-start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); }
.site-footer__top {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: 1fr 1.3fr;
  padding-block: clamp(48px, 7vw, 72px);
}
.site-footer__logo {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.site-footer__tag { margin-top: 16px; color: var(--footer-muted); max-width: 42ch; }

.site-footer__legal { font-style: normal; color: var(--footer-muted); font-size: 0.95rem; }
.site-footer__legal p { margin-top: 6px; }
.site-footer__legal .legal-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  font-style: normal;
  margin-top: 0;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.site-footer__legal a { color: var(--footer-ink); text-decoration: none; }
.site-footer__legal a:hover { color: #fff; text-decoration: underline; }

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px;
  border-top: 1px solid var(--footer-border);
  color: var(--footer-muted);
  font-size: 0.9rem;
}
.site-footer__privacy { color: var(--footer-ink); text-decoration: none; font-weight: 600; }
.site-footer__privacy:hover { color: #fff; text-decoration: underline; }

/* ---------- Legal / subpage (privacy.html) ---------- */
.page-head {
  background:
    radial-gradient(900px 360px at 90% -30%, var(--accent-tint), transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(44px, 7vw, 76px);
  scroll-margin-top: var(--header-h);
}
.page-head__title { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; margin-top: 6px; }
.page-head__meta { margin-top: 14px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }

.prose { max-width: 78ch; }
.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.08rem; font-weight: 700; margin-top: 24px; margin-bottom: 8px; }
.prose p { margin-top: 12px; color: var(--ink-soft); }
.prose ul { margin: 12px 0; padding-left: 22px; color: var(--ink-soft); }
.prose li { margin-top: 8px; }
.prose a { font-weight: 600; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 44px;
  font-weight: 700;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .factcard { position: static; }
  .site-footer__top { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .hero__motif { opacity: 0.05; right: -90px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
