/* Агросервис — стили сайта
   Цвета взяты из логотипа: зелёный и оранжевый трактор. */

:root {
  --field: #0d4a2a;        /* тёмно-зелёный, фон крупных блоков */
  --leaf: #12b560;         /* зелёный из логотипа */
  --tractor: #f2760a;      /* оранжевый трактор, главные кнопки */
  --tractor-deep: #d9650a;
  --ink: #17201a;          /* основной текст */
  --muted: #4a5a4f;        /* второстепенный текст */
  --mist: #eef3ee;         /* светлый фон секций */
  --line: #d3dcd3;
  --white: #ffffff;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --r-btn: 14px;
  --r-box: 20px;
  --bar-h: 76px;
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--tractor);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Типографика ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 { font-size: clamp(1.55rem, 6.4vw, 3.3rem); }
h2 { font-size: clamp(1.3rem, 4.6vw, 2.2rem); }
h3 { font-size: 1.05rem; line-height: 1.3; }

p { margin: 0; max-width: 62ch; }

.lead {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  color: var(--muted);
  margin-top: 18px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 26px;
  border-radius: var(--r-btn);
  border: 2px solid transparent;
  font: 700 1.05rem/1.2 var(--body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}

.btn:active { transform: translateY(1px); }

.btn-main { background: var(--tractor); color: var(--ink); }
.btn-main:hover { background: var(--tractor-deep); }

.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--white); }

.btn-green { background: var(--field); color: var(--white); }
.btn-green:hover { background: #09371f; }

.on-dark .btn-line { border-color: var(--white); color: var(--white); }
.on-dark .btn-line:hover { background: var(--white); color: var(--field); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Шапка ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.bar {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--field);
}

.brand img { width: 46px; height: 46px; border-radius: 50%; }

.menu { display: flex; gap: 4px; margin-left: auto; }

.menu a {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.menu a:hover { background: var(--mist); }
.menu a[aria-current="page"] { background: var(--field); color: var(--white); }

.top-call {
  font-weight: 700;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--r-btn);
  background: var(--mist);
  white-space: nowrap;
}

.top-call:hover { background: var(--line); }

/* ---------- Главный экран ---------- */

.hero { padding: clamp(32px, 7vw, 80px) 0 clamp(36px, 7vw, 72px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.hero-logo {
  width: min(220px, 52vw);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  animation: logo-in .9s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes logo-in {
  from { opacity: 0; transform: rotate(-14deg) scale(.88); }
  to   { opacity: 1; transform: none; }
}

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.25fr .75fr; gap: 56px; }
  .hero-logo { width: min(400px, 100%); justify-self: end; order: 2; }
}

/* ---------- Выбор техники ---------- */

.finder {
  background: var(--field);
  color: var(--white);
  padding: clamp(40px, 7vw, 72px) 0;
}

.finder h2 { max-width: 20ch; }

.finder p { color: #cfe3d6; margin-top: 12px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 8px 22px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.4);
  color: var(--white);
  font: 700 1.05rem/1 var(--body);
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}

.chip:hover {
  background: var(--leaf);
  border-color: var(--leaf);
  color: var(--ink);
}

.finder .actions { margin-top: 24px; }

/* ---------- Секции ---------- */

.section { padding: clamp(44px, 8vw, 88px) 0; }
.section-mist { background: var(--mist); }

.section-head { margin-bottom: clamp(24px, 4vw, 40px); }

/* Список групп запчастей: строки с линиями, как оглавление каталога */
/* Плитки ассортимента */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
  min-height: 150px;
  padding: 20px;
  border-radius: var(--r-box);
  background: var(--mist);
  color: var(--field);
}

.tile svg { width: 44px; height: 44px; flex: none; }

.tile h3 {
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}

.on-dark .tile {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--leaf);
}

.on-dark .tile h3 { color: var(--white); }

