/* ==========================================================
   Арина Тихачева — портфолио
   ========================================================== */

@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("../fonts/unbounded-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("../fonts/unbounded-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("../fonts/unbounded-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("../fonts/unbounded-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url("../fonts/onest-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url("../fonts/onest-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url("../fonts/onest-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url("../fonts/onest-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F3F0E9;
  --bg-2: #E9E4D8;
  --paper: #FFFFFF;
  --ink: #10262E;
  --ink-2: #51666C;
  --line: rgba(16, 38, 46, .14);
  --dark: #0E2128;
  --on-dark: #F3F0E9;
  --on-dark-2: rgba(243, 240, 233, .62);
  --coral: #EE7A63;
  --accent: var(--coral);

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1680px;
  --radius: 4px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: transform .5s var(--ease), background-color .3s, box-shadow .3s;
}
.header__in { min-width: 0; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header.is-solid { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.header.is-hidden { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
.logo__mark { width: 22px; height: 22px; flex: none; }
.nav { display: flex; gap: clamp(14px, 2.4vw, 36px); font-size: 15px; font-weight: 500; }
.nav a { position: relative; padding: 6px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 560px) {
  .logo__text--long { display: none; }
  .nav { font-size: 14px; gap: 16px; }
}
@media (max-width: 349px) {
  .logo__text { display: none; }
  .nav { gap: 14px; }
}
@media (max-width: 300px) { .nav { font-size: 13px; gap: 10px; } }

/* ---------- Loader ---------- */
.loader { display: none; }
.with-loader .loader {
  display: block; position: fixed; inset: 0; z-index: 100; color: var(--on-dark);
  cursor: pointer; overflow: hidden;
}
.loader__bars { position: absolute; inset: 0 -12vw; display: flex; transform: skewX(-14deg); }
.loader__bar { flex: 1 0 auto; height: 100%; margin-right: -1px; background: var(--dark); }
.loader__grid {
  position: absolute; left: 50%; top: 50%; translate: -50% -55%;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(10px, 2.2vw, 22px);
}
.loader__grid i {
  display: block; width: clamp(12px, 2.6vw, 26px); aspect-ratio: 1; border-radius: 2px;
  background: var(--c, var(--coral)); transform: rotate(45deg) scale(0);
}
.loader__count {
  position: absolute; left: var(--gutter); bottom: calc(var(--gutter) * .8);
  font-family: var(--f-display); font-weight: 700; font-size: clamp(56px, 12vw, 160px); line-height: .8; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.loader__name { position: absolute; left: var(--gutter); top: calc(var(--gutter) * .8); }
.loader__skip {
  position: absolute; right: var(--gutter); bottom: calc(var(--gutter) * .8);
  padding: 10px 16px; border: 1px solid rgba(243, 240, 233, .35); border-radius: 999px; color: var(--on-dark);
  transition: background-color .25s, color .25s;
}
.loader__skip:hover { background: var(--on-dark); color: var(--dark); }
.with-loader body { overflow: hidden; }

/* ---------- Page wipe transition ---------- */
.wipe { position: fixed; inset: 0; z-index: 90; overflow: hidden; pointer-events: none; }
.wipe__in { position: absolute; inset: 0 -12vw; display: flex; transform: skewX(-14deg); }
/* на высоком экране скос шире 12vw — расширяем полосы, чтобы углы были закрыты */
@media (orientation: portrait) { .wipe__in, .loader__bars { inset: 0 calc(-12vw - 13vh); } }
.wipe__bar { flex: 1 0 auto; height: 100%; margin-right: -1px; background: var(--wipe, var(--dark)); transform: scaleY(0); transform-origin: 50% 100%; }
.is-arriving .wipe__bar { transform: scaleY(1); }
.wipe.is-active { pointer-events: auto; }

/* ---------- Cursor ---------- */
.cursor { display: none; }
.has-cursor .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; }
.cursor__dot { position: fixed; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.cursor__ring {
  position: fixed; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--ink); display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), left .35s var(--ease), top .35s var(--ease), background-color .3s, border-color .3s, opacity .3s;
}
.cursor__label { font-size: 13px; font-weight: 500; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s var(--ease); white-space: nowrap; }
.cursor.is-link .cursor__ring { width: 56px; height: 56px; left: -28px; top: -28px; border-color: var(--accent); }
.cursor.is-view .cursor__ring { width: 104px; height: 104px; left: -52px; top: -52px; background: var(--c, var(--accent)); border-color: transparent; }
.cursor.is-view .cursor__label { opacity: 1; transform: none; }
.cursor.is-view .cursor__dot, .cursor.is-hidden { opacity: 0; }
.cursor.on-dark .cursor__dot { background: var(--on-dark); }
.cursor.on-dark .cursor__ring { border-color: var(--on-dark); }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [data-cursor] { cursor: none; }

/* ---------- Reveal helpers ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-reveal-img] { clip-path: inset(100% 0 0 0); }
.js .split .char { display: inline-block; transform: translateY(105%); }
.split .line { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.split .word { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; padding-top: calc(var(--header-h) + clamp(20px, 5vh, 56px)); }
.hero__top { display: flex; justify-content: space-between; gap: 24px; color: var(--ink-2); }
.hero__name {
  margin-top: clamp(16px, 4vh, 48px);
  font-family: var(--f-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(34px, 10.4vw, 186px); line-height: .9; letter-spacing: -.045em; white-space: nowrap;
}
.hero__name .line:last-child { padding-left: clamp(0px, 7vw, 130px); }
.hero__name .accent-dot { color: var(--coral); }
.hero__bottom { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; margin-top: clamp(20px, 4vh, 44px); }
.hero__lead { max-width: 30ch; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.4; }
.hero__lead b { font-weight: 500; }
.hero__scroll { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; }
.hero__scroll svg { width: 14px; height: 14px; animation: nudge 2.2s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

.marquee { position: relative; margin-top: auto; padding-block: clamp(24px, 4vh, 40px) clamp(16px, 3vh, 32px); overflow: hidden; }
.marquee__track { display: flex; gap: clamp(10px, 1.2vw, 18px); width: max-content; will-change: transform; }
.marquee__item {
  position: relative; flex: none; height: clamp(140px, 25vh, 290px); border-radius: var(--radius); overflow: hidden;
  background: var(--paper);
}
.marquee__item img { height: 100%; width: auto; transition: transform .8s var(--ease); }
.marquee__item:hover img { transform: scale(1.05); }
.marquee__item span {
  position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--on-dark);
  font-size: 12px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease);
}
.marquee__item:hover span { opacity: 1; transform: none; }
.reduced .marquee { overflow-x: auto; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 12vw, 180px); }
.section-head { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: clamp(32px, 5vw, 72px); }
.section-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(34px, 6vw, 96px); line-height: .95; letter-spacing: -.035em; text-transform: uppercase; }

/* Works */
.works { padding-top: clamp(56px, 8vw, 120px); }
.chapter { padding-block: clamp(28px, 4vw, 56px); border-top: 1px solid var(--line); }
.chapter__head { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: clamp(14px, 3vw, 40px); margin-bottom: clamp(20px, 3vw, 40px); }
.chapter__num { font-family: var(--f-display); font-weight: 700; font-size: clamp(40px, 7vw, 120px); line-height: .8; letter-spacing: .06em; color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
/* контур без внутренних линий шрифта: обводка 3px под заливкой цвета фона = чистые 1.5px снаружи */
@supports (paint-order: stroke fill) { .chapter__num { color: var(--bg); -webkit-text-stroke-width: 3px; paint-order: stroke fill; } }
.chapter__title { min-width: 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 2.6vw, 40px); line-height: 1.05; letter-spacing: -.02em; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.chapter__count { color: var(--ink-2); font-size: 14px; }
.chapter__grid { display: grid; gap: clamp(16px, 2vw, 28px); grid-template-columns: repeat(12, 1fr); }
.chapter__grid > .card { grid-column: span 6; }
.chapter__grid > .card--wide { grid-column: 1 / -1; }
.chapter__grid > .card--7 { grid-column: span 7; }
.chapter__grid > .card--5 { grid-column: span 5; }

.card { position: relative; display: block; transition: opacity .5s var(--ease); }
@media (hover: hover) { .chapter__grid:has(.card:hover) .card:not(:hover) { opacity: .45; } }
.card__media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--tint, var(--bg-2)); aspect-ratio: 3 / 2; }
.card--7 .card__media, .card--5 .card__media { aspect-ratio: auto; height: clamp(260px, 36vw, 620px); }
.card--wide .card__media { aspect-ratio: 21 / 9; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), scale 1.1s var(--ease); }
.card__media img.contain { object-fit: contain; padding: clamp(16px, 4%, 48px); }
.card:hover .card__media img { transform: scale(1.045); }
.card__media::after {
  /* accent stripes that sweep across on hover — the 45° motif of Arina's patterns */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, var(--c) 0 14px, transparent 14px 30px);
  opacity: 0; mix-blend-mode: multiply;
  clip-path: polygon(0 100%, 0 100%, 0 100%); transition: clip-path .7s var(--ease), opacity .4s;
}
.card:hover .card__media::after { opacity: .18; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.card__info { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; padding-top: 16px; }
.card__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(17px, 1.6vw, 24px); line-height: 1.2; letter-spacing: -.015em; }
.card__meta { grid-column: 1; color: var(--ink-2); font-size: 15px; }
.card__arrow {
  grid-row: 1 / span 2; grid-column: 2; align-self: start;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center;
  transition: background-color .35s, border-color .35s, color .35s, transform .5s var(--ease);
}
.card__arrow svg { width: 16px; height: 16px; }
.card:hover .card__arrow { background: var(--c); border-color: var(--c); color: #fff; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .chapter__grid > .card, .chapter__grid > .card--7, .chapter__grid > .card--5 { grid-column: 1 / -1; }
  .card--7 .card__media, .card--5 .card__media, .card--wide .card__media { aspect-ratio: 4 / 3; height: auto; }
  .chapter__head { grid-template-columns: auto 1fr; }
  .chapter__count { display: none; }
}

/* About */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 110px); align-items: start; }
.about__photo { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; background: var(--bg-2); }
.about__photo img { width: 100%; height: 112%; object-fit: cover; }
.about__photo-tag {
  position: absolute; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 500;
}
.about__intro { font-family: var(--f-display); font-weight: 500; font-size: clamp(22px, 2.7vw, 42px); line-height: 1.2; letter-spacing: -.02em; }
.about__intro em { font-style: normal; color: var(--coral); }
.facts { margin-top: clamp(32px, 5vw, 72px); display: grid; gap: 0; }
.fact { display: grid; grid-template-columns: minmax(120px, 3fr) 7fr; gap: 20px; padding-block: 22px; border-top: 1px solid var(--line); }
.fact dt { color: var(--ink-2); font-size: 15px; padding-top: 2px; }
.fact dd { font-size: clamp(16px, 1.3vw, 19px); }
.fact dd small { display: block; color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tools li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; transition: background-color .3s, color .3s, border-color .3s; }
.tools li:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tools li small { display: inline; margin: 0 0 0 4px; color: var(--ink-2); font-size: 13px; }
.tools li:hover small { color: inherit; opacity: .7; }
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 460px; }
  .fact { grid-template-columns: 1fr; gap: 6px; }
}

