/* ==========================================================================
   Портфолио — «чёрная ткань, золотая нить»
   ========================================================================== */

:root {
  --bg: #0b0b0c;
  --bg-2: #121214;
  --surface: #17171a;
  --line: rgba(236, 231, 221, 0.10);
  --line-strong: rgba(236, 231, 221, 0.22);
  --text: #ece7dd;
  --muted: #9b958a;
  --gold: #d4a548;
  --gold-2: #f0c973;
  --gold-dim: rgba(212, 165, 72, 0.16);

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1400px;
  --gutter: clamp(16px, 4vw, 64px);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: 16px; top: -60px;
  padding: 8px 14px; background: var(--gold); color: #000; border-radius: var(--radius);
  z-index: 200; transition: top .2s;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Лёгкое зерно поверх всего — эффект ткани */
.grain {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 100; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

/* --------------------------------------------------------------------------
   Типографика
   -------------------------------------------------------------------------- */
.eyebrow {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin-top: 12px;
}

em { font-style: italic; color: var(--gold-2); }

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  font-weight: 600; font-size: 14px; letter-spacing: .04em;
  border-radius: 999px;
  transition: transform .35s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn-primary { background: var(--gold); color: #0b0b0c; }
.btn-primary:hover { background: var(--gold-2); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: transform .45s var(--ease), background .3s;
  background: rgba(11, 11, 12, .82);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  transition: transform .6s var(--ease);
}
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand:hover .brand-mark { transform: rotate(20deg); }
.brand-text { font-weight: 600; letter-spacing: .02em; }

.nav { display: flex; gap: 32px; align-items: center; font-size: 14px; font-weight: 500; }
.nav a { position: relative; padding: 6px 0; color: var(--muted); transition: color .25s; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav .nav-cta { color: var(--gold); }

.burger {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.burger span { width: 22px; height: 1.5px; background: var(--text); transition: transform .3s, opacity .3s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column;
  padding: 8px var(--gutter) 20px; border-top: 1px solid var(--line);
}
.mobile-nav a { padding: 14px 0; font-size: 18px; font-family: var(--font-display); border-bottom: 1px solid var(--line); }
.mobile-nav.is-open { display: flex; }

.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-scrolled { background: rgba(11, 11, 12, .94); background: color-mix(in srgb, var(--bg) 92%, transparent); }

@media (max-width: 800px) {
  .nav { display: none; }
  .burger { display: flex; }
  .brand-text { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(72px, 12vh, 150px) 0 clamp(56px, 8vh, 100px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 500px at 85% 20%, rgba(212,165,72,.10), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(212,165,72,.05), transparent 60%),
    var(--bg);
}
.hero-inner { position: relative; z-index: 2; }
.hero-title, .hero-actions { max-width: 860px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(56px, 10vw, 136px);
  line-height: .96;
  letter-spacing: -.02em;
  margin-top: 22px;
}
.hero-lead {
  max-width: 560px; margin-top: 28px;
  font-size: clamp(16px, 1.3vw, 19px); color: var(--muted); line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }


.hero-ornament {
  position: absolute; z-index: 1; display: block;
  right: clamp(-80px, -2vw, 40px); top: 50%;
  width: clamp(380px, 42vw, 680px); height: auto;
  transform: translateY(-50%);
  pointer-events: none;
  animation: logoIn 1.6s var(--ease) both .2s;
}
.hero-ornament::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 120%; height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212,165,72,.22), transparent 60%);
  filter: blur(20px); z-index: -1;
}
.hero-ornament img {
  width: 100%; height: auto; display: block;
  animation: spin 140s linear infinite;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.6));
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes logoIn { from { opacity: 0; transform: translateY(-50%) scale(.86); } to { opacity: 1; transform: translateY(-50%) scale(1); } }

@media (max-width: 1000px) {
  .hero-ornament { opacity: .16; right: -22vw; width: 92vw; }
  .hero-ornament::before { display: none; }
}

/* --------------------------------------------------------------------------
   Бегущая строка
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden; border-bottom: 1px solid var(--line);
  padding: 18px 0; background: var(--bg-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 40px; width: max-content;
  animation: marquee 38s linear infinite;
  font-family: var(--font-display); font-size: 22px; letter-spacing: .02em; color: var(--muted);
}
.marquee-track i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Секции
   -------------------------------------------------------------------------- */
.section { padding: clamp(72px, 10vh, 140px) 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vh, 64px);
}

/* Фильтры */
.filters { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; }
.filter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: background .25s, color .25s;
}
.filter span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter:hover { color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); }
.filter.is-active span { color: var(--bg); opacity: .6; }

