@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-400-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-400-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: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-500-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-500-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: "Google Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-700-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/google-sans/google-sans-700-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;
}

/* ==========================================================================
   Maletskiy — portfolio
   Дизайн-язык: сетка на волосяных линиях, моно-лейблы, крупная типографика.
   Шрифты: Medeo Sans / Mono (OFL 1.1, assets/OFL.txt).
   ========================================================================== */

/* --- Шрифты ---------------------------------------------------------------- */

@font-face {
  font-family: "Medeo Sans";
  src: url("../fonts/medeo-sans/MedeoSansVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Medeo Sans";
  src: url("../fonts/medeo-sans/MedeoSansVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Medeo Mono";
  src: url("../fonts/medeo-mono/MedeoMonoVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Medeo Mono";
  src: url("../fonts/medeo-mono/MedeoMonoVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

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

:root {
  --sans: "Medeo Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Google Sans", "Medeo Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Medeo Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Medeo Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #121316;
  --bg-sunken: #060607;
  --fg: #f2f1ee;
  --muted: rgba(242, 241, 238, 0.6);
  --faint: rgba(242, 241, 238, 0.4);
  --line: rgba(242, 241, 238, 0.15);
  --line-soft: rgba(242, 241, 238, 0.08);
  --accent: #2d81ff;
  --accent-soft: rgba(45, 129, 255, 0.14);
  --invert-bg: #ffffff;
  --invert-fg: #0b0b0c;

  --fs-mono: 12px;
  --fs-sm: 14px;
  --fs-body: 16px;
  --fs-lead: 18px;
  --fs-h3: clamp(20px, 1.7vw, 24px);
  --fs-h2: clamp(34px, 4.2vw, 60px);
  --fs-h1: clamp(26px, 2.6vw, 38px);

  --shell: 1280px;
  --head-h: 52px;
  --pad-x: clamp(20px, 3vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --scanline: rgba(255, 255, 255, 0.022);
}

html[data-theme="light"] {
  --bg: #f4f3ef;
  --bg-sunken: #e9e7e1;
  --fg: #0b0b0c;
  --muted: rgba(11, 11, 12, 0.62);
  --faint: rgba(11, 11, 12, 0.42);
  --line: rgba(11, 11, 12, 0.16);
  --line-soft: rgba(11, 11, 12, 0.08);
  --accent: #1f6feb;
  --accent-soft: rgba(31, 111, 235, 0.1);
  --invert-bg: #0b0b0c;
  --invert-fg: #f7f6f2;
  --scanline: rgba(0, 0, 0, 0.02);
}

/* --- Сброс ---------------------------------------------------------------- */

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

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 12px);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  padding-top: var(--head-h);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--invert-bg);
  color: var(--invert-fg);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: top 0.2s;
}
.skip:focus {
  top: 12px;
}

/* --- Сетка и общие элементы ---------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
}

.mono {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.accent {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.h2 {
  margin: 0;
  font-size: var(--fs-h2);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h3 {
  margin: 0;
  font-size: var(--fs-h3);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.section {
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-inline: 1px solid var(--line);
}

/* линия на стыке первого экрана и секции — во всю ширину экрана */
.section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 100vw;
  height: 1px;
  margin-left: -50vw;
  background: var(--line);
  display: none;
}
.section.after-hero {
  border-top: 0;
}
.section.after-hero::before {
  display: block;
}
/* блоки между секциями (галерея, состав продукта) — те же боковые линии */
main > .shell > .case-gallery,
main > .shell > .case-subs,
main > .shell > .case-metrics {
  border-inline: 1px solid var(--line);
}

/* Шапка секции: 01 / ПРАКТИКА + правая подпись */
.sec-head {
  position: sticky;
  top: var(--head-h);
  z-index: 6;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 45px;
  padding: 0 var(--pad-x);
  border-bottom: 1px solid var(--line);
  color: color-mix(in srgb, var(--fg) 40%, transparent);
}
.sec-head .mono {
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sec-head__side {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Кнопки */
.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 22px;
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn svg {
  flex: none;
}
.btn--solid {
  background: var(--invert-bg);
  color: var(--invert-fg);
  border-color: var(--invert-bg);
}
.btn--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}
.btn--sm {
  --btn-h: 34px;
  padding: 0 14px;
}

/* Подчёркнутая ссылка как в референсе */
.ulink {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.2s, color 0.2s;
}
.ulink:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Пилюли-чипы */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip--accent {
  border-color: color-mix(in oklab, var(--a, var(--accent)) 55%, transparent);
  color: var(--a, var(--accent));
}

/* Появление при скролле */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(10px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease),
    filter 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

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

.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--head-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-head__in {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.site-head .shell {
  max-width: none;
  border-inline: 0;
  padding-inline: 0;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  border-right: 1px solid var(--line);
}
.logo svg {
  width: 26px;
  height: 18px;
  fill: var(--fg);
  transition: transform 0.3s var(--ease);
}
.logo:hover svg {
  transform: translateY(-2px);
}

.nav {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.nav a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--fg);
}
.nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--bg) 88%, var(--fg));
}
.mobile-menu a[aria-current="page"] {
  color: var(--fg);
}
.nav a[aria-current="page"] {
  background: var(--line-soft);
}

