/* ============================================================
   «Своя История» — стиль сайта.
   Источник истины по бренду (цвета/типографика) до появления
   business/assets/brand-guidelines.md — этот блок переменных.
   Палитра тёплая, издательская: крем + графит + латунь.
   ============================================================ */
:root {
  --ink: #1d1813;          /* тёплый «почти чёрный» — текст и тёмные секции */
  --ink-soft: #3a322a;
  --cream: #f6f1e8;        /* бумажный фон */
  --cream-2: #ece3d5;      /* фон секций-чередований */
  --muted: #8c8175;        /* приглушённый текст */
  --line: #d9cfbf;         /* линии-разделители */
  --accent: #a9743f;       /* латунь / терракота — единственный акцент */
  --accent-dark: #8c5e30;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1200px;
  --gut: clamp(1.25rem, 5vw, 4rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  border: 1px solid currentColor;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
  cursor: pointer;
}
.btn--light { color: #fff; border-color: rgba(255,255,255,.7); }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gut);
  background: transparent;
  transition: background-color .4s ease, box-shadow .4s ease, padding .4s ease;
}
.site-header.scrolled {
  background: var(--cream);
  box-shadow: 0 1px 0 var(--line);
  padding-top: .7rem; padding-bottom: .7rem;
}
.logo { display: flex; flex-direction: column; line-height: 1.1; color: #fff; transition: color .4s ease; }
.site-header.scrolled .logo { color: var(--ink); }
.logo__name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .01em; }
.logo__sub { font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; opacity: .8; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { font-size: .82rem; letter-spacing: .08em; color: #fff; transition: color .4s ease, opacity .2s ease; }
.site-header.scrolled .nav a { color: var(--ink); }
.nav a:not(.nav__cta):hover { opacity: .6; }
.nav__cta {
  border: 1px solid rgba(255,255,255,.6); padding: .55rem 1.3rem;
  text-transform: uppercase; font-weight: 600; font-size: .72rem; letter-spacing: .14em;
}
.site-header.scrolled .nav__cta { border-color: var(--accent); color: var(--accent); }
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: #fff !important; }

.nav-toggle { display: none; background: none; border: 0; width: 30px; height: 22px; position: relative; cursor: pointer; }
.nav-toggle span { position: absolute; left: 0; width: 100%; height: 2px; background: #fff; transition: .3s; }
.site-header.scrolled .nav-toggle span, .nav-open .nav-toggle span { background: var(--ink); }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { transform: scale(1.05); }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(18,14,10,.85) 0%, rgba(18,14,10,.45) 50%, rgba(18,14,10,.35) 100%),
    linear-gradient(to right, rgba(18,14,10,.45) 0%, rgba(18,14,10,0) 60%);
}
.hero__inner { position: relative; z-index: 2; padding: clamp(6rem, 13vh, 9rem) var(--gut) clamp(3rem, 10vh, 7rem); max-width: 56rem; }
.hero__kicker { font-size: .78rem; letter-spacing: .26em; text-transform: uppercase; opacity: .85; margin-bottom: .55rem; }
.hero__tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2.1vw, 1.5rem); opacity: .8; margin-bottom: 1.6rem; }
.hero__title { font-size: clamp(2.1rem, 5.4vw, 4.4rem); font-weight: 500; margin-bottom: 1.6rem; }
.hero__title-lead { display: block; margin-bottom: .8em; }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.35rem); max-width: 38rem; opacity: .92; margin-bottom: 2.4rem; font-weight: 300; }

