/* Юрий Евдокимов — фотограф. Направление taste-skill: «контактный лист».
   Ночной Петербург: тёмная земля, одна натриевая лампа — янтарный акцент. */

:root {
  --bg: #0d0c0a;
  --surface: #17150f;
  --surface-2: #211e16;
  --ink: #ecebe6;
  --muted: #a19d93;
  --accent: #e3a62b;
  --accent-strong: #f2b940;
  --accent-ink: #120f08;

  --font: "Onest", system-ui, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.5rem, 10.4vw, 11rem);

  --margin: clamp(16px, 2.2vw, 32px);
  --gap-section: clamp(88px, 9vw, 150px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, p, figure, ol, ul, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.head {
  font-size: var(--step-head);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.lead { font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.02em; }
.small { font-size: var(--step-small); }
.muted { color: var(--muted); }
.tab { font-variant-numeric: tabular-nums; }

/* ---------- Buttons and links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: var(--step-small);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button .arrow { display: inline-block; transition: transform var(--t-hover) var(--ease-out); }
.button--ghost { background: var(--surface-2); color: var(--ink); }
.button--big {
  min-height: clamp(64px, 6vw, 84px);
  padding: 0 clamp(28px, 3vw, 48px);
  font-size: var(--step-lead);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 0.08em;
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); }
  .button:hover .arrow { transform: translateX(4px); }
  .button--ghost:hover { background: #2c281d; }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- Navigation ---------- */
.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--margin);
  font-size: var(--step-small);
  font-weight: 600;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 26px; height: 26px; transition: transform 900ms var(--ease-soft); }
@media (hover: hover) and (pointer: fine) { .brand:hover img { transform: rotate(120deg); } }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.nav__links a:not(.button) { text-decoration: none; color: var(--muted); transition: color var(--t-hover) ease; }
.nav__links a:not(.button):hover { color: var(--ink); }
.nav .button { min-height: 44px; }
@media (max-width: 760px) { .nav__links a:not(.button) { display: none; } }

