/* =========================================================================
   СКОРП — scorp.ooo
   Дизайн-система: токены → база → компоненты → секции → адаптив
   Фирменные цвета сняты с логотипа: золото #D8B564, зелёный #2C6B36,
   фон #0B161C (совпадает с подложкой logo-header.png — логотип «растворяется»).
   ========================================================================= */

/* ---------------------------------- 1. Токены --------------------------- */
:root {
  /* Бренд */
  --gold: #D8B564;
  --gold-light: #EBD198;
  --gold-deep: #B8944A;
  --green: #2C6B36;
  --green-light: #4E9A5C;

  /* Поверхности */
  --bg: #0B161C;
  --surface: #101F27;
  --surface-2: #162A33;
  --surface-inset: #0A0F13;

  /* Текст */
  --ink: #E8EEF1;
  --ink-2: #A3B4BD;
  --ink-3: #6B7F89;
  --on-gold: #14200F;

  /* Линии */
  --line: rgba(216, 181, 100, 0.14);
  --line-2: rgba(216, 181, 100, 0.28);

  /* Радиусы */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Тени */
  --shadow-1: 0 2px 6px rgba(0, 0, 0, .35), 0 12px 28px -18px rgba(0, 0, 0, .7);
  --shadow-2: 0 24px 60px -28px rgba(0, 0, 0, .95), 0 0 0 1px var(--line-2);
  --shadow-gold: 0 12px 30px -12px rgba(216, 181, 100, .45);

  /* Движение — одни и те же длительности и кривая на всём сайте */
  --dur-fast: 150ms;
  --dur: 260ms;
  --dur-slow: 560ms;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Типографика */
  --font-head: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Onest', system-ui, -apple-system, sans-serif;

  /* Раскладка */
  --shell: 1280px;
  --pad: clamp(16px, 4vw, 40px);
  --header-h: 68px;

  /* Иконки для кнопок (маски, красятся currentColor) */
  --icon-ne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E");
  --icon-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m19 12-7 7-7-7'/%3E%3C/svg%3E");
}

/* ---------------------------------- 2. База ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

::selection { background: var(--gold); color: var(--on-gold); }

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.text-gold {
  background: linear-gradient(100deg, var(--gold-light), var(--gold) 45%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 200;
  transform: translate(-50%, -200%);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* Появление при прокрутке */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------------------------- 3. Фон ------------------------------ */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.backdrop__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(216, 181, 100, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 181, 100, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
}

.backdrop__glow {
  position: absolute;
  width: 46vw;
  height: 46vw;
  min-width: 380px;
  min-height: 380px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .5;
}
.backdrop__glow--gold  { top: -14vw; right: -10vw; background: rgba(216, 181, 100, .16); }
.backdrop__glow--green { top: 32vw; left: -16vw; background: rgba(44, 107, 54, .28); }

/* ---------------------------------- 4. Кнопки --------------------------- */
/* Один компонент .btn на весь сайт: шапка, hero, карточки, подвал */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: transparent;
  --btn-shadow: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .8rem 1.4rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }

/* Стрелка — единый жест для всех кнопок */
.btn--ne, .btn--down { --btn-icon: var(--icon-ne); }
.btn--down { --btn-icon: var(--icon-down); }

.btn--ne::after,
.btn--down::after {
  content: "";
  inline-size: .82em;
  block-size: .82em;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: var(--btn-icon) center / contain no-repeat;
  mask: var(--btn-icon) center / contain no-repeat;
  transition: transform var(--dur) var(--ease);
}
.btn--ne:hover::after   { transform: translate(2px, -2px); }
.btn--down:hover::after { transform: translateY(3px); }

/* Варианты */
.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  --btn-fg: var(--on-gold);
  --btn-bd: rgba(255, 255, 255, .2);
  --btn-shadow: var(--shadow-gold);
}
.btn--primary:hover { --btn-shadow: 0 16px 34px -12px rgba(216, 181, 100, .62); }

