/* ============================================================
   site.css — общий слой сайта «Студия Путова Ильи»
   Базируется на токенах бренда (assets/branding/tokens.css).
   Палитра и типографика 1:1 из калькулятора.
   ============================================================ */

/* --- база ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg-fx), var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

/* лёгкая зернистость поверх фона */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
em { font-style: normal; color: var(--accent); }
code { font-family: var(--f-mono); font-size: .9em; color: var(--accent-2); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; margin: 0; }
p { margin: 0; }

::selection { background: rgba(255, 176, 46, .28); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* --- типографика --------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::after {
  content: ''; height: 1px; width: 46px;
  background: linear-gradient(90deg, currentColor, transparent);
}
.section-label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--dim);
}
.h2 { font-size: clamp(24px, 3.2vw, 38px); margin: 12px 0 0; max-width: 22ch; }
.lead { color: var(--muted); max-width: 62ch; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tight { padding: clamp(40px, 6vw, 64px) 0; }
.section__head { margin-bottom: 34px; }
.section__head .lead { margin-top: 14px; }

/* --- кнопки --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn--primary:hover { background: #ffc057; }
.btn--ghost { background: var(--panel); border-color: var(--line); }
.btn--ghost:hover { background: var(--panel-2); border-color: var(--line-2); }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 26px; font-size: 15px; }
.btn--accent2 { background: transparent; border-color: rgba(79, 209, 221, .45); color: var(--accent-2); }
.btn--accent2:hover { background: rgba(79, 209, 221, .1); }

/* --- шапка ---------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.top__logo { display: inline-flex; align-items: center; gap: 10px; }

/* логотип: анимированный знак + вордмарк текстом */
.logo-lockup { display: inline-flex; align-items: center; gap: 10px; }
.logo-lockup__mark { height: 38px; width: auto; display: block; flex: 0 0 auto; }
.logo-lockup__text {
  font-family: var(--f-display); font-size: 17px; font-weight: 600;
  letter-spacing: -.01em; color: var(--text); white-space: nowrap; line-height: 1;
}
.logo-lockup__text span { color: var(--muted); font-weight: 400; }
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 13px; border-radius: var(--r-pill);
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  background: none; border: 0;
  transition: color .2s ease, background .2s ease;
}
.nav__link:hover { color: var(--text); background: var(--panel); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-left: 2px;
}
.nav__caret { font-size: 10px; color: var(--dim); }
.nav__cta { margin-left: 8px; }

.nav__drop { position: relative; }
.nav__sub {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 268px; padding: 8px; margin: 0; list-style: none;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav__drop:hover .nav__sub,
.nav__drop:focus-within .nav__sub,
.nav__drop.is-open .nav__sub { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav__sub a {
  display: block; padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--muted); font-size: 13.5px; transition: background .18s ease, color .18s ease;
}
.nav__sub a:hover { background: var(--panel-2); color: var(--text); }

.burger {
  display: none; margin-left: auto;
  width: 44px; height: 40px; border-radius: var(--r-sm);
  background: var(--panel); border: 1px solid var(--line);
  padding: 0; place-items: center; gap: 4px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* --- hero ----------------------------------------------------- */
.hero { padding: clamp(48px, 8vw, 92px) 0 clamp(40px, 6vw, 72px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; }
.hero__title { font-size: clamp(30px, 4.8vw, 58px); margin: 16px 0 18px; }
.hero__title em { color: var(--accent); }
.hero__lead { color: var(--muted); font-size: 16px; max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.hero__trust {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--dim);
  text-transform: uppercase;
}
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust span::before { content: '·'; color: var(--accent); font-size: 16px; }
.hero__trust span:first-child::before { content: ''; }

.hero__art {
  position: relative; display: grid; place-items: center;
  padding: 30px; border: 1px solid var(--line); border-radius: var(--r);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,176,46,.08), transparent 60%),
    var(--panel);
  box-shadow: var(--shadow);
  min-height: 320px;
}
.hero__art::before {
  content: ''; position: absolute; inset: 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.05); pointer-events: none;
}
.hero__art img { width: min(320px, 78%); height: auto; }
.hero__art-cap {
  position: absolute; left: 22px; bottom: 16px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
}

