/* ============================================================
   AVatar Финдир — направление B «Ночной кабинет»
   ДНК 04 · Холодный редакционный dark · Lora + Onest
   ============================================================ */

/* ---------- Шрифты (self-hosted, кириллица + латиница раздельно) ---------- */
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/lora-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/lora-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/lora-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/lora-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/onest-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/onest-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/onest-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/onest-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/onest-cyrillic-600.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/onest-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/onest-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/onest-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD;
}

/* ---------- Токены ---------- */
:root {
  /* Палитра — холодная тёмная система (60/30/10) */
  --bg: #0E1014;          /* фон 60% — почти-чёрный, холодный сине-серый подтон */
  --surface: #161922;     /* поверхности 30% — холодный графит */
  --surface-2: #1C202B;   /* вложенные поверхности */
  --line: #262B36;        /* тонкие холодные разделители (не текст) */
  --ink: #E8EBF0;         /* основной текст — холодный почти-белый */
  --ink-dim: #A6AEBC;     /* вторичный текст */
  --steel: #7FA8C9;       /* сигнал 10% — сталь-синий, ТОЛЬКО крупное/декор/иконки/линии */
  --steel-deep: #5E86A6;  /* глубокая сталь — декоративные подложки */
  --platinum: #C3D2E0;    /* светлый холодный металл — CTA, лейблы, светящиеся цифры */
  --on-accent: #0E1014;   /* тёмный текст на платиновой кнопке */

  /* Тени — холодные, синий подтон, никогда чёрные; ambient + key (≤2 слоя) */
  --shadow-card: 0 1px 0 rgba(255,255,255,.035) inset, 0 22px 44px -26px rgba(10,26,50,.75);
  --shadow-cta: 0 1px 0 rgba(255,255,255,.28) inset, 0 12px 28px -12px rgba(127,168,201,.5);
  --shadow-glow: 0 0 26px rgba(150,186,214,.22);

  /* Типографика — модульная шкала ×1.25, база 16px */
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Onest", "Segoe UI", system-ui, sans-serif;
  --fs-eyebrow: .8125rem;   /* 13px — служебный лейбл */
  --fs-body: 1rem;          /* 16px */
  --fs-body-lg: 1.25rem;    /* 20px */
  --fs-h3: 1.5625rem;       /* 25px */
  --fs-h2: clamp(1.75rem, 1.2rem + 2.6vw, 3.05rem);    /* 28 → 49 */
  --fs-h1: clamp(2.05rem, 1.15rem + 4.2vw, 4.77rem);   /* 33 → 76 */
  --fs-num: clamp(2rem, 1.3rem + 3vw, 3.05rem);        /* фокальная цифра */

  --maxw: 1600px;
  --content: 68ch;
  --ease: cubic-bezier(.2,.62,.2,1);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--steel); color: var(--bg); }
:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 3px;
  border-radius: 12px;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 4rem); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--platinum);
  display: inline-flex;
  align-items: center;
  gap: .625rem;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: var(--steel); }

/* ---------- Навигация ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav__row { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .625rem; font-weight: 600; letter-spacing: -.01em; }
.brand__mark {
  width: 2rem; height: 2rem; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2);
  box-shadow: var(--shadow-card);
  color: var(--steel);
}
.brand__mark svg { width: 1.1rem; height: 1.1rem; }
.brand b { font-weight: 700; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .625rem;
  padding: .875rem 1.5rem;
  border: 0; border-radius: 999px;
  font-weight: 600; letter-spacing: -.01em;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), background-color .28s var(--ease);
  will-change: transform;
}
.btn--primary { background: var(--platinum); color: var(--on-accent); box-shadow: var(--shadow-cta); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0) scale(.985); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--steel); }
.btn__icon {
  width: 1.5rem; height: 1.5rem; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(14,16,20,.14);
  transition: transform .28s var(--ease);
}
.btn--primary:hover .btn__icon { transform: translate(2px,-1px); }
.btn__icon svg { width: .85rem; height: .85rem; }
.nav .btn { padding: .625rem 1.25rem; }

/* ---------- Секции ---------- */
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section--hero { padding-top: clamp(3.5rem, 6vw, 5.5rem); }

/* ---------- Hero ---------- */
.hero__grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.hero__grid > * { min-width: 0; }   /* не давать 1fr-треку раздуться под длинное слово (overflow на 375) */
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: 1.15fr .85fr; }
}
.hero h1 { font-size: var(--fs-h1); margin-top: 1.5rem; overflow-wrap: break-word; }
.hero__lead {
  margin-top: 1.75rem;
  max-width: 46ch;
  font-size: var(--fs-body-lg);
  line-height: 1.55;
  color: var(--ink-dim);
  text-wrap: pretty;
}
.hero__lead b { color: var(--ink); font-weight: 600; }
.hero__divider { height: 1px; width: 100%; background: var(--line); margin-top: 2.5rem; }
.hero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero__note { font-size: var(--fs-eyebrow); color: var(--ink-dim); letter-spacing: .01em; }