.head-aside {
  display: flex;
  align-items: stretch;
  margin-left: auto;
}
.head-aside__link,
.head-aside__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}
.head-aside__link:hover,
.head-aside__btn:hover {
  color: var(--fg);
  background: var(--line-soft);
}
.head-aside__btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.head-aside__link svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: currentColor;
  stroke: none;
}
.head-aside .btn {
  --btn-h: 100%;
  height: 100%;
  align-self: stretch;
  border-radius: 0;
  border-left: 1px solid var(--line);
  border-top: 0;
  border-bottom: 0;
  padding-inline: 22px;
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  border-left: 1px solid var(--line);
}
.burger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--fg);
  position: relative;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: var(--fg);
  transition: transform 0.25s var(--ease);
}
.burger span::before {
  top: -5px;
}
.burger span::after {
  top: 5px;
}
.burger[aria-expanded="true"] span {
  background: transparent;
}
.burger[aria-expanded="true"] span::before {
  transform: translateY(5px) rotate(45deg);
}
.burger[aria-expanded="true"] span::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* Мобильное меню */
.mobile-menu {
  position: fixed;
  inset: var(--head-h) 0 0 0;
  z-index: 90;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 8px 0 24px;
  overflow-y: auto;
  display: none;
}
.mobile-menu.is-open {
  display: block;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  border-bottom: 1px solid var(--line);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.mobile-menu a span {
  color: var(--muted);
}
.mobile-menu__foot {
  padding: 24px var(--pad-x) 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Сцена героя: дрейфующие плитки на canvas ----------------------------- */

.hero-scene {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}
.hero-scene canvas {
  display: block;
  width: 100%;
  height: 100%;
}

main {
  position: relative;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    transparent 0,
    transparent var(--hero-h, 100vh),
    var(--bg) var(--hero-h, 100vh)
  );
}

.site-foot {
  position: relative;
  z-index: 1;
}
.site-foot .shell {
  border-inline: 1px solid var(--line);
}
.site-foot::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background: var(--bg);
  z-index: 0;
}
.site-foot .shell {
  position: relative;
  z-index: 1;
}

/* Разделы на правой кромке */
.rail-nav {
  position: fixed;
  top: 0;
  right: 60px;
  bottom: 0;
  width: 300px;
  z-index: 79;
  overflow: visible;
  pointer-events: none;
}
.rail-nav__item {
  position: absolute;
  right: 0;
  top: 0;
  transform-origin: right top;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  will-change: transform, opacity;
}
.rail-nav__item.is-active {
  color: var(--fg);
  font-weight: 600;
}
.rail-nav__item span {
  display: inline-block;
  will-change: transform;
}

.hero-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  padding: 9px 13px;
  background: var(--invert-bg);
  color: var(--invert-fg);
  border: 1px solid var(--invert-bg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  will-change: transform;
}
.hero-tip.is-on {
  opacity: 1;
}

/* --- Герой ---------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - var(--head-h));
  padding: 56px var(--pad-x) 40px;
  border-bottom: 0;
  text-align: center;
  overflow: hidden;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 36% 32% at 50% 47%,
    var(--bg) 0%,
    var(--bg) 50%,
    color-mix(in srgb, var(--bg) 70%, transparent) 76%,
    transparent 96%
  );
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__mark {
  margin: 0;
  font-size: clamp(40px, 6.25vw, 90px);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 32;
  text-transform: none;
  white-space: nowrap;
  color: var(--fg);
}

.hero__title {
  margin: 30px 0 0;
  max-width: 760px;
  font-size: var(--fs-h1);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero__lead {
  margin: 18px auto 0;
  max-width: 470px;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
}

.hero__meta {
  margin: 18px 0 0;
  color: var(--muted);
}
/* статус стоит над именем — отбивка снизу, а не сверху */
.hero__meta--top {
  margin: 0 0 18px;
}

.hero__resume {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
}
.hero__resume a {
  color: var(--muted);
}
.hero__resume a:hover {
  color: var(--fg);
}

.hero__aside {
  margin: 26px 0 0;
  font-size: var(--fs-body);
  color: var(--muted);
}

.hero__foot a {
  position: relative;
  display: inline-block;
}
/* линия выезжает слева направо и так же уходит */
.hero__foot a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.34s var(--ease);
}
.hero__foot a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero__foot li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero__foot li + li::before {
  content: "·";
  color: var(--faint);
}

