/* Kharitonova — журнальная вёрстка в духе модного глянца */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --smoke: #6b6b6b;
  --hair: #d4d4d4;
  --silver: #f2f2f2;

  --serif: "Playfair", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --gut: clamp(16px, 4vw, 56px);
  --section: clamp(5rem, 12vw, 11rem);
  --bar-h: 64px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --opsz-hi: 1200;
}

/* на маленьком кегле волосяные штрихи пропадают, поэтому контраст ниже */
@media (max-width: 720px) {
  :root { --opsz-hi: 110; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 350;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- Типографика ---------- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" var(--opsz-hi);
  font-size: clamp(3.2rem, 9.5vw, 9.5rem);
  line-height: .9;
  letter-spacing: -.025em;
}
.display--s { font-size: clamp(2.6rem, 6vw, 6rem); }
.display--light { color: var(--paper); }

.prose p { font-family: var(--serif); font-variation-settings: "opsz" 14; font-size: 1.1875rem; line-height: 1.7; max-width: 34em; }
.prose p + p { margin-top: 1.1em; text-indent: 1.6em; }

.dropcap::first-letter {
  float: left;
  font-variation-settings: "opsz" var(--opsz-hi);
  font-size: 5.6em;
  line-height: .78;
  padding: .06em .08em 0 0;
}

.btn {
  display: inline-block;
  padding: 1rem 1.6rem;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: 500 .8125rem/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s, color .25s;
}
.btn--light { color: var(--paper); }
.btn--light:hover { background: var(--paper); color: var(--ink); }

/* ---------- Верхняя панель ---------- */

.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 2rem;
  padding: 0 var(--gut);
  color: var(--paper);
  transition: background-color .35s, color .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.bar.is-solid { background: var(--paper); color: var(--ink); border-color: var(--hair); }

.bar__logo {
  font-family: var(--serif);
  font-variation-settings: "opsz" var(--opsz-hi);
  font-size: 1.7rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.bar.is-solid .bar__logo { opacity: 1; pointer-events: auto; }

.bar__nav { display: flex; gap: 1.8rem; margin-left: auto; }
.bar__nav a, .bar__cta {
  white-space: nowrap;
  font-size: .75rem; font-weight: 450; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
}
.bar__nav a:hover { text-decoration: underline; }
.bar__cta { padding: .6rem 1rem; border: 1px solid currentColor; }
.bar__cta:hover { color: var(--ink); background: var(--paper); }
.bar.is-solid .bar__cta:hover { color: var(--paper); background: var(--ink); }

.bar__burger { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--bar-h) var(--gut) var(--gut);
}
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: .4rem; }
.menu nav a {
  font-family: var(--serif); font-variation-settings: "opsz" var(--opsz-hi);
  font-size: clamp(2.4rem, 11vw, 4rem); line-height: 1.1; text-decoration: none;
}
.menu__foot { margin-top: auto; display: flex; gap: 1.5rem; font-size: .9rem; }

@media (max-width: 960px) {
  .bar__nav, .bar__cta { display: none; }
  .bar__burger {
    display: grid; place-content: center; gap: 7px;
    width: 44px; height: 44px; margin-left: auto; margin-right: -10px;
    background: none; border: 0; color: inherit; cursor: pointer;
  }
  .bar__burger i { display: block; width: 26px; height: 1px; background: currentColor; transition: transform .3s; }
  .bar__burger[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
  .bar__burger[aria-expanded="true"] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }
  .menu-open .bar { background: transparent; color: var(--paper); border-color: transparent; }
  .menu-open .bar .bar__logo { opacity: 1; }
}

/* ---------- Обложка ---------- */

.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr auto;
  padding: calc(var(--bar-h) + 4px) var(--gut) var(--gut);
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.cover__photo, .cover__photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
}
.cover__photo img { object-fit: cover; object-position: 50% 40%; animation: settle 2.8s var(--ease) both; }
.cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,0) 38%),
    linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 45%);
}

.mast {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" var(--opsz-hi);
  font-size: calc((100vw - 2 * var(--gut)) / 6.5);
  line-height: .78;
  letter-spacing: -.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  padding-top: .04em;
}
.mast__word { display: inline-block; }
.mast__word span { display: inline-block; animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--i) * 55ms + 150ms); }

.cover__issue {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between;
  margin-top: 1rem; padding-top: .7rem;
  border-top: 1px solid rgba(255,255,255,.55);
  font-family: var(--serif); font-style: italic; font-size: 1rem;
  animation: fade 1s ease 1s both;
}

