/* ─────────────────────────────────────────────────────────────
   natalishi.com — v0.3 (дизайн-токены по Figma + ревью Ромы)
   Stack: vanilla HTML + CSS. Шрифты: Forum + Manrope.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Палитра — из Figma (раздел 4 feedback/natalishi_design_review.docx) */
  --bg:            #fbfbf9;     /* почти белый */
  --bg-soft:       #f0eee5;     /* мягкий фон для toggle, миниатюр и т.п. */
  --fg:            #232c35;     /* тёмно-синий — основной текст */
  --muted:         #6A6258;     /* серо-коричневый — второстепенный текст */
  --highlight:     #FF0000;     /* красный акцент в заголовках/hero (по запросу Ромы) */
  --accent:        #232c35;     /* CTA-фон (теперь тёмно-синий, не фиолет) */
  --accent-fg:     #fbfbf9;

  /* Кнопки */
  --btn-active:    #232c35;     /* фон активной кнопки */
  --btn-active-fg: #a7c8f2;     /* текст активной кнопки */
  --btn-border:    #71a3e2;     /* рамка неактивной кнопки */
  --btn-fg:        #3c8df2;     /* текст неактивной кнопки */

  --line:          rgba(35, 44, 53, 0.14);
  --shadow:        0 1px 0 rgba(0,0,0,0.04);

  /* Типографика */
  --font-serif:    'Forum', 'Times New Roman', serif;
  --font-sans:     'Manrope', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  /* Сетка */
  --container:     1200px;       /* в v0.4 сужаем до 1160px по Figma */
  --gutter:        24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;     /* плавный скролл по якорям (hero «Работы»/«Группы») */
  scroll-padding-top: 100px;   /* чтобы под фиксированным хедером заголовки секций не прятались */
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.7; }

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

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

/* ───── Placeholder (на месте будущих фото/коллажей) ───── */
.placeholder {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(26,26,26,0.04) 0 8px,
      rgba(26,26,26,0.06) 8px 16px
    ),
    var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  position: relative;
}
.placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* ───── Header ───── */
.site-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-family: var(--font-sans);     /* Manrope, не Forum — по правке Ромы */
}
.logo-name {
  font-size: 14px;                   /* Manrope 14, по Figma */
  font-weight: 500;
  letter-spacing: 0;
}
.logo-role {
  font-size: 14px;                   /* тот же 14 — единый размер */
  font-weight: 400;
  color: var(--muted);
}
.contact {
  font-size: 14px;
  color: var(--muted);
  text-align: left;                  /* по левому краю, не центр (Roma v2 #3) */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
  justify-self: start;
}
.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
}
.nav a { color: var(--fg); }

/* ───── Hero ───── */
.hero {
  height: 100svh;
  max-height: 900px;
  min-height: 700px;             /* Roma финал — фикс высоты, без «дыры» */
  padding: 180px 0 140px;
  display: flex;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: relative;
  text-align: center;
  width: 100%;
}
.hero-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);    /* по Figma — 60px */
  line-height: 1;                       /* tight, по Figma */
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 auto 40px;
  max-width: 1160px;                    /* по Figma — чтобы "себя" не падало */
  padding: 0 24px;
}

/* Красные выделения в hero и манифесте — из дизайн-скрина Ильи */
.highlight {
  color: var(--highlight);
}

/* Арт-секция — текст по центру, фото под текстом (структура Romа v2) */
.art-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 48px;
}
.art-text {
  max-width: 1100px;
}
.section--art .body-text {
  text-transform: uppercase;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 40px);   /* Forum 40 по Figma */
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: none;
  margin: 0 auto 24px;
}
.art-photo {
  display: block;
  max-width: 420px;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  margin: 0 auto;
}
.hero-lead {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 17px;
}
.toggle { position: relative; z-index: 2; }

/* Хаотично разбросанные превью коллажей в hero — фон, не перекрывают текст */
.hero-img {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 4px;
}
.hero-img--tl {
  width: 110px; height: 140px;
  top: -60px; left: 60px;             /* Roma финал — выше и правее */
  transform: rotate(-5deg);
}
.hero-img--bl {
  width: 140px; height: 140px;
  bottom: 80px; left: -120px;         /* Roma финал — ещё левее */
  transform: rotate(4deg);
}
.hero-img--tr {
  width: 200px; height: 200px;
  top: 40%; right: -100px;            /* правее, чтобы не заезжать на «СЕБЯ» (Roma v2 #2) */
  transform: rotate(3deg);
}