/* Линейка прокрутки справа: шкала, привязанная к высоте документа */
.ruler-current {
  position: fixed;
  right: 70px;
  top: 0;
  z-index: 81;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 6px var(--bg), 0 0 14px var(--bg);
  transform: translateY(-50%);
  will-change: transform;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.ruler-current.is-on {
  opacity: 1;
}
.ruler-labels {
  position: fixed;
  inset: 0;
  z-index: 81;
  pointer-events: none;
}
.ruler-labels a {
  position: absolute;
  right: 70px;
  opacity: 0;
  transition:
    opacity 0.34s var(--ease) var(--d, 0ms),
    color 0.35s var(--ease);
  transform: translateY(-50%);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
  text-shadow: 0 0 6px var(--bg), 0 0 14px var(--bg);
  will-change: transform;
}
/* заливка белым слева направо */
.ruler-labels a::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--fg);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.45s var(--ease);
  pointer-events: none;
}
.ruler-labels a:hover::after {
  clip-path: inset(0 0 0 0);
}
/* у активного ховера нет — он и так синий */
.ruler-labels a.is-active:hover::after {
  clip-path: inset(0 100% 0 0);
}
/* (линии от разделов не рисуем — раздел стоит на длинном делении) */
.ruler-labels.is-open a {
  opacity: 1;
}
.ruler-labels.is-open a.is-active {
  opacity: 0;
}
/* активный раздел живёт отдельной подписью у маркера */
.ruler-labels a.is-active {
  opacity: 0;
}
.ruler-labels a:hover {
  color: var(--fg);
}
/* цифры на засечках больше не нужны — их место занимают названия разделов */
.ruler__tick span {
  display: none;
}
.ruler__marker {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0.9;
  pointer-events: none;
}
.ruler__marker::after {
  content: none;
}
.ruler__pct {
  position: absolute;
  right: 8px;
  top: 6px;
  display: inline-flex;
  align-items: flex-start;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}
.ruler__pct-d {
  display: inline-block;
  height: 1em;
  overflow: hidden;
}
.ruler__pct-reel {
  display: block;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ruler__pct-reel i {
  display: block;
  height: 1em;
  font-style: normal;
}
.ruler__pct-sign {
  display: inline-block;
  height: 1em;
}
.ruler {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60px;
  z-index: 80;
  overflow: hidden;
  cursor: default;
  pointer-events: none;
  touch-action: none;
  user-select: none;
}
.ruler__bg {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  -webkit-mask-image: linear-gradient(
    to left,
    #000 40%,
    rgba(0, 0, 0, 0.745) 47.5%,
    rgba(0, 0, 0, 0.53) 55%,
    rgba(0, 0, 0, 0.357) 62.5%,
    rgba(0, 0, 0, 0.22) 70%,
    rgba(0, 0, 0, 0.118) 77.5%,
    rgba(0, 0, 0, 0.047) 85%,
    rgba(0, 0, 0, 0.01) 92.5%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to left,
    #000 40%,
    rgba(0, 0, 0, 0.745) 47.5%,
    rgba(0, 0, 0, 0.53) 55%,
    rgba(0, 0, 0, 0.357) 62.5%,
    rgba(0, 0, 0, 0.22) 70%,
    rgba(0, 0, 0, 0.118) 77.5%,
    rgba(0, 0, 0, 0.047) 85%,
    rgba(0, 0, 0, 0.01) 92.5%,
    transparent 100%
  );
}
.ruler__secs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ruler__sec {
  position: absolute;
  right: 62px;
  text-shadow: 0 0 6px var(--bg), 0 0 14px var(--bg);
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.ruler:hover .ruler__sec,
.ruler.is-hover .ruler__sec {
  opacity: 1;
  pointer-events: auto;
}
.ruler:hover .ruler__bg {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.ruler__sec:hover {
  color: var(--fg);
  background: var(--line-soft);
}
.ruler__track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  will-change: transform;
}
.ruler__tick {
  position: absolute;
  right: 0;
  width: 8px;
  height: 1px;
  transition: width 0.35s var(--ease), background 0.35s var(--ease);
  background: color-mix(in srgb, var(--fg) 20%, transparent);
}
.ruler__tick.is-major {
  width: 22px;
  background: color-mix(in srgb, var(--fg) 20%, transparent);
}
/* ховер на разделе: его деление вытягивается до длины синей линии */
.ruler__tick.is-long {
  width: 60px;
  background: var(--fg);
}
.ruler__tick span {
  position: absolute;
  right: 26px;
  top: 0;
  transform: translateY(-50%);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0.5;
  white-space: nowrap;
}

/* --- Секция 01: практика -------------------------------------------------- */

.practice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.practice__text {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: clamp(40px, 5vw, 64px) var(--pad-x);
}
.practice__text .h2 {
  max-width: 560px;
  font-size: clamp(32px, 3.7vw, 54px);
}
.practice__text .lead {
  margin-top: 24px;
  max-width: 470px;
}
.practice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0 30px;
}
.practice__actions .btn--wide {
  flex: 1 1 100%;
  max-width: 280px;
}
.practice__note {
  margin: 26px 0 0;
  max-width: 470px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.55;
}
.practice__meta {
  margin: 22px 0 0;
  color: var(--muted);
}
.practice__resume {
  display: inline-block;
  margin-top: 6px;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.practice__resume:hover {
  color: var(--fg);
}

/* Плитки брендов */
.practice__grid {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: clamp(40px, 5vw, 64px) var(--pad-x);
  border-left: 1px solid var(--line);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 12px;
}

/* Клиенты и партнёры — заполняет правую колонку снизу */
.partners {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.partners__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.partners__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--muted);
}
.partners__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.partners__list li::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--line-strong, var(--faint));
  flex: none;
}
.partners__note {
  margin: 18px 0 0;
  max-width: none;
  color: var(--faint);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.tile__logo {
  width: 76px;
  height: 76px;
  border-radius: 19px; /* 25% — как у самих логотипов (rx 18 при 72) */
  display: block;
  transition: transform 0.35s var(--ease);
}
.tile:hover .tile__logo {
  transform: translateY(-2px) scale(1.04);
}
.tile__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 19px;
  background: color-mix(in srgb, var(--a) 88%, #000);
  color: #fff;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
  transition: transform 0.35s var(--ease);
}
.tile:hover .tile__mark {
  transform: translateY(-2px) scale(1.03);
}
.tile__name {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.3;
}
/* на светлой теме тени выглядят грязно — убираем совсем */
html[data-theme="light"] .tile__logo,
html[data-theme="light"] .tile__mark,
html[data-theme="light"] .cell__icon,
html[data-theme="light"] .case-hero__logo {
  box-shadow: none;
}

/* --- Секция 02: работы ---------------------------------------------------- */

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.cell {
  position: relative;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  transition: background 0.3s var(--ease);
}
.cell:nth-child(4n) {
  border-right: 0;
}
.cell:nth-last-child(-n + 3) {
  border-bottom: 0;
}
.cell:hover {
  background: color-mix(in srgb, var(--bg) 92%, var(--fg));
}
/* карточка «Возьмусь за ваш продукт» не подсвечивается при наведении */
.cell--next:hover {
  background: var(--bg);
}

.cell__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cell__top {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 39px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  gap: 0;
  overflow: hidden;
}
/* заливка шапки: растёт слева направо, уходит справа налево */
.cell__top::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--a, var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}
.cell:hover .cell__top::before,
.cell:focus-within .cell__top::before {
  transform: scaleX(1);
}
.cell__num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  width: 39px;
  min-width: 39px;
  padding: 0;
  background: var(--a, var(--accent));
  color: #fff;
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cell__cat {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  padding: 0 16px;
  text-align: right;
  transition: color 0.3s var(--ease);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell__ascii {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.cell:hover .cell__ascii,
.cell:focus-within .cell__ascii {
  opacity: 0;
}
.cell:hover .cell__media img,
.cell:focus-within .cell__media img {
  transform: scale(1.08);
  filter: none;
}
.cell__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-sunken);
}
.cell:hover .cell__cat,
.cell:focus-within .cell__cat {
  color: #fff;
}
.cell__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.005);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s var(--ease);
  filter: saturate(0.92);
}
.cell:hover .cell__media img {
  transform: scale(1.045);
  filter: saturate(1.05);
}