/* Contacts */
.contacts { padding-bottom: 0; }
.contacts { position: relative; background: var(--dark); color: var(--on-dark); overflow: hidden; }
.contacts .section-title { color: var(--on-dark); }
.contacts__lead { color: var(--on-dark-2); max-width: 36ch; font-size: clamp(16px, 1.4vw, 20px); }
.contact-list { margin-top: clamp(28px, 5vw, 72px); border-bottom: 1px solid rgba(243, 240, 233, .16); }
.contact {
  position: relative; display: grid; grid-template-columns: minmax(90px, 2fr) 8fr auto; align-items: center; gap: 16px;
  padding-block: clamp(18px, 2.6vw, 34px); border-top: 1px solid rgba(243, 240, 233, .16); overflow: hidden; isolation: isolate;
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--coral);
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease);
}
.contact:hover::before { transform: scaleY(1); }
.contact:hover { color: var(--dark); }

.contact__label { font-size: 14px; color: var(--on-dark-2); transition: color .3s; padding-left: 4px; }
.contact:hover .contact__label { color: var(--dark); }
.contact__value { font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 4.4vw, 68px); line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; transition: transform .6s var(--ease); }
.contact:hover .contact__value { transform: translateX(clamp(6px, 1.2vw, 18px)); }
.contact__icon { width: clamp(22px, 3vw, 40px); height: clamp(22px, 3vw, 40px); transition: transform .6s var(--ease); margin-right: 4px; }
.contact:hover .contact__icon { transform: rotate(-45deg); }
@media (hover: none) {
  /* touch: no sticky hover after a tap, feedback only while pressed */
  .contact:hover::before { transform: scaleY(0); }
  .contact:hover { color: inherit; }
  .contact:hover .contact__label { color: var(--on-dark-2); }
  .contact:hover .contact__value, .contact:hover .contact__icon { transform: none; }
  .contact:active::before { transform: scaleY(1); }
  .contact:active, .contact:active .contact__label { color: var(--dark); }
}
.copy-btn {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(243, 240, 233, .3); font-size: 14px; color: var(--on-dark); transition: background-color .25s, color .25s;
}
.copy-btn:hover { background: var(--on-dark); color: var(--dark); }
@media (max-width: 640px) {
  .contact { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .contact__label { grid-column: 1 / -1; padding-left: 0; }
}

.pattern-strip {
  height: clamp(48px, 7vw, 96px); margin-top: clamp(48px, 8vw, 120px);
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 7l7 7-7 7-7-7z' fill='%23F8B9AA'/%3E%3C/svg%3E") 0 0 / 28px 28px;
  animation: strip 18s linear infinite;
}
@keyframes strip { to { background-position: 280px 0; } }

.footer { background: var(--dark); color: var(--on-dark-2); font-size: 14px; }
.footer__in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; border-top: 1px solid rgba(243, 240, 233, .12); }
.footer a { color: var(--on-dark); }
.to-top { display: inline-flex; align-items: center; gap: 8px; color: var(--on-dark); }
.to-top svg { width: 14px; height: 14px; }