.assort { background: var(--field); color: var(--white); }
.assort .lead { color: #cfe3d6; }

@media (min-width: 760px) {
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .tile { min-height: 190px; padding: 24px; }
  .tile svg { width: 52px; height: 52px; }
  .tile h3 { font-size: 1.15rem; }
}

/* Преимущества: заголовок и короткое пояснение */
.benefits {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.benefits li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.benefits h3 { margin-bottom: 6px; }
.benefits p { color: var(--muted); }

@media (min-width: 860px) {
  .benefits { grid-template-columns: repeat(3, 1fr); column-gap: 48px; }
  .benefits li { border-bottom: 0; padding-bottom: 0; }
}

/* Шаги заказа: это настоящая последовательность, поэтому с номерами */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 16px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--r-box);
  border: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tractor);
  font: 700 1.2rem/1 var(--display);
}

.steps h3 { align-self: end; }
.steps p { color: var(--muted); font-size: 1rem; }

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.hint {
  margin-top: 20px;
  padding: 16px 20px;
  border-left: 5px solid var(--leaf);
  background: var(--white);
  border-radius: 0 12px 12px 0;
  max-width: 62ch;
}

/* ---------- Контакты ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
}

.facts { margin: 0; }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { border-top: 2px solid var(--ink); }
.facts dt { font-size: .95rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 1.2rem; font-weight: 600; }
.facts a { text-decoration: none; }
.facts a:hover { text-decoration: underline; }

.phone-big {
  font-family: var(--display);
  font-size: clamp(1.25rem, 5vw, 1.9rem);
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 600;
}

.status::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
}

.status[data-open="yes"]::before { background: var(--leaf); }
.status[data-open="no"]::before { background: var(--tractor); }

.map {
  width: 100%;
  height: clamp(300px, 55vw, 440px);
  border: 0;
  border-radius: var(--r-box);
  background: var(--mist);
}

/* ---------- Каталоги ---------- */

.page-title { padding: clamp(32px, 6vw, 64px) 0 clamp(20px, 3vw, 32px); }

.search { margin-top: 24px; max-width: 520px; }

.search label { display: block; font-weight: 600; margin-bottom: 6px; }

.search input {
  width: 100%;
  min-height: 56px;
  padding: 10px 18px;
  font: 500 1.1rem var(--body);
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--r-btn);
}

.search input::placeholder { color: #6f7f74; }

.group { margin-top: clamp(28px, 5vw, 48px); }
.group h2 { margin-bottom: 12px; }

.catalog-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }

.catalog-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
}

.catalog-row:target { background: #fff3e6; box-shadow: inset 5px 0 0 var(--tractor); }

.catalog-row h3 { font-size: 1.15rem; }
.catalog-row span { display: block; color: var(--muted); font-size: .98rem; margin-top: 2px; }

.catalog-row .btn { min-height: 50px; padding: 10px 22px; }

[hidden] { display: none !important; }

.empty {
  margin-top: 28px;
  padding: 24px;
  background: var(--mist);
  border-radius: var(--r-box);
}

.empty p { font-weight: 600; }

/* ---------- Подвал ---------- */

.foot {
  background: var(--ink);
  color: #d9e2db;
  padding: 44px 0 40px;
  margin-top: 0;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 760px) {
  .foot-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; }
}

.foot .brand { color: var(--white); margin-bottom: 12px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot h3 { color: var(--white); font-size: .95rem; margin-bottom: 10px; }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li { padding: 3px 0; }

/* ---------- Нижняя панель связи на телефоне ---------- */

.dock { display: none; }

@media (max-width: 759px) {
  body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

  .menu {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .menu::-webkit-scrollbar { display: none; }
  .menu a { white-space: nowrap; flex: 1; text-align: center; padding: 10px 6px; font-size: .95rem; }
  .top-call { display: none; }

  .dock {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--line);
  }

  .dock a {
    display: grid;
    place-items: center;
    min-height: 54px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .98rem;
    text-decoration: none;
    background: var(--mist);
    color: var(--ink);
  }

  .dock a.dock-main { background: var(--tractor); }

  .actions .btn { width: 100%; }
  .catalog-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-logo { animation: none; }
  .btn, .chip { transition: none; }
}
