/* ---------- Inter: локально, без внешних зависимостей (лицензия SIL OFL) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/inter-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================================
   ТОПОСФЕРА — вариант оформления в стиле Revolut
   ----------------------------------------------------------------------------
   Токены и правила взяты из DESIGN.md Revolut (коллекция awesome-design-md,
   VoltAgent, MIT) — разбор публичной дизайн-системы бренда.

   Что соблюдено из правил бренда:
     · двухрежимный ритм: графитовые storytelling-полосы (#0A0B0D) чередуются
       с белыми catalogue-полосами, резко «встык»;
     · главный CTA на тёмном — белая пилюля с чёрным текстом;
     · кобальт-фиолетовый #494fdf — только марка и featured-карточка;
     · все кнопки — пилюли (9999px), карточки 20px, поля 12px;
     · глубина через смену поверхности (чёрный → #16181a), без теней;
     · display весом 500, body весом 400.

   Отличие от разбора: шрифт Aeonik Pro проприетарный, поэтому display тоже
   набран Inter (вес 500), body — Inter 400, как и требует разбор.
   ============================================================================ */

:root {
  /* — фирменная палитра ТОПОСФЕРА (бренд-гайд 2026) — */
  --violet: #494fdf;        /* индиго: акцент */
  --violet-light: #7c82ff;  /* индиго светлый: акцент на тёмном */
  --violet-deep: #3a40c4;
  --on-primary: #ffffff;

  --ink: #0a0b0d;           /* графитовый: основной, текст */
  --body: #1f2226;
  --mute: #505a63;
  --stone: #8d969e;         /* серый: подписи, вторичный текст */
  --faint: #c9c9cd;

  --dark: #0a0b0d;          /* графитовый вместо чистого чёрного */
  --light: #ffffff;
  --elevated: #16181a;      /* единственный «приподнятый» тёмный */
  --soft: #f4f5f7;          /* светло-серый: подложки */
  --hairline-light: #e2e2e7;
  --hairline-dark: rgba(255,255,255,.14);

  /* — геометрия — */
  --r-pill: 9999px;
  --r-card: 20px;
  --r-field: 12px;

  --container: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--light);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }

/* display 500 / body 400 */
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.05; letter-spacing: -.02em; font-weight: 500; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -.03em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 500; color: var(--mute); margin-bottom: .7rem; }
.section-lead { max-width: 720px; color: var(--mute); font-size: 1.06rem; }
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--dark); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---------- видимая обводка фокуса при навигации с клавиатуры ---------- */
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
/* на тёмных полосах — светлый индиго, иначе обводка теряется на графите */
.hero :focus-visible, .team :focus-visible, .cases :focus-visible, .cta-section :focus-visible,
.site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--violet-light); }

