/* ============================================================
   deynekin.ru — 2026
   Дизайн-система: токены, типографика, компоненты.
   Светлая тема — по умолчанию; тёмная включается data-theme="dark".
   ============================================================ */

/* ---------- Шрифты (самохост, вариативные) ---------- */

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Токены ---------- */

:root {
  color-scheme: light;

  --bg: oklch(0.967 0.006 85);
  --surface: oklch(0.988 0.004 85);
  --surface-2: oklch(0.945 0.006 85);
  --ink: oklch(0.205 0.012 265);
  --muted: oklch(0.505 0.012 265);
  --line: oklch(0.205 0.012 265 / 0.14);
  --line-strong: oklch(0.205 0.012 265 / 0.28);
  --accent: oklch(0.52 0.23 265);
  --accent-soft: oklch(0.52 0.23 265 / 0.10);
  --signal: oklch(0.90 0.19 120);
  --on-signal: oklch(0.24 0.03 120);
  --on-accent: oklch(0.99 0 0);
  --shadow-sm: 0 1px 2px oklch(0.20 0.02 265 / 0.06);
  --shadow-md: 0 2px 6px oklch(0.20 0.02 265 / 0.06), 0 18px 44px oklch(0.20 0.02 265 / 0.10);

  --pad: clamp(16px, 4vw, 40px);
  --container: 1240px;

  --r-xs: 8px;
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;

  --font-display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;

  --fs-0: 12px;
  --fs-1: 15px;
  --fs-2: clamp(16px, 1.15vw, 18px);
  --fs-3: clamp(20px, 2vw, 27px);
  --fs-4: clamp(27px, 3.4vw, 42px);
  --fs-5: clamp(36px, 5.4vw, 68px);
  --fs-6: clamp(42px, 8vw, 104px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-mid: 320ms;
  --t-slow: 560ms;

  --section-gap: clamp(72px, 9vw, 140px);
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --bg: oklch(0.165 0.008 265);
  --surface: oklch(0.205 0.010 265);
  --surface-2: oklch(0.245 0.012 265);
  --ink: oklch(0.955 0.004 90);
  --muted: oklch(0.720 0.010 265);
  --line: oklch(0.955 0.004 90 / 0.16);
  --line-strong: oklch(0.955 0.004 90 / 0.30);
  --accent: oklch(0.76 0.13 265);
  --accent-soft: oklch(0.76 0.13 265 / 0.16);
  --signal: oklch(0.90 0.19 120);
  --on-signal: oklch(0.22 0.03 120);
  --on-accent: oklch(0.16 0.02 265);
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-md: 0 2px 8px oklch(0 0 0 / 0.35), 0 24px 60px oklch(0 0 0 / 0.45);
}

/* ---------- Сброс и база ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-2);
  line-height: 1.62;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Фон: сетка + мягкое свечение + зерно */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image:
    radial-gradient(60rem 40rem at 78% -10%, var(--accent-soft), transparent 70%),
    radial-gradient(40rem 30rem at -10% 30%, color-mix(in oklab, var(--signal) 12%, transparent), transparent 70%);
}
body::after {
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,
svg { display: block; max-width: 100%; }

img { height: auto; }

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

button,
input { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection {
  background: var(--signal);
  color: var(--on-signal);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Утилиты ---------- */

.container {
  width: min(var(--container), 100% - var(--pad) * 2);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-s);
  background: var(--ink);
  color: var(--bg);
  font-size: var(--fs-1);
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus-visible { top: 16px; }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-0);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section {
  padding-block: var(--section-gap) clamp(16px, 3vw, 40px);
  position: relative;
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: 0; }

/* Заголовок секции: номер + название + лид */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head__top {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.section-head__num {
  font-family: var(--font-mono);
  font-size: var(--fs-0);
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section-head h2 {
  font-size: var(--fs-4);
}
.section-head__lead {
  color: var(--muted);
  max-width: 62ch;
  font-size: var(--fs-2);
}
.section-head__aside {
  justify-self: start;
}
@media (min-width: 860px) {
  .section-head {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas:
      "title lead"
      "aside .";
    align-items: end;
    column-gap: clamp(24px, 4vw, 64px);
    row-gap: 20px;
  }
  .section-head > :first-child { grid-area: title; }
  .section-head__lead { grid-area: lead; }
  .section-head__aside { grid-area: aside; justify-self: start; }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}
.site-header.is-scrolled .header-inner { min-height: 60px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}
.brand__logo {
  height: 14px;
  width: auto;
  display: block;
  flex: none;
}


.nav {
  display: none;
  gap: 4px;
  margin-left: clamp(20px, 3vw, 36px);
  margin-right: auto;
}
.nav a {
  padding: 9px 13px;
  border-radius: 999px;
  font-size: var(--fs-1);
  color: var(--muted);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 900px) {
  .nav { display: flex; }
}

@media (max-width: 899px) {
  .header-actions { margin-left: auto; }
}

/* Кнопки */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-1);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
}
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn .icon { width: 18px; height: 18px; flex: none; }

/* Переключатель темы */
.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--line-strong); }
.theme-toggle .icon { width: 19px; height: 19px; }
.theme-toggle .i-auto,
.theme-toggle .i-light,
.theme-toggle .i-dark { display: none; }
html[data-theme-mode='auto'] .theme-toggle .i-auto,
html[data-theme-mode='light'] .theme-toggle .i-light,
html[data-theme-mode='dark'] .theme-toggle .i-dark { display: block; }

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 104px);
  position: relative;
}
.hero__bottom {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: end;
}
.hero__bottom > * { min-width: 0; }
.hero__main { min-width: 0; }
@media (min-width: 980px) {
  .hero__bottom { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  font-family: var(--font-mono);
  font-size: var(--fs-0);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--signal) 28%, transparent);
}

