/* =========================================================
   Александр — фотограф. Тёмная тема, мобильный приоритет.
   Порядок: переменные → база → шапка → секции 1–6 → lightbox
   ========================================================= */

:root {
  --bg:        #0e0f12;   /* почти чёрный фон */
  --bg-2:      #16181d;   /* карточки, панели */
  --bg-3:      #1e2127;   /* ховеры, границы-плейсхолдеры */
  --text:      #f4f5f7;   /* основной текст */
  --muted:     #9aa0ab;   /* второстепенный текст */
  --line:      #2a2e36;   /* тонкие разделители */
  --accent:    #e6b566;   /* тёплый акцент, используется дозировано */
  --maxw:      1120px;
  --gap:       clamp(16px, 4vw, 32px);
  --radius:    12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: clamp(16px, 5vw, 40px);
  padding-right: clamp(16px, 5vw, 40px);
}

/* Заголовки секций */
.section { padding: clamp(56px, 12vw, 120px) 0; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-lead {
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: clamp(28px, 5vw, 48px);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--text); color: #111; }
.btn--primary:hover { background: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.25); }
.btn--ghost:hover { border-color: var(--text); }

/* ================= Шапка ================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,15,18,.72);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { font-weight: 700; letter-spacing: -0.01em; font-size: 18px; }
.brand span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__links { display: flex; gap: 24px; }
.nav__links a { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav__links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* Мобильное меню */
@media (max-width: 820px) {
  .nav__links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    transform: translateY(-120%);
    transition: transform .25s ease;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 14px clamp(16px, 5vw, 40px); font-size: 17px; }
  .nav .btn--primary { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Планшеты: картинка перекрывает ширину — смещаем к героине, чтобы не ушла за край. */
  .hero { background-position: 70% center; }
}

/* ================= 1. Главный экран ================= */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex; align-items: flex-end;
  /* Реальное фото (assets/photos/hero-bg.webp) + направленный overlay.
     Кадр скомпонован так, что героиня — в правой трети, слева поле и небо.
     Два градиента: тёмный слева→прозрачный справа и тёмный снизу→прозрачный
     сверху. Сильнее всего затемнён нижний-левый угол (имя и кнопки) —
     контраст текста держится на уровне AA; лицо справа остаётся различимым.
     background-position 62% удерживает героиню в кадре на ноутбуках/планшетах,
     где картинка перекрывает ширину; для телефонов — своё значение ниже. */
  background:
    /* Вариант A (активен): левый overlay мягче — .60 на старте, спад к прозрачному к 55% ширины.
       Заголовок и кнопки читаются, но золото поля слева различимо. */
    linear-gradient(90deg, rgba(14,15,18,.65) 0%, rgba(14,15,18,.34) 34%, rgba(14,15,18,0) 55%),
    /* Вариант B (закомментирован): левый .70 на старте, спад быстрее — к 45% ширины.
       Чтобы переключить — закомментировать строку варианта A выше и раскомментировать строку ниже.
    linear-gradient(90deg, rgba(14,15,18,.70) 0%, rgba(14,15,18,.35) 22%, rgba(14,15,18,0) 45%), */
    linear-gradient(0deg, rgba(14,15,18,.72) 0%, rgba(14,15,18,.30) 36%, rgba(14,15,18,0) 70%),
    url('../photos/hero-bg.webp');
  background-size: cover;
  background-position: 62% center;
}
.hero__inner { padding-bottom: clamp(48px, 9vw, 96px); padding-top: 96px; width: 100%; }
.hero__name {
  font-size: clamp(40px, 10vw, 88px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.02;
  text-shadow: 0 2px 18px rgba(0,0,0,.5);
}
.hero__name span { color: var(--accent); }   /* акцентная точка, как в логотипе */
.hero__tagline {
  margin-top: 14px;
  font-size: clamp(13px, 2.4vw, 15px);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);          /* дескриптор рода занятий — акцентом */
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.hero__role {
  font-size: clamp(16px, 3.5vw, 22px);
  color: #eef0f3;                /* светлее muted — читаемо над фото (AA) */
  letter-spacing: .04em;
  margin-top: 5px;               /* прижата к дескриптору «Фотосъёмка» выше */
  text-shadow: 0 1px 12px rgba(0,0,0,.55);
}
.hero__actions .btn--ghost { text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(28px, 5vw, 40px); }

/* ================= 2. Портфолио ================= */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 4vw, 36px); }
.filter__btn {
  padding: 9px 18px; border-radius: 999px;
  background: var(--bg-2); color: var(--muted);
  border: 1px solid var(--line); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.filter__btn:hover { color: var(--text); }
.filter__btn.is-active { color: #111; background: var(--text); border-color: var(--text); }

.gallery {
  columns: 3 260px;      /* адаптивная masonry-раскладка */
  column-gap: 16px;
}
.gallery__item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--line);
}
.gallery__item img {
  width: 100%;
  transition: transform .4s ease, opacity .4s ease;
}
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item::after {
  content: attr(data-cat);
  position: absolute; left: 12px; bottom: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(14,15,18,.7); color: var(--text);
  opacity: 0; transition: opacity .2s ease;
}
.gallery__item:hover::after { opacity: 1; }
.gallery__item.is-hidden { display: none; }