/* ---------- Hero: the name, the facts, the lit strip ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.hero__name {
  padding: clamp(8px, 2vh, 28px) var(--margin) 0;
  font-size: var(--step-display);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.86;
  white-space: nowrap;
}
.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: inline-block; }
.hero__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
  padding: clamp(16px, 2.6vh, 32px) var(--margin) clamp(20px, 3.4vh, 40px);
  font-size: var(--step-small);
  font-weight: 600;
  line-height: 1.4;
}
.hero__facts span { display: block; color: var(--muted); font-weight: 400; }
.hero__facts a { text-decoration: none; }

.strip-wrap { position: relative; display: flex; flex-direction: column; min-height: 0; }
.strip {
  display: flex;
  gap: 10px;
  flex: 1 1 auto;
  height: auto;
  min-height: clamp(220px, 34vh, 380px);
  max-height: 42vh;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: 40vw;
  cursor: grab;
}
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.is-dragging img { pointer-events: none; }
.strip__frame {
  flex: 0 0 auto;
  height: 100%;
  margin: 0;
  scroll-snap-align: center;
  overflow: hidden;
  background: var(--surface);
}
.strip__frame img {
  height: 100%;
  width: auto;
  filter: brightness(0.42) saturate(0.8);
  transition: filter 600ms var(--ease-out), transform 1600ms var(--ease-soft);
  user-select: none;
  -webkit-user-drag: none;
}
.strip__frame.is-lit img { filter: none; transform: scale(1.04); }
@media (hover: hover) and (pointer: fine) {
  .strip__frame:hover img { filter: brightness(0.8); }
  .strip__frame.is-lit:hover img { filter: none; }
}
.strip__caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px var(--margin) 0;
  font-size: var(--step-small);
  color: var(--muted);
  min-height: 2.6em;
}
.strip__caption b { color: var(--ink); font-weight: 600; }
.strip__title { transition: opacity var(--t-ui) ease, transform var(--t-ui) var(--ease-out); }
.strip__title.is-swapping { opacity: 0; transform: translateY(6px); }

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 40px;
  padding: clamp(20px, 3vh, 36px) var(--margin) clamp(20px, 4.4vh, 44px);
}
.hero__line { max-width: 34ch; font-size: var(--step-body); }

/* The live thing: today's light in Petersburg */
.light { font-size: var(--step-small); line-height: 1.45; }
.light__now { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.lamp {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.lamp.is-off { background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) {
  .lamp:not(.is-off) { animation: lamp 2.4s ease-in-out infinite; }
}
@keyframes lamp { 50% { opacity: 0.35; } }
.light__times { color: var(--muted); }

@media (max-width: 900px) {
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__foot { grid-template-columns: 1fr; align-items: start; }
  .hero__foot .button { justify-self: start; }
}
@media (max-width: 600px) {
  .strip { min-height: 46vh; padding-inline: 12vw; }
  .hero__facts { padding-top: 14px; }
}

/* ---------- Section frame ---------- */
.section { padding-top: var(--gap-section); }
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding-inline: var(--margin);
  margin-bottom: clamp(28px, 4vw, 56px);
}

/* ---------- Portfolio: dense masonry sheet ---------- */
.work__top {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding-inline: 12px;
  margin-bottom: 4px;
  align-items: end;
}
.work__title { grid-column: 1 / 3; padding: 0 0 18px calc(var(--margin) - 12px); align-self: start; }
.work__feature { grid-column: 3 / 5; }
.work__statement {
  grid-column: 5 / 7;
  max-width: 30ch;
  padding: 0 calc(var(--margin) - 12px) 8px 20px;
  font-size: var(--step-lead);
  line-height: 1.3;
}
.work__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 20px 12px 24px;
}
.chip {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--step-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.chip:active { transform: scale(0.97); }
.chip b { font-weight: 400; margin-left: 6px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip[aria-pressed="true"] b { color: #5c574b; }
@media (hover: hover) and (pointer: fine) { .chip:hover:not([aria-pressed="true"]) { background: var(--surface-2); color: var(--ink); } }

.sheet { columns: 6; column-gap: 4px; padding-inline: 12px; }
.tile {
  break-inside: avoid;
  margin: 0 0 14px;
  cursor: zoom-in;
}
.tile__img { position: relative; overflow: hidden; background: var(--surface); }
.tile__img img { width: 100%; transition: transform 1100ms var(--ease-soft), filter 400ms ease; }
.tile figcaption { margin-top: 6px; font-size: var(--step-small); color: var(--muted); line-height: 1.3; transition: color 240ms ease; }
.tile figcaption b { color: var(--ink); font-weight: 600; transition: color 240ms ease; }
.tile[hidden] { display: none; }
.work__feature.tile { margin: 0; }

/* Наведение: один кадр в фокусе, остальные тихо отходят в тень.
   Затемнение — сразу, возврат — с небольшой задержкой, чтобы при переходе
   через щель между кадрами ничего не вспыхивало. */
.tile__img::after {
  content: "+";
  position: absolute; right: 10px; bottom: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-size: 22px; font-weight: 700; line-height: 1;
  opacity: 0; transform: scale(0.6);
  transition: opacity 220ms ease, transform 320ms var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .js .sheet .tile.is-done {
    transition: opacity 380ms ease 160ms, filter 380ms ease 160ms, transform 700ms var(--ease-out);
  }
  .js .sheet:has(.tile:hover) .tile.is-done:not(:hover) {
    opacity: 0.38;
    filter: saturate(0.35) brightness(0.85);
    transition-delay: 0ms;
    transition-duration: 260ms;
  }
  .js .sheet .tile.is-done:hover { transition-delay: 0ms; }
  .js .sheet .tile.is-done:hover .tile__img img,
  .work__feature:hover .tile__img img { transform: scale(1.05); transition: transform 900ms var(--ease-soft); }
  .tile:hover .tile__img::after { opacity: 1; transform: none; }
  .tile:hover figcaption b { color: var(--accent); }
  .tile:hover figcaption { color: var(--ink); }
}

.cat-note {
  max-width: 60ch;
  min-height: 1.5em;
  margin: -8px 0 20px;
  padding-inline: 12px;
  color: var(--muted);
  font-size: var(--step-body);
  opacity: 0; transform: translateY(6px);
  transition: opacity 260ms ease, transform 320ms var(--ease-out);
}
.cat-note.is-on { opacity: 1; transform: none; }

@media (max-width: 1100px) { .sheet { columns: 4; } }
@media (max-width: 760px) {
  .sheet { columns: 3; padding-inline: 10px; }
  .tile figcaption span { display: none; }
  .work__top { grid-template-columns: 1fr; padding-inline: 10px; }
  .work__title, .work__feature, .work__statement { grid-column: 1; }
  .work__title { padding: 0 0 8px calc(var(--margin) - 10px); }
  .work__statement { order: -0; padding: 14px calc(var(--margin) - 10px) 0; font-size: 1.1875rem; max-width: none; }
  .work__filters { padding-inline: 10px; }
}
@media (max-width: 460px) { .sheet { columns: 2; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(8, 7, 6, 0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 320ms var(--ease-out), visibility 0s linear 320ms;
}
.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 320ms var(--ease-out); }
.lightbox__bar, .lightbox__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--margin);
  font-size: var(--step-small);
}
.lightbox__stage { position: relative; display: grid; place-items: center; overflow: hidden; padding: 0 var(--margin); touch-action: pan-y; }
.lightbox__stage img {
  max-height: calc(100svh - 150px);
  max-width: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); /* taste-skill-ignore: кадр в открытом окне просмотра */
  transition: opacity 360ms ease, transform 520ms var(--ease-out);
}
.lightbox__stage img.is-leaving { opacity: 0; transform: translateX(calc(var(--dir, 1) * -40px)) scale(0.98); }
.lightbox__stage img.is-entering { opacity: 0; transform: translateX(calc(var(--dir, 1) * 40px)) scale(0.98); transition: none; }
.icon-btn {
  width: 48px; height: 48px;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--accent); color: var(--accent-ink); } }