/* --- сетки ---------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* --- карточки ------------------------------------------------- */
.card {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--panel-2); }
.card__icon { font-size: 22px; line-height: 1; margin-bottom: 14px; }
.card__title { font-family: var(--f-display); font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.card__text { color: var(--muted); font-size: 13.5px; }
.card--link { display: block; }
.card--link .card__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--accent); font-size: 12.5px; font-family: var(--f-mono); letter-spacing: .06em; }

/* вопрос-карточка (маршрутизатор) */
.qcard {
  display: flex; flex-direction: column; gap: 10px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  transition: transform .2s ease, border-color .2s ease;
}
.qcard:hover { transform: translateY(-3px); border-color: rgba(255,176,46,.4); }
.qcard__q { font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.qcard__a { color: var(--dim); font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-top: auto; }

/* --- шаги ----------------------------------------------------- */
.steps { counter-reset: step; }
.step { position: relative; padding: 22px 22px 22px 22px; }
.step__n {
  font-family: var(--f-mono); font-size: 12px; color: var(--accent);
  letter-spacing: .1em; margin-bottom: 12px;
}
.step__line { height: 2px; width: 34px; background: var(--line-2); border-radius: 2px; margin-bottom: 14px; }

/* --- тизер калькулятора --------------------------------------- */
.teaser {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 0;
  border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--panel);
  box-shadow: var(--shadow);
}
.teaser__shot { position: relative; min-height: 300px; background: linear-gradient(180deg, #0e1518, #0a0d0f); border-right: 1px solid var(--line); }
.teaser__body { padding: 34px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.teaser__price { font-family: var(--f-display); font-size: clamp(34px, 5vw, 50px); font-weight: 600; letter-spacing: -.02em; }
.teaser__price .cur { font-size: .5em; color: var(--muted); margin-left: 4px; }
.teaser__meta { font-family: var(--f-mono); font-size: 11.5px; color: var(--dim); letter-spacing: .04em; }

/* --- таблица -------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; min-width: 520px; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.table thead th { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); background: var(--panel-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--panel); }
.table td:first-child { font-weight: 600; }

/* --- работы --------------------------------------------------- */
.work { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); transition: transform .2s ease, border-color .2s ease; }
.work:hover { transform: translateY(-3px); border-color: var(--line-2); }
.work__shot { aspect-ratio: 4 / 3; }
.work__body { padding: 16px 18px 18px; }
.work__title { font-family: var(--f-display); font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.work__meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; }
.work__price { font-family: var(--f-mono); color: var(--accent); }

/* --- «почему я» ----------------------------------------------- */
.why { display: grid; gap: 14px; }
.why__item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.why__mark { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,176,46,.14); color: var(--accent); font-family: var(--f-mono); font-size: 13px; }
.why__t { font-weight: 600; margin-bottom: 3px; }
.why__d { color: var(--muted); font-size: 13.5px; }

/* --- магнит --------------------------------------------------- */
.magnet {
  display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 26px; align-items: center;
  padding: clamp(26px, 4vw, 44px); border: 1px solid rgba(79,209,221,.3); border-radius: var(--r);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(79,209,221,.1), transparent 55%),
    var(--panel);
}
.magnet__t { font-family: var(--f-display); font-size: clamp(20px, 2.6vw, 28px); font-weight: 600; margin: 12px 0 8px; }
.magnet__d { color: var(--muted); max-width: 54ch; }

/* --- отзывы --------------------------------------------------- */
.review { padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); display: flex; flex-direction: column; gap: 12px; }
.review__stars { color: var(--accent); font-size: 13px; letter-spacing: 2px; }
.review__text { color: var(--text); font-size: 14px; }
.review__who { color: var(--dim); font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; margin-top: auto; }

/* --- FAQ ------------------------------------------------------ */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 600; font-size: 14.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--f-mono); color: var(--accent); font-size: 18px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__a { padding: 0 18px 18px; color: var(--muted); font-size: 13.5px; }

/* --- CTA-полоса ----------------------------------------------- */
.cta-band {
  padding: clamp(34px, 5vw, 56px); border-radius: var(--r);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(255,176,46,.12), transparent 55%),
    var(--panel-2);
  text-align: center;
}
.cta-band__t { font-family: var(--f-display); font-size: clamp(22px, 3vw, 34px); font-weight: 600; margin-bottom: 10px; }
.cta-band__d { color: var(--muted); max-width: 56ch; margin: 0 auto 24px; }
.cta-band__msgs { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* --- плейсхолдеры --------------------------------------------- */
.ph {
  position: relative; width: 100%; height: 100%; min-height: 120px;
  display: grid; place-content: center; gap: 8px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--r-sm);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 10px, transparent 10px 20px),
    var(--panel-2);
  color: var(--dim);
}
.ph__label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.ph__hint { font-size: 12px; color: var(--dim); }
.ph--tall { min-height: 220px; }

