/* Денонощна пътна помощ. Тъмен асфалт, кехлибарено от маяка, шрифт като на пътен знак. */

:root {
  --bg: #0d0f12;
  --bg-2: #15181d;
  --ink: #f4f1ea;
  --soft: #b9bcc2;
  --line: rgba(244, 241, 234, .14);
  --amber: #ffb000;
  --amber-hi: #ffc233;
  --on-amber: #0d0f12;
  --green: #3ddc84;
  --display: "Fira Sans Extra Condensed", "Arial Narrow", sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: 20px;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  /* Печатните форми на кирилицата, не българските ръкописни. */
  font-feature-settings: "locl" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; flex: none; }

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

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--on-amber);
  padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Лента */

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 60px; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 28px;
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s;
}
.bar.is-solid {
  background: rgba(13, 15, 18, .94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap;
}
.brand svg { color: var(--amber); }
.brand b { color: var(--amber); font-weight: 700; }

.nav { display: none; gap: 28px; margin-left: 12px; }
.nav a { font-size: 16px; font-weight: 500; color: var(--soft); text-decoration: none; transition: color .2s; }
.nav a:hover { color: var(--ink); }

.status {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.status time { color: var(--soft); font-variant-numeric: tabular-nums; }
.status i {
  position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
}
.status i::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid var(--green); opacity: 0;
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 70%, 100% { transform: scale(1.25); opacity: 0; } }

.bar-call {
  display: none; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 8px;
  background: var(--amber); color: var(--on-amber);
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background-color .2s, opacity .25s, visibility .25s;
}
.bar-call:hover { background: var(--amber-hi); }

/* Първи екран */

.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: 60px;
  overflow: hidden;
}

/* Видеото зад първия екран. Докато зареди, се вижда първият му кадър. */
.hero-media {
  position: absolute; inset: 0; z-index: -3;
  background: var(--bg) url("../video/sofia-largo-540.jpg") center / cover no-repeat;
}
.hero-video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Тъмният слой върху видеото: по-плътен там, където е текстът. */
.hero-scrim {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(to bottom,
    rgba(13, 15, 18, .4) 0%, rgba(13, 15, 18, 0) 12%, rgba(13, 15, 18, .05) 28%,
    rgba(13, 15, 18, .6) 44%, rgba(13, 15, 18, .86) 56%, rgba(13, 15, 18, .97) 76%, var(--bg) 100%);
}

/* Сигналната лампа на репатрака: осем кехлибарени диода, двете половини светят една след друга. */
.lightbar {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px;
  height: 10px; margin: 6px var(--pad) 0;
}
.lightbar i {
  border-radius: 3px; background: var(--amber);
  box-shadow: 0 0 22px 2px rgba(255, 176, 0, .75);
  opacity: .22;
  animation: beacon 2.6s ease-in-out infinite;
}
.lightbar i:nth-child(n+5) { animation-delay: -1.3s; }

/* Светлината, която лампата хвърля върху екрана. */
.beacon { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.beacon i {
  position: absolute; top: -40vmax; width: 86vmax; height: 86vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 176, 0, .42), rgba(255, 176, 0, .13) 48%, transparent 74%);
  opacity: .22;
  animation: beacon 2.6s ease-in-out infinite;
}
.beacon i:first-child { left: -30vmax; }
.beacon i:last-child { right: -30vmax; animation-delay: -1.3s; }
@keyframes beacon { 0%, 100% { opacity: .18; } 50% { opacity: 1; } }

.hero-grid {
  flex: 1;
  display: flex; flex-direction: column;
  padding-top: 28px; padding-bottom: 28px;
}

.hero-main { margin-top: auto; }

h1, h2, .row-name, .plate-num, .step-n {
  font-family: var(--display);
  font-weight: 800;
  line-height: .92;
}

h1 { font-size: clamp(48px, 16.6vw, 168px); letter-spacing: -.005em; }

.lead {
  margin-top: 16px; max-width: 22em;
  font-size: 20px; line-height: 1.35; font-weight: 500;
}