.cell__body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 22px 22px;
}

.cell__icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-top: -36px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s var(--ease);
}
.cell:hover .cell__icon {
  transform: translateY(-3px);
}
.cell__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 18px;
}

.cell__title {
  margin: 0;
  font-size: clamp(24px, 2.1vw, 30px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.cell__text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
  text-wrap: pretty;
}

.cell__pills {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  gap: 6px;
}

.cell__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  color: color-mix(in srgb, var(--fg) 42%, transparent);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.45s var(--ease);
}
.cell:hover .cell__more,
.cell:focus-within .cell__more {
  color: var(--fg);
}
.cell__more svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
  transition: transform 0.3s var(--ease);
}
.cell:hover .cell__more svg {
  transform: translate(2px, -2px);
}

/* Блок «дальше» */
.cell--next {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  display: flex;
  align-items: flex-end;
  border-right: 0;
  background: var(--bg);
}
.cell--next__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.cell--next .cell__body {
  gap: 0;
  padding: clamp(28px, 3vw, 40px);
}
.cell--next .h3 {
  margin-top: 18px;
  font-size: clamp(26px, 2.4vw, 34px);
  letter-spacing: -0.03em;
}
.cell--next p {
  margin: 12px 0 0;
  max-width: 420px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.55;
}
.cell--next .btn {
  margin-top: 26px;
  align-self: flex-start;
}
.cell--next__count {
  position: absolute;
  right: 18px;
  top: 6px;
  font-size: clamp(120px, 12vw, 190px);
  line-height: 0.7;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  pointer-events: none;
  user-select: none;
}

/* --- Секция 03: принципы -------------------------------------------------- */

