/* ---------------------------------------------------------------------------
   ТаксиРегистър — design tokens
   Palette: baby blue + baby yellow. The pastels carry surfaces and labels;
   deepened versions of the same two hues carry text and buttons, so nothing
   relies on white-on-pastel. Type is a system stack with full Cyrillic coverage: no external font
   CDN, so no third-party requests and nothing to disclose in the privacy page.
--------------------------------------------------------------------------- */
:root {
  /* Baby blue + baby yellow. The two pastels are surfaces and labels only;
     text and buttons use deepened versions of the same two hues so every
     pairing clears WCAG AA. White on a pastel never appears. */
  --ink: #0f4a70;          /* headings, body text, footer, checker squares */
  --ink-soft: #3f5a6b;     /* secondary text */
  --ink-muted: #6a8296;    /* hints, counts */
  --paper: #edf6fc;        /* page background — baby blue, lightened */
  --surface: #ffffff;
  --line: #c6e0f0;
  --brand: #1a5f8f;
  --brand-dark: #0f4a70;
  --brand-tint: #dceefb;   /* baby blue */
  --brand-line: #a9d3ed;
  --call: #0f4a70;         /* the call button — 10.1:1 against white */
  --call-dark: #093756;
  --amber: #f5c518;        /* signal yellow: checker accent, sponsored rail */
  --amber-tint: #fff1c9;   /* baby yellow */
  --amber-dark: #6b4e00;   /* the only text colour used on baby yellow */
  --amber-line: #f0dca0;
  --danger: #a32020;
  --danger-tint: #fbeaea;
  --skeleton-base: #ddebf5;
  --skeleton-sheen: #f0f7fc;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 74, 112, .08), 0 6px 20px rgba(15, 74, 112, .09);
  --shadow-flat: 0 1px 0 var(--line);

  --step-0: 1.0625rem;   /* 17px — readable at arm's length */
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 1.9rem;
  --step-4: 2.4rem;

  --font-body: "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, system-ui, sans-serif;
  --tap: 48px;
  --container: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); }

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

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .75rem;
  font-weight: 700; color: var(--ink-muted); margin: 0 0 .35em;
}

/* --- Signature: the checker band ----------------------------------------- */
.checker {
  height: 10px;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  background-color: var(--amber-tint);
  opacity: .9;
}

/* --- Header / footer ------------------------------------------------------ */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem;
}
.logo__text { font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
  border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-soft); font-weight: 600;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-dark); }

