/* ==========================================================================
   ДАНИИЛ ПАВЛОВ — FRONTEND РАЗРАБОТЧИК
   Стили сайта-портфолио.

   Оглавление:
   01. Шрифты
   02. Reset
   03. Токены дизайна (:root)
   04. Базовая типографика
   05. Утилиты и общие компоненты (контейнер, эйбрау, кнопки, теги)
   06. Курсор
   07. Прелоадер
   08. Шапка / навигация
   09. Hero
   10. Обо мне
   11. Навыки
   12. Опыт (избранное + журнал проектов + модальное окно)
   13. Отзывы (marquee)
   14. Цены
   15. FAQ
   16. Контакты
   17. Подвал
   18. Скроллбар / выделение / фокус
   19. Reduced motion
   ========================================================================== */

/* ==========================================================================
   01. Шрифты
   Unbounded — витрина (заголовки), Manrope — текст, JetBrains Mono — служебный.
   Все три имеют полноценную поддержку кириллицы.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@200;300;400;500;600;700;800;900&family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   02. Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html,
body {
  height: 100%;
}

body {
  overflow-x: hidden;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

ul,
ol {
  list-style: none;
}

/* ==========================================================================
   03. Токены дизайна
   ========================================================================== */
:root {
  /* -- Цвет: тёплый графит и латунь -- */
  --ink: #0a0a0c;
  --ink-soft: #101114;
  --surface: #16171b;
  --surface-2: #1c1d22;
  --line: rgba(244, 242, 236, 0.09);
  --line-strong: rgba(244, 242, 236, 0.18);

  --paper: #f4f2ec;
  --paper-dim: #cac8c1;
  --muted: #8b8b93;
  --muted-dim: #5c5c63;

  --brass: #e7a33e;
  --brass-bright: #f6c76a;
  --brass-dim: #7a5a26;
  --brass-ink: #1a1305;

  --sage: #74a696;
  --sage-bright: #97c4b6;
  --sage-dim: #2c3d38;

  --danger: #d9694f;

  --accent: var(--brass);
  --accent-2: var(--sage);

  /* -- Типографика -- */
  --font-display: 'Unbounded', 'Arial', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Ширина подобрана под самое длинное слово заголовка («DEVELOPER», 9 знаков
     в широком Unbounded). При 7vw оно вылезало за экран на телефоне. */
  --fs-hero: clamp(2rem, 11.5vw, 8.5rem);
  --fs-display: clamp(2.4rem, 1.9rem + 3.2vw, 4.6rem);
  --fs-h1: clamp(2.1rem, 1.7rem + 2.2vw, 3.4rem);
  --fs-h2: clamp(1.6rem, 1.35rem + 1.4vw, 2.35rem);
  --fs-h3: clamp(1.2rem, 1.08rem + 0.5vw, 1.5rem);
  --fs-lg: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  --fs-body: 1rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.78rem;

  --lh-tight: 1.05;
  --lh-snug: 1.25;
  --lh-normal: 1.55;

  /* -- Отступы -- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1.15rem;
  --space-md: 1.75rem;
  --space-lg: clamp(2.25rem, 1.9rem + 1.5vw, 3.25rem);
  --space-xl: clamp(3.5rem, 2.6rem + 3.6vw, 6.5rem);
  --space-2xl: clamp(5rem, 3.5rem + 6vw, 10rem);

  --container-w: min(1280px, 92vw);
  --container-w-narrow: min(860px, 92vw);

  /* -- Форма -- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* -- Тень / свечение -- */
  --shadow-soft: 0 30px 80px -30px rgba(0, 0, 0, 0.65);
  --shadow-brass: 0 14px 46px -12px rgba(231, 163, 62, 0.4);
  --shadow-lift: 0 18px 40px -18px rgba(0, 0, 0, 0.55);

  /* -- Тайминг -- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.22s;
  --dur-med: 0.45s;
  --dur-slow: 0.85s;
}

/* ==========================================================================
   04. Базовая типографика
   ========================================================================== */
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  color: var(--paper-dim);
}

strong {
  color: var(--paper);
  font-weight: 600;
}

a {
  transition: color var(--dur-fast) var(--ease-out-quart);
}

::selection {
  background: var(--brass);
  color: var(--brass-ink);
}