.lightbox__nav { display: flex; gap: 4px; }

/* ---------- About: side facts, wide paragraph ---------- */
.about { padding-inline: var(--margin); }
.about__row { display: grid; grid-template-columns: 34% 1fr; gap: 0; }
.about__row + .about__row { margin-top: clamp(64px, 8vw, 120px); }
.facts { display: grid; gap: 20px; align-content: start; max-width: 220px; font-size: var(--step-small); }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; font-size: var(--step-body); }
.about__text { max-width: 56ch; width: 90%; }
.about__text p { font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.02em; }
.about__text p + p { margin-top: 0.9em; font-size: var(--step-body); line-height: 1.55; letter-spacing: -0.01em; }
.about__word { font-size: var(--step-small); font-weight: 600; }
.record { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 40px 64px; }
.record h3 { font-size: var(--step-small); color: var(--muted); font-weight: 400; margin-bottom: 14px; }
.record li { display: flex; justify-content: space-between; gap: 20px; padding: 6px 0; font-size: var(--step-small); }
.record li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: clamp(20px, 5vw, 80px); margin-top: clamp(40px, 5vw, 72px); }
.numbers div { font-size: var(--step-small); color: var(--muted); }
.numbers strong { display: block; font-size: var(--step-head); font-weight: 800; letter-spacing: -0.045em; line-height: 1; color: var(--ink); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
  .about__row { grid-template-columns: 1fr; gap: 32px; }
  .about__row:first-child .facts { order: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .about__text { width: 100%; }
  .about__text p { font-size: 1.1875rem; }
  .record { grid-template-columns: 1fr; }
}

/* ---------- Places: two-ended rows with a preview ---------- */
.places { display: grid; grid-template-columns: 22% minmax(0, 520px) 1fr; gap: 0 clamp(24px, 4vw, 64px); padding-inline: var(--margin); align-items: start; }
.places__list { grid-column: 2; }
.places__list h2 { margin-bottom: 32px; }
.places__group + .places__group { margin-top: 40px; }
.places__group h3 { font-size: var(--step-body); font-weight: 400; color: var(--muted); margin-bottom: 8px; }
.place {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding: 6px 0;
  cursor: default;
  transition: opacity var(--t-hover) ease, transform var(--t-ui) var(--ease-out);
}
.place__name { display: flex; align-items: center; gap: 10px; font-size: var(--step-body); }
.place__name img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; align-self: center; }
.place__when { font-size: var(--step-small); color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .places__list:hover .place:not(:hover) { opacity: 0.4; }
  .place:hover { transform: translateX(6px); }
}
.places__frame { grid-column: 3; position: sticky; top: 12vh; aspect-ratio: 4 / 5; max-height: 76vh; overflow: hidden; background: var(--surface); }
.places__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 500ms ease, transform 1400ms var(--ease-soft); }
.places__frame img.is-on { opacity: 1; transform: none; }
.places__frame p { position: absolute; left: 14px; bottom: 12px; right: 14px; font-size: var(--step-small); font-weight: 600; color: #fff; }
@media (max-width: 900px) {
  .places { grid-template-columns: 1fr; }
  .places__list { grid-column: 1; }
  .places__frame { grid-column: 1; position: relative; top: 0; aspect-ratio: 16 / 10; margin-top: 40px; }
  .place { min-height: 44px; flex-wrap: wrap; }
  .place__when { white-space: normal; text-align: left; padding-left: 28px; width: 100%; }
}

/* ---------- Prices: plans as a large table ---------- */
.prices { padding-inline: var(--margin); }
.plans { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--step-body); }
.plans th, .plans td { text-align: left; vertical-align: top; padding: 18px 20px; }
.plans col.c-label { width: 31%; }
.plans thead th { padding-top: 26px; padding-bottom: 26px; }
.plans thead th:first-child { vertical-align: bottom; padding-left: 0; }
.plan__name { display: block; font-size: var(--step-head); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan__price { display: block; margin-top: 8px; font-size: var(--step-head); font-weight: 400; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan__price small { font-size: var(--step-small); letter-spacing: 0; color: inherit; opacity: 0.75; }
.plans tbody th { font-weight: 400; color: var(--muted); padding-left: 0; }
.plans tbody tr:nth-child(odd) th,
.plans tbody tr:nth-child(odd) td { background: var(--surface); }
.plans tbody tr:nth-child(odd) th { padding-left: 16px; }
.plans tbody tr:nth-child(even) th { padding-left: 16px; }
.plans .is-pick { background: var(--accent) !important; color: var(--accent-ink); }
.plans tbody tr:nth-child(odd) .is-pick { background: #d99c22 !important; }
.plans tfoot td { padding-top: 24px; padding-bottom: 24px; }
.plans tfoot .button { width: 100%; }
.plans .is-pick .button { background: var(--accent-ink); color: var(--accent); }
.prices__note { margin-top: 20px; font-size: var(--step-small); color: var(--muted); max-width: 70ch; }

.plan-cards { display: none; }
@media (max-width: 820px) {
  .plans { display: none; }
  .plan-cards { display: grid; gap: 40px; }
  .plan-card { padding: 24px 20px; background: var(--surface); }
  .plan-card.is-pick { background: var(--accent); color: var(--accent-ink); }
  .plan-card .plan__name, .plan-card .plan__price { font-size: 9vw; }
  .plan-card dl { margin: 22px 0 24px; display: grid; gap: 14px; }
  .plan-card dt { color: var(--muted); font-size: 1.0625rem; }
  .plan-card.is-pick dt { color: #4b3a12; }
  .plan-card dd { font-size: 1.0625rem; }
  .plan-card .button { width: 100%; }
  .plan-card.is-pick .button { background: var(--accent-ink); color: var(--accent); }
}

/* ---------- Process: drag row of moments ---------- */
.process__top { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-inline: var(--margin); }
.process__arrows { display: flex; gap: 4px; }
.process__bar { position: relative; height: 6px; margin: 22px var(--margin) 36px; background: var(--surface-2); overflow: hidden; }
.process__bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0.16); transition: transform 200ms linear; }
.moments {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--margin);
  padding-inline: var(--margin);
  padding-bottom: 8px;
  scrollbar-width: none;
  cursor: grab;
}
.moments::-webkit-scrollbar { display: none; }
.moments.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.moments.is-dragging img { pointer-events: none; }
.moment { flex: 0 0 300px; scroll-snap-align: start; display: flex; flex-direction: column; }
.moment h3 { font-size: var(--step-body); font-weight: 700; letter-spacing: -0.02em; }
.moment p { margin-top: 8px; font-size: var(--step-body); color: var(--muted); line-height: 1.45; }
.moment__gap { flex: none; }
.moment__img { margin-top: auto; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.moment__img img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; transition: transform 1100ms var(--ease-soft); }
@media (hover: hover) and (pointer: fine) { .moment:hover .moment__img img { transform: scale(1.04); } }
.moment:last-child { padding-right: var(--margin); flex-basis: calc(300px + var(--margin)); }
@media (max-width: 700px) {
  .process__arrows { display: none; }
  .moments { gap: 16px; }
  .moment { flex-basis: 72vw; }
  .moment:last-child { flex-basis: calc(72vw + var(--margin)); }
  .moment__gap { height: 32px !important; }
  .moment:nth-child(even) .moment__gap { height: 56px !important; }
}

/* ---------- FAQ: answers as reading text ---------- */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; padding-inline: var(--margin); }
.faq h2 { grid-column: 1 / 4; }
.faq__text { grid-column: 5 / 13; columns: 2; column-gap: 56px; }
.faq__text p { break-inside: avoid; margin-bottom: 20px; font-size: var(--step-body); line-height: 1.55; }
.faq__text b { font-weight: 600; }
@media (max-width: 900px) {
  .faq { grid-template-columns: 1fr; }
  .faq h2 { grid-column: 1; margin-bottom: 28px; }
  .faq__text { grid-column: 1; columns: 1; }
  .faq__text p { margin-bottom: 18px; }
}