.todo-inline {
  margin-top: 12px; font-size: 12px; color: var(--dim);
  border-left: 2px solid var(--accent); padding-left: 10px;
}
.badge-todo {
  display: inline-block; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--r-pill);
  color: var(--accent); background: rgba(255,176,46,.14); border: 1px solid rgba(255,176,46,.4);
}
.badge-todo--cy { color: var(--accent-2); background: rgba(79,209,221,.12); border-color: rgba(79,209,221,.35); }

/* --- подвал --------------------------------------------------- */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 48px; background: rgba(0,0,0,.2); position: relative; z-index: 1; }
.foot__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 40px; }
.foot__tag { color: var(--muted); font-size: 13px; margin-top: 14px; max-width: 34ch; }
.foot__logo { margin-bottom: 2px; }
.foot__brand .logo-lockup__mark { height: 34px; }
.foot__brand .logo-lockup__text { font-size: 16px; }
.foot__h { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.foot__col { display: flex; flex-direction: column; gap: 9px; }
.foot__col a { color: var(--muted); font-size: 13.5px; }
.foot__col a:hover { color: var(--text); }
.foot__msgs { display: flex; flex-direction: column; gap: 9px; }
.foot__msg { color: var(--muted); font-size: 13.5px; }
.foot__msg:hover { color: var(--accent); }
.foot__meta { color: var(--dim); font-size: 12.5px; margin-top: 12px; line-height: 1.7; }
.foot__meta a { color: var(--muted); }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 18px 22px 26px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.foot__legal { display: inline-flex; gap: 8px; align-items: center; }
.foot__legal a:hover { color: var(--text); }

/* --- мобильный sticky-бар ------------------------------------- */
.stickybar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  gap: 8px; background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.stickybar .btn { flex: 1; padding: 13px 16px; }

/* --- адаптив -------------------------------------------------- */
@media (max-width: 1080px) {
  .grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* Выдвижное меню (position: fixed справа) иначе растягивает страницу
     по горизонтали ровно на ширину экрана — вёрстка «слетает». */
  html { overflow-x: hidden; overflow-x: clip; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; min-height: 240px; }
  .teaser { grid-template-columns: 1fr; }
  .teaser__shot { border-right: 0; border-bottom: 1px solid var(--line); min-height: 220px; }
  .magnet { grid-template-columns: 1fr; }
  .foot__in { grid-template-columns: 1fr 1fr; }

  /* мобильное меню */
  .burger { display: grid; }
  .nav {
    position: fixed; inset: 66px 0 0 0; z-index: 39;
    flex-direction: column; align-items: stretch; gap: 4px;
    margin: 0; padding: 16px 22px 40px;
    background: var(--ink); border-top: 1px solid var(--line);
    overflow-y: auto;
    transform: translateX(100%); transition: transform .28s ease;
  }
  body.nav-open .nav { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link { padding: 13px 12px; font-size: 15px; border-radius: var(--r-sm); }
  .nav__sub {
    position: static; transform: none; opacity: 1; visibility: visible;
    min-width: 0; box-shadow: none; background: transparent; border: 0; padding: 2px 0 2px 12px; display: none;
  }
  .nav__drop.is-open .nav__sub { display: block; }
  .nav__cta { margin: 13px 0 0; }

  .stickybar { display: flex; }
  body { padding-bottom: 66px; }
}
@media (max-width: 640px) {
  .grid--3, .grid--4, .grid--6 { grid-template-columns: 1fr 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .foot__in { grid-template-columns: 1fr; gap: 26px; }
  .hero__actions .btn { width: 100%; }
}
@media (max-width: 420px) {
  .grid--3, .grid--4, .grid--6 { grid-template-columns: 1fr; }
}

/* --- развёрнутый просмотр калькулятора ------------------------ */
/* Пока окно модели развёрнуто, шапка и мобильный бар не мешают. */
body.theater-open .top,
body.theater-open .stickybar { display: none !important; }
body.theater-open .wrap { z-index: auto; }