/* ============================================================
   Гульнара Пегашева — персональный стилист
   Журнальный минимализм / Editorial Design · Mobile First
   ============================================================ */

/* ---------- Переменные ---------- */
:root {
  --bg:        #FAF8F5;  /* тёплый молочный */
  --bg-soft:   #F0ECE6;  /* мягкий песочный */
  --ink:       #1C1C1C;  /* глубокий графитовый */
  --accent:    #7A1F2E;  /* глубокий бордовый */
  --accent-dk: #5E1421;  /* бордовый при наведении */
  --line:      rgba(28, 28, 28, 0.15);
  --white:     #FFFFFF;

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans:  "Manrope", Arial, sans-serif;

  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --header-h: 72px;
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

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

code {
  font-family: monospace;
  font-size: 0.85em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 3px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Типографика ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(32px, 5.5vw, 52px);
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.section-title em,
.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.section-head {
  margin-bottom: 56px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.section-note {
  margin-top: 20px;
  max-width: 560px;
  font-size: 14px;
  color: rgba(28, 28, 28, 0.65);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.btn--accent {
  background: var(--accent);
  color: var(--white);
}
.btn--accent:hover,
.btn--accent:focus-visible {
  background: var(--accent-dk);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

.btn--sm { padding: 11px 22px; font-size: 11px; }
.btn--full { width: 100%; }

/* ---------- Журнальные рамки для фото ---------- */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}
.frame::after {
  /* тонкая внутренняя рамка, как в журнале */
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(250, 248, 245, 0.55);
  pointer-events: none;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.frame:hover img { transform: scale(1.04); }

.frame--portrait { aspect-ratio: 3 / 4; }
.frame--square   { aspect-ratio: 1 / 1; }

.frame__caption {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(28, 28, 28, 0.55);
}

/* ============================================================
   ШАПКА
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.header.is-scrolled { box-shadow: 0 4px 24px rgba(28, 28, 28, 0.08); }

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Логотип-монограмма */
.logo { display: inline-flex; align-items: center; gap: 12px; }

.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.logo:hover .logo__mark {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.logo__text {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.logo__text em { font-style: italic; font-weight: 400; }

/* Навигация */
.nav { display: none; }

.nav__link {
  position: relative;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 6px 0;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}
.nav__link:hover::after { width: 100%; }

.nav__cta { display: none; }

.header__cta { display: none; }

/* Бургер */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 120;
}
.burger span {
  display: block;
  height: 1.5px;
  width: 24px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   ПЕРВЫЙ ЭКРАН
   ============================================================ */
.hero { padding: calc(var(--header-h) + 64px) 0 80px; }

.hero__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(44px, 9vw, 84px);
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero__lead {
  max-width: 460px;
  font-size: 17px;
  font-weight: 300;
  color: rgba(28, 28, 28, 0.75);
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.hero__note {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(28, 28, 28, 0.5);
}

.hero__photo { margin: 0; }
.hero__photo figcaption {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(28, 28, 28, 0.55);
}

/* ============================================================
   ОБО МНЕ
   ============================================================ */
.about { padding: 96px 0; border-top: 1px solid var(--line); }

.about__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

.about__content p + p { margin-top: 16px; }
.about__content > p {
  max-width: 520px;
  color: rgba(28, 28, 28, 0.8);
}

.about__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 20px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  list-style: none;
}
.about__facts li {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(28, 28, 28, 0.6);
}
.about__facts strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

/* ============================================================
   УСЛУГИ (аккордеон)
   ============================================================ */
.services { padding: 96px 0; background: var(--bg-soft); }

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

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

.service__head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  padding: 26px 4px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.service__index {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
}

.service__name {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.3s var(--ease);
}
.service__head:hover .service__name { color: var(--accent); }

.service__meta {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(28, 28, 28, 0.55);
  white-space: nowrap;
}

.service__toggle {
  position: relative;
  display: none; /* плюсик показываем на планшетах и шире */
  align-self: center;
  width: 14px;
  height: 14px;
}
.service__toggle::before,
.service__toggle::after {
  content: "";
  position: absolute;
  top: 50%; left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transition: transform 0.35s var(--ease);
}
.service__toggle::after { transform: rotate(90deg); }
.service.is-open .service__toggle::after { transform: rotate(0deg); }

.service__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease);
}
.service.is-open .service__body { max-height: 1600px; }

.service__content {
  padding: 0 4px 32px 60px;
  max-width: 640px;
}
.service__content p { color: rgba(28, 28, 28, 0.75); }

/* Списки этапов внутри услуги */
.service__steps { margin: 0 0 16px; padding-left: 20px; }
.service__steps li { margin-bottom: 12px; }
.service__steps strong { font-weight: 600; }

/* Курсивная врезка с бордовой линией слева */
.service__extra {
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font-style: italic;
}

/* Блок «Кому подходит» */
.service__fit { margin-bottom: 8px; }

.service__fit-list {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}
.service__fit-list li {
  position: relative;
  margin-bottom: 6px;
  color: rgba(28, 28, 28, 0.7);
}
.service__fit-list li::before {
  content: "—";
  position: absolute;
  left: -20px;
  color: var(--accent);
}

.service__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.service__detail {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(28, 28, 28, 0.5);
}

/* ============================================================
   ПОРТФОЛИО
   ============================================================ */
.portfolio { padding: 96px 0; border-top: 1px solid var(--line); }

.portfolio__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 40px;
}

.filter-btn {
  background: none;
  border: none;
  padding: 8px 0;
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(28, 28, 28, 0.55);
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.filter-btn:hover { color: var(--ink); }
.filter-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Асимметричная сетка */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.portfolio__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--bg-soft);
  cursor: pointer;
}
.portfolio__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.portfolio__item:hover img,
.portfolio__item:focus-visible img { transform: scale(1.05); }

.portfolio__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 18px 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(to top, rgba(28, 28, 28, 0.55), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.portfolio__item:hover figcaption,
.portfolio__item:focus-visible figcaption {
  opacity: 1;
  transform: translateY(0);
}

.item--wide { grid-column: span 2; }
.item--wide img { aspect-ratio: 16 / 9; }
.item--tall img { aspect-ratio: 3 / 5; }

/* Скрытие карточек при фильтрации */
.portfolio__item.is-hidden {
  display: none;
  animation: fadeIn 0.5s var(--ease);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.portfolio__hint {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(28, 28, 28, 0.45);
}

/* ============================================================
   ЛАЙТБОКС
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 28, 28, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  transform: scale(0.94);
  transition: transform 0.35s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }

.lightbox__close {
  position: absolute;
  top: 20px; right: 24px;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  color: var(--white);
  cursor: pointer;
  transition: transform 0.3s var(--ease);
}
.lightbox__close:hover { transform: rotate(90deg); }

/* ============================================================
   КОНТАКТЫ И ФОРМА
   ============================================================ */
.contacts { padding: 96px 0; background: var(--bg-soft); }

.contacts__inner {
  display: grid;
  gap: 56px;
}

.contacts__text {
  max-width: 420px;
  margin: 20px 0 32px;
  color: rgba(28, 28, 28, 0.75);
}

.contacts__list {
  list-style: none;
  border-top: 1px solid var(--line);
}
.contacts__list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contacts__label {
  min-width: 96px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(28, 28, 28, 0.5);
}
.contacts__list a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.contacts__list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contacts__note {
  margin-top: 16px;
  font-size: 11px;
  color: rgba(28, 28, 28, 0.4);
}

/* Форма */
.form {
  background: var(--white);
  padding: 36px 28px;
  border: 1px solid var(--line);
}

.form__title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 28px;
}

.field { margin-bottom: 20px; }

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(28, 28, 28, 0.6);
}

.field__input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  outline: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field__input:focus { border-color: var(--accent); background: var(--white); }
.field__input.has-error { border-color: #B4463B; }

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237A1F2E' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.field__error {
  margin-top: 6px;
  font-size: 12px;
  color: #B4463B;
}

.form__submit { margin-top: 4px; }

.form__hint {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(28, 28, 28, 0.45);
  text-align: center;
}

/* ============================================================
   ТОСТ (уведомление)
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 300;
  transform: translate(-50%, 20px);
  padding: 16px 28px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(28, 28, 28, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ============================================================
   ФУТЕР
   ============================================================ */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(28, 28, 28, 0.55);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo__mark--footer { width: 56px; height: 56px; font-size: 24px; }

.footer__name {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
}

.footer__meta { letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px; }

.footer__up { transition: color 0.3s var(--ease); }
.footer__up:hover { color: var(--accent); }

/* ============================================================
   АНИМАЦИЯ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* лёгкая задержка-ступенька для соседних блоков */
.reveal:nth-child(even) { transition-delay: 0.12s; }

/* уважение к настройкам доступности */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ============================================================
   ПЛАНШЕТ И ШИРЕ (≥768px)
   ============================================================ */
@media (min-width: 768px) {
  .container { padding: 0 40px; }

  .service__toggle { display: block; }
  .service__head { grid-template-columns: 56px 1fr auto 40px; }
  .service__content { padding-left: 80px; }

  .about__facts { grid-template-columns: repeat(4, 1fr); }

  .footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .footer__brand { flex-direction: row; }
}

/* ============================================================
   ДЕСКТОП (≥1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root { --header-h: 84px; }

  /* Навигация по-десктопному */
  .nav {
    display: flex;
    align-items: center;
    gap: 36px;
  }
  .nav__cta { display: none; }
  .header__cta { display: inline-flex; }
  .burger { display: none; }

  /* Hero: асимметричная журнальная вёрстка */
  .hero { padding-bottom: 120px; }
  .hero__inner {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 80px;
  }
  .hero__photo {
    /* фото намеренно сдвинуто и приподнято — журнальная асимметрия */
    margin-top: -32px;
  }

  /* Обо мне: асимметрия со сдвигом фото */
  .about { padding: 128px 0; }
  .about__inner {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 96px;
  }
  .about__photo { margin-top: -24px; }

  /* Портфолио: 3 колонки, «кирпичи» разной высоты */
  .portfolio__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 10px;
    grid-auto-flow: dense;
  }
  .portfolio__item { grid-row: span 22; }
  .item--wide { grid-column: span 2; grid-row: span 16; }
  .item--tall { grid-row: span 26; }
  .portfolio__item img { aspect-ratio: auto; height: 100%; }

  /* Контакты */
  .contacts { padding: 128px 0; }
  .contacts__inner { grid-template-columns: 1fr 1fr; gap: 96px; }
  .form { padding: 44px 40px; }
}

/* На мобильных и планшетах у wide-карточки оставляем span 2 */
@media (max-width: 1023px) {
  .item--wide { grid-column: span 2; }
}

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: rgba(28, 28, 28, 0.7); cursor: pointer; }
.consent input { accent-color: var(--accent); margin-top: 3px; }

/* ============================================================
   МОБИЛЬНОЕ МЕНЮ (без медиазапросов — работает от класса is-open)
   ============================================================ */

/* Открытое меню: фиксированная панель на весь экран под шапкой */
.nav.is-open {
  display: flex;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 48px 24px;
  background: #FAF8F5;
  pointer-events: auto;
  animation: navFadeIn 0.3s ease;
}

@keyframes navFadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Крупные ссылки — только в открытом меню */
.nav.is-open .nav__link {
  font-family: var(--font-serif);
  font-size: 28px;
  padding: 12px 0;
}

.nav.is-open .nav__cta {
  display: inline-flex;
  margin-top: 24px;
}

/* На десктопе бургер скрыт, но на случай открытого меню при ресайзе
   возвращаем обычную строку навигации */
@media (min-width: 1024px) {
  .nav.is-open {
    position: static;
    top: auto;
    bottom: auto;
    background: none;
    padding: 0;
    flex-direction: row;
    align-items: center;
    animation: none;
  }
  .nav.is-open .nav__link {
    font-family: var(--font-sans);
    font-size: 14px;
    padding: 6px 0;
  }
}