/* ==========================================================================
   05. Утилиты и общие компоненты
   ========================================================================== */
.container {
  width: var(--container-w);
  margin-inline: auto;
}

.container--narrow {
  width: var(--container-w-narrow);
  margin-inline: auto;
}

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

section {
  position: relative;
  padding-block: var(--space-2xl);
}

/* -- Подпись-путь перед каждой секцией -- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(231, 163, 62, 0.18);
  flex-shrink: 0;
}

.eyebrow .path-root {
  color: var(--muted-dim);
}

.eyebrow .path-accent {
  color: var(--paper-dim);
}

.eyebrow .caret {
  display: inline-block;
  width: 0.55em;
  color: var(--accent);
  animation: caret-blink 1.1s step-end infinite;
}

@keyframes caret-blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.section-head__text {
  max-width: 46rem;
}

.section-head h2 {
  font-size: var(--fs-display);
}

.section-head p {
  margin-top: var(--space-sm);
  font-size: var(--fs-lg);
  max-width: 34rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted-dim);
  white-space: nowrap;
  padding-bottom: 0.4rem;
}

/* -- Кнопки -- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 1rem 1.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  color: var(--paper);
  background: transparent;
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--dur-fast) var(--ease-out-quart), color var(--dur-fast) var(--ease-out-quart), transform var(--dur-fast) var(--ease-out-quart);
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: inherit;
  transform: translateY(102%);
  transition: transform var(--dur-med) var(--ease-out-expo);
  z-index: -1;
}

.btn:hover,
.btn:focus-visible {
  color: var(--brass-ink);
  border-color: var(--accent);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateY(0%);
}

.btn svg {
  width: 1em;
  height: 1em;
  transition: transform var(--dur-fast) var(--ease-out-quart);
}

.btn:hover svg {
  transform: translate(2px, -2px);
}

.btn--solid {
  background: var(--accent);
  color: var(--brass-ink);
  border-color: var(--accent);
}

.btn--solid::before {
  background: var(--paper);
}

.btn--solid:hover {
  color: var(--ink);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--muted);
  padding: 0.85rem 1.4rem;
}

.btn--ghost::before {
  background: var(--surface-2);
}

.btn--ghost:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.btn--block {
  width: 100%;
}

/* -- Теги -- */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  padding: 0.4em 0.75em;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  color: var(--sage-bright);
  background: rgba(116, 166, 150, 0.08);
  white-space: nowrap;
  line-height: 1.4;
}

.tag::before {
  content: '"';
  opacity: 0.5;
}

.tag::after {
  content: '"';
  opacity: 0.5;
}

.tag--brass {
  color: var(--brass-bright);
  background: rgba(231, 163, 62, 0.1);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* -- Разделитель "хэйрлайн" -- */
.hr {
  height: 1px;
  background: var(--line);
  border: none;
}

/* -- Числа в моно, табличные -- */
.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   06. Курсор
   Только для устройств с точным указателем (мышь). На тач-устройствах
   не подключается вовсе — см. main.js.
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  .has-custom-cursor {
    cursor: none;
  }

  .has-custom-cursor a,
  .has-custom-cursor button,
  .has-custom-cursor input,
  .has-custom-cursor textarea,
  .has-custom-cursor label {
    cursor: none;
  }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--paper-dim);
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  transition: width var(--dur-fast) var(--ease-out-quart),
              height var(--dur-fast) var(--ease-out-quart),
              border-color var(--dur-fast) var(--ease-out-quart),
              background var(--dur-fast) var(--ease-out-quart),
              opacity var(--dur-fast) ease;
  will-change: transform;
  mix-blend-mode: difference;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brass);
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}

.cursor--hover {
  width: 54px;
  height: 54px;
  border-color: var(--brass);
  background: rgba(231, 163, 62, 0.08);
}

.cursor--hidden,
.cursor-dot--hidden {
  opacity: 0;
}