.btn--ghost {
  --btn-bg: rgba(216, 181, 100, .05);
  --btn-bd: var(--line-2);
}
.btn--ghost:hover {
  --btn-bg: rgba(216, 181, 100, .12);
  --btn-bd: var(--gold);
  --btn-fg: var(--gold-light);
}

.btn--disabled {
  --btn-bg: rgba(255, 255, 255, .04);
  --btn-fg: var(--ink-3);
  --btn-bd: var(--line);
  cursor: not-allowed;
}
.btn--disabled:hover,
.btn--disabled:active { transform: none; --btn-shadow: none; }

/* Размер */
.btn--sm {
  padding: .58rem 1rem;
  font-size: .8438rem;
}

/* ---------------------------------- 5. Шапка ---------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 22, 28, .78);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(11, 22, 28, .94);
  border-bottom-color: var(--line);
  box-shadow: 0 18px 40px -30px #000;
}

.site-header__inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.brand {
  display: block;
  line-height: 0;
  border-radius: var(--r-sm);
  transition: opacity var(--dur) var(--ease);
}
.brand:hover { opacity: .82; }

/* Логотип с прозрачным фоном — ложится на любую подложку */
.brand__img {
  height: 38px;
  width: auto;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.nav__link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover {
  color: var(--ink);
  background: rgba(216, 181, 100, .07);
}
.nav__link:hover::after { transform: scaleX(1); }

/* ---------------------------------- 6. Hero ----------------------------- */
.hero {
  padding-block: clamp(56px, 10vw, 112px) clamp(40px, 6vw, 72px);
}

/* Ширину ограничивают сами блоки, а не контейнер —
   иначе hero съезжает от общей сетки страницы */
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.hero__title {
  max-width: 16ch;
  font-size: clamp(2.1rem, 6.2vw, 4rem);
  font-weight: 700;
}

.hero__lead {
  max-width: 62ch;
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

/* Колонок столько, сколько пунктов: добавили или убрали цифру — сетка подстроится */
.stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 880px;
  margin: 22px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(216, 181, 100, .05), transparent 70%),
    var(--surface);
}

.stats__item { text-align: center; }

.stats__label {
  order: 2;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stats__value {
  order: 1;
  margin: 0 0 2px;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

/* ---------------------------------- 7. Секции --------------------------- */
.section {
  padding-block: clamp(48px, 7vw, 88px);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section--about {
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section__title {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 700;
}

.section__sub {
  font-size: 1.0625rem;
  color: var(--ink-2);
}

/* ---------------------------------- 8. Карточки ------------------------- */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.card {
  position: relative;
  flex: 1 1 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  background: var(--surface-2);
  border-color: var(--line-2);
  box-shadow: var(--shadow-2);
}

.card:focus-within {
  border-color: var(--gold);
  box-shadow: var(--shadow-2);
}

/* Превью */
.card__shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-inset);
  border-bottom: 1px solid var(--line);
}

/* Затемнение верха — бейдж читается даже поверх белого скриншота */
.card__shot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 38%;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(11, 22, 28, .55), transparent);
  pointer-events: none;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition:
    transform var(--dur-slow) var(--ease),
    filter var(--dur) var(--ease);
}
.card:hover .card__img { transform: scale(1.045); }

/* Баннер Отнесу.рф шире карточки — кадрируем по логотипу и курьеру */
.card__shot--otnesu .card__img { object-position: 45% center; }

.card__shot--contain { background: #0A0A0C; }
.card__shot--contain .card__img {
  object-fit: contain;
  object-position: center;
  padding: 6%;
}

/* Растушёвка низа превью — сшивает разнородные скриншоты с телом карточки */
.card__shot::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 30%;
  background: linear-gradient(to top, var(--surface) 0%, rgba(16, 31, 39, .35) 55%, transparent);
  pointer-events: none;
  transition: background var(--dur) var(--ease);
}
.card:hover .card__shot::after {
  background: linear-gradient(to top, var(--surface-2) 0%, rgba(22, 42, 51, .35) 55%, transparent);
}