.hero h1 {
  margin-top: clamp(22px, 3vw, 34px);
  font-size: clamp(26px, 7.2vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.hero h1 .line { display: block; }
.hero h1 .quiet { color: var(--muted); }
.hero h1 mark {
  background: none;
  isolation: isolate;
  color: inherit;
  position: relative;
  white-space: nowrap;
}
.hero h1 mark::after {
  content: '';
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  bottom: -0.05em;
  height: 0.16em;
  background: var(--signal);
  z-index: -1;
  transform: skewX(-8deg);
}

.hero__lead {
  margin-top: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 19px);
}
.hero__lead strong { color: var(--ink); font-weight: 500; }

.hero__cta {
  margin-top: clamp(28px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__stats {
  margin-top: clamp(30px, 4vw, 42px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.hero__stat {
  background: var(--bg);
  padding: 18px 16px;
}
.hero__stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero__stat span {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (min-width: 620px) {
  .hero__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero__stat { background: transparent; }
  .hero__stats { background: transparent; gap: 0; }
  .hero__stat + .hero__stat { border-left: 1px solid var(--line); }
}

/* Карточка «терминал» */
.hero__card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: rotate(0.5deg);
}
.hero__card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface-2) 60%, transparent);
}
.hero__card-head .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.hero__card-head .title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero__card-body {
  padding: 20px 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink);
}
.hero__card-body .cmt { color: var(--muted); }
.hero__card-body .prompt { color: var(--accent); }
.hero__card-body .out { color: var(--ink); }
.hero__card-body .key { color: var(--signal); background: var(--on-signal); padding: 0 4px; border-radius: 4px; }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  vertical-align: -0.18em;
  background: var(--accent);
  animation: caret 1.1s steps(2, start) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Карточки услуг ---------- */

.services {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 820px) {
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.services--six { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .services--six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .services--six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.service {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  transition: border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease);
}
.service:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--line));
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.service__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.service__icon .icon { width: 22px; height: 22px; }
.service h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.5vw, 21px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.service p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.service .chips { margin-top: auto; }

/* Чипы */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }

/* ---------- Проекты ---------- */

