/* iДжобс — стили. Apple-стиль, тёмная/светлая тема. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-card: #ffffff;
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --border: #e3e3e6;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --shadow: 0 4px 24px rgba(0,0,0,.06);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 60px;
  --maxw: 1120px;
}
[data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #0a0a0c;
  --bg-card: #1c1c1e;
  --text: #f5f5f7;
  --text-soft: #a1a1a6;
  --border: #2c2c2e;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --shadow: 0 4px 30px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--text-soft); }

/* ── Кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 980px;
  padding: 12px 24px; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background .2s, transform .1s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-soft); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 15px 32px; font-size: 17px; }

/* ── Шапка ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; height: var(--header-h); gap: 20px; }
.logo-img { height: 26px; width: auto; }
.main-nav { display: flex; gap: 26px; margin-left: 12px; flex: 1; }
.main-nav a { font-size: 14px; color: var(--text-soft); transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  background: transparent; border: none; cursor: pointer; font-size: 18px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
}
.theme-toggle:hover { background: var(--bg-soft); }
[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: none; }
.nav-burger { display: none; background: transparent; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

/* ── Hero ── */
.site-main { min-height: 60vh; }
.hero { padding: 90px 0 60px; text-align: center; background: radial-gradient(circle at 50% 0%, var(--bg-soft), var(--bg) 70%); }
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-badge {
  display: inline-block; padding: 6px 14px; border-radius: 980px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 13px; color: var(--accent); margin-bottom: 22px; font-weight: 500;
}
.hero-title { font-size: clamp(32px, 6vw, 56px); font-weight: 700; }
.hero-subtitle { font-size: clamp(17px, 2.4vw, 22px); color: var(--text-soft); margin: 16px 0 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-features {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; color: var(--text-soft); font-size: 15px;
}

/* ── Бегущая лента брендов ── */
.brands { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-soft); padding: 18px 0; }
.brands-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.brands:hover .brands-track { animation-play-state: paused; }
.brand-item { font-size: 18px; font-weight: 600; color: var(--text-soft); white-space: nowrap; letter-spacing: -.01em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Секции ── */
.section { padding: 70px 0; }
.section-title { font-size: clamp(26px, 4vw, 40px); font-weight: 700; text-align: center; }
.section-lead { text-align: center; color: var(--text-soft); font-size: 18px; max-width: 640px; margin: 0 auto 40px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 36px; }
.cat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 18px; text-align: center; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.cat-icon { font-size: 34px; display: block; margin-bottom: 12px; }
.cat-name { font-weight: 600; font-size: 16px; }

.section-cta { padding: 40px 0 80px; }
.cta-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-box h2 { font-size: 26px; }
.cta-box p { color: var(--text-soft); margin: 0; }

/* ── Заголовок страницы ── */
.page-head { padding: 56px 0 10px; text-align: center; }
.page-head h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 700; }

/* ── Прайс ── */
.price-search { max-width: 460px; margin: 20px auto 0; }
.price-search input {
  width: 100%; padding: 14px 18px; border-radius: 980px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-size: 16px;
}
.tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.tab {
  padding: 9px 18px; border-radius: 980px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-soft); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: all .2s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.price-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; }
.price-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.price-photo { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.price-info { flex: 1; }
.price-name { font-weight: 600; }
.price-desc { color: var(--text-soft); font-size: 14px; margin-top: 3px; }
.price-value { font-weight: 700; font-size: 18px; white-space: nowrap; }

/* ── Форма ── */
.form-wrap { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field span { font-size: 14px; color: var(--text-soft); }
.field input, .field select, .field textarea {
  padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-size: 16px; font-family: inherit; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field-file input { padding: 10px; }
.consent { display: flex; align-items: center; gap: 10px; margin: 22px 0; font-size: 14px; color: var(--text-soft); }
.consent input { width: 18px; height: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.alert-ok { background: color-mix(in srgb, #30d158 15%, var(--bg-card)); border: 1px solid #30d158; }
.alert-err { background: color-mix(in srgb, #ff453a 12%, var(--bg-card)); border: 1px solid #ff453a; }
.alert h2 { margin-top: 0; }

/* ── Контакты ── */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 30px; }
.contact-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.contact-card h3 { font-size: 20px; }
.contact-addr { color: var(--text-soft); }
.contact-hours { margin-top: 12px; color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.general-contacts { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 10px 0 34px; }
.map-block { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-block iframe { width: 100%; min-height: 400px; border: 0; display: block; }
.map-placeholder { padding: 70px 20px; text-align: center; background: var(--bg-soft); }

/* ── 404 ── */
.error-page { padding: 100px 0; }
.error-code { font-size: 90px; font-weight: 800; color: var(--accent); letter-spacing: -.04em; }

/* ── Подвал ── */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 50px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 30px; }
.footer-logo { height: 24px; margin-bottom: 14px; }
.footer-note { color: var(--text-soft); font-size: 14px; max-width: 320px; }
.footer-col h4 { font-size: 15px; margin-bottom: 14px; }
.footer-col a, .footer-addr { display: block; color: var(--text-soft); font-size: 14px; margin-bottom: 9px; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); margin-top: 34px; padding-top: 20px; color: var(--text-soft); font-size: 13px; }
.footer-admin { color: var(--text-soft); }
.footer-admin:hover { color: var(--text); }

/* ── Плавающие кнопки ── */
.float-actions { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 12px; }
.fab {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .2s;
}
.fab:hover { transform: scale(1.08); }
.fab-wa { background: #25d366; }
.fab-call { background: var(--accent); }
.to-top {
  position: fixed; left: 20px; bottom: 20px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-size: 20px; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ── Анимации появления ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .brands-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Адаптив ── */
@media (max-width: 820px) {
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 16px 24px; gap: 16px; transform: translateY(-140%); transition: transform .3s; margin: 0;
  }
  .main-nav.open { transform: translateY(0); }
  .nav-burger { display: block; }
  .header-actions .btn-primary { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-box { flex-direction: column; text-align: center; }
}