/* ==========================================================================
   07. Прелоадер
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  transition: opacity 0.6s var(--ease-out-quart), visibility 0.6s;
}

.preloader__mark {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preloader__mark .caret {
  display: inline-block;
  width: 0.55em;
  color: var(--accent);
  animation: caret-blink 1.1s step-end infinite;
}

.preloader__bar {
  width: min(220px, 50vw);
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.preloader__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: preload-bar 1.1s var(--ease-out-expo) forwards;
}

@keyframes preload-bar {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.is-loading,
body.modal-open,
body.nav-open {
  overflow: hidden;
}

body.is-loading {
  height: 100vh;
}

/* ==========================================================================
   08. Шапка / навигация
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding-block: var(--space-md);
  transition: padding var(--dur-med) var(--ease-out-quart), background var(--dur-med), border-color var(--dur-med);
  border-bottom: 1px solid transparent;
}

/* Размытие фона шапки — только на десктопе.

   backdrop-filter делает элемент containing block для потомков с
   position:fixed. Меню лежит внутри шапки, и после прокрутки (когда
   появляется .is-scrolled) переставало считаться от вьюпорта. Снятия
   фильтра при открытом меню недостаточно: Safari сохраняет containing
   block за элементом, у которого фильтр вообще когда-либо был.
   На ширинах с полноэкранным меню используем плотный фон без размытия. */
.site-header.is-scrolled {
  padding-block: var(--space-xs);
  background: rgba(10, 10, 12, 0.94);
  border-bottom-color: var(--line);
}

@media (min-width: 861px) {
  .site-header.is-scrolled {
    background: rgba(10, 10, 12, 0.78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
  }
}

body.nav-open .site-header,
body.nav-open .site-header.is-scrolled {
  background: transparent;
  border-bottom-color: transparent;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--paper);
  z-index: 600;
  position: relative;
}

.brand__mark {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  transition: transform var(--dur-med) var(--ease-out-expo);
}

.brand:hover .brand__mark {
  transform: translateY(-2px) rotate(-4deg);
}

.brand__name {
  letter-spacing: -0.01em;
}

.brand__tag {
  align-self: flex-end;
  padding-bottom: 0.2em;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--brass);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.main-nav__list a {
  position: relative;
  color: var(--muted);
  padding-block: 0.3rem;
}

.main-nav__list a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-fast) var(--ease-out-quart);
}

.main-nav__list a:hover,
.main-nav__list a.is-active {
  color: var(--paper);
}

.main-nav__list a:hover::before,
.main-nav__list a.is-active::before {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}

.icon-link:hover {
  color: var(--brass);
  border-color: var(--brass-dim);
  transform: translateY(-2px);
}

.icon-link svg {
  width: 16px;
  height: 16px;
}

/* Буква K из логотипа Kwork. Размер задан явно, иначе общие правила
   .icon-link svg и .contact__channel svg зажмут её в квадрат 16x16
   и собьют пропорции. */
.icon-link .kwork-k {
  width: 15px;
  height: 15px;
}

.contact__channel .kwork-k {
  width: 16px;
  height: 16px;
  color: var(--brass);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 600;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.nav-toggle__bars {
  position: relative;
  width: 20px;
  height: 14px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--paper);
  transition: transform var(--dur-fast) var(--ease-out-quart), opacity var(--dur-fast);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle__bars span:nth-child(3) { bottom: 0; }

body.nav-open .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
body.nav-open .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 860px) {
  .main-nav__list {
    position: fixed;
    inset: 0;
    z-index: 550;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 8rem var(--space-lg) var(--space-lg);
    background: var(--ink-soft);
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    font-weight: 600;
    transform: translateX(100%);
    transition: transform var(--dur-slow) var(--ease-out-expo);
  }

  body.nav-open .main-nav__list {
    transform: translateX(0);
  }

  .main-nav__list li {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted-dim);
  }

  .main-nav__list li::before {
    content: attr(data-index);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--brass);
  }

  .header-actions {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* ==========================================================================
   09. Hero
   ========================================================================== */

/* -- Зерно -- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(6.5rem, 5.5rem + 3vw, 9rem);
  padding-bottom: var(--space-xl);
  overflow: clip;
}

.hero__glow {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(closest-side, rgba(231, 163, 62, 0.16), transparent 72%);
  pointer-events: none;
  z-index: 0;
  animation: drift 26s ease-in-out infinite alternate;
}

.hero__glow--2 {
  top: auto;
  bottom: -20%;
  left: -15%;
  right: auto;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(closest-side, rgba(116, 166, 150, 0.12), transparent 72%);
  animation-duration: 32s;
  animation-direction: alternate-reverse;
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-4%, 5%) scale(1.08); }
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: min(8vw, 96px) min(8vw, 96px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 65%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 65%);
  opacity: 0.5;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.hero__avail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
}

.hero__avail .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage-bright);
  box-shadow: 0 0 0 3px rgba(116, 166, 150, 0.2);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__headline {
  font-size: var(--fs-hero);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 3rem);
}

.hero__headline .line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.12;
}

.hero__headline .line:first-child {
  color: var(--paper);
}

.hero__headline .line:last-child {
  -webkit-text-stroke: 1.5px var(--paper);
  color: transparent;
}

.hero__headline .chr {
  display: inline-block;
  font-variation-settings: 'wght' 700;
  transition: font-variation-settings 0.2s ease-out;
}

.hero__body {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(2rem, 1.4rem + 3vw, 4.5rem);
  align-items: end;
}

/* -- Рамка фото: ч/б, цвет по наведению и при появлении на экране -- */
.photo-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  isolation: isolate;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(0.9) contrast(1.08) brightness(0.92);
  transform: scale(1.02);
  transition: filter 1.2s var(--ease-out-quart);
}

