:root {
  color-scheme: dark;
  --bg: #07080a;
  --surface: #101216;
  --surface-2: #171a20;
  --text: #f4f5f7;
  --muted: #9aa1aa;
  --accent: #b11226;
  --accent-hover: #d01932;
  --line: rgba(255, 255, 255, 0.10);
  --button-text: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  padding: 14px 12px 14px;
  background: #050506;
  border-bottom: 1px solid var(--line);
}

.brand-block {
  display: grid;
  gap: 3px;
  text-align: center;
}

.brand-title,
.brand-subtitle,
.brand-line,
.brand-address,
.bottom-title,
.bottom-text,
.site-footer p {
  margin: 0;
}

.brand-logo {
  display: block;
  width: min(44vw, 179px);
  height: auto;
  margin: 0 auto 4px;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-subtitle {
  font-size: 17px;
  font-weight: 700;
}

.brand-line {
  color: var(--muted);
  font-size: clamp(11px, 3.35vw, 14px);
  font-weight: 600;
  white-space: nowrap;
}

.brand-address {
  max-width: 420px;
  margin: 7px auto 0;
  color: #d7dbe0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.28;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 620px;
  margin: 14px auto 0;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.contact-button:first-child {
  border-color: rgba(209, 25, 50, 0.72);
  background: var(--accent);
  color: var(--button-text);
}

.contact-button:first-child:hover,
.contact-button:first-child:active {
  background: var(--accent-hover);
}

.contact-button:active,
.contact-button:hover {
  transform: translateY(1px);
}

.car-strip {
  position: relative;
  height: 128px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 8, 10, 0.72), rgba(177, 18, 38, 0.22), rgba(7, 8, 10, 0.78)),
    linear-gradient(135deg, #090a0d 0%, #151820 48%, #0b0c0f 100%);
}

.car-strip::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: url("../img/car-strip.jpg");
  background-position: center;
  background-size: cover;
  opacity: 0.58;
}

.car-strip::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(7, 8, 10, 0.28), rgba(7, 8, 10, 0.72)),
    radial-gradient(circle at 72% 48%, rgba(177, 18, 38, 0.28), transparent 34%);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
}

.video-grid.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 28px 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  background: var(--bg);
}

.video-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #050505;
  cursor: pointer;
}

.video-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-badges {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 1;
  display: grid;
  gap: 3px;
  max-width: calc(100% - 8px);
  pointer-events: none;
}

.price-badge {
  display: grid;
  width: max-content;
  max-width: 100%;
  min-width: 44px;
  padding: 3px 5px 4px;
  clip-path: polygon(7% 0, 100% 0, 94% 50%, 100% 100%, 7% 100%, 0 50%);
  background:
    linear-gradient(135deg, #f23d3d 0%, #c31025 62%, #8e0718 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.36);
  text-align: center;
  text-transform: uppercase;
}

.price-badge__label {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 6px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-badge__price {
  margin-top: 1px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.price-badge__prefix,
.price-badge__suffix {
  display: inline-block;
  font-size: 0.72em;
  line-height: 1;
  text-transform: none;
  transform: translateY(-0.03em);
}

.price-badge__prefix {
  margin-right: 2px;
}

.price-badge__suffix {
  margin-left: 1px;
}

.video-card:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: -3px;
}

.bottom-contact {
  padding: 28px 12px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.bottom-title {
  font-size: 20px;
  font-weight: 800;
}

.bottom-text {
  max-width: 460px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.site-footer {
  display: grid;
  gap: 6px;
  padding: 18px 12px 24px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.site-footer p:first-child {
  color: var(--text);
  font-weight: 800;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.video-modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.86);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100svh - 28px);
  aspect-ratio: 9 / 16;
  background: #000;
}

.modal-panel video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font: 36px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.modal-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

body.modal-open {
  overflow: hidden;
}

@media (min-width: 700px) {
  .site-header {
    padding: 18px 20px 18px;
  }

  .car-strip {
    height: 190px;
  }

  .brand-title {
    font-size: 24px;
  }

  .brand-logo {
    width: min(31vw, 241px);
  }

  .brand-subtitle {
    font-size: 19px;
  }

  .brand-address {
    max-width: 640px;
    font-size: 14px;
  }

  .video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  .price-badges {
    top: 6px;
    left: 6px;
    gap: 4px;
  }

  .price-badge {
    min-width: 54px;
    padding: 4px 6px 5px;
  }

  .price-badge__label {
    font-size: 7px;
  }

  .price-badge__price {
    font-size: 11px;
  }
}

@media (min-width: 1100px) {
  .video-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .site-header,
  .bottom-contact,
  .site-footer {
    max-width: 1440px;
    margin-inline: auto;
  }
}