/* Hero CTA — две отдельные pill-кнопки (Roma) */
.hero-cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 16px;
  align-items: center;
}
.hero-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.hero-btn--dark {
  background: var(--btn-active);     /* #232c35 */
  color: var(--btn-active-fg);       /* #a7c8f2 */
  outline: 1px solid var(--btn-active-fg);
}
.hero-btn--outline {
  background: transparent;
  color: var(--btn-fg);              /* #3c8df2 */
  border: 1px solid var(--btn-border); /* #71a3e2 */
}
.hero-btn:hover { opacity: 0.85; }

/* ───── Sections (общая отбивка) ───── */
.section {
  padding: 0 0;
  margin-bottom: 152px;             /* Roma финал — фикс отступ между секциями */
}
.section--art { padding-top: 40px; }
.site-footer { margin-top: 0; }
.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  text-transform: uppercase;
  color: var(--highlight);
}
.section-sub {
  max-width: 960px;
  margin: 0 0 84px;                    /* Roma финал — 84px header→content (вместо 40) */
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 20px;
  text-transform: uppercase;
  line-height: 1.3;
}

.body-text {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 16px;
  max-width: 640px;
}
.body-text--lead {
  font-size: 20px;
  max-width: 880px;
  margin: 0 auto 64px;
  text-align: center;
}

/* Practices lead — большой текст под CTA (правки Ромы B) */
.practices-lead {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 40px);    /* B.6 — Forum 40px */
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--fg);
  max-width: 1000px;
  margin: 0 auto 64px;
}

/* ───── Two-column (text + image) ───── */
.two-col {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 72px;
  align-items: center;
}
.col-text {
  padding: 24px 0;
}
.col-text .body-text {
  font-size: 18px;
  max-width: 480px;
}
.col-image .img-block {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 5;
  margin-left: auto;
}
.placeholder--tall { aspect-ratio: 3 / 4; }

/* ============================================ */
/* ГАЛЕРЕЯ КОЛЛАЖЕЙ — v4 (полная переверстка)   */
/* ============================================ */

/* --- ЧАСТЬ 1: заголовок (отдельно от тела) --- */
.gallery-header {
  margin-bottom: 84px;
}
.gallery-title {
  font-family: var(--font-serif);   /* Forum */
  font-size: 60px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--highlight);          /* #FF0000 */
  margin: 0 0 10px 0;
  max-width: none;
}
.gallery-subtitle {
  font-family: var(--font-sans);    /* Manrope */
  font-size: 20px;
  text-transform: uppercase;
  color: var(--fg);                 /* #232C35 */
  margin: 0;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .gallery-subtitle { white-space: normal; }
}

/* --- ЧАСТЬ 2: тело (три колонки одной высоты) --- */
.gallery-body {
  display: flex;
  gap: 0;
  align-items: stretch;             /* высота колонок = высота фото */
}

/* ЛЕВАЯ колонка */
.gallery-col-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* описание — наверху, превью — внизу */
  width: 280px;
  flex-shrink: 0;
  padding-right: 32px;
}
.gallery-description {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  margin: 0;
}
.gallery-thumbs-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.thumbs-row {
  display: flex;
  gap: 12px;
  align-items: center;
  user-select: none;
}
.thumbs {
  display: flex;
  gap: 12px;
  cursor: grab;
}
.thumbs:active { cursor: grabbing; }
.thumb {
  width: 90px;
  height: 90px;
  appearance: none;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}