/* Бейдж статуса */
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: var(--r-pill);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.badge--live {
  color: #8FDCA1;
  background: rgba(15, 42, 22, .72);
  border: 1px solid rgba(78, 154, 92, .5);
}
.badge--live::before { animation: pulse 2.4s var(--ease) infinite; }

.badge--dev {
  color: var(--gold-light);
  background: rgba(46, 34, 10, .75);
  border: 1px solid rgba(216, 181, 100, .38);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(143, 220, 161, .55); }
  60%      { box-shadow: 0 0 0 7px rgba(143, 220, 161, 0); }
}

/* Проект в разработке: превью приглушено, статус несёт бейдж */
.card--dev .card__img { filter: saturate(.6) brightness(.68); }
.card--dev:hover .card__img { filter: saturate(.78) brightness(.8); }

/* Тело */
.card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
}

.card__url {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--gold);
  overflow-wrap: anywhere;
}

.card__desc {
  font-size: .9375rem;
  color: var(--ink-2);
}

/* Руководитель */
.owner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.owner__ava {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--gold) 0%, var(--gold-deep) 55%, var(--green) 100%);
  color: var(--on-gold);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.owner__text { display: flex; flex-direction: column; min-width: 0; }

.owner__label {
  font-size: .6563rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.owner__name {
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink);
}

/* CTA прижата к низу; кликабельна вся карточка */
.card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.card__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: var(--r-lg);
}

/* ---------------------------------- 9. О компании ----------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.about__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  color: var(--ink-2);
  font-size: 1.0313rem;
}
.about__text .section__title { margin-bottom: 4px; }
.about__text .btn { margin-top: 8px; }

.about__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about__item {
  position: relative;
  padding: 18px 20px 18px 62px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition:
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.about__item:hover {
  transform: translateX(4px);
  border-color: var(--line-2);
  background: var(--surface-2);
}

.about__num {
  position: absolute;
  left: 20px;
  top: 18px;
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  color: var(--gold);
  opacity: .8;
}

.about__item-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.about__item-text {
  font-size: .9063rem;
  color: var(--ink-2);
}

/* ---------------------------------- 10. Подвал -------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(10, 15, 19, .6);
  padding-block: 24px;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer__brand {
  line-height: 0;
  border-radius: var(--r-sm);
  transition: opacity var(--dur) var(--ease);
}
.site-footer__brand:hover { opacity: .8; }

.site-footer__logo {
  height: 30px;
  width: auto;
  opacity: .9;
}

.site-footer__copy {
  font-size: .875rem;
  color: var(--ink-3);
}

/* ---------------------------------- 11. Адаптив ------------------------- */
@media (min-width: 760px) {
  .card {
    flex: 0 1 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

@media (min-width: 1120px) {
  .card {
    flex: 0 1 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
  }
}

@media (max-width: 860px) {
  .about { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }

  .site-header__inner { grid-template-columns: auto 1fr; }
  .site-header__cta { justify-self: end; }
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    margin: 0 -6px 10px;
  }
  .nav__link { padding: 6px 10px; font-size: .875rem; }
  .nav__link::after { left: 10px; right: 10px; }

  .brand__img { height: 32px; }

  .stats {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
    padding: 18px 16px;
  }
  /* Нечётный последний пункт — на всю ширину, без дыры справа */
  .stats__item:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .hero__actions .btn { flex: 1 1 auto; }

  .site-footer__inner { justify-content: center; text-align: center; }
}

/* ---------------------------------- 12. Меньше движения ----------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1; transform: none; }
  .card:hover { transform: none; }
  .card:hover .card__img { transform: none; }
  .btn:hover { transform: none; }
  .about__item:hover { transform: none; }
}