.principles-intro {
  padding: clamp(48px, 5.5vw, 76px) var(--pad-x) clamp(32px, 3.5vw, 48px);
}
.principles-intro .h2 {
  max-width: 760px;
}
.principles-intro .lead {
  margin-top: 20px;
  max-width: 540px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.principle {
  padding: clamp(28px, 3vw, 40px) var(--pad-x) clamp(32px, 3.4vw, 44px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.principle:nth-child(3n) {
  border-right: 0;
}
.principle:nth-last-child(-n + 3) {
  border-bottom: 0;
}
.principle__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
}
.principle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  color: var(--accent);
}
.principle__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.principle h3 {
  margin: 22px 0 0;
  font-size: var(--fs-h3);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.principle p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
  text-wrap: pretty;
}

/* --- Секция 04: о себе ---------------------------------------------------- */

.about {
  padding: clamp(48px, 6vw, 88px) var(--pad-x);
  text-align: center;
}
.about__kicker {
  color: var(--muted);
}
.about__title {
  margin: 22px auto 0;
  max-width: 900px;
  font-size: clamp(32px, 4.6vw, 64px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.about__title .serif {
  display: block;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}
.about__lead {
  margin: 22px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-wrap: pretty;
}
.about__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.about-band {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  border-top: 1px solid var(--line);
}
.about-band__photo {
  position: relative;
  aspect-ratio: 4 / 3.2;
  border-right: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-sunken);
}
.about-band__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: filter 0.6s var(--ease), transform 1s var(--ease);
}
.about-band__photo:hover img {
  filter: grayscale(0.55) contrast(1.2);
  transform: scale(1.02);
}
.about-band__caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.about-band__facts {
  display: flex;
  flex-direction: column;
}
.fact {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  padding: 24px var(--pad-x);
  border-top: 1px solid var(--line);
  text-align: left;
}
.about2__facts .fact:first-child {
  border-top: 1px solid var(--line);
}
.fact dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 2px;
}
.fact dd {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.45;
}
.fact dd span {
  color: var(--muted);
}

/* --- Финальный призыв ----------------------------------------------------- */

