/* home_concepts shared base: токены бренда azamat.ai + шрифты + общие блоки.
   Копируется в <variant>/assets/base.css скриптом sync.sh — правь здесь. */

@font-face {
  font-family: 'Switzer';
  src: url('fonts/switzer-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('fonts/switzer-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('fonts/switzer-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-400-500-latin.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2190-21BB;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-400-500-cyrillic.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: oklch(0.905 0.011 230);
  --surface: oklch(0.952 0.008 230);
  --ink: oklch(0.18 0.045 238);
  --muted: oklch(0.46 0.032 238);
  --hairline: color-mix(in oklab, var(--ink) 17%, transparent);
  --hairline-strong: color-mix(in oklab, var(--ink) 32%, transparent);
  --accent: oklch(0.55 0.14 35);
  --accent-warm: oklch(0.46 0.13 35);
  --accent-weak: color-mix(in oklab, var(--accent) 11%, transparent);
  --sans: 'Switzer', ui-sans-serif, system-ui, sans-serif;
  --display: 'Switzer', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 4vw, 56px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.16 0.024 242);
    --surface: oklch(0.205 0.026 242);
    --ink: oklch(0.87 0.012 230);
    --muted: oklch(0.66 0.02 235);
    --accent: oklch(0.61 0.115 35);
    --accent-warm: oklch(0.69 0.082 42);
    --accent-weak: color-mix(in oklab, var(--accent) 12%, transparent);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, .display { font-family: var(--display); }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  background: var(--ink);
  color: var(--bg);
  font: 600 16px var(--sans);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }

/* Бегущая лента логотипов: дорожка дублируется в разметке дважды. */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  width: max-content;
  padding-right: clamp(40px, 6vw, 88px);
  animation: marquee 36s linear infinite;
}
.marquee img {
  height: 30px;
  width: auto;
  opacity: 0.62;
  filter: grayscale(1);
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.marquee img.ink { filter: brightness(0); opacity: 0.55; }
@media (prefers-color-scheme: dark) {
  .marquee img.ink { filter: brightness(0) invert(1); opacity: 0.6; }
}
/* Кликабельные логотипы: серые в покое, оригинальные цвета при наведении */
.marquee a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.25s ease;
}
.marquee a:hover { background: #fff; }
.marquee a:hover img { filter: none !important; opacity: 1; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Веер скриншотов (карточка «Все кейсы») */
.nc-fan { position: relative; width: 128px; height: 96px; flex: none; }
.nc-fan img {
  position: absolute;
  top: 4px;
  width: 62px;
  height: 84px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 0 6px 18px rgba(14, 16, 19, 0.14);
  transition: transform 0.3s ease;
}
.nc-fan img:nth-child(1) { left: 0; transform: rotate(-8deg); }
.nc-fan img:nth-child(2) { left: 33px; transform: rotate(0deg); z-index: 1; }
.nc-fan img:nth-child(3) { left: 66px; transform: rotate(8deg); }

/* «Все кейсы» — карточка в конце секции кейсов */
.case-all {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 18px 30px 18px 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  text-decoration: none;
  text-align: left;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.case-all:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 44px rgba(14, 16, 19, 0.13);
}
.case-all:hover .nc-fan img:nth-child(1) { transform: rotate(-12deg) translateX(-4px); }
.case-all:hover .nc-fan img:nth-child(3) { transform: rotate(12deg) translateX(4px); }
.case-all b { display: block; font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--ink); }
.case-all small { color: var(--muted); font-size: 13.5px; }
.case-all .arr { color: var(--accent-warm); font-size: 20px; transition: translate 0.25s ease; }
.case-all:hover .arr { translate: 4px 0; }
.cases-more { text-align: center; }

/* «Все услуги» — ссылка под сеткой демо */
.svc-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
  padding: 12px 22px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 24px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.svc-all:hover { color: var(--accent-warm); border-color: var(--accent-warm); }

/* Секция «Команда»: аватары-жетоны line-art */
.team { text-align: center; border-top: 1px solid var(--hairline); }
.team .team-sub { color: var(--muted); font-size: 15px; max-width: 52ch; margin: 14px auto 44px; }
.team-avatars {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 10px; max-width: 720px; margin: 0 auto 40px;
}
.team-avatars .avatar {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.team-avatars .avatar:hover { transform: translateY(-3px); border-color: var(--accent); }
.team-avatars .avatar.founder {
  width: 68px; height: 68px;
  border: 1.5px solid var(--accent);
  color: var(--accent-warm);
  font-size: 15px;
}
.team-roles {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 18px; margin: 0 auto 40px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}

/* Секция «Статьи»: карточки с обложками */
.articles { text-align: center; border-top: 1px solid var(--hairline); }
.articles-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  max-width: 1100px; margin: 52px auto 44px;
}
@media (max-width: 860px) { .articles-grid { grid-template-columns: 1fr; max-width: 480px; } }
.article-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px 14px 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  text-decoration: none; text-align: left;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 44px rgba(14, 16, 19, 0.13);
}
.article-card img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--hairline);
}
.article-card b {
  font-family: var(--display); font-size: 16.5px; font-weight: 600;
  line-height: 1.25; color: var(--ink); padding: 0 6px;
}
.article-card .meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }

/* Центрированная ссылка-хвост секции */
.sec-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--hairline-strong); border-radius: 24px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.sec-link:hover { color: var(--accent-warm); border-color: var(--accent-warm); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
