/* ===== Палитра: молочный · бежевый · графит — меняйте здесь ===== */
:root {
  --milk: #faf8f4;
  --soft: #f1ece5;
  --beige: #e4dbcf;
  --sand: #cfc2b1;
  --graphite: #262523;
  --muted: #7b756d;
  --line: rgba(38, 37, 35, .14);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: var(--milk); color: var(--graphite); font: 300 15px/1.75 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
section[id] { scroll-margin-top: 70px; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container { width: min(1180px, 100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.1; }
h2 { font-size: clamp(34px, 4.4vw, 52px); }
h3 { font-size: 24px; font-weight: 400; }
.title { text-align: center; margin-bottom: 56px; }
.title--second { margin-top: 110px; }
.center { text-align: center; }

/* Кнопки */
.btn { display: inline-block; padding: 15px 36px; border-radius: 999px; background: var(--graphite); color: var(--milk); border: 1px solid var(--graphite); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 400; transition: background .3s, color .3s; }
.btn:hover { background: transparent; color: var(--graphite); }
.btn--line { background: transparent; color: var(--graphite); }
.btn--line:hover { background: var(--graphite); color: var(--milk); }

/* Заглушки для фото */
.photo { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--beige), var(--sand)); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo__empty { display: none; position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); padding: 8px; }
.photo__empty small { font: 300 11px var(--sans); font-style: normal; }
.photo.is-empty img { display: none; }
.photo.is-empty .photo__empty { display: flex; }

/* Шапка */
.header { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 244, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 24px; }
.logo { font-family: var(--serif); font-size: 22px; letter-spacing: .28em; white-space: nowrap; }
.nav { display: flex; gap: 34px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.nav a { position: relative; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px; background: currentColor; transition: width .3s; }
.nav a:hover::after { width: 100%; }
.header__right { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .12em; }
.lang span { color: var(--sand); }
.lang button { color: var(--muted); min-width: 36px; min-height: 44px; padding: 0 4px; }
.lang button.is-active { color: var(--graphite); font-weight: 500; }
.burger { display: none; width: 44px; height: 44px; }
.burger span { display: block; width: 22px; height: 1px; background: var(--graphite); margin: 6px auto; }

/* 1. Hero — большое фото и имя поверх */
.hero { position: relative; display: grid; grid-template-columns: 1fr 44%; min-height: min(88vh, 820px); min-height: min(88svh, 820px); overflow: hidden; }
.hero__photo { grid-column: 2; grid-row: 1; position: relative; }
.hero__photo img { object-position: 50% 30%; } /* точка фокуса — лицо; при кадрировании остаётся в кадре */
.hero__content { grid-column: 1; grid-row: 1; align-self: center; width: auto; margin: 0; padding: 80px 56px 80px max(16px, calc((100vw - 1180px) / 2 - 8px)); position: relative; z-index: 1; }
.monogram { width: 76px; height: 76px; border: 1px solid var(--graphite); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 30px; line-height: 1; margin-bottom: 34px; padding-bottom: 8px; }
.monogram span { margin: 16px 0 0 -2px; }
.hero h1 { font-size: clamp(46px, 5.4vw, 86px); letter-spacing: .14em; line-height: 1.02; }
.hero__role { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 30px); color: var(--muted); margin: 12px 0 26px; }
.hero__lead { max-width: 440px; font-size: 16px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }

/* Секции */
.section { padding: 120px 0; }
.section--soft { background: var(--soft); }

/* 2. Обо мне */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: center; }
.about__photo { aspect-ratio: 4 / 5; }
.about h2 { margin-bottom: 26px; }
.about__big { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.35; margin-bottom: 22px; }
.about__text > p:not(.about__big) { color: var(--muted); margin-bottom: 14px; }
.socials { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.socials li { padding: 20px 8px; text-align: center; }
.socials li + li { border-left: 1px solid var(--line); }
.socials b { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.socials span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Карточка статистики Instagram */
.insight { display: flex; align-items: center; gap: 18px; margin-top: 24px; padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 40px -28px rgba(38, 37, 35, .4); }
.insight__icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: #4f7a5a; font-size: 20px; line-height: 1; }
.insight__label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.insight__value { line-height: 1.3; }
.insight__value b { font-family: var(--serif); font-weight: 500; font-size: 30px; margin-right: 4px; }
.insight__value span { color: var(--muted); font-size: 14px; }

/* 3. Направления */
.niches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.niche { background: var(--milk); padding: 40px 30px; text-align: center; }
.niche__n { display: block; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--muted); margin-bottom: 22px; }
.niche h3 { margin-bottom: 14px; }
.niche p { color: var(--muted); font-size: 14px; }

/* 4. Работы — фото-сетка */
.photos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.photos .photo { aspect-ratio: 1; margin: 0; }
.photos .photo:nth-child(4n+2) { background: linear-gradient(160deg, #ddd3c6, #bfb09d); }
.photos .photo:nth-child(7n+5) { background: linear-gradient(160deg, #3a3835, #5b5751); }
.photos .photo:nth-child(7n+5) .photo__empty { color: var(--sand); }
.photos img { transition: transform .8s; }
.photos .photo:hover img { transform: scale(1.04); }

/* 4. Работы — видео в рамках телефона */
/* Лента видео: в один ряд по --per штук, остальные — по кнопке → или свайпом */
.vslider { --per: 4; --gap: 32px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 18px; }
.videos { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; padding: 10px 0 34px; }
.videos::-webkit-scrollbar { display: none; }
.videos__pad { flex: 0 0 0; }
.video { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); scroll-snap-align: start; cursor: pointer; text-align: center; }
.vslider__btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--graphite); background: transparent; color: var(--graphite); font-size: 20px; line-height: 1; display: grid; place-items: center; margin-bottom: 70px; transition: background .25s, color .25s, opacity .25s; }
.vslider__btn:hover:not(:disabled) { background: var(--graphite); color: var(--milk); }
.vslider__btn:disabled { opacity: .2; cursor: default; }
.vslider__count { grid-column: 1 / -1; text-align: center; font-size: 12px; letter-spacing: .14em; color: var(--muted); margin-top: -6px; }
.vslider.is-single .vslider__btn, .vslider.is-single .vslider__count { display: none; }
.vslider.is-single { grid-template-columns: minmax(0, 1fr); }
.phone { position: relative; aspect-ratio: 9 / 16; border-radius: 30px; border: 7px solid var(--graphite); overflow: hidden; background: linear-gradient(160deg, var(--beige), var(--sand)); box-shadow: 0 24px 50px -28px rgba(38,37,35,.5); transition: transform .4s; }
.video:hover .phone { transform: translateY(-6px); }
.phone::before { content: ""; position: absolute; top: 8px; left: 50%; width: 34%; height: 14px; border-radius: 999px; background: var(--graphite); transform: translateX(-50%); z-index: 2; }
.phone video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.video.has-video .phone video { opacity: 1; }
.phone__file { position: absolute; left: 0; right: 0; bottom: 18px; font-size: 11px; color: var(--muted); }
.video.has-video .phone__file { display: none; }
.phone__play { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; display: grid; place-items: center; border-radius: 50%; background: rgba(250,248,244,.9); font-size: 13px; padding-left: 3px; transition: opacity .3s; }
.video.has-video:hover .phone__play { opacity: 0; }
.video__title { font-family: var(--serif); font-size: 21px; margin-top: 18px; line-height: 1.2; }
.video__meta { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* 5. Услуги */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: center; margin-bottom: 56px; }
.service { background: var(--milk); padding: 26px 26px 34px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.service__img { aspect-ratio: 4 / 3; margin-bottom: 12px; }
.service p { color: var(--muted); font-size: 14px; }
.service ul { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 13px; }
.service--main { background: var(--graphite); color: var(--milk); padding-top: 34px; padding-bottom: 46px; }
.service--main p { color: rgba(250,248,244,.7); }
.service--main ul { border-color: rgba(250,248,244,.18); }
.service--main .service__img { aspect-ratio: 4 / 4.2; }
.note { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* 6. Контакты */
.contact { text-align: center; border-top: 1px solid var(--line); }
.contact__inner { display: grid; justify-items: center; gap: 22px; }
.contact .hero__role { margin: 0; }
.contact__title { max-width: 780px; font-size: clamp(36px, 5vw, 64px); }
.contact__lead { max-width: 500px; color: var(--muted); font-size: 16px; margin-bottom: 10px; }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; margin-top: 18px; font-size: 13px; letter-spacing: .08em; }
.contact__links a { display: inline-block; border-bottom: 1px solid var(--line); padding: 10px 0 3px; transition: border-color .2s; }
.contact__links a:hover { border-color: var(--graphite); }

.footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Модалка */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(38, 37, 35, .92); display: none; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.modal.is-open { display: grid; }
.modal__close { width: 48px; height: 48px; }
.modal video { max-height: 90vh; max-height: 90svh; max-width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 16px; }
.modal__close { position: absolute; top: 12px; right: 22px; color: var(--milk); font-size: 44px; font-weight: 200; line-height: 1; }

/* Появление */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Доступность и тач ===== */
@media (hover: none) {
  .video:hover .phone { transform: none; }
  .photos .photo:hover img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
body.is-locked { overflow: hidden; }

/* ===== Адаптив =====
   ≥1200 — большой ПК (базовые стили выше)
   ≤1100 — ноутбук / планшет горизонтально
   ≤960  — планшет: меню-бургер, первый экран «фото сверху»
   ≤700  — большой телефон / маленький планшет
   ≤600  — телефон
   ≤380  — маленький телефон
*/
@media (min-width: 1600px) {
  .container { width: min(1320px, 100% - 64px); }
  .hero { min-height: min(88svh, 960px); }
  .hero__content { padding-left: calc((100vw - 1320px) / 2 - 8px); }
}

/* Ноутбук: уплотняем шапку, чтобы полное имя и меню влезали в одну строку */
@media (min-width: 961px) and (max-width: 1180px) {
  .logo { font-size: 18px; letter-spacing: .2em; }
  .nav { gap: 20px; font-size: 11px; letter-spacing: .12em; }
}

@media (max-width: 1100px) {
  .niches { grid-template-columns: repeat(2, 1fr); }
  .about { gap: 56px; }
  .vslider { --gap: 22px; column-gap: 12px; }
  .services { gap: 18px; }
  .service { padding: 22px 20px 30px; }
}

@media (max-width: 960px) {
  /* меню */
  .burger { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 20px; background: var(--milk); border-bottom: 1px solid var(--line); display: none; max-height: calc(100svh - 70px); overflow-y: auto; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .burger span { transition: transform .3s; }
  .burger.is-open span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .burger.is-open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  /* первый экран: фото сверху, имя под ним по центру */
  .hero { min-height: 0; display: flex; flex-direction: column; align-items: stretch; }
  .hero__photo { aspect-ratio: 16 / 10; max-height: 62svh; width: 100%; }
  .hero__photo img { object-position: 50% 28%; }
  .hero__content { width: min(1180px, 100% - 32px); margin-inline: auto; padding: 0 0 80px; text-align: center; display: flex; flex-direction: column; align-items: center; }
  .hero h1 { font-size: clamp(46px, 8vw, 80px); }
  .monogram { margin: -38px 0 28px; background: var(--milk); }
  .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }

  .section { padding: 96px 0; }
  .services { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .service--main { padding: 26px 26px 34px; }
  .service--main .service__img, .service__img { aspect-ratio: 16 / 10; }
  .vslider { --per: 3; }
}

/* Планшет: карточки услуг горизонтальные — фото слева, текст справа */
@media (min-width: 601px) and (max-width: 960px) {
  .services { max-width: 760px; }
  .service, .service--main { display: grid; grid-template-columns: 40% 1fr; grid-template-rows: auto auto 1fr; column-gap: 28px; row-gap: 10px; text-align: left; padding: 22px; }
  .service__img, .service--main .service__img { grid-row: 1 / span 3; aspect-ratio: auto; height: 100%; min-height: 230px; margin: 0; }
  .service h3 { align-self: end; }
  .service ul { align-self: start; }
}

@media (max-width: 700px) {
  .section { padding: 72px 0; }
  .title { margin-bottom: 36px; }
  .title--second { margin-top: 72px; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .about__photo { max-width: 440px; width: 100%; justify-self: center; }
  .about h2 { text-align: center; }
  .hero__content { padding-bottom: 64px; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .hero__photo { aspect-ratio: 4 / 5; max-height: 68svh; }
  .hero h1 { font-size: clamp(40px, 13vw, 64px); letter-spacing: .1em; }
  .hero__actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
  .btn { padding: 16px 28px; text-align: center; }
  .niches { grid-template-columns: 1fr; gap: 12px; }
  .niche { padding: 30px 24px; }
  .photos { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  /* телефон: 2 видео на экране, стрелки под лентой, листать можно и свайпом */
  .vslider { --per: 2; --gap: 14px; grid-template-columns: 1fr auto auto 1fr; grid-template-areas: "list list list list" ". prev next ."; column-gap: 12px; }
  .videos { grid-area: list; padding-bottom: 22px; }
  .vslider__btn { margin: 0; width: 46px; height: 46px; }
  .vslider__btn--prev { grid-area: prev; }
  .vslider__btn--next { grid-area: next; }
  .vslider__count { grid-column: 1 / -1; margin-top: 12px; }
  .phone { border-width: 5px; border-radius: 22px; }
  .phone::before { top: 6px; height: 10px; }
  .phone__play { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .video__title { font-size: 18px; margin-top: 12px; }
  .video__meta { font-size: 10px; letter-spacing: .1em; }
  .socials { grid-template-columns: repeat(2, 1fr); }
  .socials li:nth-child(3) { border-left: 0; }
  .socials li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .contact__links { flex-direction: column; gap: 0; width: 100%; max-width: 320px; }
  .contact__links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .footer__inner { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
  .logo { font-size: 18px; letter-spacing: .2em; }
}

@media (max-width: 480px) {
  .logo__first { display: none; }
}

@media (max-width: 380px) {
  .insight { padding: 16px 18px; gap: 14px; }
  .insight__value b { font-size: 26px; }
  .container { width: calc(100% - 28px); }
  .logo { font-size: 16px; letter-spacing: .14em; }
  .nav { padding-inline: 14px; }
  .service { padding: 18px 16px 26px; }
}

/* Телефон горизонтально: не даём первому экрану растянуться на несколько экранов */
@media (max-height: 500px) and (orientation: landscape) {
  .hero__photo { max-height: 55svh; }
  .modal video { max-height: 86svh; }
}