.photo-frame:hover img,
.photo-frame.is-visible img {
  filter: grayscale(0.35) contrast(1.05) brightness(1);
}

.photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 12, 0.85));
  z-index: 1;
}

.photo-frame__tag {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--paper-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.01em;
}

.photo-frame__tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border: 1px solid var(--brass);
}

.photo-frame__corners {
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.6;
}

.photo-frame__corners i {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--paper);
  border-style: solid;
  border-width: 0;
}

.photo-frame__corners i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.photo-frame__corners i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.photo-frame__corners i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.photo-frame__corners i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.hero__figure {
  aspect-ratio: 4 / 5;
}

.hero__text p {
  font-size: var(--fs-lg);
  max-width: 34rem;
  margin-bottom: var(--space-md);
}

.hero__text .lead {
  color: var(--paper);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.hero__meta strong {
  color: var(--brass-bright);
  font-weight: 500;
}

.hero__scroll {
  position: absolute;
  right: var(--space-md);
  bottom: var(--space-md);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.hero__scroll .line-track {
  writing-mode: initial;
  width: 1px;
  height: 46px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.hero__scroll .line-track::after {
  content: '';
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--brass);
  animation: scroll-drip 2.4s var(--ease-in-out) infinite;
}

@keyframes scroll-drip {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}

@media (max-width: 900px) {
  .hero__body {
    grid-template-columns: 1fr;
  }

  .hero__figure {
    aspect-ratio: 16 / 10;
    max-width: 320px;
  }

  .hero__scroll {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero__meta {
    gap: 0.35rem 1rem;
  }

  .hero__actions {
    gap: 0.85rem;
  }
}

/* ==========================================================================
   10. Обо мне
   ========================================================================== */
.about {
  border-top: 1px solid var(--line);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2.5rem, 1.8rem + 3vw, 5rem);
  align-items: start;
}

.about__figure {
  aspect-ratio: 3 / 4;
  order: 2;
  position: sticky;
  top: 7rem;
}

.about__content {
  order: 1;
}

.about__content .kicker {
  font-size: var(--fs-display);
  max-width: 18ch;
  margin-bottom: var(--space-lg);
}

.about__content .kicker em {
  font-style: normal;
  color: var(--brass);
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 42rem;
  margin-bottom: var(--space-lg);
}

.about__text p {
  font-size: var(--fs-lg);
}

.about__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.about__fact {
  background: var(--ink);
  padding: 1.1rem 1.3rem;
}

.about__fact dt {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted-dim);
  margin-bottom: 0.35rem;
}

.about__fact dd {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--paper);
}

@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__figure {
    order: 1;
    position: static;
    max-width: 280px;
  }

  .about__content {
    order: 2;
  }
}