@media (max-width: 480px) {
  .filters { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { padding: 9px 13px; font-size: 13px; white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   Галерея (masonry на колонках, раскладка через JS)
   -------------------------------------------------------------------------- */
.masonry { display: flex; gap: 18px; align-items: flex-start; }
.masonry-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.work {
  position: relative; display: block; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.work.is-in { opacity: 1; transform: none; }
.work img {
  width: 100%; height: auto; aspect-ratio: var(--ar);
  object-fit: cover;
  opacity: 0; transition: opacity .6s ease, transform 1.2s var(--ease);
}
.work img.is-loaded { opacity: 1; }
.work:hover img { transform: scale(1.03); }

.work::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: inherit; pointer-events: none;
  transition: box-shadow .3s;
}
.work:hover::after { box-shadow: inset 0 0 0 1px rgba(212,165,72,.6); }

.work-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 14px 12px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text);
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .4s var(--ease);
}
.work-label b { font-weight: 500; color: var(--gold-2); }
.work:hover .work-label, .work:focus-visible .work-label { opacity: 1; transform: none; }

.works-more { display: flex; justify-content: center; margin-top: 48px; }
.works-more[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Услуги
   -------------------------------------------------------------------------- */
.services { background: var(--bg-2); border-block: 1px solid var(--line); }

.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.service-card {
  position: relative; padding: clamp(28px, 3.5vw, 48px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .35s, transform .5s var(--ease);
}
.service-card:hover { border-color: rgba(212,165,72,.45); transform: translateY(-4px); }
.service-index {
  font-family: var(--font-display); font-size: 15px; letter-spacing: .12em; color: var(--gold);
}
.service-card h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 3vw, 40px); line-height: 1.1; margin: 14px 0 18px;
}
.service-card p { color: var(--muted); max-width: 52ch; }
.service-list { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.service-list li { position: relative; padding-left: 22px; font-size: 15px; }
.service-list li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--gold);
}

/* --------------------------------------------------------------------------
   Процесс
   -------------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 36px 28px 40px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .step + .step { padding-left: 24px; border-left: 1px solid var(--line); } }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold);
  font-family: var(--font-display); font-size: 18px;
}
.step h3 { font-family: var(--font-display); font-weight: 500; font-size: 28px; margin: 22px 0 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* --------------------------------------------------------------------------
   Контакты
   -------------------------------------------------------------------------- */
.contact {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 400px at 50% 100%, rgba(212,165,72,.12), transparent 65%),
    var(--bg);
}
.contact-inner { text-align: center; max-width: 820px; }
.contact-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(44px, 7vw, 96px); line-height: 1; letter-spacing: -.02em; margin-top: 14px;
}
.contact-lead { margin: 26px auto 0; max-width: 46ch; color: var(--muted); }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.contact-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-weight: 500; font-size: 15px;
  transition: border-color .25s, color .25s, transform .35s var(--ease);
}
.contact-link:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-2px); }
.contact-link svg { width: 18px; height: 18px; fill: currentColor; }

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.to-top {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); transition: border-color .25s, color .25s;
}
.to-top:hover { border-color: var(--gold); color: var(--gold); }

/* --------------------------------------------------------------------------
   Лайтбокс
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 150;
  display: grid; place-items: center;
  background: rgba(6, 6, 7, .94);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100vw; padding: 0 16px; }
.lb-img {
  max-width: min(92vw, 1500px); max-height: 82vh; width: auto; height: auto;
  object-fit: contain; border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  opacity: 0; transform: scale(.97);
  transition: opacity .35s ease, transform .5s var(--ease);
}
.lb-img.is-ready { opacity: 1; transform: none; }
.lb-caption { display: flex; gap: 18px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lb-title { color: var(--text); }

.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 2;
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--text); font-size: 18px;
  background: rgba(11,11,12,.5);
  transition: border-color .25s, color .25s, background .25s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--gold); color: var(--gold); background: rgba(11,11,12,.9); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 700px) {
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: 20px; } .lb-next { right: 20px; }
  .lb-img { max-height: 70vh; }
}

/* --------------------------------------------------------------------------
   Появление при скролле
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }
.reveal:nth-child(5) { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .reveal, .work { opacity: 1; transform: none; }
}

/* ==========================================================================
   Дополнения: избранные кейсы, обо мне, QR, подвал
   ========================================================================== */