/* ---------- Project page ---------- */
.p-hero { padding-top: calc(var(--header-h) + clamp(40px, 8vw, 120px)); padding-bottom: clamp(36px, 6vw, 88px); }
.p-hero__crumbs { display: flex; gap: 14px; align-items: center; color: var(--ink-2); }
.p-hero__crumbs .num { color: var(--c); }
.p-hero__title {
  margin-top: clamp(18px, 3vw, 36px); max-width: 16ch;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(34px, 6.4vw, 112px); line-height: .98; letter-spacing: -.04em;
}
.p-hero__row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 6vw, 110px); margin-top: clamp(28px, 4vw, 64px); align-items: start; }
.p-hero__desc { font-size: clamp(17px, 1.5vw, 22px); line-height: 1.5; max-width: 46ch; }
.p-meta { display: grid; gap: 0; }
.p-meta div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-block: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.p-meta dt { color: var(--ink-2); }
.p-hero__stripe { height: 10px; margin-top: clamp(36px, 5vw, 72px); background: repeating-linear-gradient(135deg, var(--c) 0 6px, transparent 6px 14px); transform-origin: left; }
@media (max-width: 860px) { .p-hero__row { grid-template-columns: 1fr; } }

.gallery { display: grid; gap: clamp(16px, 2.4vw, 40px); padding-bottom: clamp(64px, 10vw, 160px); }
.shot { position: relative; margin-inline: auto; width: 100%; }
.shot--narrow { max-width: min(900px, 100%); }
.shot__frame { position: relative; display: block; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.shot--paper .shot__frame { background: var(--paper); }
.shot__frame img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.shot__frame:hover img { transform: scale(1.015); }
.shot__cap { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; font-size: 14px; color: var(--ink-2); }
.shot__cap b { font-weight: 500; color: var(--ink); }
.row { display: flex; gap: clamp(16px, 2.4vw, 40px); align-items: flex-start; }
.row > .shot { flex: var(--ar) 1 0; min-width: 0; }
@media (max-width: 700px) {
  .row { flex-direction: column; }
  .row > .shot { flex: none; }
}
.stickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.6vw, 24px); }
.sticker { background: var(--paper); border-radius: var(--radius); overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.sticker:hover { transform: rotate(var(--r, -3deg)) translateY(-6px); box-shadow: 0 18px 40px -18px rgba(16, 38, 46, .35); }
.sticker:nth-child(even) { --r: 3deg; }
@media (max-width: 700px) { .stickers { grid-template-columns: repeat(2, 1fr); } }
.gallery__label { display: flex; align-items: center; gap: 14px; margin-top: clamp(16px, 3vw, 40px); color: var(--ink-2); }
.gallery__label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Next project */
.next { position: relative; display: block; background: var(--c); color: #fff; overflow: hidden; isolation: isolate; }
.next__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(56px, 9vw, 140px); }
.next__kicker { opacity: .75; }
.next__title { margin-top: 18px; font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 5vw, 84px); line-height: 1; letter-spacing: -.04em; }
.next__go { margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 999px; background: #fff; color: var(--c); font-weight: 500; }
.next__go svg { width: 16px; height: 16px; transition: transform .5s var(--ease); }
.next:hover .next__go svg { transform: translateX(6px); }
.next__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; background: rgba(255,255,255,.12); }
.next__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.next__media img.contain { object-fit: contain; background: #fff; padding: 6%; }
.next:hover .next__media img { transform: scale(1.05); }
.next::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 18px, transparent 18px 40px);
}
@media (max-width: 760px) { .next__in { grid-template-columns: 1fr; } }