/* ================= Секции-плейсхолдеры (Этапы 4–5) ================= */
.placeholder-note {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 40px);
  color: var(--muted);
  background: var(--bg-2);
}

/* ================= 3. Услуги ================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.service-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease, transform .2s ease;
}
.service-card:hover { border-color: rgba(230,181,102,.5); transform: translateY(-3px); }
.service-card__title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.service-card__desc { color: var(--muted); margin-bottom: 20px; }
.service-card__meta {
  list-style: none;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
  font-size: 14px;
}
.service-card__meta li { position: relative; padding-left: 20px; color: var(--text); }
.service-card__meta li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 2px; background: var(--accent);
}
.services-note {
  margin-top: clamp(24px, 4vw, 36px);
  color: var(--muted);
}
.services-note a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.services-note a:hover { border-color: var(--accent); }

/* ================= 4. Обо мне ================= */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
/* Портрет компактнее, чтобы не перевешивать короткий текст рядом. */
.about__photo { max-width: 320px; justify-self: start; }
.about__photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.about__text p:not(.eyebrow):not(.section-title) {
  color: var(--muted);
  margin-bottom: 16px;
}
.about__text .section-title { margin-bottom: 20px; }

@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 360px; }
}

/* ================= 5. Запись ================= */
.booking {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 40px);
  align-items: stretch;          /* обе колонки — одной высоты, единый ряд */
}
.booking__col { display: flex; flex-direction: column; }
.booking__subtitle { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* Контейнер inline-виджета Cal.com — тёмный, чтобы виджет слился с дизайном */
.booking__cal {
  flex: 1 1 auto;
  min-height: 620px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.booking__cal > #cal-inline {
  width: 100%;
  height: 100%;
  min-height: 620px;
  overflow: auto;
}
.booking__fallback { margin-top: 12px; font-size: 14px; color: var(--muted); }
.booking__fallback a { color: var(--accent); }

/* Форма */
.form { display: flex; flex-direction: column; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__field { display: flex; flex-direction: column; gap: 7px; }
.form__field > span { font-size: 14px; color: var(--muted); }
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  color-scheme: dark;    /* тёмные нативные контролы (выпадашки, автозаполнение) */
  transition: border-color .2s ease;
}
.form input::placeholder,
.form textarea::placeholder { color: #6b7280; }
.form input:focus,
.form select:focus,
.form textarea:focus { outline: none; border-color: var(--accent); }
.form textarea { resize: vertical; min-height: 84px; }
/* Форма заполняет высоту колонки — на десктопе ряд с календарём выглядит ровным.
   На мобильном колонки схлопнуты: свободной высоты нет, поля остаются компактными. */
.booking .form { flex: 1 1 auto; }
.form__field--grow { flex: 1 1 0; }
.form__field--grow textarea { flex: 1 1 auto; }

.form__submit { align-self: flex-start; margin-top: 4px; }
.form__submit[disabled] { opacity: .6; cursor: default; }
.form__status { font-size: 14px; min-height: 1.2em; }
.form__status.is-ok { color: #6ee7a8; }
.form__status.is-error { color: #f4879a; }

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

/* ================= 6. Контакты ================= */
.contacts {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
}
.contacts__lines { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.contacts__line {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: clamp(18px, 3vw, 22px); font-weight: 600;
  transition: color .2s ease;
}
.contacts__line svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.contacts__line:hover { color: var(--accent); }

.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.social {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text);
  transition: color .2s ease, border-color .2s ease, transform .2s ease, background .2s ease;
}
.social:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.social svg { width: 23px; height: 23px; }
/* Заглушённая соцсеть (ссылки пока нет): иконка на месте, но неактивна. */
.social--muted { opacity: .38; pointer-events: none; cursor: default; }
.social--muted:hover { color: var(--text); border-color: var(--line); transform: none; }

/* ================= Подвал ================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--muted); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
}

/* ================= Lightbox ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,9,11,.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 92vw; max-height: 86vh;
  border-radius: 8px; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: var(--text); font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox__btn:hover { background: rgba(255,255,255,.18); }
.lightbox__prev { left: max(16px, 3vw); }
.lightbox__next { right: max(16px, 3vw); }
.lightbox__close { top: max(16px, 3vw); right: max(16px, 3vw); transform: none; }
.lightbox__counter {
  position: absolute; bottom: max(16px, 3vw); left: 0; right: 0;
  text-align: center; color: var(--muted); font-size: 14px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
  .lightbox__btn { width: 44px; height: 44px; font-size: 18px; }
  /* Телефоны: держим лицо героини в кадре (узкая обрезка по центру героини). */
  .hero { background-position: 80% center; }
}

/* Уважение к пользователям, отключившим анимации */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