/* ---------- Closing: a plain sentence, one action ---------- */
.closing { padding: 16svh var(--margin) 14svh; }
.closing p { max-width: 34ch; font-size: var(--step-lead); line-height: 1.4; }
.closing__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 24px; }

/* ---------- Footer: one quiet line under the name ---------- */
.footer { padding: 0 var(--margin) 30px; }
.footer__name {
  font-size: var(--step-display);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.86;
  white-space: nowrap;
  color: var(--ink);
  margin-bottom: 28px;
}
.footer__line { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px 24px; align-items: baseline; font-size: var(--step-small); color: var(--muted); }
.footer__links { display: flex; gap: 24px; }
.footer__links a { color: var(--ink); }
.footer__right { text-align: right; }
@media (max-width: 760px) {
  .footer__line { grid-template-columns: 1fr; gap: 8px; }
  .footer__right { text-align: left; }
}

/* ---------- Page transition curtain ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--surface);
  pointer-events: none;
  transform: translateY(-101%);
}
.curtain img { width: 56px; height: 56px; }
@media (prefers-reduced-motion: no-preference) {
  .js .curtain { transform: none; animation: curtain-out 900ms var(--ease-in-out) 120ms forwards; }
  .js .curtain img { animation: iris 900ms var(--ease-in-out) forwards; }
  .js .curtain.is-leaving { animation: curtain-in 520ms var(--ease-in-out) forwards; }
  .js .curtain.is-leaving img { animation: iris-in 520ms var(--ease-in-out) forwards; }
}
@keyframes curtain-out { from { transform: none; } to { transform: translateY(-101%); } }
@keyframes curtain-in { from { transform: translateY(101%); } to { transform: none; } }
@keyframes iris { from { transform: rotate(0); opacity: 1; } to { transform: rotate(-180deg); opacity: 0; } }
@keyframes iris-in { from { transform: rotate(180deg) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Motion: entrances ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 1000ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + 520ms); }
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 700ms); }
  .js .strip__frame { opacity: 0; transform: translateX(60px); animation: slide-in 1100ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 55ms + 600ms); }

  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  .js .tile[data-reveal] .tile__img img { transform: scale(1.14); }
  .js .tile[data-reveal].is-in .tile__img img { transform: none; }

  .js [data-shutter] { overflow: hidden; clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js [data-shutter] img { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js [data-shutter].is-in { clip-path: inset(0); }
  .js [data-shutter].is-in img { transform: none; }

  @supports (animation-timeline: view()) {
    .drift img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    @keyframes drift { from { transform: translateY(-5%) scale(1.1); } to { transform: translateY(5%) scale(1.1); } }
    .footer__name { animation: name-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes name-in { from { transform: translateY(40%); opacity: 0.2; } to { transform: none; opacity: 1; } }
  }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes slide-in { to { opacity: 1; transform: none; } }

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

/* =========================================================
   Booking form page
   ========================================================= */