.cta {
  position: relative;
  background: var(--bg);
  border-inline: 1px solid var(--line);
  padding: clamp(56px, 7vw, 96px) var(--pad-x);
  text-align: center;
  border-top: 1px solid var(--line);
}
.waves-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cta > *:not(.waves-bg),
.cell--next > *:not(.waves-bg) {
  position: relative;
  z-index: 1;
}
.cta__title {
  margin: 18px auto 0;
  max-width: 760px;
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.03;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.cta__lead {
  margin: 20px auto 0;
  max-width: 520px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-wrap: pretty;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

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

.site-foot {
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.site-foot__cols {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
}
.site-foot__col {
  padding: 34px var(--pad-x);
  border-right: 1px solid var(--line);
}
.site-foot__col:last-child {
  border-right: 0;
}
.site-foot__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.site-foot__brand svg {
  width: 26px;
  height: 18px;
  fill: var(--fg);
}
.site-foot__brand span {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.site-foot__about {
  margin: 0;
  max-width: 300px;
  color: color-mix(in srgb, var(--fg) 40%, transparent);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.site-foot__mail {
  position: relative;
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.site-foot__mail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.36s var(--ease);
}
.site-foot__mail:hover {
  color: var(--fg);
}
.site-foot__mail:hover::after {
  transform: scaleX(1);
}
.site-foot__col h4 {
  margin: 0 0 14px;
  color: color-mix(in srgb, var(--fg) 40%, transparent);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-foot__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.site-foot__col li a {
  position: relative;
  display: inline-block;
  color: color-mix(in srgb, var(--fg) 60%, transparent);
  font-size: var(--fs-sm);
  transition: color 0.28s var(--ease);
}
.site-foot__col li a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}
.site-foot__col li a:hover {
  color: var(--fg);
}
.site-foot__col li a:hover::after {
  transform: scaleX(1);
}
.site-foot__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--pad-x);
  border-top: 1px solid var(--line);
  color: color-mix(in srgb, var(--fg) 40%, transparent);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Страница кейса ------------------------------------------------------- */

.case-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 7vw, 88px) var(--pad-x) clamp(32px, 4vw, 48px);
}
.case-hero__logo {
  width: clamp(88px, 10vw, 120px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 24%;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.case-hero__kicker {
  margin: 26px 0 0;
  color: var(--muted);
}
.case-hero__title {
  margin: 14px 0 0;
  max-width: 18ch;
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.case-hero__lead {
  margin: 22px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.45;
}
.case-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.case-hero__back {
  display: inline-flex;
  margin-top: 30px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.case-hero__back:hover {
  color: var(--fg);
}
.case-head {
  padding: 40px var(--pad-x) 0;
}
.case-head__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.case-head__back:hover {
  color: var(--fg);
}
.case-head__kicker {
  margin: 40px 0 0;
  color: var(--accent);
}
.case-head__title {
  margin: 16px 0 0;
  max-width: 1000px;
  font-size: clamp(40px, 7vw, 104px);
  line-height: 0.96;
  font-weight: 500;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.case-head__tagline {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.45;
}
.case-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.case-meta__item {
  padding: 18px var(--pad-x) 20px;
  border-right: 1px solid var(--line);
}
.case-meta__item:last-child {
  border-right: 0;
}
.case-meta__item .mono {
  color: var(--muted);
  display: block;
}
.case-meta__item p {
  margin: 8px 0 0;
  font-size: var(--fs-body);
  line-height: 1.4;
}

.case-cover {
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
}
.case-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.case-body {
  padding: clamp(36px, 4vw, 56px) var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.case-body__label {
  color: var(--muted);
  margin: 0 0 20px;
}
.case-body__lead {
  margin: 0;
  max-width: 760px;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.case-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: clamp(36px, 4vw, 56px) var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.case-split__label {
  color: var(--muted);
}
.case-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
  max-width: 780px;
  counter-reset: step;
}
.case-list li {
  position: relative;
  padding-left: 46px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
}
.case-list li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
}
.case-results {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 780px;
}
.case-results li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
}
.case-results li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 1px;
  background: var(--accent);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.case-metric {
  padding: 28px var(--pad-x);
  border-right: 1px solid var(--line);
}
.case-metric:last-child {
  border-right: 0;
}
.case-metric strong {
  display: block;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.case-metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.35;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.case-gallery figure:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.case-gallery figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-sunken);
}
.case-gallery figure:nth-child(2n) {
  border-right: 0;
}
.case-gallery figure:first-child {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
  border-right: 0;
}
.case-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.case-gallery figure:last-child:nth-child(even) {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
  border-right: 0;
}
.case-gallery figure:hover img {
  transform: scale(1.02);
}

.case-subs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.case-sub {
  padding: 26px var(--pad-x) 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.case-sub:nth-child(2n) {
  border-right: 0;
}
.case-subs > .case-sub:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.case-sub h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.case-sub p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.case-sub__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}
.case-sub__metrics div {
  font-size: var(--fs-sm);
  color: var(--muted);
}
.case-sub__metrics b {
  display: block;
  color: var(--fg);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.case-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px var(--pad-x);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.case-next:hover {
  background: var(--line-soft);
}
.case-next__label {
  color: var(--muted);
}
.case-next__title {
  margin: 8px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.case-next__arrow {
  flex: none;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.case-next:hover .case-next__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.case-next__arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
}

/* --- Архив работ ---------------------------------------------------------- */

.archive-head {
  padding: 48px var(--pad-x) 40px;
}
.archive-head p {
  margin: 16px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
}
.archive-list {
  border-top: 1px solid var(--line);
}
.archive-row {
  display: grid;
  grid-template-columns: 56px 1.1fr 1.4fr auto 40px;
  align-items: center;
  gap: 20px;
  padding: 18px var(--pad-x);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.archive-row:hover {
  background: var(--line-soft);
}
.archive-row__num {
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--fs-mono);
}
.archive-row__title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.archive-row__desc {
  color: var(--muted);
  font-size: var(--fs-sm);
}
.archive-row__meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}
.archive-row__arrow {
  text-align: right;
  color: var(--faint);
  transition: color 0.2s, transform 0.2s;
}
.archive-row:hover .archive-row__arrow {
  color: var(--fg);
  transform: translateX(3px);
}

/* --- Служебное ------------------------------------------------------------ */

.grain {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}
html[data-theme="light"] .grain {
  opacity: 0.25;
  mix-blend-mode: multiply;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  background: var(--invert-bg);
  color: var(--invert-fg);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Адаптив -------------------------------------------------------------- */

@media (max-width: 1380px) {
  .ruler,
  .rail-nav {
    display: none;
  }
  .hero__index {
    display: none;
  }
  .nav a {
    padding: 0 12px;
  }
  .head-aside__link--lang {
  letter-spacing: 0.06em;
  opacity: 0.72;
  transition: opacity 0.18s var(--ease);
}
.head-aside__link--lang:hover {
  opacity: 1;
}
.mobile-menu__lang {
  font-weight: 500;
}
.head-aside__link--cv {
    display: none;
  }
}

@media (max-width: 1000px) {
  .nav {
    display: none;
  }
  .burger {
    display: flex;
  }
  .practice {
    grid-template-columns: 1fr;
  }
  .practice__grid {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-template-columns: repeat(4, 1fr);
  }
  .grid4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cell:nth-child(4n) {
    border-right: 1px solid var(--line);
  }
  .cell:nth-child(2n) {
    border-right: 0;
  }
  .cell:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
  .cell:last-child {
    border-bottom: 0;
  }
  .cell--next {
    grid-column: span 2;
  }
  .principles {
    grid-template-columns: repeat(2, 1fr);
  }
  .principle:nth-child(3n) {
    border-right: 1px solid var(--line);
  }
  .principle:nth-child(2n) {
    border-right: 0;
  }
  .principle:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
  .principle:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
  .about-band {
    grid-template-columns: 1fr;
  }
  .about-band__photo {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    aspect-ratio: 4 / 3;
  }
  .site-foot__cols {
    grid-template-columns: 1fr 1fr;
  }
  .site-foot__col {
    border-bottom: 1px solid var(--line);
  }
  .site-foot__col:nth-child(2n) {
    border-right: 0;
  }
  .case-meta {
    grid-template-columns: repeat(2, 1fr);
  }
  .case-meta__item:nth-child(2n) {
    border-right: 0;
  }
  .case-meta__item {
    border-bottom: 1px solid var(--line);
  }
  .case-meta__item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
  .case-split {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .archive-row {
    grid-template-columns: 44px 1fr auto;
  }
  .archive-row__desc,
  .archive-row__arrow {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --head-h: 50px;
  }
  .head-aside__link {
    display: none;
  }
  .head-aside .btn {
    display: none;
  }
  .sec-head__side {
    display: none;
  }
  .hero {
    padding-top: 40px;
    padding-bottom: 48px;
    min-height: calc(100svh - var(--head-h));
    min-height: calc(100dvh - var(--head-h));
  }
  .hero__veil {
    background: radial-gradient(
      ellipse 62% 46% at 50% 46%,
      var(--bg) 0%,
      var(--bg) 52%,
      color-mix(in srgb, var(--bg) 72%, transparent) 72%,
      transparent 90%
    );
  }
  .hero__mark {
    font-size: clamp(28px, 8.6vw, 54px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    white-space: normal;
  }
  .hero__title {
    margin-top: 22px;
    font-size: 24px;
  }
  .hero__lead {
    font-size: var(--fs-body);
  }
  .hero__actions {
    width: 100%;
    flex-direction: column;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .hero__foot a {
  position: relative;
  display: inline-block;
}
/* линия выезжает слева направо и так же уходит */
.hero__foot a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.34s var(--ease);
}
.hero__foot a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.hero__foot {
    gap: 6px 12px;
  }
  .practice__text {
    padding-top: 32px;
  }
  .practice__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 8px;
  }
  .practice__actions .btn {
    flex: 1 1 100%;
    max-width: none;
  }
  .grid4 {
    grid-template-columns: 1fr;
  }
  .cell {
    border-right: 0;
  }
  .cell:nth-child(2n) {
    border-right: 0;
  }
  .cell--next {
    grid-column: span 1;
    border-right: 0;
  }
  .cell__body {
    padding-inline: 18px;
  }
  .cell__title {
    font-size: 26px;
  }
  .principles {
    grid-template-columns: 1fr;
  }
  .principle {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .principle:last-child {
    border-bottom: 0 !important;
  }
  .about__title .serif {
    margin-top: 2px;
    font-size: inherit;
    font-weight: inherit;
  }
  .fact {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .site-foot__cols {
    grid-template-columns: 1fr;
  }
  .site-foot__col {
    border-right: 0 !important;
  }
  .site-foot__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .case-head {
    padding-top: 28px;
  }
  .case-head__kicker {
    margin-top: 28px;
  }
  .case-head__title {
    font-size: clamp(34px, 11vw, 52px);
  }
  .case-meta {
    grid-template-columns: 1fr;
  }
  .case-meta__item {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .case-meta__item:last-child {
    border-bottom: 0 !important;
  }
  .case-metrics {
    grid-template-columns: 1fr;
  }
  .case-metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .case-metric:last-child {
    border-bottom: 0;
  }
  .case-gallery {
    grid-template-columns: 1fr;
  }
  .case-gallery figure {
    border-right: 0;
  }
  .case-gallery figure:first-child {
    grid-column: span 1;
  }
  .case-subs {
    grid-template-columns: 1fr;
  }
  .case-sub {
    border-right: 0;
  }
}

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

/* --- Заголовки: Google Sans Medium --------------------------------------- */
h1, h2, h3, h4,
.h1, .h2, .h3,
.hero__title,
.case-hero__title,
.about__lead {
  font-family: var(--display);
  font-weight: 500;
  font-synthesis-weight: none;
}

/* --- Навыки и жизненный путь (страница «О себе») -------------------------- */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.skill {
  padding: clamp(26px, 2.8vw, 38px) var(--pad-x) clamp(30px, 3.2vw, 42px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.skill:nth-child(3n) {
  border-right: 0;
}
.skill__num {
  display: block;
  color: var(--faint);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
}
.skill__title {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.skill__text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.path {
  margin: 0;
  padding: 0;
  list-style: none;
}
.path__row:last-child {
  border-bottom: 0;
}
.path__row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(18px, 2vw, 26px) var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.path__year {
  color: var(--muted);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
}
.path__text {
  color: var(--fg);
  max-width: 70ch;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .skills {
    grid-template-columns: 1fr;
  }
  .skill {
    border-right: 0;
  }
  .path__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* --- О себе (по макету Figma 6582:38461) ---------------------------------- */
.about2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.about2__photo {
  position: relative;
  margin: 0;
  border-right: 1px solid var(--line);
  overflow: hidden;
  min-height: 640px;
}
.about2__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  display: block;
  transform: translate3d(0, 0, 0) scale(1.12);
  will-change: transform;
}
.about2__cap {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: var(--fg);
  opacity: 0.28;
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.about2__col {
  display: flex;
  flex-direction: column;
}
.about2__body {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.2vw, 42px) clamp(24px, 3.4vw, 44px) clamp(24px, 2.6vw, 34px);
  flex: 1 0 auto;
}
.about2__kicker {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.about2__title {
  margin: 16px 0 0;
  max-width: 16ch;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.about2__lead {
  margin: 22px 0 0;
  max-width: 44ch;
  color: var(--muted);
  line-height: 1.5;
}
.about2__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.about2__facts {
  margin: 0;
}
.about2__facts .fact {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 16px;
  padding: 17px clamp(24px, 3.4vw, 44px);
  border-top: 1px solid var(--line);
}

.about2__facts dt {
  color: var(--muted);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.about2__facts dd {
  margin: 0;
}
.about2__facts dd span {
  display: block;
  color: var(--muted);
}
@media (max-width: 900px) {
  .about2 {
    grid-template-columns: 1fr;
  }
  .about2__photo {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
  .about2__facts .fact {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Первая секция под шапкой: линию уже рисует шапка — не дублируем */
main > .shell > .section:first-child,
main > .shell > .cta:first-child {
  border-top: 0;
}
/* Последний блок внутри секции: линию даёт следующая секция */
main > .shell > .section > .case-body:last-child,
main > .shell > .section > .case-split:last-child,
main > .shell > .section > .case-gallery:last-child,
main > .shell > .section > .case-subs:last-child,
main > .shell > .section > .case-metrics:last-child,
main > .shell > .section > .case-next:last-child,
main > .shell > .section > .case-body:last-child,
main > .shell > .section > .case-gallery figure:last-child {
  border-bottom: 0;
}
main > .shell > .case-next:last-child {
  border-bottom: 0;
}
.absent { color: inherit; }

/* Линейка и её подписи на мобильных не нужны */
@media (max-width: 1000px) {
  .ruler,
  .ruler-labels,
  .ruler-current {
    display: none !important;
  }
}

/* Заголовки — Google Sans Medium, без жирности */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3,
.hero__title,
.cta__title,
.about2__title,
.case-hero__title,
.cell__title,
.skill__title,
.principle__title,
.fact dd b,
.cell--next .h3,
.principles-intro .h2,
.practice__text .h2 {
  font-weight: 500;
}

/* последняя ячейка сетки: общую линию даёт сам грид */
.skill:last-child {
  border-bottom: 0;
}

/* Пет-проекты: иконка целиком как в макете, номер тёмный;
   акцент переключается по теме, иначе на светлой не видно */
.cell--pet {
  --a: var(--a-dark);
}
html[data-theme="light"] .cell--pet {
  --a: var(--a-light);
}
.cell--pet .cell__num {
  color: #0b0b0c;
}
html[data-theme="light"] .cell--pet .cell__num {
  color: #fff;
}
.cell--pet .cell__media img {
  object-position: 50% 0;
}
.cell--pet .cell__title {
  margin-top: 4px;
}


/* --- Ключевая экспертиза ------------------------------------------------ */
.xp {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.xp__card {
  position: relative;
  display: block;
  padding: clamp(28px, 3vw, 40px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
}
/* подсветка фона отдельным слоем: не конфликтует с анимацией появления */
.xp__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--fg) 4%, transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.xp__card > * {
  position: relative;
  z-index: 1;
}
.xp__icon {
  display: block;
  width: 160px;
  height: 160px;
  margin-bottom: clamp(30px, 3.4vw, 42px);
  transition: color 0.35s var(--ease);
}
.xp__icon .xp__art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  stroke-opacity: 0.15;
  transition: stroke-opacity 0.35s var(--ease), color 0.35s var(--ease);
}
.xp__card:hover .xp__icon .xp__art,
.xp__card:focus-visible .xp__icon .xp__art {
  stroke-opacity: 1;
}
.xp__title {
  display: block;
  font-family: var(--display);
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.xp__text {
  display: block;
  margin-top: 14px;
  max-width: 40ch;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.xp__arrow {
  position: absolute;
  top: clamp(28px, 3vw, 40px);
  right: clamp(28px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  color: var(--fg);
  background: transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.xp__arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.4;
}
.xp__card:nth-child(2n) {
  border-right: 0;
}
.xp__card:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.xp__card:hover::before,
.xp__card:focus-visible::before {
  opacity: 1;
}
.xp__card:hover .xp__icon,
.xp__card:focus-visible .xp__icon {
  color: var(--accent);
}
.xp__card:hover .xp__arrow,
.xp__card:focus-visible .xp__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.xp__card:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

@media (max-width: 900px) {
  .xp { grid-template-columns: 1fr; }
  .xp__icon { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .xp__card,
  .xp__icon,
  .xp__arrow { transition: none; }
}

/* якоря для ссылок на экспертизу */
.anchor-target {
  display: block;
  height: 0;
  scroll-margin-top: 80px;
}

/* первый блок под шапкой: верхнюю линию даёт шапка */
.shell > section.section:first-of-type,
.shell > .anchor-target + .section {
  border-top: 0;
}

/* --- Услуги: четыре экспертизы ------------------------------------------ */
.serv__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 72px);
  padding: 64px var(--pad-x) 48px;
}
.serv__copy {
  max-width: 582px;
}
.serv__title {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.serv__lead {
  margin: 24px 0 0;
  max-width: 540px;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
}
.serv__icon {
  flex: none;
  display: block;
  width: clamp(150px, 21vw, 288px);
  color: var(--accent);
}
.serv__icon .serv__art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.serv__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.serv__card {
  padding: 39px var(--pad-x) 40px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.serv__card:nth-child(2n) {
  border-right: 0;
}
.serv__card:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.serv__num {
  display: block;
  color: var(--faint);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
}
.serv__cardtitle {
  margin: 31px 0 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
}
.serv__cardtext {
  margin: 14px 0 0;
  max-width: 400px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .serv__intro { flex-direction: column-reverse; align-items: flex-start; padding: 40px var(--pad-x); }
  .serv__icon { width: 140px; }
  .serv__title { font-size: clamp(30px, 8vw, 44px); }
  .serv__grid { grid-template-columns: 1fr; }
  .serv__card { border-right: 0; }
  .serv__card:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .serv__card:last-child { border-bottom: 0; }
}