/* Диалоговый мотив — фирменный ход направления (не device-mockup) */
.dialog {
  position: relative;
  min-width: 0; max-width: 100%;
  background: var(--surface);
  border-radius: 20px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow-card);
}
.dialog__cap {
  display: flex; align-items: center; gap: .5rem;
  font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 1.25rem;
}
.dialog__dot { width: .5rem; height: .5rem; border-radius: 999px; background: var(--steel); box-shadow: var(--shadow-glow); }
.bubble { max-width: 88%; padding: .875rem 1.125rem; border-radius: 16px; line-height: 1.5; font-size: var(--fs-body); }
.bubble + .bubble { margin-top: .875rem; }
.bubble__who { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--platinum); margin-bottom: .375rem; }
.bubble--fin { background: var(--surface-2); border-radius: 16px; }
.bubble--you { background: var(--surface-2); border-radius: 16px; margin-left: auto; box-shadow: inset 0 0 0 1px rgba(127,168,201,.35); }
.bubble--you .bubble__who { color: var(--steel); }

/* ---------- Секция «Что вы получите» ---------- */
.get__head { max-width: 40ch; }
.get h2 { font-size: var(--fs-h2); margin-top: 1.25rem; }
.get__sub { margin-top: 1.25rem; color: var(--ink-dim); max-width: var(--content); font-size: var(--fs-body-lg); line-height: 1.55; }

.bento { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.bento > * { min-width: 0; }
.card p, .mini p, .bubble { overflow-wrap: break-word; }
.mini { min-width: 0; }
.mini > div { min-width: 0; }
@media (min-width: 48rem) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card--wide { grid-column: 1 / -1; }
}
@media (min-width: 72rem) {
  .bento { grid-template-columns: repeat(12, 1fr); }
  .card--dash { grid-column: span 7; }
  .card--stack { grid-column: span 5; }
  .card--a { grid-column: span 4; }
  .card--b { grid-column: span 4; }
  .card--c { grid-column: span 4; }
}

.card {
  background: var(--surface);
  border-radius: 20px;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  box-shadow: var(--shadow-card);
}
.card__n { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .12em; color: var(--steel); font-variant-numeric: tabular-nums; }
.card__ic { width: 2.5rem; height: 2.5rem; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--steel); margin-bottom: 1.25rem; }
.card__ic svg { width: 1.35rem; height: 1.35rem; }
.card h3 { font-size: var(--fs-h3); margin-bottom: .625rem; }
.card p { color: var(--ink-dim); line-height: 1.55; }
.card--stack { display: flex; flex-direction: column; gap: 1.5rem; justify-content: center; }
.mini { display: flex; gap: 1rem; align-items: flex-start; }
.mini__ic { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--steel); }
.mini__ic svg { width: 1.2rem; height: 1.2rem; }
.mini h3 { font-size: var(--fs-body-lg); margin-bottom: .25rem; }
.mini p { font-size: var(--fs-body); }

/* ---------- Дашборд-панель (светящиеся цифры — сигнатура) ---------- */
.dash { display: flex; flex-direction: column; gap: 1.5rem; }
.dash__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dash__title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); letter-spacing: -.01em; }

/* Стилизованный <select> — без системной стрелки */
.field { position: relative; display: inline-flex; align-items: center; }
.field label { position: absolute; left: -9999px; }
.select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5rem 2.5rem .5rem 1.125rem;
  font: inherit; font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: .02em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5 6 6.5 11 1.5' stroke='%237FA8C9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1.125rem center;
}
.select::-ms-expand { display: none; }
.select option { background: #0E1014; color: #E8EBF0; }

.ledger { display: flex; flex-direction: column; }
.ledger__row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1rem; padding-block: .875rem; border-bottom: 1px solid var(--line); }
.ledger__row:last-child { border-bottom: 0; }
.ledger__k { color: var(--ink-dim); display: inline-flex; align-items: center; gap: .5rem; }
.ledger__sign { width: 1.25rem; height: 1.25rem; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--steel); font-size: .75rem; font-weight: 700; }
.ledger__v { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.focal { margin-top: .5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.focal__k { color: var(--ink-dim); font-size: var(--fs-body); max-width: 18ch; }
.focal__v {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--fs-num); line-height: 1;
  color: var(--platinum);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  text-shadow: var(--shadow-glow);   /* спокойное свечение — единственный раз на вьюпорт */
}
.dash__foot { font-size: var(--fs-eyebrow); color: var(--ink-dim); display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- Подвал ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 3rem; }
.foot__row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; justify-content: space-between; }
.foot__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.foot a:hover { color: var(--platinum); }
.foot small { color: var(--ink-dim); }

/* ---------- Движение — один оркестрованный момент ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > :nth-child(1) { animation-delay: .02s; }
.stagger > :nth-child(2) { animation-delay: .10s; }
.stagger > :nth-child(3) { animation-delay: .18s; }
.stagger > :nth-child(4) { animation-delay: .26s; }
.stagger > :nth-child(5) { animation-delay: .34s; }

.reveal { animation: rise .55s var(--ease) both; }
@supports (animation-timeline: view()) {
  .reveal {
    animation-timeline: view();
    animation-range: entry 5% cover 26%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .btn--primary:hover { transform: none; }
}
