/* =========================================================
   ColorHub — компоненты лендинга
   ========================================================= */

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 24px;
}
.nav__logo { height: 34px; width: auto; }
.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color .25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav__phone {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.nav__phone small { display: block; font-family: var(--font-body); font-size: 11px; color: var(--faint); font-weight: 500; letter-spacing: .04em; }
.nav__burger { display: none; }

@media (max-width: 900px) {
  .nav__links, .nav__phone { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 130px;
  padding-bottom: 0;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg-spray {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(700px 520px at 78% 12%, rgba(28,160,227,.16), transparent 60%),
    radial-gradient(620px 520px at 92% 78%, rgba(230,74,46,.12), transparent 60%),
    radial-gradient(560px 480px at 8% 90%, rgba(43,168,74,.10), transparent 60%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  min-height: min(86vh, 820px);
}
.hero__copy { padding-bottom: clamp(48px, 7vw, 96px); }
.hero__title {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.04;
  margin-top: 26px;
}
.hero__title .flow {
  background: linear-gradient(90deg, var(--c-red), var(--c-orange), var(--c-green), var(--c-cyan), var(--c-indigo), var(--c-magenta));
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: spectrumSlide 8s linear infinite;
}
.hero__lead {
  max-width: 520px;
  margin-top: 26px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.chip svg { width: 16px; height: 16px; color: var(--c-green); flex-shrink: 0; }

/* Hero photo */
/* Hero person — full-bleed cutout, no frame, dissolves into the page */
.hero__media {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 540px;
}
.hero__person {
  position: relative;
  width: auto;
  height: 100%;
  max-height: min(88vh, 880px);
  max-width: 130%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  filter: drop-shadow(0 30px 50px rgba(20,30,60,.18));
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
  will-change: transform;
}

/* floating swatch card over photo */
.swatch-card {
  position: absolute;
  left: -38px;
  bottom: 96px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 3;
}
.swatch-card .sw-dots { display: flex; gap: 6px; }
.swatch-card .sw-dots i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.swatch-card .sw-meta strong { font-family: var(--font-mono); font-size: 13px; display: block; }
.swatch-card .sw-meta span { font-size: 12px; color: var(--muted); }

.stat-card {
  position: absolute;
  right: -28px;
  top: 64px;
  background: var(--bg-ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-lg);
  z-index: 3;
}
.stat-card b { font-family: var(--font-display); font-size: 34px; line-height: 1; display: block; }
.stat-card span { font-size: 12px; color: rgba(255,255,255,.6); letter-spacing: .03em; white-space: nowrap; }

/* Marquee */
.marquee {
  margin-top: 0;
  border-block: 1px solid var(--line);
  background: #fff;
  padding: 18px 0;
  overflow: hidden;
  position: relative;
}
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2;
}
.marquee::before { left: 0; background: linear-gradient(90deg, #fff, transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, #fff, transparent); }
.marquee__track { display: flex; gap: 0; width: max-content; animation: marquee 34s linear infinite; }
.marquee__track span {
  display: inline-flex; align-items: center; gap: 22px;
  padding-inline: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  color: var(--ink);
  white-space: nowrap;
}
.marquee__track .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Catalog cards ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 48px;
}
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s;
  min-height: 248px;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--c, var(--primary));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s var(--ease-out);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.cat-card:hover::before { transform: scaleY(1); }
.cat-card__index { font-family: var(--font-mono); font-size: 12px; color: var(--faint); letter-spacing: .1em; }
.cat-card__dots { display: flex; gap: 5px; margin: 14px 0 22px; }
.cat-card__dots i { width: 13px; height: 13px; border-radius: 50%; display: block; transition: transform .3s var(--ease-out); }
.cat-card:hover .cat-card__dots i { transform: translateY(-3px); }
.cat-card__title { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin-bottom: 10px; }
.cat-card__text { font-size: 14.5px; color: var(--muted); flex: 1; }
.cat-card__link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px;
  font-weight: 700; font-size: 14.5px;
  color: var(--c, var(--primary));
}
.cat-card__link .arr { transition: transform .3s var(--ease-out); }
.cat-card:hover .cat-card__link .arr { transform: translateX(5px); }

/* ---------- Features ---------- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.feature {
  display: flex;
  gap: 18px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.feature__icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, var(--primary)) 14%, #fff);
  color: var(--c, var(--primary));
}
.feature__icon svg { width: 22px; height: 22px; }
.feature__title { font-family: var(--font-display); font-weight: 800; font-size: 17px; margin-bottom: 5px; letter-spacing: -.01em; }
.feature__text { font-size: 14px; color: var(--muted); }

/* ---------- CTA (paint match) ---------- */
.cta {
  position: relative;
  background: var(--bg-ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
}
.cta__spectrum {
  position: absolute; inset: 0; z-index: -1; opacity: .9;
  background:
    radial-gradient(540px 380px at 100% 0%, rgba(28,160,227,.32), transparent 62%),
    radial-gradient(520px 420px at 0% 100%, rgba(230,74,46,.26), transparent 60%),
    radial-gradient(480px 380px at 60% 120%, rgba(91,62,150,.30), transparent 60%);
}
.cta__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.cta h2 { color: #fff; font-size: clamp(28px, 4vw, 46px); }
.cta__lead { margin-top: 18px; color: rgba(255,255,255,.72); max-width: 540px; font-size: 16px; }
.cta__actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cta__actions .btn { width: 100%; justify-content: center; }
.cta__codes { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.code-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
}

/* ---------- Contacts ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-card__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin-bottom: 16px; }
.contact-card__value { display: block; font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 12px; transition: color .2s; }
a.contact-card__value:hover { color: var(--primary); }
.contact-card__note { font-size: 12.5px; color: var(--faint); margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-ink);
  color: rgba(255,255,255,.7);
  padding-block: 56px 36px;
}
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; align-items: flex-start; }
.footer-logo { height: 34px; }
.footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer__col h4 { font-family: var(--font-display); font-size: 13px; color: #fff; margin-bottom: 14px; letter-spacing: .02em; }
.footer__col a, .footer__col p { display: block; font-size: 14px; color: rgba(255,255,255,.62); margin-bottom: 9px; transition: color .2s; }
.footer__col a:hover { color: #fff; }
/* Документы компании (PDF-кнопки) */
.footer-docs {
  margin-top: 40px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer-docs h4 { font-family: var(--font-display); font-size: 13px; color: #fff; margin-bottom: 16px; letter-spacing: .02em; }
.footer-docs__row { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-doc {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600;
  transition: background .2s, border-color .2s, transform .2s;
}
.footer-doc:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); transform: translateY(-2px); color: #fff; }
.footer-doc__ic { width: 26px; height: 26px; flex: none; color: var(--primary, #5b8cff); }
.footer-doc__ic svg { width: 100%; height: 100%; }
.footer-doc span { display: flex; flex-direction: column; line-height: 1.3; }
.footer-doc small { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.45); letter-spacing: .06em; }

.footer-disclaimer {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12.5px; line-height: 1.65; color: rgba(255,255,255,.38);
  max-width: 960px;
}
.footer-disclaimer p { margin: 0 0 10px; }
.footer-disclaimer p:last-child { margin-bottom: 0; }

.footer-bottom {
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: rgba(255,255,255,.45);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 0; }
  .hero__media { max-width: 460px; margin: 0 auto; width: 100%; }
  .cta__inner { grid-template-columns: 1fr; }
  .stat-card { right: 8px; }
  .swatch-card { left: 8px; }
}
@media (max-width: 560px) {
  .swatch-card, .stat-card { display: none; }
  .hero { padding-top: 104px; }
}

/* ---------- Тщательный мобильный проход ---------- */
@media (max-width: 768px) {
  .nav { height: 64px; gap: 14px; }
  .nav__logo { height: 30px; }
  .hero { padding-top: 92px; }
  .hero__grid { min-height: auto; }
  .hero__copy { padding-bottom: 20px; }
  .hero__media { min-height: auto; max-width: 380px; }
  .hero__person { height: auto; width: 100%; max-width: 100%; max-height: 56vh; margin: 0 auto; }
  .hero__title { margin-top: 18px; }
  .footer-top { gap: 28px; }
  .footer__cols { gap: 36px; }
}
@media (max-width: 560px) {
  /* CTA «Оставить заявку» дублируется в выезжающем меню — в шапке прячем, чтобы не теснить бургер */
  .nav__actions .btn { display: none; }
  .hero { padding-top: 84px; }
  .hero__person { max-height: 46vh; }
  .cat-grid, .feat-grid { grid-template-columns: 1fr; gap: 14px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .footer__cols { gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; align-items: flex-start; }
}

/* ---------- Мобильный Hero — кнопки и плашки ---------- */
@media (max-width: 640px) {
  /* Кнопки в одну строку, одинаковой ширины */
  .hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
  }
  .hero__actions .btn {
    justify-content: center;
    font-size: 14px;
    padding: 12px 14px;
  }
  .hero__actions .btn .arr { display: none; }

  /* Убираем отступ под блоком текста — плашки и фото вплотную */
  .hero__copy { padding-bottom: 0; }

  /* Плашки — компактная сетка 2×2 */
  .hero__chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
  }
  .hero__chips .chip {
    font-size: 12px;
    padding: 8px 12px;
    gap: 6px;
    justify-content: flex-start;
  }
  .hero__chips .chip svg { width: 14px; height: 14px; }

  /* Фото сразу под плашками, без зазора */
  .hero__media { margin-top: -4px; }
  .hero__person { max-height: 52vh; }

  /* Анимации кнопок hero на мобильном */
  .hero__actions .btn--primary {
    animation: hero-pulse 2.8s ease-in-out infinite;
  }
  .hero__actions .btn--ghost {
    animation: hero-shimmer 3.5s ease-in-out infinite;
    animation-delay: 1.4s;
  }
}

/* Анимация pulse на десктопе тоже */
.hero__actions .btn--primary {
  animation: hero-pulse 2.8s ease-in-out infinite;
}
.hero__actions .btn--ghost {
  animation: hero-shimmer 3.5s ease-in-out infinite;
  animation-delay: 1.4s;
}

@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(28,117,188,.35); }
  50%       { box-shadow: 0 0 0 9px rgba(28,117,188,.0); }
}
@keyframes hero-shimmer {
  0%, 85%, 100% { opacity: 1; }
  92%            { opacity: .65; }
}