.cover__lines { grid-row: 4; align-self: end; animation: fade 1s ease 1.15s both; }
.cover__lead {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-variation-settings: "opsz" var(--opsz-hi);
  font-size: clamp(2.5rem, 5.6vw, 5.8rem);
  line-height: .95; letter-spacing: -.015em;
}
.cover__sub { margin-top: 1.2rem; font-size: .8125rem; font-weight: 450; letter-spacing: .16em; text-transform: uppercase; }

.cover__side {
  grid-row: 4; grid-column: 2; align-self: end;
  max-width: 21rem; display: grid; gap: 1.4rem; justify-items: start;
  font-size: 1rem;
  animation: fade 1s ease 1.3s both;
}

@media (max-width: 720px) {
  .cover { grid-template-columns: 1fr; }
  .cover__side { grid-row: 5; grid-column: 1; margin-top: 1.6rem; max-width: none; }
  .cover__side p { display: none; }
  .cover__side .btn { width: 100%; text-align: center; white-space: nowrap; letter-spacing: .1em; padding-inline: .5rem; }
  .cover__issue { font-size: .9rem; }
}

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes settle { from { transform: scale(1.08); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Сетки разделов ---------- */

.letter, .stories, .portraits, .prices, .process, .reviews, .contact {
  padding: var(--section) var(--gut) 0;
}

.section-head {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gut);
  align-items: end;
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.section-head h2 { grid-column: 1 / span 8; }
.section-head p { grid-column: 9 / -1; max-width: 26em; color: var(--smoke); font-size: 1rem; }

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head h2, .section-head p { grid-column: 1; }
  .section-head p { margin-top: 1.2rem; }
}

figcaption { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--smoke); margin-top: .7rem; }

/* ---------- Письмо фотографа ---------- */

.letter { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gut); align-items: start; }
.letter__photo { grid-column: 1 / span 5; position: sticky; top: calc(var(--bar-h) + 2rem); }
.letter__text { grid-column: 7 / -1; }
.letter__text h2 { margin-bottom: clamp(2rem, 5vw, 4rem); }

.signature {
  margin-top: 2rem;
  font-family: var(--serif); font-style: italic; font-variation-settings: "opsz" var(--opsz-hi);
  font-size: 3.4rem; line-height: 1;
}

.facts { margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--hair); }
.facts dt { font-family: var(--serif); font-style: italic; color: var(--smoke); }

@media (max-width: 900px) {
  .letter { grid-template-columns: 1fr; }
  .letter__photo { grid-column: 1; position: static; width: min(100%, 26rem); margin-bottom: 3rem; }
  .letter__text { grid-column: 1; }
  .facts div { grid-template-columns: 1fr; gap: .2rem; }
}

/* ---------- Истории ---------- */

.spread {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gut);
  align-items: start;
  padding-top: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid var(--ink);
}
.spread + .spread { margin-top: var(--section); }

.spread__head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 2rem; flex-wrap: wrap; }
.spread__head h3 {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-variation-settings: "opsz" var(--opsz-hi);
  font-size: clamp(2.4rem, 6vw, 5.5rem); line-height: 1; letter-spacing: -.02em;
}
.spread__meta { font-size: .8125rem; font-weight: 450; letter-spacing: .16em; text-transform: uppercase; }

.spread__main { grid-column: 1 / span 7; grid-row: 2 / span 2; }
.spread__side { grid-column: 9 / -1; grid-row: 2; margin-top: 18%; }
.spread__text {
  grid-column: 9 / -1; grid-row: 3; align-self: end;
  font-family: var(--serif); font-variation-settings: "opsz" 24; font-size: 1.3rem; line-height: 1.5; max-width: 22em;
}
.spread__wide { grid-column: 4 / -1; grid-row: 4; }

.spread--flip .spread__main { grid-column: 6 / -1; }
.spread--flip .spread__side, .spread--flip .spread__text { grid-column: 1 / span 4; }
.spread--flip .spread__wide { grid-column: 1 / span 9; }

/* история без бокового кадра */
.spread:not(:has(.spread__side)) .spread__text { grid-row: 2 / span 2; align-self: center; }

[data-lightbox] { cursor: zoom-in; }

