/* ============ Данил Минкин — RU портфолио v3 ============
   Эстетика: тёмный люкс, статичные градиентные меши (без мельтешения).
   Шрифты без засечек: Radiotechnika (заголовки) + Unbounded (числа/акцид.) + Onest (текст).
   Тёплый чёрный · слоновая кость · золото. */

/* Radiotechnika — Serezha Zhigarev, свободная лицензия (некоммерч.).
   Самохост: assets/fonts/. Один вес — синтез жирного отключён. */
@font-face {
  font-family: "Radiotechnika";
  src: url("assets/fonts/Radiotechnika.woff2") format("woff2"),
       url("assets/fonts/Radiotechnika.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070604;
  --bg-alt: #0d0b08;
  --ink: #f2ead9;
  --muted: #9a917f;
  --gold: #d9a441;
  --gold-bright: #f0c96c;
  --gold-soft: rgba(217, 164, 65, 0.35);
  --hairline: rgba(242, 234, 217, 0.1);
  --card: rgba(242, 234, 217, 0.03);
  --display: "Unbounded", "Arial Black", sans-serif;
  --heading: "Radiotechnika", "Unbounded", "Arial Black", sans-serif;
  --sans: "Onest", "Helvetica Neue", Arial, sans-serif;
  --mono: "Share Tech Mono", "Courier New", monospace;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-booting { overflow: hidden; }

a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: var(--bg); }

/* ============ BOOT / ЗАСТАВКА (золотой терминал) ============ */
.boot {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}
.boot.is-done { opacity: 0; transform: scale(1.03); pointer-events: none; }
.boot__inner { width: min(540px, 88vw); font-family: var(--mono); }
.boot__log {
  font-family: var(--mono);
  font-size: 0.84rem; line-height: 1.95;
  color: var(--gold); white-space: pre-wrap;
  min-height: 200px; text-shadow: 0 0 10px rgba(217,164,65,0.35);
}
.boot__log .ok { color: var(--ink); }
.boot__meta { display: flex; align-items: center; gap: 1rem; margin-top: 16px; }
.boot__count {
  font-family: var(--mono);
  font-size: 1.1rem; color: var(--gold-bright);
  font-variant-numeric: tabular-nums; min-width: 3.2ch;
}
.boot__count::after { content: "%"; opacity: 0.5; margin-left: 0.1ch; }
.boot__bar { flex: 1; height: 2px; background: var(--hairline); overflow: hidden; }
.boot__bar span { display: block; height: 100%; width: 0; background: var(--gold); box-shadow: 0 0 10px rgba(217,164,65,0.6); transition: width 0.2s linear; }
.boot__enter {
  margin-top: 28px; display: flex; align-items: center; gap: 16px; justify-content: center;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.5s, transform 0.5s; pointer-events: none;
}
.boot__enter.is-ready { opacity: 1; transform: none; pointer-events: auto; }
.boot__enter-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); }
.boot__enter button {
  font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.28em; color: var(--bg);
  background: var(--gold); border: none; padding: 0.8rem 2rem; cursor: pointer;
  box-shadow: 0 0 24px rgba(217,164,65,0.4);
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.boot__enter button:hover { background: var(--gold-bright); box-shadow: 0 0 34px rgba(240,201,108,0.6); transform: translateY(-2px); }

/* ============ CURSOR ============ */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 1500;
  border-radius: 50%;
  will-change: transform;
}
.cursor {
  width: 8px; height: 8px;
  background: var(--gold-bright);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid var(--gold-soft);
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: var(--gold);
  background: rgba(217, 164, 65, 0.08);
}
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ring { display: none; }
}