@media (max-width: 560px) {
  .about__facts {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   11. Навыки
   ========================================================================== */
.skills {
  border-top: 1px solid var(--line);
  overflow: clip;
}

.ticker {
  --ticker-dur: 34s;
  display: flex;
  overflow: hidden;
  margin-bottom: var(--space-2xl);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker__track {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  flex-shrink: 0;
  animation: ticker-scroll var(--ticker-dur) linear infinite;
  padding-right: clamp(1.5rem, 1rem + 2vw, 3rem);
  will-change: transform;
}

.ticker__track span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.6rem);
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
}

.ticker__track span.is-lit {
  color: transparent;
  -webkit-text-stroke: 1px var(--brass);
}

.ticker__track span::after {
  content: '/';
  display: inline-block;
  margin-left: clamp(1.5rem, 1rem + 2vw, 3rem);
  color: var(--muted-dim);
  -webkit-text-stroke: 0;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skill-card {
  background: var(--ink);
  padding: var(--space-md);
  transition: background var(--dur-med) var(--ease-out-quart);
}

.skill-card:hover {
  background: var(--ink-soft);
}

.skill-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-sm);
}

.skill-card__index {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brass);
}

.skill-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--paper);
}

.skill-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.skill-card li {
  font-size: var(--fs-sm);
  color: var(--paper-dim);
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.skill-card li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-dim);
  flex-shrink: 0;
  transform: translateY(-0.15em);
}

.skill-card li.is-note {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted-dim);
  padding-top: 0.3rem;
}

.skill-card li.is-note::before {
  display: none;
}

.skill-card--wide {
  grid-column: span 1;
}

/* ==========================================================================
   12. Опыт — избранные кейсы, журнal проектов, модальное окно
   ========================================================================== */
.work {
  border-top: 1px solid var(--line);
}

/* -- Избранные кейсы -- */
.featured-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.featured-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 1.4rem + 3vw, 4.5rem);
  align-items: center;
}

.featured-item__media {
  order: 1;
  aspect-ratio: 5 / 4;
  position: relative;
}

.featured-item__body {
  order: 2;
}

.featured-item:nth-child(even) .featured-item__media {
  order: 2;
}

.featured-item:nth-child(even) .featured-item__body {
  order: 1;
}

.featured-item__date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brass);
  border: 1px solid var(--brass-dim);
  padding: 0.35em 0.75em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.featured-item h3 {
  font-size: var(--fs-h1);
  margin-bottom: var(--space-sm);
  max-width: 16ch;
}

.featured-item__desc {
  font-size: var(--fs-lg);
  max-width: 38rem;
  margin-bottom: var(--space-sm);
}

.featured-item__result {
  display: flex;
  gap: 0.6em;
  font-size: var(--fs-sm);
  color: var(--sage-bright);
  background: rgba(116, 166, 150, 0.08);
  border-left: 2px solid var(--sage);
  padding: 0.7em 1em;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-sm);
  max-width: 34rem;
}

.featured-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.featured-item__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--paper);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.2em;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

.featured-item__link:hover {
  color: var(--brass);
  border-color: var(--brass);
}

@media (max-width: 860px) {
  .featured-item,
  .featured-item:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .featured-item__media,
  .featured-item:nth-child(even) .featured-item__media {
    order: 1;
  }

  .featured-item__body,
  .featured-item:nth-child(even) .featured-item__body {
    order: 2;
  }
}

/* -- Журнал проектов -- */
/* -- Заглушка для кейсов без скриншота -- */
.featured-item__blank {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-soft);
  overflow: hidden;
  isolation: isolate;
}

.featured-item__blank-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
  opacity: 0.8;
}

.featured-item__blank-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.2rem + 1vw, 2.1rem);
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  text-transform: uppercase;
}

.featured-item__blank-note {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted-dim);
}

.featured-item__blank .photo-frame__corners {
  opacity: 0.5;
}

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: var(--space-md);
}

.log-head h3 {
  font-size: var(--fs-h3);
  font-family: var(--font-body);
  font-weight: 700;
}

.log-count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted-dim);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.55em 1.05em;
  border-radius: var(--radius-full);
  transition: all var(--dur-fast) var(--ease-out-quart);
}

.filter-btn:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.filter-btn.is-active {
  color: var(--brass-ink);
  background: var(--brass);
  border-color: var(--brass);
}

.log-list {
  border-top: 1px solid var(--line);
}

.log-row {
  display: grid;
  grid-template-columns: 64px 5.5rem 1fr auto 20px;
  align-items: center;
  gap: var(--space-md);
  padding: 1.1rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  width: 100%;
  transition: background var(--dur-fast) var(--ease-out-quart), padding-left var(--dur-fast) var(--ease-out-quart);
}