.muted { color: var(--muted); }
.section-note { max-width: 32ch; font-size: 14px; color: var(--muted); line-height: 1.6; text-align: right; }
@media (max-width: 800px) { .section-note { text-align: left; } }

.section-head--sub { margin-top: clamp(56px, 8vh, 96px); align-items: center; }
.section-subtitle {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin-top: 8px;
}
.count-badge {
  font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
}

/* Избранные кейсы */
.featured { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.case {
  display: block; border-radius: 8px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .35s, transform .5s var(--ease);
}
.case:hover { border-color: rgba(212,165,72,.5); transform: translateY(-4px); }
.case-media { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 7%; overflow: hidden; }
.case-media img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  transition: transform 1.2s var(--ease);
}
.case:hover .case-media img { transform: scale(1.04); }
.case-meta {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 20px 22px 22px; border-top: 1px solid var(--line);
}
.case-meta h3 { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.1; }
.case-meta p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.case-index { flex: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding-top: 6px; }
.case:nth-child(1) { transition-delay: 0s; } .case:nth-child(2) { transition-delay: .08s; }
@media (max-width: 720px) {
  .featured { grid-template-columns: 1fr; }
  .case-meta h3 { font-size: 22px; }
}

.works-more { flex-direction: column; align-items: center; gap: 18px; }
.works-count { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
#load-more[hidden] { display: none; }

/* Баннер Telegram */

/* Обо мне */
.about { background: var(--bg-2); border-top: 1px solid var(--line); overflow: hidden; }
.about-head { margin-bottom: clamp(40px, 6vh, 72px); }
.about-name {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(48px, 8vw, 112px); line-height: .98; letter-spacing: -.02em; margin-top: 14px;
}
.about-role { margin-top: 18px; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 460px); gap: clamp(40px, 7vw, 120px); align-items: start; }

.about-lead {
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.25; color: var(--text);
  max-width: 24ch;
}
.about-body { margin-top: 28px; display: grid; gap: 16px; max-width: 58ch; color: var(--muted); font-size: 16px; }

.skills { margin-top: 44px; border-top: 1px solid var(--line); }
.skill-row { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.skill-row h4 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0; }
.skill-row ul { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-row li { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 500; transition: border-color .25s, color .25s; }
.skill-row li:hover { border-color: var(--gold); color: var(--gold-2); }
.skill-row.is-ai li { border-color: rgba(212,165,72,.45); color: var(--gold-2); }
@media (max-width: 560px) { .skill-row { grid-template-columns: 1fr; gap: 10px; } }

/* Фото-арка с «прошитой» рамкой */
.about-figure { position: relative; margin: 0; padding: 16px 16px 0 0; }
.about-arch {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 999px 999px 10px 10px;
  display: grid; place-items: center;
  background:
    radial-gradient(400px 300px at 50% 100%, rgba(212,165,72,.16), transparent 70%),
    var(--surface);
}
.about-arch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-arch.has-photo::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(18,18,20,.5), transparent 35%);
}
.about-figure::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 24px; left: 16px; pointer-events: none;
  border: 1.5px dashed var(--gold); border-radius: 999px 999px 10px 10px; opacity: .7;
}
.about-monogram {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(96px, 14vw, 180px);
  line-height: 1; color: var(--gold); letter-spacing: -.04em; opacity: .9;
}
.about-figure figcaption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding-right: 16px; font-size: 13px; color: var(--muted); letter-spacing: .04em;
}
.about-figure-note b { font-weight: 600; color: var(--gold-2); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-figure { order: -1; max-width: 380px; }
}