.book {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  padding: clamp(24px, 4vw, 56px) var(--margin) 0;
  align-items: start;
}
.book__side { position: sticky; top: 24px; }
.book__title {
  font-size: clamp(2.75rem, 7vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.88;
}
.book__intro { margin-top: 24px; max-width: 40ch; }
.book__photo { margin-top: 32px; aspect-ratio: 5 / 4; overflow: hidden; background: var(--surface); position: relative; }
.book__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 700ms ease, transform 1600ms var(--ease-soft); }
.book__photo img.is-on { opacity: 1; transform: none; }
.book__photo figcaption { position: absolute; left: 14px; bottom: 12px; font-size: var(--step-small); font-weight: 600; color: #fff; transition: opacity var(--t-ui) ease; }
.book__sheet { display: flex; gap: 6px; height: 96px; margin-top: 6px; overflow: hidden; }
.book__sheet img { height: 100%; width: auto; flex: none; object-fit: cover; transition: opacity 400ms ease, transform 500ms var(--ease-out); }
.book__sheet.is-swapping img { opacity: 0; transform: translateY(10px); }
@media (prefers-reduced-motion: no-preference) {
  .js .group .field { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + 120ms); }
  .js .group.is-in .field { opacity: 1; transform: none; }
}
.book__light { margin-top: 20px; padding: 18px 20px; background: var(--surface); }
.book__light h2 { font-size: var(--step-small); font-weight: 600; margin-bottom: 6px; }