@media (max-width: 900px) {
  .spread { grid-template-columns: repeat(6, 1fr); gap: 1.5rem 12px; }
  .spread__head { grid-column: 1 / -1; }
  .spread .spread__main { grid-column: 1 / -1; grid-row: auto; }
  .spread .spread__side { grid-column: 3 / -1; grid-row: auto; margin-top: 0; }
  .spread--flip .spread__side { grid-column: 1 / span 4; }
  .spread .spread__text { grid-column: 1 / -1; grid-row: auto; font-size: 1.15rem; }
  .spread .spread__wide { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Портреты ---------- */

.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gut); align-items: start; }
.wall figure:nth-child(3n + 2) { margin-top: clamp(3rem, 10vw, 10rem); }
.wall figure:nth-child(3n) { margin-top: clamp(1.5rem, 4vw, 4rem); }

@media (max-width: 700px) {
  .wall { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .wall figure:nth-child(n) { margin-top: 0; }
  .wall figure:nth-child(2n) { margin-top: 3rem; }
}

/* ---------- Съёмка и цены ---------- */

.prices { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gut); align-items: start; }
.prices__head { grid-column: 1 / span 5; position: sticky; top: calc(var(--bar-h) + 2rem); }
.prices__head p { margin-top: 2rem; max-width: 24em; color: var(--smoke); font-size: 1rem; }
.contents { grid-column: 7 / -1; border-top: 1px solid var(--ink); }
.contents li { padding: 1.6rem 0 1.5rem; border-bottom: 1px solid var(--hair); }
.contents__row { display: flex; align-items: baseline; gap: 1rem; }
.contents__row::after { content: ""; flex: 1; order: 1; border-bottom: 1px dotted var(--ink); transform: translateY(-.3em); min-width: 2rem; }
.contents__row h3 {
  font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 72;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.15;
}
.contents__price { order: 2; font-family: var(--serif); font-style: italic; font-size: 1.15rem; white-space: nowrap; }
.contents p { margin-top: .5rem; max-width: 34em; color: var(--smoke); font-size: 1rem; }

@media (max-width: 900px) {
  .prices { grid-template-columns: 1fr; }
  .prices__head, .contents { grid-column: 1; position: static; }
  .contents { margin-top: 3rem; }
  .contents__row { flex-wrap: wrap; }
  .contents__row::after { display: none; }
  .contents__price { flex-basis: 100%; }
}

/* ---------- Как всё проходит ---------- */

.process .display { margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gut); counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1.2rem; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-variation-settings: "opsz" var(--opsz-hi);
  font-size: 4.5rem; line-height: 1; margin-bottom: 1rem;
}
.steps h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin-bottom: .5rem; }
.steps p { font-size: .95rem; color: var(--smoke); }

@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { display: grid; grid-template-columns: 4rem 1fr; padding: 1.2rem 0 1.4rem; }
  .steps li::before { grid-row: span 2; font-size: 3rem; margin: 0; }
}

/* ---------- Отзывы ---------- */

.reviews { display: grid; gap: clamp(4rem, 9vw, 8rem); }
.quote { max-width: 19em; font-size: clamp(1.7rem, 3.6vw, 3.3rem); }
.quote--right { margin-left: auto; text-align: right; }
.quote blockquote p {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-variation-settings: "opsz" 144;
  line-height: 1.18; letter-spacing: -.01em;
}
.quote blockquote p::before { content: "«"; }
.quote blockquote p::after { content: "»"; }
.quote:not(.quote--right) blockquote p { text-indent: -.45em; }
.quote figcaption { margin-top: 1.4rem; font-family: var(--sans); font-style: normal; font-size: .8125rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }

/* ---------- Контакт ---------- */

.contact {
  margin-top: var(--section);
  padding-bottom: var(--section);
  background: var(--ink); color: var(--paper);
}
.contact .display { max-width: 11em; margin-bottom: clamp(3rem, 7vw, 6rem); }
.contact__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gut); align-items: start; }