.site-footer { background: var(--ink); color: #cfe6f5; margin-top: 56px; }
.site-footer a { color: #fff; }
.site-footer__inner { display: grid; gap: 24px; padding: 32px 0; }
.site-footer h2 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .fine { font-size: .9rem; color: #9fc3db; }

@media (min-width: 720px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}

/* --- Breadcrumbs ---------------------------------------------------------- */
.breadcrumbs { padding: 14px 0 0; font-size: .9rem; color: var(--ink-muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 700; text-decoration: none;
  cursor: pointer; transition: background-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn--call { background: var(--call); color: #fff; font-size: 1.15rem; min-height: 56px; width: 100%; }
.btn--call:hover { background: var(--call-dark); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--paper); }
.btn--block { width: 100%; }
.btn-row { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.btn-row .btn { width: 100%; }
.btn-row--single { grid-template-columns: 1fr; }

/* --- Cards ---------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-flat); padding: 18px;
}
.card + .card { margin-top: 14px; }
.card--sponsored { border-color: var(--amber); box-shadow: inset 3px 0 0 var(--amber); }

.company__head { display: flex; gap: 14px; align-items: flex-start; }
.company__logo {
  width: 56px; height: 56px; border-radius: 12px; object-fit: contain;
  background: var(--paper); border: 1px solid var(--line); flex: 0 0 auto;
}
.company__logo--fallback {
  display: grid; place-items: center; font-weight: 800; color: var(--brand); font-size: 1.1rem;
}
.company__name { font-size: var(--step-1); font-weight: 800; margin: 0; }
.company__name a { color: inherit; text-decoration: none; }
.company__name a:hover { text-decoration: underline; }
.company__desc { color: var(--ink-soft); margin: 6px 0 0; }
.company__meta { margin: 12px 0 0; display: grid; gap: 6px; font-size: .95rem; color: var(--ink-soft); }
.company__actions { margin-top: 14px; display: grid; gap: 8px; }

/* --- Badges & chips ------------------------------------------------------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line);
}
.badge--verified { background: var(--brand-tint); color: var(--brand-dark); border-color: var(--brand-line); }
.badge--sponsored { background: var(--amber-tint); color: var(--amber-dark); border-color: var(--amber-line); }
.badge--24 { background: var(--surface); color: var(--ink-soft); border-color: var(--line); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; white-space: nowrap;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* --- Hero ----------------------------------------------------------------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 36px 0 32px; }
.hero h1 { max-width: 16ch; }
.hero__lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 52ch; }
.search {
  display: grid; gap: 10px; margin-top: 22px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.search label { font-weight: 700; }
@media (min-width: 640px) {
  .search__row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
}

.field {
  width: 100%; min-height: var(--tap); padding: 10px 14px; font: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--ink);
}
.field:focus { border-color: var(--brand); }
textarea.field { min-height: 120px; }

.city-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.city-tile {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 72px; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
}
.city-tile:hover { border-color: var(--brand); background: var(--brand-tint); }
.city-tile strong { font-size: 1.05rem; }
.city-tile span { color: var(--ink-muted); font-size: .9rem; }

.section { padding: 32px 0; }
.section--tight { padding: 20px 0; }

.steps { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step__num {
  counter-increment: step; display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff;
  font-weight: 800; margin-bottom: 10px;
}
.step__num::before { content: counter(step); }

/* --- Layout for city page ------------------------------------------------- */
.page-head { padding: 22px 0 8px; }
.page-head h1 { margin-bottom: 4px; }
.page-head__count { color: var(--ink-muted); font-weight: 600; }

.toolbar { display: grid; gap: 10px; margin: 12px 0 18px; }
.toolbar__row { display: grid; gap: 10px; }
@media (min-width: 720px) { .toolbar__row { grid-template-columns: 1fr auto; } }

/* --- States --------------------------------------------------------------- */
.empty, .error-state {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px; text-align: center;
}
.error-state { border-color: #eec4c4; background: var(--danger-tint); }
.empty h2 { margin-bottom: .3em; }

.skeleton { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 18px; }
.skeleton__line {
  height: 14px; border-radius: 6px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-sheen) 37%, var(--skeleton-base) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite;
}
.skeleton__line--title { height: 20px; width: 55%; }
.skeleton__line--short { width: 35%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

[hidden] { display: none !important; }

.notice {
  border-left: 4px solid var(--brand); background: var(--brand-tint);
  padding: 14px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 18px 0;
}
.notice--warn { border-color: var(--amber); background: var(--amber-tint); }
.messages { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.messages li { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-tint); }
.messages li.error { background: var(--danger-tint); color: var(--danger); }

/* --- Ad slot -------------------------------------------------------------- */
.ad-slot {
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 18px; text-align: center; color: var(--ink-muted); margin: 18px 0;
}
.ad-slot__label {
  text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 700;
}

/* --- Detail page ---------------------------------------------------------- */
.detail-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1fr 320px; align-items: start; } }
.dl { display: grid; gap: 10px; margin: 0; }
.dl > div { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.dl dt { font-weight: 700; font-size: .9rem; color: var(--ink-muted); margin: 0; }
.dl dd { margin: 0; }

.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hours th { font-weight: 600; color: var(--ink-soft); }

.sticky-call { position: sticky; bottom: 0; z-index: 20; padding: 10px 0 14px;
  background: linear-gradient(to top, var(--paper) 70%, rgba(237, 246, 252, 0)); }
@media (min-width: 900px) { .sticky-call { position: static; background: none; } }

/* --- Cookie banner -------------------------------------------------------- */
.cookie-banner {
  position: fixed; inset: auto 12px 12px; z-index: 60; background: var(--ink); color: #fff;
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  display: grid; gap: 12px; max-width: 520px; margin: 0 auto;
}
.cookie-banner a { color: var(--amber-tint); }

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