/* QR */
.contact-qr-wrap { display: flex; justify-content: center; margin-top: 40px; }
.contact-qr {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 22px 16px; border-radius: 8px; background: var(--text); color: var(--bg);
}
.contact-qr[hidden] { display: none; }
.qr-box { width: 128px; height: 128px; margin-bottom: 10px; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.contact-qr span { font-size: 13px; font-weight: 600; }
.contact-qr small { font-size: 11px; opacity: .6; }

/* Подвал — три колонки */
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
  padding-block: clamp(40px, 6vh, 64px); border-bottom: 1px solid var(--line);
}
.footer-brand p { margin-top: 18px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.footer-brand .brand-text { display: inline; }
.footer-head { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-col a, .footer-col div a { display: block; padding: 5px 0; font-size: 15px; color: var(--text); transition: color .25s; }
.footer-col a:hover { color: var(--gold-2); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 22px; font-size: 13px; color: var(--muted);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Процесс: два трека */
.steps[hidden] { display: none; }
.steps.is-active .step { animation: stepIn .6s var(--ease) both; }
.steps.is-active .step:nth-child(2) { animation-delay: .06s; }
.steps.is-active .step:nth-child(3) { animation-delay: .12s; }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Две «двери» на первом экране */
.hero-doors {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  margin-top: clamp(44px, 6vh, 72px); max-width: 900px;
}
.door {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: rgba(23, 23, 26, .75);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .3s, transform .45s var(--ease), background .3s;
}
.door:hover { border-color: var(--gold); background: var(--surface); transform: translateY(-3px); }
.door-thumbs { display: flex; flex: none; }
.door-thumbs span {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--bg); margin-left: -12px; display: grid; place-items: center;
}
.door-thumbs span:first-child { margin-left: 0; }
.door-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.door-title { display: block; font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.1; }
.door-sub { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.door-sub b { color: var(--gold-2); font-weight: 600; }
.door-arrow { font-size: 20px; color: var(--gold); transition: transform .4s var(--ease); }
.door:hover .door-arrow { transform: translateX(4px); }
@media (max-width: 720px) {
  .hero-doors { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .door { grid-template-columns: 1fr auto; }
  .door-thumbs { display: none; }
}

/* отступ под липкую шапку при переходе по якорям */
section[id], .section-head--sub { scroll-margin-top: 84px; }


/* ==========================================================================
   Анимации и эффекты
   ========================================================================== */

/* Полоса прогресса чтения */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transform: scaleX(0); transform-origin: left; pointer-events: none;
}

/* Заголовок hero: строки выезжают снизу */
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .line > span {
  display: block; transform: translateY(110%);
  animation: lineUp 1.1s var(--ease) forwards;
}
.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes lineUp { to { transform: translateY(0); } }

.hero .eyebrow.reveal { transition-delay: 0s; }
.hero-lead.reveal { transition-delay: .35s; }
.hero-actions.reveal { transition-delay: .5s; }
.hero-doors.reveal { transition-delay: .65s; }

/* Орнамент: лёгкий параллакс (через переменные из JS) */
.hero-ornament.is-live {
  animation: none;
  transform: translate3d(var(--px, 0px), calc(-50% + var(--py, 0px)), 0) rotate(var(--rot, 0deg));
  transition: transform .2s linear;
  will-change: transform;
}

/* Кнопка: блик при наведении */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease); pointer-events: none;
}
.btn:hover::after { left: 130%; }

/* Ссылки в навигации — золотая точка */
.nav-cta::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); margin-right: 8px; vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(212,165,72,.6); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(212,165,72,0); } 100% { box-shadow: 0 0 0 0 rgba(212,165,72,0); } }

/* 3D-наклон карточек (перо мыши), только для точных указателей */
@media (hover: hover) and (pointer: fine) {
  .tilt {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
    transition: transform .5s var(--ease), border-color .35s, background .3s;
    transform-style: preserve-3d;
  }
  .tilt:hover { --ty: -4px; }
  .tilt.is-tilting { transition: transform .08s linear, border-color .35s; }
}

/* Карточки галереи: поочерёдное появление внутри пачки */
.work { transition-delay: var(--delay, 0s); }