.form { grid-column: 1 / span 7; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem var(--gut); }
.field { grid-column: 1 / -1; display: grid; gap: .4rem; }
.field--half { grid-column: span 1; }
.field--trap { position: absolute; left: -9999px; }
.field label { font-family: var(--serif); font-style: italic; font-size: 1rem; color: #bdbdbd; }

.field input, .field select, .field textarea {
  width: 100%;
  padding: .5rem 0 .7rem;
  border: 0; border-bottom: 1px solid rgba(255,255,255,.5); border-radius: 0;
  background: transparent; color: var(--paper);
  font: 350 1.15rem/1.4 var(--sans);
  -webkit-appearance: none; appearance: none;
  color-scheme: dark;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: right 6px top 55%, right 0 top 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { color: var(--ink); }
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input::placeholder { color: #8a8a8a; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom: 2px solid var(--paper); padding-bottom: calc(.7rem - 1px); }
.field.is-invalid input { border-bottom-color: #ff8a8a; }

.consent { grid-column: 1 / -1; display: flex; gap: .8rem; align-items: start; font-size: .9rem; color: #bdbdbd; cursor: pointer; }
.consent input { margin: .25rem 0 0; width: 1.05rem; height: 1.05rem; accent-color: #fff; flex: none; }
.consent.is-invalid span { color: #ff8a8a; }

.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .5; cursor: progress; }
.form__status { grid-column: 1 / -1; font-family: var(--serif); font-style: italic; font-size: 1.2rem; min-height: 1.6em; }

.contact__direct { grid-column: 9 / -1; }
.contact__direct > p:first-child { font-family: var(--serif); font-style: italic; color: #bdbdbd; margin-bottom: 1rem; }
.links li { border-top: 1px solid rgba(255,255,255,.3); }
.links li:last-child { border-bottom: 1px solid rgba(255,255,255,.3); }
.links a {
  display: block; padding: .8rem 0;
  font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: 1.6rem; line-height: 1.2;
  text-decoration: none;
}
.links a:hover { font-style: italic; }
.contact__phone { margin-top: 2rem; font-size: 1.15rem; letter-spacing: .04em; }
.contact__phone a { text-decoration: none; }

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .form, .contact__direct { grid-column: 1; }
  .contact__direct { margin-top: 4rem; }
}
@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
  .field--half { grid-column: 1; }
  .form .btn { width: 100%; text-align: center; }
}

/* ---------- Подвал ---------- */

.foot { background: var(--ink); color: var(--paper); padding: 0 var(--gut) var(--gut); }
.foot__mast {
  font-family: var(--serif); font-variation-settings: "opsz" var(--opsz-hi);
  font-size: calc((100vw - 2 * var(--gut)) / 6.5); line-height: .8; text-align: center; text-transform: uppercase;
  white-space: nowrap; overflow: hidden;
  padding-top: 3rem; border-top: 1px solid rgba(255,255,255,.3);
}
.foot__mast span { display: inline-block; }
.foot__row { display: flex; flex-wrap: wrap; gap: .6rem 2.5rem; margin-top: 2.5rem; font-size: .85rem; color: #a8a8a8; }
.foot__row p:first-child { margin-right: auto; }
.foot__note { flex-basis: 100%; font-size: .75rem; color: #7a7a7a; }

/* ---------- Просмотр фото ---------- */

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--ink); color: var(--paper);
}
.lightbox[open] { display: grid; place-items: center; animation: fade .3s ease both; }
.lightbox::backdrop { background: var(--ink); }
.lightbox img { max-width: calc(100vw - 2 * var(--gut)); max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; cursor: zoom-out; }
.lightbox__count { position: absolute; left: var(--gut); top: 1.3rem; font-family: var(--serif); font-style: italic; }
.lightbox__btn {
  position: absolute; padding: .9rem .2rem; background: none; border: 0; color: inherit; cursor: pointer;
  font: 450 .75rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
}
.lightbox__btn:hover { text-decoration: underline; text-underline-offset: .3em; }
.lightbox__close { right: var(--gut); top: .6rem; }
.lightbox__prev { left: var(--gut); bottom: .8rem; }
.lightbox__next { right: var(--gut); bottom: .8rem; }

/* ---------- Без анимаций по запросу системы ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ---------- Служебные страницы ---------- */

.bar__back { margin-left: auto; font-size: .75rem; font-weight: 450; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.bar__back:hover { text-decoration: underline; }
.doc { padding: calc(var(--bar-h) + clamp(3rem, 8vw, 7rem)) var(--gut) var(--section); max-width: 60rem; }
.doc .display { margin-bottom: clamp(2rem, 5vw, 4rem); }
.doc__body { max-width: 38em; }
.doc__body h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 2.4rem 0 .6rem; }
.doc__body p { color: #333; }
.doc__date { margin-top: 3rem; font-family: var(--serif); font-style: italic; color: var(--smoke); }
.doc--center { min-height: 100vh; display: grid; align-content: center; justify-items: start; gap: 2rem; max-width: none; }
.doc--center .display { margin: 0; max-width: 12em; }
.doc__lead { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--smoke); }