/* Табелата с телефона: главният бутон на сайта. */
.plate {
  display: block; margin-top: 32px;
  padding: 14px 14px 12px;
  background: var(--amber); color: var(--on-amber);
  border-radius: 12px; text-decoration: none;
  transition: background-color .2s, transform .2s;
}
.plate:hover { background: var(--amber-hi); }
.plate:active { transform: scale(.985); }
.plate-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 700;
}
.plate-num {
  display: block; margin-top: 4px;
  font-size: clamp(46px, 15.7vw, 124px);
  font-weight: 900; line-height: .95; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hero-side { margin-top: 12px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 12px 18px;
  border-radius: 8px; border: 1px solid transparent;
  font: 600 17px/1.2 var(--text); font-feature-settings: "locl" 0;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn-ghost { background: rgba(13, 15, 18, .35); border-color: rgba(244, 241, 234, .34); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost[disabled] { opacity: .7; cursor: progress; }
.btn-light { background: var(--ink); color: var(--bg); }
.btn-light:hover { background: #fff; }

.loc-hint { margin-top: 8px; font-size: 15px; color: var(--soft); text-align: center; }
.loc-out { margin-top: 14px; padding: 16px; background: var(--bg-2); border-radius: 12px; }
.loc-out p { font-size: 16px; }
.loc-out .btn { margin: 12px 0; }
.loc-out .loc-small { font-size: 14px; color: var(--soft); }
.loc-out b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.loc-out.is-error { background: none; padding: 0; }
.loc-out.is-error p { color: var(--ink); }

.facts {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 15px; font-weight: 600;
}

/* Светлоотразителната лента от репатрака. */
.tape {
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 14px, var(--bg) 14px 28px);
}

/* Секции */

.sec { padding: 60px 0; }
h2 { font-size: clamp(44px, 12.5vw, 96px); margin-bottom: 28px; }

.rows li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.rows li:last-child { border-bottom: 1px solid var(--line); }
.row-name { font-size: clamp(34px, 9.4vw, 64px); line-height: 1; }

.veh { height: 38px; width: auto; color: var(--soft); }
.veh path, .veh rect, .veh circle {
  fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.veh circle { stroke: var(--amber); }

.services li { flex-direction: column; align-items: flex-start; gap: 6px; }
.row-text { font-size: 17px; color: var(--soft); }
.rows .sub { display: grid; gap: 6px; margin-top: 4px; }
.rows .sub li { display: block; padding: 0; border: 0; font-size: 18px; font-weight: 500; }

.steps { display: grid; gap: 0; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr; column-gap: 12px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.step-n { grid-row: span 2; font-size: 64px; color: var(--amber); line-height: .85; }
.steps h3 { font-size: 21px; font-weight: 700; line-height: 1.25; }
.steps p { margin-top: 4px; font-size: 17px; color: var(--soft); }

/* Цените: кехлибарена табела на цялата ширина. */
.sign { background: var(--amber); color: var(--on-amber); padding: 56px 0 60px; }
.sign h2 { font-size: clamp(84px, 31vw, 300px); font-weight: 900; line-height: .84; margin: 0; white-space: nowrap; }
.sign h2 span { display: block; font-size: clamp(30px, 8vw, 52px); font-weight: 800; line-height: 1; margin-bottom: 10px; }
.sign p { margin-top: 20px; max-width: 24em; font-size: 18px; font-weight: 600; }

/* Контакт */

.contact .plate { margin-top: 0; }
.info { margin-top: 28px; }
.info div { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.info div:last-child { border-bottom: 1px solid var(--line); }
.info dt { font-size: 16px; color: var(--soft); white-space: nowrap; }
.info dd { font-size: 17px; font-weight: 600; text-align: right; }

.foot { border-top: 1px solid var(--line); padding: 26px 0 104px; font-size: 14px; color: var(--soft); }
.foot-in { display: flex; flex-direction: column; gap: 8px; }
.coltcode-credit a { color: inherit; text-decoration: none; }
.coltcode-credit span { text-decoration: underline; text-underline-offset: 3px; }

/* Долната лента за обаждане на телефон: показва се, когато табелата не е на екрана. */
.callbar {
  position: fixed; z-index: 60;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  height: 60px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--amber); color: var(--on-amber);
  border-radius: 12px; text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  transition: transform .3s ease, opacity .3s ease, visibility .3s;
}
.callbar span { font-size: 17px; font-weight: 700; }
.callbar b { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }

.call-in-view .callbar { transform: translateY(160%); opacity: 0; visibility: hidden; }
.call-in-view .bar-call { opacity: 0; visibility: hidden; }

/* Таблет и компютър */

@media (min-width: 768px) {
  :root { --pad: 40px; }
  .hero-media { background-image: url("../video/sofia-largo-1280.jpg"); }
  .hero-scrim {
    background:
      linear-gradient(to bottom, rgba(13, 15, 18, .45) 0%, rgba(13, 15, 18, 0) 24%, rgba(13, 15, 18, .3) 62%, rgba(13, 15, 18, .94) 92%, var(--bg) 100%),
      linear-gradient(90deg, rgba(13, 15, 18, .78) 0%, rgba(13, 15, 18, .45) 45%, rgba(13, 15, 18, 0) 100%);
  }
  body { font-size: 19px; }
  .bar { height: 72px; }
  .hero { padding-top: 72px; }
  .status { font-size: 15px; }
  .brand { font-size: 19px; }
  .callbar { display: none; }
  .bar-call { display: flex; }
  .foot { padding-bottom: 28px; }
  .foot-in { flex-direction: row; justify-content: space-between; }

  .sec { padding: 112px 0; }
  h2 { margin-bottom: 40px; }
  .rows li { padding: 26px 0; }
  .veh { height: 64px; }
  .lead { font-size: 24px; }
  .plate { padding: 18px 24px 16px; }
  .plate-top { font-size: 18px; }
  .plate-num { font-size: clamp(88px, 12vw, 122px); }

  .services li { flex-direction: row; align-items: baseline; }
  .services .row-name { flex: 0 0 52%; }
  .row-text { flex: 1; font-size: 20px; }
  .rows .sub { flex: 1; margin-top: 0; }
  .rows .sub li { font-size: 21px; }

  .steps { grid-template-columns: repeat(3, 1fr); column-gap: 40px; }
  .steps li { display: block; padding: 24px 0 0; border-bottom: 0 !important; }
  .step-n { display: block; font-size: 96px; margin-bottom: 18px; }
  .steps h3 { font-size: 24px; }
  .steps p { font-size: 18px; margin-top: 8px; }

  .sign { padding: 88px 0 96px; }
  .sign p { font-size: 21px; margin-top: 28px; }

  .info dt, .info dd { font-size: 19px; }
}

@media (min-width: 1024px) {
  .nav { display: flex; }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
    grid-template-rows: 1fr auto;
    column-gap: 64px;
    padding-top: 56px; padding-bottom: 56px;
  }
  .hero-main { grid-column: 1 / -1; margin-top: 0; align-self: center; }
  .plate { grid-column: 1; align-self: end; margin-top: 40px; }
  .plate-num { font-size: clamp(72px, 8.2vw, 118px); }
  .hero-side { grid-column: 2; align-self: end; margin-top: 0; }

  .contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); column-gap: 64px; align-items: end; }
  .info { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .beacon i, .lightbar i { animation: none; opacity: .6; }
  .status i::after { animation: none; }
  * { transition-duration: .01ms !important; }
}