/* Номера шагов: «выстреливают» */
.step.is-in .step-num { animation: pop .7s var(--ease) both; }
.step:nth-child(2).is-in .step-num { animation-delay: .1s; }
.step:nth-child(3).is-in .step-num { animation-delay: .2s; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

/* Заголовки секций: золотая черта прорисовывается */
.section-head > div:first-child { position: relative; padding-top: 14px; }
.section-head > div:first-child::before {
  content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 48px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .9s var(--ease) .2s;
}
.section-head.is-in > div:first-child::before { transform: scaleX(1); }
.about-head { position: relative; padding-top: 14px; }
.about-head::before {
  content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 48px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease) .2s;
}
.about-head.is-in::before { transform: scaleX(1); }

/* Лайтбокс: слайд в сторону переключения */
.lb-img.slide-next { animation: slideNext .45s var(--ease); }
.lb-img.slide-prev { animation: slidePrev .45s var(--ease); }
@keyframes slideNext { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slidePrev { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

/* Чипы навыков: появляются по очереди */
.skill-row li { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .25s, color .25s; }
.skills.is-in .skill-row li { opacity: 1; transform: none; }
.skills.is-in .skill-row li:nth-child(1) { transition-delay: .05s; }
.skills.is-in .skill-row li:nth-child(2) { transition-delay: .12s; }
.skills.is-in .skill-row li:nth-child(3) { transition-delay: .19s; }
.skills.is-in .skill-row li:nth-child(4) { transition-delay: .26s; }

/* Плавающая кнопка Telegram на телефоне/планшете */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 55;
  display: none; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 999px;
  background: var(--gold); color: #0b0b0c; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transform: translateY(120%); transition: transform .5s var(--ease);
}
.fab svg { width: 18px; height: 18px; fill: currentColor; }
.fab.is-visible { transform: none; }
@media (max-width: 1024px) { .fab { display: inline-flex; } }

/* ==========================================================================
   Адаптация — дополнительные точки
   ========================================================================== */

/* Переключатели процесса на узких экранах — во всю ширину */
@media (max-width: 640px) {
  .process .section-head { flex-direction: column; align-items: stretch; }
  .process .filters { width: 100%; }
  .process .filter { flex: 1; justify-content: center; padding: 11px 8px; font-size: 13px; }
}

/* Планшет: hero и «двери» */
@media (min-width: 721px) and (max-width: 1000px) {
  .hero-title { font-size: clamp(56px, 9vw, 96px); }
  .door { padding: 16px; gap: 14px; }
  .door-title { font-size: 19px; }
}

/* Телефон: воздух и типографика */
@media (max-width: 560px) {
  .hero { padding-top: 56px; }
  .hero-lead { font-size: 16px; margin-top: 22px; }
  .hero-actions { margin-top: 30px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-doors { margin-top: 36px; gap: 10px; }
  .door { padding: 14px 16px; }
  .marquee-track { font-size: 18px; gap: 28px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 28px; }
  .case-meta { padding: 16px 16px 18px; }
  .service-card { padding: 24px 20px; }
  .service-card h3 { font-size: 26px; }
  .contact-title { font-size: clamp(40px, 12vw, 64px); }
  .contact-link { flex: 1 1 calc(50% - 6px); justify-content: center; padding: 13px 12px; font-size: 14px; }
  .about-name { font-size: clamp(40px, 12vw, 64px); }
  .about-lead { font-size: 22px; }
  .lb-close { top: 12px; right: 12px; width: 44px; height: 44px; }
  .lb-prev, .lb-next { width: 44px; height: 44px; bottom: 16px; }
  .fab { bottom: 12px; right: 12px; padding: 12px 16px; }
  .to-top { display: none; }
}

/* Очень узкие (320–360) */
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .hero-title { font-size: 48px; }
  .filters { padding: 4px; }
  .filter { padding: 8px 10px; font-size: 12px; }
  .contact-link { flex-basis: 100%; }
}

/* Горизонтальный телефон: hero не должен быть выше экрана */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 40px 0 32px; }
  .hero-title { font-size: clamp(40px, 7vw, 64px); }
  .hero-ornament { opacity: .18; }
  .hero-doors { grid-template-columns: repeat(2, 1fr); }
}

/* Широкие мониторы: не растягиваем строки текста */
@media (min-width: 1700px) {
  .hero-title { font-size: 136px; }
  .hero-lead { font-size: 19px; }
}