/* ---------- Общие секции ---------- */
.section { padding: clamp(4.5rem, 11vh, 9rem) var(--gut); max-width: var(--maxw); margin: 0 auto; }
.section__head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }
.eyebrow { font-size: .74rem; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.eyebrow--light { color: #d8b48a; }
.section__title { font-size: clamp(2rem, 4.5vw, 3.4rem); }

/* ---------- Подход ---------- */
.approach__statement {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.4;
  font-weight: 400; max-width: 44rem; margin-bottom: clamp(3rem, 7vh, 5rem); color: var(--ink-soft);
  font-style: italic;
}
.principles { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 3rem; }
.principles li { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.principles h3 { font-size: 1.45rem; margin-bottom: .5rem; }
.principles p { color: var(--muted); font-size: .98rem; }

/* ---------- Портфолио ---------- */
.work { max-width: 1320px; }
.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.work__card { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--cream-2); }
.work__card img { transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.work__card:hover img { transform: scale(1.06); }
.work__card-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.6rem; color: #fff;
  background: linear-gradient(to top, rgba(20,16,12,.82) 0%, rgba(20,16,12,.05) 55%);
}
.work__type { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; opacity: .85; margin-bottom: .4rem; }
.work__title { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; margin-bottom: .3rem; }
.work__meta { font-size: .85rem; opacity: .8; }
.work__note { font-size: .82rem; color: #e8cba6; margin-top: .5rem; }
.work__open { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-top: .9rem; opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.work__card:hover .work__open, .work__card:focus-visible .work__open { opacity: 1; transform: none; }

/* ---------- О дизайнере ---------- */
.about {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center;
  max-width: var(--maxw);
}
.about__media { aspect-ratio: 4 / 5; overflow: hidden; }
.about__text p { margin-bottom: 1.2rem; color: var(--ink-soft); font-size: 1.05rem; }
.about__text .section__title { margin-bottom: 1.6rem; }
.about__signature { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--accent-dark); }

/* ---------- Пресса ---------- */
.press { background: transparent; }
.press__list { list-style: none; border-top: 1px solid var(--line); }
.press__item { display: flex; align-items: baseline; gap: 1.5rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); transition: padding-left .3s ease; }
.press__item:hover { padding-left: .6rem; }
.press__pub { font-family: var(--serif); font-size: 1.3rem; min-width: 9rem; flex-shrink: 0; }
.press__info { flex: 1; }
.press__title { font-size: 1rem; }
.press__meta { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.press__arrow { color: var(--accent); font-size: 1.1rem; opacity: 0; transition: opacity .3s ease; }
.press__item:hover .press__arrow { opacity: 1; }

/* ---------- Контакт ---------- */
.contact { background: var(--ink); color: var(--cream); max-width: none; margin: 0; }
.contact__inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.contact__title { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 1.4rem; }
.contact__lead { max-width: 38rem; margin: 0 auto 2.6rem; color: #cabeac; font-size: 1.1rem; font-weight: 300; }
.contact__details { font-style: normal; margin-top: 2.8rem; display: flex; flex-direction: column; gap: .5rem; font-size: .95rem; opacity: .8; }
.contact__details a:hover { color: #fff; text-decoration: underline; }

/* ---------- Футер ---------- */
.site-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem var(--gut); background: var(--ink); color: rgba(246,241,232,.6);
  font-size: .82rem; border-top: 1px solid rgba(255,255,255,.08);
}
.site-footer a:hover { color: #fff; }

/* ---------- Появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
/* Доступность: при отключённой анимации показываем контент сразу (и это же чинит headless-скриншоты). */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .principles { grid-template-columns: repeat(2, 1fr); }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about__media { aspect-ratio: 16 / 10; }
}

@media (max-width: 620px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.8rem;
    background: var(--cream); padding: 2rem var(--gut);
    transform: translateX(100%); transition: transform .35s ease; box-shadow: -10px 0 40px rgba(0,0,0,.15);
  }
  .nav a { color: var(--ink) !important; font-size: 1.1rem; }
  .nav__cta { border-color: var(--accent); color: var(--accent) !important; }
  .nav-open .nav { transform: none; }
  .nav-toggle { display: block; z-index: 60; }
  .nav-open .nav-toggle span:nth-child(1) { top: 10px; transform: rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

  .principles { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .work__card { aspect-ratio: 4 / 3; }
  .press__item { flex-direction: column; gap: .3rem; }
  .press__pub { min-width: 0; }
}

/* ============================================================
   Страница проекта (project.html) + лайтбокс
   ============================================================ */
.project-page { background: var(--cream); }

/* Герой проекта */
.proj-hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.proj-hero__media { position: absolute; inset: 0; }
.proj-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(18,14,10,.82) 0%, rgba(18,14,10,.3) 55%, rgba(18,14,10,.4) 100%);
}
.proj-hero__inner { position: relative; z-index: 2; padding: 0 var(--gut) clamp(2.5rem, 8vh, 5rem); max-width: var(--maxw); width: 100%; margin: 0 auto; }
.proj-back { display: inline-block; font-size: .8rem; letter-spacing: .1em; opacity: .85; margin-bottom: 1.4rem; }
.proj-back:hover { opacity: 1; }
.proj-hero__type { font-size: .74rem; letter-spacing: .26em; text-transform: uppercase; opacity: .85; margin-bottom: .8rem; }
.proj-hero__title { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.proj-hero__meta { font-size: 1.05rem; opacity: .85; margin-top: .6rem; }

/* Интро */
.proj-intro { max-width: 46rem; margin: 0 auto; padding: clamp(3.5rem, 9vh, 7rem) var(--gut); }
.proj-intro p { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.45; color: var(--ink-soft); }

/* Галерея — редакционная сетка */
.proj-gallery { max-width: 1320px; margin: 0 auto; padding: 0 var(--gut) clamp(3rem, 8vh, 6rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.proj-gallery__item { padding: 0; border: 0; background: var(--cream-2); cursor: zoom-in; overflow: hidden; aspect-ratio: 3 / 2; display: block; }
.proj-gallery__item--wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.proj-gallery__item img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.proj-gallery__item:hover img { transform: scale(1.04); }

/* Подвал проекта */
.proj-foot {
  border-top: 1px solid var(--line); max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 7vh, 5rem) var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.proj-next { display: flex; flex-direction: column; gap: .3rem; }
.proj-next span { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.proj-next strong { font-family: var(--serif); font-weight: 500; font-size: 1.8rem; transition: color .3s ease; }
.proj-next:hover strong { color: var(--accent); }

.proj-missing { text-align: center; padding: 10rem var(--gut) 8rem; }
.proj-missing h1 { font-size: 2.4rem; margin-bottom: 1rem; }
.proj-missing a { color: var(--accent); }

/* Лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(15,12,9,.94); padding: 4vh 4vw;
}
.lightbox.open { display: flex; }
.lightbox__img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-family: Georgia, serif; line-height: 1; opacity: .7; transition: opacity .2s ease;
}
.lightbox__close:hover, .lightbox__nav:hover { opacity: 1; }
.lightbox__close { top: 2vh; right: 3vw; font-size: 2.6rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 4rem; padding: 1rem; }
.lightbox__prev { left: 1vw; }
.lightbox__next { right: 1vw; }
.lightbox__counter { position: absolute; bottom: 2.5vh; left: 0; right: 0; text-align: center; color: #fff; opacity: .7; font-size: .85rem; letter-spacing: .1em; }

@media (max-width: 900px) {
  .proj-gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .proj-gallery { grid-template-columns: 1fr; gap: 1rem; }
  .proj-gallery__item, .proj-gallery__item--wide { aspect-ratio: 4 / 3; grid-column: auto; }
  .proj-foot { flex-direction: column; align-items: flex-start; }
  .lightbox__nav { font-size: 2.6rem; padding: .4rem; }
}