.p-footer { background: var(--dark); color: var(--on-dark-2); }
.p-footer__in { display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; align-items: center; padding-block: 32px; font-size: 15px; }
.p-footer__links { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.p-footer a { color: var(--on-dark); }
.p-footer a:hover { color: var(--coral); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80; display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(10, 24, 29, .96); color: var(--on-dark);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px; font-size: 14px; }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); touch-action: pinch-zoom; }
.lightbox__stage img { max-width: 100%; max-height: calc(100vh - 160px); max-height: calc(100svh - 160px); width: auto; height: auto; object-fit: contain; border-radius: 2px; user-select: none; -webkit-user-drag: none; }
.lightbox__btn { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(243, 240, 233, .3); color: var(--on-dark); transition: background-color .25s, color .25s; }
.lightbox__btn:hover { background: var(--on-dark); color: var(--dark); }
.lightbox__btn svg { width: 18px; height: 18px; }
.lightbox__nav { display: flex; justify-content: center; gap: 12px; padding: 14px 14px max(14px, env(safe-area-inset-bottom)); }
.lightbox__cap { color: var(--on-dark-2); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-reveal-img], .js .split .char { opacity: 1; transform: none; clip-path: none; }
}
.cursor.is-view.on-dark .cursor__ring { background: #fff; }
.cursor.is-view.on-dark .cursor__label { color: var(--c); }

@media (max-width: 640px) {
  .hero__bottom { grid-template-columns: 1fr; }
  .hero__lead { max-width: none; }
}
@media (orientation: portrait) and (min-width: 700px) {
  .marquee__item { height: clamp(200px, 30vh, 400px); }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .logo { min-height: 44px; }
  .nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .nav a::after { bottom: 11px; }

  /* hero: name fills the line, works feed takes the free space */
  .hero { padding-top: calc(var(--header-h) + 20px); }
  .hero__top { flex-wrap: wrap; gap: 4px 12px; }
  .hero__top > * { white-space: nowrap; }
  .hero > .wrap { flex: 1 0 auto; display: flex; flex-direction: column; }
  .hero__name { margin-top: auto; padding-top: clamp(28px, 6svh, 56px); font-size: calc((100vw - 2 * var(--gutter)) / 8.25); line-height: .92; }
  .hero__name .line:last-child { padding-left: 0; }
  .hero__bottom { gap: 12px; margin-top: clamp(18px, 3.5svh, 32px); margin-bottom: auto; } /* свободная высота — поровну над именем и над лентой */
  .hero__lead { font-size: 18px; }
  .hero__scroll { justify-self: start; min-height: 44px; color: var(--ink); font-weight: 500; }
  .marquee { margin-top: 0; padding-block: 28px 16px; }
  .marquee__item { height: 224px; } /* = sizes в index.html: на DPR ≤ 1.75 грузится вариант -600 */

  .section { padding-block: 72px; }
  .contacts { padding-bottom: 0; }
  .section-head { gap: 10px; margin-bottom: 28px; }
  .section-title { font-size: clamp(26px, 10.5vw, 46px); }
  .chapter__head { gap: 14px; }
  .chapter__num { font-size: clamp(34px, 11vw, 48px); }
  .chapter__title { font-size: clamp(17px, 5.4vw, 22px); }
  .chapter { padding-block: 28px 36px; }
  .chapter__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .card__info { gap: 6px 14px; padding-top: 14px; }
  .card__title { margin: 0; font-size: 18px; }
  .card__meta { font-size: 14px; }
  .card__arrow { width: 44px; height: 44px; }

  .about__intro { font-size: clamp(22px, 6.4vw, 28px); }
  .fact { padding-block: 18px; }

  .contact { padding-block: 16px; }
  .contact__value { font-size: clamp(14px, 5.1vw, 24px); }
  .contact__icon { width: 22px; height: 22px; }
  .copy-btn { min-height: 44px; padding: 10px 18px; margin-top: 20px; }
  .pattern-strip { margin-top: 56px; }
  .footer__in { padding-block: 14px; align-items: center; }
  .to-top { min-height: 44px; }

  /* project pages */
  .p-hero { padding-top: calc(var(--header-h) + 16px); }
  .p-hero__crumbs { flex-wrap: wrap; gap: 0 10px; }
  .p-hero__crumbs > * { white-space: nowrap; }
  .p-hero__crumbs a { flex-basis: 100%; display: inline-flex; align-items: center; min-height: 44px; }
  .p-hero__crumbs > span[aria-hidden] { display: none; }
  .p-hero__title { margin-top: 18px; max-width: none; font-size: clamp(24px, 9.2vw, 42px); line-height: 1.02; }
  .p-hero__row { gap: 28px; margin-top: 24px; }
  .p-meta div { grid-template-columns: 96px 1fr; gap: 12px; }
  .gallery { gap: 28px; }
  .shot__cap { padding-top: 10px; }
  .next__in { gap: 28px; padding-block: 56px; }
  .next__title { font-size: clamp(22px, 8.4vw, 38px); margin-top: 14px; }
  .next__go { margin-top: 22px; min-height: 48px; }
  .p-footer__in { padding-block: 20px 24px; gap: 4px; }
  .p-footer__links { gap: 0 24px; }
  .p-footer__links a { display: inline-flex; align-items: center; min-height: 44px; }

  .lightbox__stage { padding: 0 8px; }
  .lightbox__stage img { max-height: calc(100svh - 170px); }
}
@media (max-width: 400px) {
  .hero__top { font-size: 11px; letter-spacing: .06em; }
}