/* Тач-устройства: подписи карточек видны без наведения (слегка) */
@media (hover: none) {
  .work-label { opacity: 1; transform: none; padding: 20px 12px 10px; font-size: 10px; }
  .btn::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .line > span { transform: none; animation: none; }
  .hero-ornament, .hero-ornament img { animation: none; }
  .progress, .nav-cta::before { animation: none; }
  .tilt { transform: none !important; }
  .skill-row li { opacity: 1; transform: none; }
}


/* ==========================================================================
   Совместимость со старыми браузерами
   ========================================================================== */
.noscript { margin: 0; padding: 14px var(--gutter); background: var(--gold); color: #000; font-size: 14px; text-align: center; }

/* aspect-ratio недоступен (Safari < 15): держим пропорции через padding */
@supports not (aspect-ratio: 1 / 1) {
  .case-media { position: relative; height: 0; padding: 0 0 62.5%; }
  .case-media img { position: absolute; top: 7%; left: 7%; width: 86%; height: 86%; }
  .about-arch { position: relative; height: 0; padding-bottom: 125%; }
  .about-arch img, .about-arch .about-monogram { position: absolute; top: 0; left: 0; }
  .about-arch .about-monogram { top: 50%; left: 50%; transform: translate(-50%, -50%); }
  .work img { height: auto; }
}

/* gap во flex недоступен (Safari < 14.1): отступы через margin */
@supports not (gap: 1rem) {
  .hero-actions .btn, .contact-link, .skill-row li { margin: 0 12px 12px 0; }
  .nav a { margin-left: 32px; }
  .masonry-col { margin-right: 18px; }
  .masonry-col:last-child { margin-right: 0; }
  .work { margin-bottom: 18px; }
}

/* backdrop-filter недоступен: плотный фон */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: rgba(11, 11, 12, .97); }
  .door { background: var(--surface); }
  .lightbox { background: rgba(6, 6, 7, .97); }
}

/* Лайтбокс: кнопка «поделиться» */
.lb-share {
  position: absolute; z-index: 2; top: 20px; right: 84px;
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--text); background: rgba(11,11,12,.5);
  transition: border-color .25s, color .25s, background .25s, width .3s var(--ease);
}
.lb-share:hover { border-color: var(--gold); color: var(--gold); background: rgba(11,11,12,.9); }
.lb-share-icon { font-size: 16px; }
.lb-share-done { display: none; font-size: 12px; letter-spacing: .04em; white-space: nowrap; padding: 0 16px; }
.lb-share.is-done { width: auto; border-radius: 999px; border-color: var(--gold); color: var(--gold-2); }
.lb-share.is-done .lb-share-icon { display: none; }
.lb-share.is-done .lb-share-done { display: block; }
@media (max-width: 560px) { .lb-share { top: 12px; right: 66px; width: 44px; height: 44px; } }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq-inner { max-width: 900px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; line-height: 1.2;
  transition: color .25s;
}
.faq-q::after {
  content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-family: var(--font-body); font-size: 18px; color: var(--gold);
  transition: transform .4s var(--ease), border-color .25s;
}
.faq-q:hover { color: var(--gold-2); }
.faq-q:hover::after { border-color: var(--gold); }
.faq-item.is-open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.faq-a > p { overflow: hidden; margin: 0; color: var(--muted); max-width: 64ch; font-size: 16px; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-item.is-open .faq-a > p { padding-bottom: 22px; }
@supports not (grid-template-rows: 0fr) {
  .faq-a { display: none; }
  .faq-item.is-open .faq-a { display: block; }
}

/* Три шага: на десктопе ровно три колонки */
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } .step { padding-right: 20px; } }

/* Печать */
@media print {
  body { background: #fff; color: #000; }
  .grain, .progress, .fab, .marquee, .site-header, .lightbox, .works-more, .filters, .skip-link { display: none !important; }
  .reveal, .work { opacity: 1 !important; transform: none !important; }
  a { color: #000; }
}

/* Картинка не загрузилась */
.work.is-broken { min-height: 120px; background: var(--surface) !important; }
.work.is-broken img { opacity: 0; }
.work.is-broken::before { content: "Изображение недоступно"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); letter-spacing: .06em; }