/* ============ ФОНОВАЯ АТМОСФЕРА (статичная, без мельтешения) ============ */
/* Мягкие градиентные меши на всю страницу — как в EN-версии, но в тёплой гамме. */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(58% 48% at 80% -6%, rgba(217, 164, 65, 0.16), transparent 60%),
    radial-gradient(46% 46% at 6% 10%, rgba(240, 201, 108, 0.08), transparent 60%),
    radial-gradient(80% 60% at 50% 120%, rgba(217, 164, 65, 0.10), transparent 60%);
}
/* Тонкое статичное зерно для фактуры — без анимации. */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3.5rem);
  z-index: 100;
  background: linear-gradient(to bottom, rgba(7,6,4,0.9), rgba(7,6,4,0));
}
.nav__logo {
  font-family: var(--display);
  font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.nav__links { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.nav__links a {
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color 0.25s;
}
.nav__links a::after {
  content: "";
  position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__right { display: flex; align-items: center; gap: 1.2rem; }
.nav__time {
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.1em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nav__cta {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--gold-soft);
  color: var(--gold);
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.nav__cta:hover {
  background: var(--gold); color: var(--bg);
  box-shadow: 0 8px 28px rgba(217,164,65,0.3);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(6rem, 12vh, 9rem) clamp(1.2rem, 5vw, 4.5rem) 5rem;
  overflow: hidden;
}
.hero__mesh {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 55% at 72% 30%, rgba(217, 164, 65, 0.14), transparent 62%),
    radial-gradient(35% 45% at 20% 75%, rgba(240, 201, 108, 0.07), transparent 60%);
}
.hero__inner { position: relative; z-index: 2; max-width: 62rem; }
.hero__kicker {
  font-size: 0.78rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}
.hero__title {
  font-family: var(--heading);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hero__title .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--gold);
  text-stroke: 2px var(--gold);
}
.hero__tag {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  color: var(--muted);
  margin-top: 2rem;
  letter-spacing: 0.01em;
}
.hero__tag em { color: var(--gold-bright); font-style: normal; font-weight: 500; }
.hero__actions { display: flex; gap: 1rem; margin-top: 2.6rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.95rem 2.1rem;
  font-family: var(--mono);
  font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  /* рубленые углы, как в киберпанк-версии */
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
}
.btn--gold { background: var(--gold); color: var(--bg); font-weight: 400; }
.btn--gold:hover { background: var(--gold-bright); box-shadow: 0 14px 40px rgba(217,164,65,0.35); }
.btn--ghost { border: 1px solid var(--hairline); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

.hero__photo {
  position: absolute;
  right: clamp(1rem, 6vw, 6rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  will-change: transform;
}
.hero__photo img {
  display: block;
  width: clamp(220px, 26vw, 380px); height: auto;
  border-radius: 4px;
  -webkit-mask-image: linear-gradient(to bottom, black 82%, transparent);
  mask-image: linear-gradient(to bottom, black 82%, transparent);
}

.hero__scroll {
  position: absolute;
  left: 50%; transform: translateX(-50%); bottom: 2rem;
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted);
}
.hero__scroll span {
  display: block; width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s var(--ease) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 1.1rem 0;
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee__track span {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-right: 0.4em;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ STATS ============ */
.stats {
  display: flex; flex-wrap: wrap;
  margin: 0 clamp(1.2rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--hairline);
}
.stats__item {
  flex: 1 1 180px;
  padding: 2rem 1.4rem;
  border-left: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 0.3rem;
}
.stats__item:first-child { border-left: none; }
.stats__item b {
  font-family: var(--mono);
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(217,164,65,0.25);
}
.stats__item span { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.03em; }

/* ============ SECTIONS ============ */
.section { padding: clamp(5rem, 11vh, 8.5rem) clamp(1.2rem, 5vw, 4.5rem); }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 52rem; margin-bottom: 3.4rem; }
.kicker {
  font-size: 0.76rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.9rem;
}
.kicker span { color: var(--gold); font-weight: 500; }
.kicker::after { content: ""; flex: 0 0 3rem; height: 1px; background: var(--gold-soft); }
h2 {
  font-family: var(--heading);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.8rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
}
.section__sub { margin-top: 1.2rem; color: var(--muted); max-width: 40rem; }

/* ============ LINE REVEAL (маска строки) ============ */
.lr { display: block; overflow: hidden; }
.lr > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
}
.lr.is-in > span { transform: translateY(0); }

/* ============ CARDS ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 1.3rem;
  perspective: 1200px;
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 0 1.7rem 1.9rem;
  display: flex; flex-direction: column; gap: 0.9rem;
  transition: border-color 0.35s, box-shadow 0.35s;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover {
  border-color: var(--gold-soft);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(217,164,65,0.08);
}
.card--feature { grid-column: 1 / -1; }
.card--muted { opacity: 0.92; }

.card__art {
  position: relative;
  margin: 0 -1.7rem 0.6rem;
  height: 140px;
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.card__art svg {
  width: 100%; height: 100%;
  display: block;
  transition: transform 0.8s var(--ease);
}
.card:hover .card__art svg { transform: scale(1.06); }
.card__num {
  position: absolute; right: 1.2rem; top: 0.9rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: 2.2rem;
  color: transparent;
  -webkit-text-stroke: 1px rgba(217,164,65,0.4);
  line-height: 1;
}

.card__meta { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.tag {
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  color: var(--muted);
}
.tag--live { border-color: var(--gold-soft); color: var(--gold-bright); }
.role { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }

.card__title {
  font-family: var(--heading);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
}
.card__desc { color: var(--muted); font-size: 0.94rem; }
.card__desc b { color: var(--ink); font-weight: 500; }
.note {
  display: block; margin-top: 0.7rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: rgba(240,201,108,0.85);
}

.metrics { display: flex; flex-wrap: wrap; gap: 0.4rem 1.8rem; list-style: none; }
.metrics li { font-size: 0.85rem; color: var(--muted); }
.metrics b {
  font-family: var(--display);
  font-size: 1.15rem; font-weight: 700; color: var(--gold);
  margin-right: 0.35rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; }
.chips li {
  font-size: 0.73rem; letter-spacing: 0.04em;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(242,234,217,0.05);
  color: var(--muted);
  transition: background 0.3s, color 0.3s;
}
.card:hover .chips li { background: rgba(217,164,65,0.08); }

/* Скриншот работающего продукта внутри карточки */
.card__shot { margin: 1rem 0 0; }
.card__shot img {
  display: block; width: 100%; height: auto;
  border-radius: 10px;
  border: 1px solid rgba(240,201,108,0.18);
  background: rgba(255,255,255,0.02);
}
.card__shot figcaption {
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}
.card__note-inline { font-size: 0.85rem; color: var(--muted); }

.card__links { display: flex; gap: 1.5rem; margin-top: auto; padding-top: 0.4rem; flex-wrap: wrap; align-items: baseline; }
.card__links a {
  font-size: 0.9rem; color: var(--gold-bright);
  position: relative;
}
.card__links a::after {
  content: "";
  position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.card__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ============ APPROACH ============ */
.approach {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1.4rem;
}
.approach__item {
  position: relative;
  border-top: 1px solid var(--gold-soft);
  padding-top: 1.5rem;
}
.approach__num {
  position: absolute; right: 0; top: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.2rem;
  color: rgba(217,164,65,0.16);
  line-height: 1;
}
.approach__item h4 {
  font-family: var(--heading);
  font-size: 1.15rem; font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}
.approach__item p { font-size: 0.92rem; color: var(--muted); }

/* ============ TEACHING ============ */
.teach {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.3rem;
}
.teach__card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 2rem 1.8rem;
  transition: border-color 0.35s;
}
.teach__card:hover { border-color: var(--gold-soft); }
.teach__card h3 {
  font-family: var(--heading);
  font-size: 1.3rem; font-weight: 400;
  font-synthesis: none;
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin-bottom: 0.9rem;
}
.teach__card p { color: var(--muted); font-size: 0.95rem; }
.teach__note {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 0.92rem; color: var(--muted);
  padding-top: 0.4rem;
}

/* ============ CONTACT ============ */
.section--contact { padding-bottom: 6rem; }
.contact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.contact__photo img {
  display: block;
  width: clamp(180px, 24vw, 300px); height: auto;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  padding: 10px;
  transition: transform 0.6s var(--ease);
}
.contact__photo:hover img { transform: rotate(-3deg) scale(1.02); }
.contact__big {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.02;
  text-transform: uppercase;
}
.contact__big--accent em {
  font-family: var(--heading);
  font-synthesis: none;
  font-weight: 400;
  color: var(--gold-bright);
}
.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
}
.contact__grid a {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  display: flex; flex-direction: column; gap: 0.15rem;
  transition: border-color 0.3s, background 0.3s;
}
.contact__grid a:hover { border-color: var(--gold); background: rgba(217,164,65,0.05); }
.contact__grid span {
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.contact__grid b { font-weight: 500; font-size: 0.96rem; color: var(--gold-bright); }

/* ============ FOOTER ============ */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.8rem clamp(1.2rem, 5vw, 4.5rem);
  border-top: 1px solid var(--hairline);
  font-size: 0.82rem; color: var(--muted);
  flex-wrap: wrap; gap: 0.6rem;
}
.footer a { color: var(--gold-bright); }

/* ============ REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============ MOTION OFF ============ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .lr > span { opacity: 1; transform: none; transition: none; }
  .grain, .marquee__track, .hero__scroll span, .loader { animation: none; }
  html { scroll-behavior: auto; }
  .cursor, .cursor-ring { display: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero__photo {
    position: relative;
    right: auto; top: auto; transform: none;
    margin-top: 2.5rem;
  }
  .hero { flex-direction: column; align-items: flex-start; justify-content: center; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__time { display: none; }
  .contact { grid-template-columns: 1fr; }
  .contact__photo { justify-self: center; }
  .hero__title { font-size: clamp(2.6rem, 13vw, 4.5rem); }
}

/* ============ УЛУЧШЕНИЕ 1: СКРОЛЛ-ПРОГРЕСС ============ */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 1600;
  pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 10px rgba(217,164,65,0.5);
}

/* ============ УЛУЧШЕНИЕ 2: SCROLLSPY ============ */
.nav__links a.is-active { color: var(--gold-bright); }
.nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }

/* ============ УЛУЧШЕНИЕ 3: COPY EMAIL + A11Y FOCUS ============ */
.contact__copy {
  font: inherit; text-align: left;
  background: none; cursor: pointer;
  color: inherit;
}
.contact__copy.is-copied span { color: var(--gold-bright); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ AI-ЧАТ ============ */
.chat-fab {
  position: fixed; right: 1.6rem; bottom: 1.6rem;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: var(--bg-alt);
  color: var(--gold-bright);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 900;
  transition: background 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.chat-fab:hover { background: var(--gold); color: var(--bg); box-shadow: 0 14px 40px rgba(217,164,65,0.35); }

.chat[hidden] { display: none; }
.chat {
  position: fixed; right: 1.6rem; bottom: 5.6rem;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(560px, calc(100vh - 8rem));
  display: flex; flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  z-index: 950;
  box-shadow: 0 30px 80px rgba(0,0,0,0.65);
  overflow: hidden;
}
.chat__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--hairline);
}
.chat__head b { font-weight: 500; font-size: 0.95rem; display: block; }
.chat__head span { font-size: 0.75rem; color: var(--muted); }
.chat__close {
  background: none; border: none; color: var(--muted);
  font-size: 1rem; cursor: pointer;
  transition: color 0.25s;
}
.chat__close:hover { color: var(--gold); }
.chat__log {
  flex: 1; overflow-y: auto;
  padding: 1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.7rem;
  min-height: 120px;
}
.chat__msg {
  max-width: 85%;
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat__msg--user {
  align-self: flex-end;
  background: var(--gold);
  color: var(--bg);
  border-bottom-right-radius: 3px;
}
.chat__msg--bot {
  align-self: flex-start;
  background: rgba(242,234,217,0.06);
  border: 1px solid var(--hairline);
  border-bottom-left-radius: 3px;
}
.chat__msg--typing { color: var(--muted); }
.chat__chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0 1.2rem 0.8rem;
}
.chat__chips button {
  font-size: 0.74rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: none; color: var(--muted);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.chat__chips button:hover { border-color: var(--gold); color: var(--gold-bright); }
.chat__form {
  display: flex; gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border-top: 1px solid var(--hairline);
}
.chat__form input {
  flex: 1;
  background: rgba(242,234,217,0.05);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  color: var(--ink);
  font: inherit; font-size: 0.88rem;
}
.chat__form input:focus { outline: none; border-color: var(--gold-soft); }
.chat__form button {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--gold); color: var(--bg);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.25s;
}
.chat__form button:hover { background: var(--gold-bright); }
.chat__note {
  font-size: 0.68rem; color: var(--muted);
  text-align: center;
  padding: 0 1rem 0.8rem;
}
.chat__note a { color: var(--gold); }
@media (max-width: 480px) {
  .chat { right: 1rem; bottom: 5.2rem; }
  .chat-fab { right: 1rem; bottom: 1rem; }
}

/* ============ АМБИЕНТ-ЗВУК ============ */
.audio {
  position: fixed; left: 1.4rem; bottom: 1.4rem; z-index: 900;
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(13,11,8,0.82); border: 1px solid var(--hairline); color: var(--muted);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.55rem 0.9rem; cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: border-color 0.25s, color 0.25s;
}
.audio:hover { border-color: var(--gold); color: var(--gold-bright); }
.audio.is-on { border-color: var(--gold); color: var(--gold-bright); }
.audio__bars { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.audio__bars i { width: 2px; height: 4px; background: currentColor; }
.audio.is-on .audio__bars i { animation: eq 0.9s ease-in-out infinite; }
.audio.is-on .audio__bars i:nth-child(2){ animation-delay: .18s; }
.audio.is-on .audio__bars i:nth-child(3){ animation-delay: .36s; }
.audio.is-on .audio__bars i:nth-child(4){ animation-delay: .54s; }
@keyframes eq { 0%,100%{height:4px} 50%{height:13px} }
@media (max-width: 480px) { .audio { left: 1rem; bottom: 1rem; } }