/* ---------- кнопки: все пилюли ---------- */
.btn {
  font: inherit; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  border-radius: var(--r-pill); padding: .8rem 1.7rem; font-size: 1rem; min-height: 48px;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
/* белая пилюля — главный CTA на тёмном */
.btn-primary { background: var(--light); color: var(--dark); }
.btn-primary:hover { background: var(--faint); }
.btn-light { background: var(--light); color: var(--dark); }
.btn-light:hover { background: var(--faint); }
/* чёрная пилюля — CTA на светлом: при наведении уходит в фирменный индиго */
.btn-outline { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn-outline:hover { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-outline:active { background: var(--violet-deep); border-color: var(--violet-deep); }
/* индиго-пилюля — главный CTA на СВЕТЛЫХ поверхностях (белая тут была бы белой на белом) */
.btn-accent { background: var(--violet); color: #fff; border-color: var(--violet); }
.btn-accent:hover { background: var(--violet-light); border-color: var(--violet-light); }
.btn-accent:active { background: var(--violet-deep); border-color: var(--violet-deep); }
.btn-header { padding: .55rem 1.3rem; min-height: 40px; font-size: .92rem; }
/* Текстовая кнопка-ссылка: подчёркивание проявлено заранее (transparent),
   чтобы при наведении текст не дёргался, плюс лёгкий сдвиг — реакция заметна */
.link-btn {
  background: none; border: none; padding: 0; font: inherit; font-weight: 500;
  color: var(--violet); cursor: pointer;
  text-decoration: underline transparent; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
  transition: color .15s ease, text-decoration-color .15s ease, transform .15s ease;
}
.link-btn:hover { color: var(--violet-deep); text-decoration-color: currentColor; transform: translateX(2px); }
.link-btn:active { transform: translateX(3px); }
/* на тёмных полосах акцент — светлый индиго (по гайду: #7C82FF на тёмном) */
.team .link-btn, .cases .link-btn, .cta-section .link-btn { color: var(--violet-light); }
.team .link-btn:hover, .cases .link-btn:hover, .cta-section .link-btn:hover { color: #fff; text-decoration-color: currentColor; }

/* ---------- тёмные полосы ---------- */
.site-header, .hero, .team, .process, .cases, .cta-section, .site-footer {
  background: var(--dark);
  color: #fff;
}
.site-header .eyebrow, .hero .eyebrow, .team .eyebrow, .process .eyebrow,
.cases .eyebrow, .cta-section .eyebrow { color: var(--stone); }
.team .section-lead, .process .section-lead, .cases .section-lead { color: var(--stone); }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--hairline-dark); }
.header-inner { display: flex; align-items: center; gap: 1.4rem; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: .55em; font-weight: 500; font-size: 1.2rem; letter-spacing: -.02em; text-decoration: none; color: #fff; }
.logo-mark { width: 1.75em; height: 1.75em; flex: 0 0 auto; }
.main-nav { margin-left: auto; display: flex; gap: 1.6rem; }
.main-nav a { text-decoration: none; color: rgba(255,255,255,.72); font-weight: 400; font-size: .95rem; }
.main-nav a:hover { color: #fff; }
.burger { display: none; margin-left: auto; background: none; border: 0; width: 34px; height: 34px; cursor: pointer; }
.burger span { display: block; height: 2px; background: #fff; margin: 6px 0; }

/* ---------- герой: чёрная полоса ---------- */
.hero { padding: clamp(3rem, 6vw, 5.5rem) 0 3.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4.4rem); font-weight: 500; line-height: 1.0; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: rgba(255,255,255,.6); }
.hero-text { color: rgba(255,255,255,.72); max-width: 620px; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.8rem 0 2.2rem; }
.offer-badge { background: var(--elevated); border-radius: var(--r-card); padding: 1.2rem 1.5rem; max-width: 560px; }
.offer-badge strong { display: block; font-size: 1.05rem; font-weight: 500; margin-bottom: .25rem; }
.offer-badge span { color: rgba(255,255,255,.72); font-size: .92rem; }

/* монограмма: кобальтовый глиф */
/* Знак ТОПОСФЕРА (бренд-гайд: знак отдельно — от 16 px, охранное поле = ¼ диаметра) */
.hero-mark { display: flex; align-items: center; justify-content: center; padding: 3vw; }
.hero-mark img { width: clamp(140px, 16vw, 210px); height: auto; }
/* десктоп: знак поднят к верхнему краю блока, а не по центру колонки */
@media (min-width: 901px) {
  .hero-mark { align-self: start; padding: 2.5vw 3vw 3vw; }
}

/* ---------- услуги: белая полоса ---------- */
.services { background: var(--light); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.service-card { background: var(--light); border: 1px solid var(--hairline-light); border-radius: var(--r-card); padding: 1.7rem; display: flex; flex-direction: column; gap: 1rem; }
.service-head { display: flex; align-items: baseline; gap: .9rem; }
.service-num { font-size: .8rem; color: var(--mute); font-weight: 500; }
.service-items { margin: 0; padding-left: 1.15rem; color: var(--body); display: grid; gap: .3rem; }
.service-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--hairline-light); }
.price { font-weight: 500; }

/* ---------- эксперты: чёрная полоса ---------- */
.team { background: var(--dark); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.expert-card { background: var(--elevated); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.expert-photo { aspect-ratio: 1 / 1; overflow: hidden; }
.expert-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.expert-card:hover img { transform: scale(1.04); }
.expert-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
.expert-domain { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--stone); font-weight: 500; }
.expert-body h3 { font-size: 1.05rem; margin: 0; }
.expert-body p { color: rgba(255,255,255,.6); font-size: .92rem; margin: 0 0 .5rem; }
.expert-body .link-btn { margin-top: auto; align-self: flex-start; }

/* ---------- пакеты: белая полоса, featured — кобальт ---------- */
.packages { background: var(--light); }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.pkg-card { background: var(--light); border: 1px solid var(--hairline-light); border-radius: var(--r-card); padding: 1.8rem; display: flex; flex-direction: column; gap: .6rem; }
.pkg-card h3 { font-size: 1.25rem; }
.pkg-card .pkg-for { color: var(--mute); font-weight: 400; font-size: .9rem; margin-bottom: .6rem; }
.pkg-card .btn { margin-top: auto; align-self: flex-start; }
/* средний тариф — featured (кобальт) */
.pkg-card:nth-child(2) { background: var(--violet); border-color: var(--violet); color: #fff; }
.pkg-card:nth-child(2) .pkg-for { color: rgba(255,255,255,.8); }
.pkg-card:nth-child(2) .btn { background: #fff; color: var(--violet); border-color: #fff; }
.pkg-card:nth-child(2) .btn:hover { background: var(--faint); border-color: var(--faint); }
.pkg-card:nth-child(2) .btn:active { background: #fff; }

/* ---------- процесс: чёрная полоса ---------- */
.process { background: var(--dark); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.step { border-top: 1px solid var(--hairline-dark); padding-top: 1.2rem; }
.step-num { font-weight: 500; color: #fff; font-size: 1.5rem; line-height: 1; }
.step h3 { margin-top: .5rem; }
.step p { color: rgba(255,255,255,.6); }

/* ---------- преимущества: белая полоса ---------- */
.advantages { background: var(--light); }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.adv-card { background: var(--soft); border-radius: var(--r-card); padding: 1.6rem; }
.adv-card p { color: var(--body); margin-bottom: 0; }

/* ---------- кейсы: чёрная полоса ---------- */
.cases { background: var(--dark); }

/* Горизонтальная лента с «пиком» следующей карточки: три карточки в поле
   зрения плюс виден край четвёртой — так понятно, что лента листается.
   Листание — нативный scroll-snap, поэтому работает и без JS (пальцем/колесом). */
.cases-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.2rem; }
.cases-head h2 { margin-bottom: 0; }
.cases-nav { display: flex; gap: .6rem; margin-left: auto; }

/* Стрелки — те же белые пилюли, что и главный CTA на тёмном (.btn-primary):
   сплошная белая заливка, графитовый значок. Полупрозрачный вариант на
   графите читался как «призрачные» кнопки и выбивался из языка сайта. */
.nav-btn {
  font: inherit; cursor: pointer; padding: 0;
  width: 54px; height: 54px; border-radius: var(--r-pill);
  background: var(--light); color: var(--dark);
  border: 1px solid var(--light);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.nav-btn svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.nav-btn:hover { background: var(--faint); border-color: var(--faint); }
.nav-btn:active { transform: scale(.95); }
.nav-btn:disabled { opacity: .3; cursor: default; }

.cases-track {
  --cases-gap: 1.2rem;
  --cases-peek: 5rem;      /* запас под пик следующей карточки; с учётом зазора
                              её видимый край получается ~99px */
  display: flex; gap: var(--cases-gap);
  margin-top: 2rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;   /* горизонтальный свайп не утаскивает страницу */
  scroll-snap-type: x mandatory;
  scrollbar-width: none;            /* полосу не показываем: её роль играют стрелки и пик */
  -webkit-overflow-scrolling: touch;
}
.cases-track::-webkit-scrollbar { display: none; }

/* Телефон: одна карточка + пик следующей. Потолок ширины нужен, чтобы
   карточка не растянулась в нечитаемую строку на широком телефоне. */
.case-card {
  flex: 0 0 calc(86% - var(--cases-gap));
  max-width: 34rem;
  scroll-snap-align: start;
  background: var(--elevated); border-radius: var(--r-card); padding: 1.5rem;
  /* рамка есть всегда, просто прозрачная: подсветка текущей карточки не сдвигает вёрстку */
  border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}

/* Текущая карточка — та, на которой остановилась лента. Подсвечиваем её
   индиго-рамкой и чуть более светлой подложкой: видно, какой кейс читаешь,
   остальные остаются обычными, чтобы текст не терял контраст.
   Класс ставит js/app.js, при выключенном JS подсветки просто нет. */
.case-card.is-current {
  background: #1c1f24;
  border-color: rgba(124,130,255,.55);
}
.case-card.is-current .case-place { color: var(--violet-light); }
.case-place { text-transform: uppercase; font-size: .74rem; letter-spacing: .06em; color: var(--stone); font-weight: 500; }
.case-card h3 { margin-top: .4rem; font-size: 1.2rem; }
.case-card p { color: rgba(255,255,255,.6); margin-bottom: 0; }

/* Планшет: две карточки + пик. Порог 690px подобран по ширине текста:
   ниже него две карточки дают меньше 30 знаков в строке. */
@media (min-width: 690px) {
  .case-card { flex: 0 0 calc((100% - 2 * var(--cases-gap) - var(--cases-peek)) / 2); padding: 1.8rem; }
}

/* Десктоп: ровно три карточки + пик четвёртой —
   3 ширины + 3 зазора + пик = 100% ширины ленты.
   Порог 1000px, а не 901px: на 901px три карточки сжимаются до 250px
   и текст в них идёт по 25 знаков в строке. */
@media (min-width: 1000px) {
  .case-card { flex: 0 0 calc((100% - 3 * var(--cases-gap) - var(--cases-peek)) / 3); }
}

/* уважаем «уменьшить движение»: без плавной прокрутки */
@media (prefers-reduced-motion: reduce) {
  .cases-track { scroll-behavior: auto; }
}

/* ---------- призыв к действию: финал раздела «Как мы работаем» ----------
   Раньше это была отдельная тёмная полоса сразу после «Результатов» — две
   тёмные полосы подряд сливались, и блок читался как часть кейсов. Теперь он
   внутри раздела про то, как мы работаем: сначала объяснили, потом предложили
   собрать команду. Волосяная линия сверху — тот же приём, что у шагов выше. */
.cta-section {
  text-align: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--hairline-dark);
}
.cta-section h2 { max-width: 760px; margin: 0 auto .9rem; }
.cta-section p { color: rgba(255,255,255,.72); max-width: 620px; margin: 0 auto 1.8rem; }

/* ---------- контакты: белая полоса ---------- */
.contacts { background: var(--light); }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: stretch; }
.contact-list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .8rem; }
.contact-list li { color: var(--mute); }
.contact-list a { color: var(--ink); font-weight: 500; font-size: 1.2rem; text-decoration: none; letter-spacing: -.01em; }
.contact-list a:hover { color: var(--violet); }
/* карточка призыва: заголовок и кнопка центрированы относительно блока */
.contacts-form {
  background: var(--light);
  border: 1px solid var(--hairline-light);
  border-radius: var(--r-card);
  padding: 2.4rem 1.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.4rem;
}
.contacts-form h3 { margin: 0; }

/* ---------- футер: чёрный ---------- */
.site-footer { border-top: 1px solid var(--hairline-dark); padding: 2rem 0; color: rgba(255,255,255,.6); font-size: .86rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-brand { font-weight: 500; color: #fff; }

/* ---------- модалки: светлые ---------- */
.modal { border: 0; padding: 0; background: transparent; width: min(560px, 92vw); max-height: 90vh; overflow: visible; }
.modal::backdrop { background: rgba(0,0,0,.68); }
.modal-panel { background: var(--light); border-radius: var(--r-card); padding: 1.7rem; position: relative; max-height: 84vh; overflow: auto; }
.modal-close { position: absolute; top: .8rem; right: .8rem; background: var(--soft); border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: .9rem; color: var(--ink); }
.modal-close:hover { background: var(--violet); color: #fff; }
#expert-modal-content .expert-modal-head { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1rem; }
#expert-modal-content img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; }
#expert-modal-content .em-domain { color: var(--violet); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }

/* ---------- формы: белые поля 12px ---------- */
.form-panel h3 { font-size: 1.5rem; }
label { display: grid; gap: .4rem; font-weight: 500; font-size: .92rem; margin-bottom: .9rem; }
input, textarea { font: inherit; border: 1px solid var(--hairline-light); border-radius: var(--r-field); padding: .9rem 1rem; background: var(--light); color: var(--ink); width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }
.form-note { color: var(--mute); font-size: .84rem; margin-top: .8rem; }
.form-success-title { font-size: 1.2rem; font-weight: 500; }

/* ---------- адаптив ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  /* мобильная версия: знак по центру по горизонтали */
  .hero-mark { justify-content: center; }
  .contacts-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .main-nav { position: fixed; inset: 64px 0 auto 0; background: var(--dark); flex-direction: column; padding: 1.3rem 24px; gap: 1rem; border-bottom: 1px solid var(--hairline-dark); transform: translateY(-120%); transition: transform .2s ease; }
  .main-nav.open { transform: translateY(0); }
  .burger { display: block; }
  .btn-header { display: none; }
}