.form { display: grid; gap: 4px; padding-bottom: var(--gap-section); }
.group { padding: clamp(24px, 3vw, 40px); background: var(--surface); }
.group h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.group > p { margin-top: 8px; color: var(--muted); font-size: 1rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 20px; margin-top: 28px; }
.field { display: grid; gap: 8px; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field label, .field legend { font-size: var(--step-small); font-weight: 600; }
.field label i, .field legend i { font-style: normal; color: var(--accent); }
.field .hint { font-size: var(--step-small); color: var(--muted); }
.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: var(--bg);
  border: 0;
  border-bottom: 2px solid var(--surface-2);
  border-radius: 0;
  font-size: 1.0625rem;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease;
  color-scheme: dark;
}
.input::placeholder { color: #6f685a; }
.input:hover { background: #12110d; }
.input:focus { outline: none; border-bottom-color: var(--accent); background: #12110d; }
textarea.input { min-height: 130px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a89f8a' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field.is-invalid .input { border-bottom-color: #e5684a; }
.field .error { display: none; font-size: var(--step-small); color: #f08a6e; }
.field.is-invalid .error { display: block; }

fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 4px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px;
  background: var(--bg); color: var(--muted); font-size: 1rem; font-weight: 600;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.choice span small { margin-left: 8px; font-weight: 400; font-size: var(--step-small); }
.choice input:checked + span { background: var(--accent); color: var(--accent-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice input:active + span { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .choice:hover input:not(:checked) + span { color: var(--ink); background: #1b1913; } }

.daylight { grid-column: 1 / -1; padding: 16px 18px; background: var(--bg); font-size: 1rem; display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: center; }
.daylight[hidden] { display: none; }
.daylight b { font-weight: 600; }
.daylight .button { min-height: 44px; }
@media (max-width: 560px) { .daylight { grid-template-columns: 1fr; } .daylight .button { justify-self: start; } }

.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; font-size: 1rem; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: clamp(24px, 3vw, 40px); background: var(--surface); }
.submit-row .button--big { margin-left: auto; }

.done {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: var(--margin);
  background: rgba(8, 7, 6, 0.92);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 320ms var(--ease-out), visibility 0s linear 320ms;
}
.done.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 320ms var(--ease-out); }
.done__card {
  width: min(640px, 100%);
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: clamp(24px, 4vw, 44px);
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); /* taste-skill-ignore: диалог поверх страницы */
  transform: translateY(24px) scale(0.98);
  transition: transform 520ms var(--ease-out);
}
.done.is-open .done__card { transform: none; }
.done__card h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.done__card > p { margin-top: 12px; color: var(--muted); }
.summary { margin: 24px 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: 1rem; }
.summary dt { color: var(--muted); }
.done__actions { display: flex; flex-wrap: wrap; gap: 4px; }

@media (max-width: 900px) {
  .book { grid-template-columns: 1fr; }
  .book__side { position: static; }
  .book__photo { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .fields { grid-template-columns: 1fr; }
  .group { padding: 22px 18px; }
}

/* =========================================================
   Intro: the first screen, an aperture opening on the gulf
   ========================================================= */
.intro {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  isolation: isolate;
}
/* Scroll track: the intro stays pinned while the picture closes into a print. */
.intro-track { position: relative; }
.intro__frame { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.intro__photos { position: absolute; inset: 0; will-change: transform, filter; }
.intro__body { will-change: transform, opacity, filter; }
/* The second screen slides up over the pinned intro like a sheet. */
.hero { position: relative; z-index: 1; background: var(--bg); }
@media (prefers-reduced-motion: no-preference) {
  .js .intro { position: sticky; top: 0; }
}
.intro__photos img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 1800ms ease, transform 9000ms linear;
}
.intro__photos img.is-on { opacity: 1; transform: scale(1.02); }
/* Neutral scrim under the type: the one allowed gradient. */
.intro__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 7, 6, 0.82) 0%, rgba(8, 7, 6, 0.25) 55%, rgba(8, 7, 6, 0.45) 100%); /* taste-skill-ignore: scrim under text on a photo */
}
.intro__bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--margin);
  font-size: var(--step-small);
  font-weight: 600;
}
.intro__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 var(--margin) clamp(24px, 5vh, 52px);
}
.intro__name { display: block; }
/* Monogram first, the full name beneath it at heading size. */
.intro__mono {
  font-size: clamp(4.5rem, 15vw, 17rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.78;
  margin-left: -0.06em;
  padding-top: 0.1em;
}
.intro__mono [data-line] { display: inline-block; }
.intro__full {
  margin-top: clamp(10px, 1.6vw, 24px);
  font-size: var(--step-head);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}
.brand__mark { font-weight: 800; letter-spacing: -0.04em; font-size: 1.0625rem; }
.intro__foot {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px 48px;
  margin-top: clamp(20px, 3.5vh, 40px);
}
.intro__line { max-width: 40ch; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.02em; }
.intro__down {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-size: var(--step-small);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.intro__arrow {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.125rem;
  transition: transform var(--t-hover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .intro__down:hover .intro__arrow { transform: translateY(4px); } }
@media (max-width: 700px) {
  .intro__foot { flex-direction: column; align-items: start; }
  .intro__mono { font-size: 18vw; }
}

@media (prefers-reduced-motion: no-preference) {
  /* The aperture opens once the curtain has lifted. */
  .js .intro__photos { clip-path: circle(0% at 50% 50%); animation: aperture 1700ms var(--ease-in-out) 700ms forwards; }
  .js .intro .lines [data-line] { animation-delay: calc(var(--i, 0) * 130ms + 1500ms); animation-duration: 1200ms; }
  .js [data-intro] { opacity: 0; transform: translateY(20px); animation: rise 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 120ms + 1900ms); }
  .js .intro__arrow { animation: nudge 2.2s var(--ease-in-out) 3s infinite; }

  /* Hero entrances wait until it is scrolled into view. */
  .js .hero:not(.is-in) [data-line],
  .js .hero:not(.is-in) [data-rise],
  .js .hero:not(.is-in) .strip__frame { animation-play-state: paused; }
  .js .hero [data-line] { animation-delay: calc(var(--i, 0) * 110ms + 100ms); }
  .js .hero [data-rise] { animation-delay: calc(var(--i, 0) * 90ms + 300ms); }
  .js .hero .strip__frame { animation-delay: calc(var(--i, 0) * 55ms + 200ms); }

}
@keyframes aperture { to { clip-path: circle(80% at 50% 50%); } }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(6px); } }

/* =========================================================
   Retouch: one slider develops the finished frame
   ========================================================= */
.edits { padding-inline: var(--margin); }
.edits__title { margin-bottom: clamp(28px, 4vw, 56px); }
.ba { display: grid; grid-template-columns: minmax(0, 3fr) minmax(200px, 1fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.ba__main { width: fit-content; max-width: 100%; }
.ba__stage { position: relative; overflow: hidden; background: var(--surface); transition: opacity 260ms ease; }
.ba__stage.is-swapping { opacity: 0; }
.ba__after { display: block; width: auto; height: auto; max-width: 100%; max-height: min(78vh, 860px); }
.ba__before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: opacity; }
.ba__range {
  --v: 0%;
  display: block;
  width: 100%;
  height: 44px;
  margin: 14px 0 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.ba__range::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, var(--ink) var(--v), var(--surface-2) var(--v)); /* taste-skill-ignore: hard-stop fill of a slider track, not a gradient */
}
.ba__range::-moz-range-track { height: 6px; background: var(--surface-2); }
.ba__range::-moz-range-progress { height: 6px; background: var(--ink); }
.ba__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px; height: 30px;
  margin-top: -12px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  transition: transform var(--t-press) var(--ease-out);
}
.ba__range::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--accent); }
.ba__range:active::-webkit-slider-thumb { transform: scale(1.15); }
.ba__range:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.ba__thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; align-content: start; max-width: 360px; }
.ba__thumb {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.ba__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ba__thumb[aria-pressed="true"] { opacity: 1; }
.ba__thumb:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .ba__thumb:hover { opacity: 1; } }
@media (max-width: 900px) {
  .ba { grid-template-columns: 1fr; }
  .ba__main { width: 100%; }
  .ba__after { width: 100%; height: auto; max-height: 80vh; }
  .ba__thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: none; }
}

.load-error { padding: 40vh var(--margin) 0; font-size: var(--step-lead); }

/* Ловушка для ботов в анкете: убрана с экрана, но не display:none, чтобы боты её заполняли */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: скрытое поле-ловушка, не линия */
.done [hidden] { display: none !important; }