.log-row:hover {
  background: var(--ink-soft);
  padding-left: 1rem;
}

.log-row__thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}

.log-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) contrast(1.05);
  transition: filter var(--dur-med) var(--ease-out-quart);
}

.log-row:hover .log-row__thumb img {
  filter: grayscale(0);
}

.log-row__date {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted-dim);
}

.log-row__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  text-align: left;
}

.log-row__title {
  font-weight: 600;
  color: var(--paper);
  font-size: var(--fs-body);
  margin-bottom: 0.2rem;
}

.log-row__desc {
  color: var(--muted);
  font-size: var(--fs-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-row__tags {
  display: none;
}

@media (min-width: 720px) {
  .log-row__tags {
    display: flex;
    gap: 0.4rem;
  }
}

.log-row__arrow {
  color: var(--muted-dim);
  transition: transform var(--dur-fast) var(--ease-out-quart), color var(--dur-fast);
}

.log-row:hover .log-row__arrow {
  transform: translateX(3px);
  color: var(--brass);
}

.log-row.is-hidden {
  display: none;
}

@media (max-width: 720px) {
  .log-row {
    grid-template-columns: 44px 1fr 16px;
  }

  .log-row__thumb { width: 40px; height: 40px; }
  .log-row__date { display: none; }
  .log-row__desc {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.log-empty {
  padding: var(--space-lg) 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  display: none;
}

.log-empty.is-visible {
  display: block;
}

/* -- Модальное окно проекта -- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(6, 6, 7, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out-quart), visibility var(--dur-med);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(84vh, 780px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.75rem);
  transform: translateY(24px) scale(0.98);
  transition: transform var(--dur-med) var(--ease-out-expo);
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}

.modal__close:hover {
  color: var(--paper);
  border-color: var(--brass);
  transform: rotate(90deg);
}

.modal__media {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink);
  margin-bottom: var(--space-md);
}

.modal__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal__date {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brass);
  margin-bottom: 0.6rem;
}

.modal h3 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-sm);
}

.modal__desc {
  color: var(--paper-dim);
  font-size: var(--fs-body);
  margin-bottom: var(--space-sm);
  white-space: pre-line;
}

.modal .tag-row {
  margin-bottom: var(--space-sm);
}

/* ==========================================================================
   13. Отзывы
   ========================================================================== */
.reviews {
  border-top: 1px solid var(--line);
  overflow: clip;
}

.marquee-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  margin-bottom: 1.1rem;
}

.marquee-track {
  display: flex;
  gap: 1.1rem;
  width: max-content;
  will-change: transform;
  animation: marquee-left 60s linear infinite;
}

.marquee-track.is-reverse {
  animation-name: marquee-right;
  animation-duration: 70s;
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.marquee-row.is-paused .marquee-track {
  animation-play-state: paused;
}

.review-card {
  flex-shrink: 0;
  width: clamp(270px, 28vw, 360px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.review-card__quote {
  font-size: var(--fs-sm);
  color: var(--paper-dim);
  line-height: var(--lh-normal);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-card__foot {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: auto;
}

.review-card__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--brass-dim), var(--sage-dim));
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-card__name {
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--paper);
}

.reviews__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}

.reviews__stars {
  display: flex;
  gap: 0.2rem;
  color: var(--brass);
  margin-bottom: 0.6rem;
}

.reviews__stars svg {
  width: 16px;
  height: 16px;
}

.reviews__docs {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.reviews__docs-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

.reviews__docs-thumb::after {
  display: none;
}

.reviews__docs-thumb img {
  object-position: center;
}

.reviews__docs-text h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--paper);
  margin-bottom: 0.3rem;
}

.reviews__docs-text p {
  font-size: var(--fs-sm);
  max-width: 30rem;
}

/* ==========================================================================
   14. Цены
   ========================================================================== */
.pricing {
  border-top: 1px solid var(--line);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.price-card {
  background: var(--ink);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background var(--dur-med) var(--ease-out-quart);
}

.price-card:hover {
  background: var(--ink-soft);
}

.price-card__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--paper);
  min-height: 2.6em;
}

.price-card__value {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-display);
  color: var(--brass-bright);
}