.thumb.is-active {
  border: 2px solid var(--fg);
  outline: none;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.thumb-arrow {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 4px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
}
.thumb-arrow img { height: 20px; width: auto; display: block; }
.thumb-arrow:hover { opacity: 0.7; }

/* Пагинация: выровнена по правому краю превью */
.pagination {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  width: calc(3 * 90px + 2 * 12px); /* ширина = 3 превью + 2 gap */
}
.pagination .page {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: #999999;
  cursor: pointer;
  padding: 0;
}
.pagination .page.is-active {
  color: var(--fg);
  font-weight: 700;
}

/* СРЕДНЯЯ колонка */
.gallery-col-mid {
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* серии — вверху, подпись — внизу */
  width: 220px;
  flex-shrink: 0;
  padding: 0 32px;
  border-left: 1px solid #CCCCCC;
  border-right: 1px solid #CCCCCC;
}
.gallery-series-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.series-item {
  font-family: var(--font-serif);   /* Forum */
  font-size: 16px;
  color: #999999;
  cursor: pointer;
  line-height: 1.3;
  display: inline-block;
  text-decoration: none;
}
.series-item.is-active {
  color: var(--fg);
  font-weight: 700;
  text-decoration: underline;
}
.photo-caption {
  font-family: var(--font-serif);   /* Forum */
  font-size: 16px;
  color: #999999;
  font-style: italic;
  margin: 0;
}

/* ПРАВАЯ колонка — только большое фото */
.gallery-col-right {
  flex: 1;
}
.main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* ───── CTA Banner — переверстка по Роме (Практики A) ───── */
.cta-banner {
  position: relative;
  padding: 80px 0 0;
  background: var(--accent);            /* сплошной #232c35 */
  color: var(--accent-fg);
}
.cta-inner {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-bottom: 60px;
}

/* Параллакс блок с «Рождение художника» (Roma финал) */
.cta-parallax {
  height: 500px;
  overflow: hidden;
  position: relative;
}
.cta-parallax-img {
  width: 100%;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}
.cta-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  padding: 14px 32px;
  border-radius: 50px;                  /* pill */
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}
.cta-btn--dark {
  background: var(--btn-active);        /* #232c35 */
  color: var(--btn-active-fg);          /* #a7c8f2 */
  outline: 1px solid var(--btn-active-fg);
}
.cta-btn--light {
  background: var(--btn-border);        /* #71a3e2 */
  color: var(--accent);                 /* #232c35 */
}
.cta-btn:hover { opacity: 0.85; }

/* (старая .cta-image удалена — теперь .cta-parallax с параллаксом) */

/* ───── Service cards ───── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  margin-bottom: 48px;
}
.card-service { }
.card-title {
  font-family: var(--font-serif);       /* C.10 — Forum */
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 16px;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--highlight);              /* C.10 — красный */
}
.card-text {
  margin: 0;
  color: var(--fg);                     /* C.12 — #232c35 */
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

/* Кнопка «Расписание» — pill, тёмная (правки Ромы D) */
.btn-pill-dark {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  padding: 14px 32px;
  border: none;
  border-radius: 50px;
  background: var(--btn-active);        /* #232c35 */
  color: var(--btn-active-fg);          /* #a7c8f2 */
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-pill-dark:hover { opacity: 0.85; }

/* ───── Video grid ───── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.video-thumb {
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
}
.video-thumb--tall { aspect-ratio: 3 / 4; }
.video-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 17px;
  margin: 0 0 8px;
  line-height: 1.3;
}
.video-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* ───── Contacts ───── */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}
.contacts-block p { margin: 0 0 12px; }

/* ───── Footer ───── */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
}

/* ───── Real-assets adjustments (overrides .placeholder rules) ───── */

/* Hero коллажи: <img>, не <div>; полный охват своих фиксированных размеров */
img.hero-img {
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Большие коллажи (секции, галерея) — <img> вместо .placeholder div */
img.img-block {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
img.img-block--tall {
  aspect-ratio: 3 / 4;
  max-width: 520px;
  margin-left: auto;
  border-radius: 6px;
}
img.img-block--square {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
}

/* (старый .cta-bg удалён — теперь cta-image под кнопками, см. CTA Banner) */

/* (старые дублирующие правила .thumb / .thumb img удалены — единственный источник в блоке «Галерея коллажей v4» выше) */

/* Видео в проектах */
video.video-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #1a1a1a;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

/* ───── Адаптив ───── */
@media (max-width: 960px) {
  .header-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }
  .nav { justify-content: center; flex-wrap: wrap; }
  .contact { text-align: center; }
  .hero-img--tl, .hero-img--bl, .hero-img--tr { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  /* Галерея v4 — одна колонка на мобильных */
  .gallery-body {
    flex-direction: column;
    gap: 32px;
    align-items: stretch;
  }
  .gallery-col-left,
  .gallery-col-mid,
  .gallery-col-right {
    width: 100%;
    padding: 0;
  }
  .gallery-col-mid {
    border-left: none;
    border-right: none;
    border-top: 1px solid #CCCCCC;
    border-bottom: 1px solid #CCCCCC;
    padding: 16px 0;
    gap: 16px;
  }
  .main-photo {
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .pagination {
    width: auto;
    justify-content: flex-start;
  }
  .thumbs {
    justify-content: center;
  }
  .cards { grid-template-columns: 1fr; gap: 32px; }
  .video-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .video-thumb, .video-thumb--tall { aspect-ratio: 4 / 3; }
  .contacts-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-inner { flex-direction: column; align-items: center; }
}

@media (max-width: 520px) {
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 64px; }
  .video-grid { grid-template-columns: 1fr; }
  .cta-btn { font-size: 18px; padding: 14px 40px; width: 100%; text-align: center; }
}
