/* =========================================================================
   Сайт-визитка Николая Орехова — стили
   Editorial ЧБ-минимализм. Ванильный CSS, без фреймворков.

   ГДЕ ЧТО МЕНЯТЬ:
   - Цвета и палитра   → блок :root (переменные --bg, --ink, ...)
   - Размер шрифтов    → переменные --step-* (флюидная типографика)
   - Отступы секций    → переменная --section-pad
   Тексты и фото меняются в index.html, а не здесь.
   ========================================================================= */

/* ---- Шрифт Inter (самохостинг, кириллица + латиница) --------------------- */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/inter-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap;
  src: url('assets/fonts/inter-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap;
  src: url('assets/fonts/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap;
  src: url('assets/fonts/inter-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap;
  src: url('assets/fonts/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/inter-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/inter-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---- Палитра и переменные ------------------------------------------------ */
:root {
  --bg:        #F5F1EA;   /* тёплый молочный фон */
  --bg-deep:   #ECE6DB;   /* чуть темнее — для контрастных блоков */
  --ink:       #141414;   /* почти чёрный текст */
  --ink-soft:  #555049;   /* вторичный текст */
  --line:      #D8D0C2;   /* тонкие разделители */
  --ink-invert:#F5F1EA;

  --font: Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  /* Флюидная типографическая шкала (min → max, px через clamp) */
  --step-hero: clamp(2.75rem, 1.6rem + 5.6vw, 6rem);   /* имя на hero      */
  --step-h2:   clamp(1.9rem, 1.3rem + 2.6vw, 3.25rem);  /* заголовки секций */
  --step-lead: clamp(1.35rem, 1.05rem + 1.3vw, 2rem);   /* крупные фразы    */
  --step-body: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem); /* основной текст   */
  --step-sm:   0.82rem;                                 /* подписи, номера  */

  --container: 1240px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --section-pad: clamp(4.5rem, 10vh, 9rem);
  --measure: 60ch;   /* комфортная длина строки */
}

/* ---- База ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2, h3 { font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; }

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

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Мелкая editorial-подпись / номер секции */
.eyebrow {
  font-size: var(--step-sm);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
  display: flex; align-items: center; gap: 0.9rem;
}
.eyebrow::before { content: attr(data-num); font-variant-numeric: tabular-nums; color: var(--ink); }
.eyebrow span { display: inline-block; }

/* Плавное появление блоков (сдержанно). Отключается при reduced-motion и без JS. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* =========================================================================
   Навигация (тонкая, sticky)
   ========================================================================= */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--container); margin-inline: auto; padding: 0.9rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand { font-weight: 600; letter-spacing: -0.01em; font-size: 1.02rem; text-decoration: none; white-space: nowrap; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); list-style: none; margin: 0; padding: 0; }
.nav__links a {
  text-decoration: none; font-size: 0.92rem; color: var(--ink-soft);
  padding: 0.2rem 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.nav__links a:hover, .nav__links a:focus-visible { color: var(--ink); border-color: var(--ink); }
/* Телеграм — акцентная ссылка (тёмная, всегда видна) */
.nav__tg { color: var(--ink); font-weight: 500; }
/* Короткие метки (Фото/ТГ) — только на мобилке; на десктопе полные (Портфолио/Телеграм) */
.lbl-short { display: none; }
/* На мобилке оставляем Подход · Форматы · Фото · ТГ; зоны нажатия крупнее */
@media (max-width: 720px) {
  .nav__more { display: none; }
  .lbl-full { display: none; }
  .lbl-short { display: inline; }
  .nav__inner { padding-inline: 1rem; gap: 0.5rem; }
  .nav__brand { font-size: 0.88rem; }
  .nav__links { gap: 0.95rem; }
  .nav__links a { padding-block: 0.55rem; font-size: 0.88rem; }
}

/* =========================================================================
   Кнопки
   ========================================================================= */
.btns { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: inherit; font-size: 0.98rem; font-weight: 500; line-height: 1;
  padding: 0.95em 1.6em; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background .22s ease, color .22s ease, transform .22s ease;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--bg); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover, .btn--solid:focus-visible { background: transparent; color: var(--ink); }
.btn--lg { font-size: 1.05rem; padding: 1.1em 2em; }
.btn:active { transform: translateY(1px); }

/* Единый видимый фокус для клавиатуры */
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}

/* =========================================================================
   Секции — общий ритм
   ========================================================================= */
.section { padding-block: var(--section-pad); border-top: 1px solid var(--line); }
.section:first-of-type { border-top: none; }
.lead { font-size: var(--step-lead); line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.muted { color: var(--ink-soft); }
.stack-words { font-size: var(--step-lead); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }

/* Разбивка «текст | фото» */
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
/* На мобилке фото идёт ПОД текстом (иначе два фото подряд — about и approach).
   На десктопе фото уходит влево для визуального разнообразия. */
.split--reverse .split__media { order: 0; }
@media (min-width: 860px) { .split--reverse .split__media { order: -1; } }

.figure { margin: 0; overflow: hidden; background: var(--bg-deep); }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.ratio-portrait { aspect-ratio: 3 / 4; }
.ratio-tall     { aspect-ratio: 4 / 5; }
.ratio-wide     { aspect-ratio: 3 / 2; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding-top: clamp(2rem, 5vh, 4rem); padding-bottom: var(--section-pad); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: stretch; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 0.92fr) 1.08fr; } }
/* На мобилке фото не должно съедать весь первый экран — имя и кнопки поднимаются выше. */
.hero__media { margin: 0; overflow: hidden; background: var(--bg-deep); aspect-ratio: 4 / 5; max-height: 56vh; }
@media (min-width: 900px) { .hero__media { aspect-ratio: auto; height: 100%; min-height: 60vh; } }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero__body { display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.hero__name { font-size: var(--step-hero); font-weight: 700; letter-spacing: -0.03em; }
/* Роль, город и форматы — один тихий абзац единого кегля */
.hero__meta { font-size: 1.05rem; color: var(--ink-soft); line-height: 1.62; max-width: 42ch; }
.hero__claim { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.01em; line-height: 1.22; max-width: 20ch; }

/* =========================================================================
   Форматы (2×2)
   ========================================================================= */
.formats { display: grid; gap: clamp(1.5rem, 3.5vw, 3rem); margin-top: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 760px) { .formats { grid-template-columns: 1fr 1fr; } }
.card { display: flex; flex-direction: column; }
.card__media { margin: 0 0 1.3rem; overflow: hidden; background: var(--bg-deep); aspect-ratio: 3 / 2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .card:hover .card__media img { transform: none; } }
.card h3 { font-size: 1.5rem; line-height: 1.14; margin-bottom: 0.6rem; }
.card p { margin: 0; color: var(--ink-soft); max-width: 48ch; line-height: 1.5; }

/* =========================================================================
   Доверие — плакатный блок
   ========================================================================= */
.trust { background: var(--ink); color: var(--ink-invert); border-top: none; }
.trust .eyebrow { color: color-mix(in srgb, var(--ink-invert) 70%, transparent); }
.trust .eyebrow::before { color: var(--ink-invert); }
.trust__grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 860px) { .trust__grid { grid-template-columns: 0.8fr 1.2fr; } }
.trust__media { margin: 0; overflow: hidden; aspect-ratio: 3 / 4; }
.trust__media img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.02); }
.trust__text { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.9rem); font-weight: 600; line-height: 1.18; letter-spacing: -0.02em; }
.trust__text b { font-weight: 600; }