.price-card__value .num {
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  font-weight: 600;
}

.price-card__value .cur {
  font-size: 1.1rem;
  opacity: 0.8;
}

.price-card__unit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.price-card--hot {
  background: linear-gradient(160deg, rgba(231, 163, 62, 0.11), rgba(231, 163, 62, 0.02));
  position: relative;
}

.price-card--hot::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--brass-dim);
  pointer-events: none;
}

.price-card--hot:hover {
  background: linear-gradient(160deg, rgba(231, 163, 62, 0.16), rgba(231, 163, 62, 0.04));
}

.price-card--hot .price-card__label {
  color: var(--paper);
  font-weight: 700;
}

.price-card--hot .price-card__value {
  color: var(--brass-bright);
}

.pricing__note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.pricing__note p {
  max-width: 34rem;
}

/* ==========================================================================
   15. FAQ
   ========================================================================== */
.faq {
  border-top: 1px solid var(--line);
}

.faq__list {
  max-width: 46rem;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  text-align: left;
  padding-block: 1.5rem;
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--paper);
}

.faq-item__icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  background: var(--paper-dim);
  transition: transform var(--dur-fast) var(--ease-out-quart), opacity var(--dur-fast);
}

.faq-item__icon::before { width: 10px; height: 1px; }
.faq-item__icon::after { width: 1px; height: 10px; }

.faq-item.is-open .faq-item__icon {
  border-color: var(--brass);
}

.faq-item.is-open .faq-item__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-med) var(--ease-out-quart);
}

.faq-item__panel-inner {
  overflow: hidden;
}

.faq-item.is-open .faq-item__panel {
  grid-template-rows: 1fr;
}

.faq-item__panel p {
  padding-bottom: 1.5rem;
  max-width: 40rem;
  font-size: var(--fs-body);
}

/* ==========================================================================
   16. Контакты
   ========================================================================== */
.contact {
  border-top: 1px solid var(--line);
  position: relative;
}

.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 1.8rem + 3vw, 5rem);
}

.contact__intro h2 {
  font-size: var(--fs-display);
  margin-bottom: var(--space-md);
  max-width: 14ch;
}

.contact__intro p {
  font-size: var(--fs-lg);
  max-width: 30rem;
  margin-bottom: var(--space-lg);
}

.contact__channels {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact__channel {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--paper-dim);
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
  width: fit-content;
}

.contact__channel svg {
  width: 16px;
  height: 16px;
  color: var(--brass);
  flex-shrink: 0;
}

.contact__channel:hover {
  color: var(--paper);
}

.field {
  position: relative;
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: 0.55rem;
  letter-spacing: 0.01em;
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.65rem 0.1rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--paper);
  transition: border-color var(--dur-fast) var(--ease-out-quart);
}

.field textarea {
  resize: vertical;
  min-height: 5rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-dim);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
}

.field__err {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--danger);
  margin-top: 0.4rem;
}

.field.has-error .field__err {
  display: block;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: var(--space-md);
}

.check-field input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.check-field input:checked {
  background: var(--brass);
  border-color: var(--brass);
}

.check-field input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--brass-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-field label {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}

.honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin-top: 1.2rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  display: none;
  align-items: center;
  gap: 0.6rem;
}

.form-status.is-visible {
  display: flex;
}

.form-status.is-success {
  background: rgba(116, 166, 150, 0.1);
  color: var(--sage-bright);
  border: 1px solid var(--sage-dim);
}

.form-status.is-error {
  background: rgba(217, 105, 79, 0.1);
  color: #e79684;
  border: 1px solid rgba(217, 105, 79, 0.3);
}

.form-status.is-loading {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
}

@media (max-width: 860px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   17. Подвал
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-xl) var(--space-lg);
  position: relative;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer__brand .brand {
  font-size: 1.4rem;
  margin-bottom: 0.9rem;
}

.footer__brand .brand__mark {
  width: 34px;
  height: 34px;
}

@media (max-width: 560px) {
  .brand { font-size: 1rem; }
  .brand__mark { width: 26px; height: 26px; }
  .brand__tag { display: none; }
}

.footer__brand p {
  max-width: 26rem;
  font-size: var(--fs-sm);
}