.projects {
  display: grid;
  gap: clamp(18px, 2.2vw, 26px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 700px)  { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .projects--four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .projects--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.project {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease);
}
.project:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--line));
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.project__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.project:hover .project__media img { transform: scale(1.035); }

.project__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 16px;
  flex: 1;
}
.project__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.project__eyebrow .arrow { color: var(--accent); font-size: 14px; }
.project h2,
.project h3 {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.project h2 a:hover,
.project h3 a:hover { color: var(--accent); }
.project p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.project__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}
.project__link {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.project__link:hover { color: var(--accent); border-color: var(--accent); }
.project__link .icon { width: 14px; height: 14px; }

/* ---------- Стек ---------- */

.stack {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 620px) { .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .stack { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.stack__group h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.stack__group ul { display: flex; flex-direction: column; gap: 9px; }
.stack__group li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.stack__group li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  opacity: 0.65;
}

/* ---------- Процесс ---------- */

.process {
  display: grid;
  gap: clamp(18px, 2vw, 24px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 560px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .process { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.step {
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}
.step__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.step h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.step p { margin-top: 10px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

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

.contact {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--line);
}
.contact__inner {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
}
@media (min-width: 900px) {
  .contact__inner { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: end; }
}
.contact h2 {
  font-size: clamp(28px, 3.8vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.06;
  max-width: 18ch;
}
.contact p {
  margin-top: 18px;
  color: var(--muted);
  max-width: 46ch;
}

.contact__links {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}
.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface);
  font-size: 15px;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.contact__link:hover {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 5%, var(--surface));
  transform: translateY(-2px);
}
.contact__link small {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.contact__link .icon { width: 18px; height: 18px; color: var(--accent); flex: none; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(36px, 5vw, 56px) 28px;
  position: relative;
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 28px;
}
.footer__brand p { margin-top: 12px; color: var(--muted); font-size: 14px; }
.footer__logo { height: 44px; width: auto; display: block; }
.footer__wordmark {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1;
}
.footer__wordmark span { color: var(--muted); }
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 14px;
}
.footer__nav a { color: var(--muted); transition: color var(--t-fast) var(--ease); }
.footer__nav a:hover { color: var(--ink); }
.footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}
.footer__contact a { transition: color var(--t-fast) var(--ease); }
.footer__contact a:hover { color: var(--ink); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ---------- Портфолио: шапка страницы ---------- */

.page-head {
  padding-block: clamp(34px, 5vw, 56px) clamp(24px, 3vw, 36px);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: 0.5; }
.page-head h1 {
  font-size: var(--fs-5);
  letter-spacing: -0.03em;
}
.page-head__lead {
  margin-top: 20px;
  max-width: 66ch;
  color: var(--muted);
}

/* Фильтры */
.filters {
  position: sticky;
  top: 60px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  margin-bottom: clamp(22px, 3vw, 34px);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.filter {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--line-strong); }
.filter[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.filters__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Сетка портфолио */
.portfolio-grid { padding-bottom: clamp(40px, 6vw, 80px); }
.project[hidden] { display: none; }

.portfolio-note {
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  max-width: 70ch;
}

/* ---------- Анимации появления ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
html.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .caret { animation: none; }
}

/* Переключение темы через View Transition */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 320ms;
    animation-timing-function: var(--ease);
  }
}

/* ---------- Мелкие правки на узких экранах ---------- */

@media (max-width: 760px) {
  .brand__logo { height: 13px; }
  .header-inner { gap: 12px; }
}



@media (max-width: 520px) {
  .hero__cta .btn { flex: 1 1 auto; }
  .footer__logo { height: 34px; }
  .project__foot { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero__card { transform: none; }
  .footer__bottom { flex-direction: column; }
}

@media (max-width: 900px) {
  .filters { top: 0; }
}

/* Печать */
@media print {
  body::before,
  body::after,
  .site-header,
  .filters,
  .skip-link { display: none !important; }
  .project,
  .services--six { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .services--six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .services--six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.service { break-inside: avoid; }
  body { background: #fff; color: #000; }
}