/* =========================================================================
   Видео — вертикальный кадр рядом с текстом.
   Видео снято на телефон (9:16), поэтому стоит колонкой, а не полосой
   во всю ширину: горизонтальная рамка резала бы кадр и субтитры.
   ========================================================================= */
.split--video { align-items: center; }

.video__frame { margin: 0; display: flex; justify-content: center; }

.video__frame video {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(74vh, 760px);
  aspect-ratio: 9 / 16;
  background: var(--ink);
}

.video__note {
  margin-top: 1.4rem;
  font-size: var(--step-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* =========================================================================
   Галерея — журнальная сетка (masonry через columns)
   ========================================================================= */
.gallery { columns: 3 260px; column-gap: clamp(0.8rem, 1.6vw, 1.4rem); margin-top: clamp(2rem, 4vw, 3.5rem); }
.gallery figure { margin: 0 0 clamp(0.8rem, 1.6vw, 1.4rem); break-inside: avoid; overflow: hidden; background: var(--bg-deep); }
.gallery img { width: 100%; height: auto; transition: transform .6s ease; }
.gallery figure:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .gallery figure:hover img { transform: none; } }
@media (max-width: 560px) { .gallery { columns: 1; } }  /* мобилка — крупные кадры */

/* =========================================================================
   Контакты — финал
   ========================================================================= */
.contact { text-align: center; }
.contact__title { font-size: var(--step-h2); margin-bottom: 1.1rem; }
.contact__hint { max-width: 46ch; margin: 0 auto 2rem; color: var(--ink-soft); font-size: 1.08rem; line-height: 1.5; }
.contact .btns { justify-content: center; }
.contact__alt { margin-top: 1.6rem; display: flex; gap: 0.9rem; justify-content: center; align-items: center; font-size: 1.05rem; }
.contact__alt a { text-decoration: none; border-bottom: 1px solid var(--line); padding: 0.3rem 0 2px; transition: border-color .2s; }
.contact__alt a:hover, .contact__alt a:focus-visible { border-color: var(--ink); }
.contact__alt span { color: var(--ink-soft); }
.contact__place { color: var(--ink-soft); margin-top: 2.4rem; font-size: 1rem; }

.footer { border-top: 1px solid var(--line); padding-block: 2.4rem; text-align: center; color: var(--ink-soft); font-size: 0.9rem; }

/* =========================================================================
   Full-bleed на мобилке — сильные фото край-в-край (hero, плакат, галерея).
   Текстовые split-блоки и карточки форматов остаются с полями (контраст).
   ========================================================================= */
@media (max-width: 720px) {
  .hero__media   { margin-inline: calc(-1 * var(--gutter)); }
  .trust__media  { margin-inline: calc(-1 * var(--gutter)); }
  .video__frame  { margin-inline: calc(-1 * var(--gutter)); }
  .video__frame video { width: 100%; height: auto; }
}
@media (max-width: 560px) {
  .gallery { margin-inline: calc(-1 * var(--gutter)); column-gap: 0; }
  .gallery figure { margin-bottom: 4px; }
}