.footer__col h5 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted-dim);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer__col a {
  font-size: var(--fs-sm);
  color: var(--paper-dim);
}

.footer__col a:hover {
  color: var(--brass);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted-dim);
}

.footer__bottom a:hover {
  color: var(--paper);
}

.back-to-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  transition: color var(--dur-fast);
}

.back-to-top:hover {
  color: var(--brass);
}

.back-to-top svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 760px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* ==========================================================================
   18. Скроллбар / фокус
   ========================================================================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: var(--radius-full);
  border: 2px solid var(--ink);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brass-dim);
}

html {
  scrollbar-color: var(--surface-2) var(--ink);
}

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

/* ==========================================================================
   19. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero__glow,
  .hero__glow--2,
  .ticker__track,
  .marquee-track {
    animation: none !important;
  }
}

/* Скрытое состояние для появления при скролле задаётся из main.js,
   а не здесь: если GSAP не загрузится, контент останется видимым. */


/* ==========================================================================
   20. Адаптив — доводка под узкие экраны
   Блок идёт последним, чтобы правила уверенно перекрывали базовые.
   ========================================================================== */

/* -- Планшет и ниже -- */
@media (max-width: 860px) {
  /* Шапка на мобильном прячет иконки соцсетей, и связаться из меню было
     нельзя. Показываем их внизу открытой панели. */
  body.nav-open .header-actions {
    display: flex;
    position: fixed;
    left: var(--space-lg);
    bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
    z-index: 560;
  }

  /* Панель прокручивается, если экран низкий (телефон в альбомной).
     Центрируем авто-полями, а не justify-content: при переполнении
     центрирование прижимает список к верху и срезает начало,
     а авто-поля просто схлопываются. */
  .main-nav__list {
    justify-content: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .main-nav__list li:first-child {
    margin-top: auto;
  }

  .main-nav__list li:last-child {
    margin-bottom: auto;
  }

  /* Заголовок секции и счётчик справа не помещаются в строку. */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
  }

  .section-num {
    padding-bottom: 0;
    order: -1;
  }

  /* Теги и ссылка проекта переставали помещаться рядом. */
  .featured-item__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

/* -- Телефон -- */
@media (max-width: 560px) {
  /* 92vw оставляли всего 14 px по краям — на узком экране это тесно. */
  .container,
  .container--narrow {
    width: calc(100% - 2.25rem);
  }

  /* Заголовок hero: слово длинное, поджимаем межбуквенное расстояние. */
  .hero__headline {
    letter-spacing: -0.03em;
  }

  .hero__headline .line:last-child {
    -webkit-text-stroke-width: 1px;
  }

  /* Две кнопки в строку не помещаются — растягиваем на всю ширину. */
  .hero__actions {
    gap: 0.65rem;
  }

  .hero__actions .btn,
  .pricing__note .btn,
  .reviews__docs .btn {
    width: 100%;
  }

  .btn {
    padding: 0.9rem 1.3rem;
  }

  /* Марка проекта в карусели отзывов не должна быть шире экрана. */
  .review-card {
    width: min(78vw, 300px);
  }

  /* Модальное окно: меньше внутренних полей, кнопка не наезжает на текст. */
  .modal {
    padding: 3.25rem 1.15rem 1.5rem;
  }

  .modal__close {
    top: 0.85rem;
    right: 0.85rem;
  }

  /* Подвал: колонки в столбик уже есть, поправляем нижнюю строку. */
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  /* Прайс: подпись и цена в одной строке жались друг к другу. */
  .price-card__label {
    min-height: 0;
  }

  /* Пальцем в мелкие ссылки попасть трудно. */
  .main-nav__list a,
  .footer__col a,
  .contact__channel {
    padding-block: 0.55rem;
  }
}

/* -- Очень узкие экраны (320–380 px) -- */
@media (max-width: 380px) {
  .hero__headline {
    letter-spacing: -0.045em;
  }

  .about__facts {
    border-radius: var(--radius-sm);
  }

  .log-row {
    padding-inline: 0;
  }

  .log-row:hover {
    padding-left: 0;
  }
}

/* -- Низкие экраны в альбомной ориентации -- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-block: 6rem var(--space-lg);
  }

  .main-nav__list {
    font-size: 1.2rem;
    gap: 0.4rem;
  }
}
