/* ============================================================================
   ГАБИТУС — общая система. Тёмный режим: глубокая чёрная бумага,
   на ней бумажно-белые чернила. Никакого кремового канваса,
   ни одной тени, ни одного градиента, ни одного покупного эмодзи.
   ============================================================================ */

:root {
  /* фирменная "ночная" бумага и чернила */
  --paper:        #0A0A0A;   /* глубокий, но не чистый #000 — без мерцания */
  --paper-deep:   #050505;   /* самые тёмные секции / провалы */
  --paper-soft:   #15140F;   /* поднятые поверхности (карточки) */
  --ink:          #F4F3EE;   /* бумажно-белый из фирменного на dark */
  --ink-soft:     #D7D5CC;
  --mute:         #8F8C83;
  --mute-soft:    #5E5C55;
  --rule:         rgba(244, 243, 238, 0.12);
  --rule-strong:  rgba(244, 243, 238, 0.32);

  /* инверсия — редкие светлые врезки */
  --light:        #F4F3EE;
  --on-light:     #0A0A0A;

  /* единственный тёплый акцент */
  --accent:       #E04A2C;   /* терракот чуть ярче — для read-on-dark */
  --accent-soft:  #FF6A4A;

  /* шрифты */
  --font-display: 'Inter Tight', 'Helvetica Neue', system-ui, -apple-system,
                  BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI',
                  system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace,
                  SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif:   'Iowan Old Style', 'Source Serif Pro', 'Charter',
                  'Cambria', Georgia, serif;

  /* сетка / отступы */
  --container: 1440px;
  --gutter: 24px;
  --side: clamp(20px, 4vw, 64px);

  /* анимация */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--ink); color: var(--paper); }

/* ============================================================================
   ТИПОГРАФИКА
   ============================================================================ */

.h-display,
.h-h1,
.h-h2,
.h-h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.h-display {
  font-size: clamp(56px, 9vw, 180px);
  line-height: 0.88;
  letter-spacing: -0.045em;
}
.h-h1 {
  font-size: clamp(36px, 4.6vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.032em;
}
.h-h2 {
  font-size: clamp(26px, 2.8vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.024em;
}
.h-h3 {
  font-size: clamp(19px, 1.4vw, 26px);
  line-height: 1.22;
  letter-spacing: -0.012em;
}
.lead {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
  max-width: 56ch;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 12px; height: 12px;
  background: var(--ink);
  flex: 0 0 12px;
}
.eyebrow.no-mark::before { display: none; }
.eyebrow.accent::before { background: var(--accent); }
.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  color: var(--mute);
}
.serif-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
}
.num-tabular { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent); }
.muted { color: var(--mute); }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); }

/* ============================================================================
   КОНТЕЙНЕРЫ
   ============================================================================ */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--side);
  padding-right: var(--side);
}
.wrap--wide { max-width: none; padding-left: var(--side); padding-right: var(--side); }
.section {
  padding: clamp(72px, 9vw, 160px) 0;
  border-top: 1px solid var(--rule);
}
.section--tight { padding: clamp(48px, 6vw, 96px) 0; }
.section--flush { padding-top: 0; padding-bottom: 0; border-top: 0; }
.section.is-light {
  background: var(--light);
  color: var(--on-light);
}
.section.is-light .h-display,
.section.is-light .h-h1,
.section.is-light .h-h2,
.section.is-light .h-h3 { color: var(--on-light); }
.section.is-light .lead { color: rgba(10, 10, 10, 0.7); }
.section.is-light .eyebrow { color: rgba(10, 10, 10, 0.55); }
.section.is-light .eyebrow::before { background: var(--on-light); }

/* ============================================================================
   ШАПКА
   ============================================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--rule);
  --nav-h: 64px;
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--side);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  min-height: var(--nav-h);
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.nav__logo img {
  display: block;
  height: 22px;
  width: auto;
  background: transparent;
}
.nav__links {
  display: flex;
  gap: clamp(16px, 1.8vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
}
.nav__links a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.nav__links a:hover { border-bottom-color: var(--ink); }
.nav__links a.is-active { border-bottom-color: var(--ink); }
.nav__links a .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mute);
  letter-spacing: 0.05em;
}
.nav__cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.nav__burger {
  display: none;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--ink);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav__burger span {
  display: block;
  width: 16px; height: 1px;
  background: var(--ink);
  position: relative;
}
.nav__burger span::before,
.nav__burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1px;
  background: var(--ink);
}
.nav__burger span::before { top: -5px; }
.nav__burger span::after  { top: 5px; }

@media (max-width: 1024px) {
  .nav__inner { grid-template-columns: 1fr auto; gap: 14px; }
  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 12px var(--side) 32px;
    gap: 0;
    font-size: 20px;
    z-index: 99;
  }
  .nav__links li { border-bottom: 1px solid var(--rule); }
  .nav__links li:last-child { border-bottom: 0; }
  .nav__links a {
    padding: 18px 0;
    font-family: var(--font-display);
    border-bottom: 0;
  }
  .nav__links a::after { display: none; } /* подчёркивание-draw — только на десктопе */
  .nav__links a .num { font-size: 11px; }
  .nav.is-open .nav__links { display: flex; }
  .nav.is-open .nav__burger span { background: transparent; }
  .nav.is-open .nav__burger span::before { top: 0; transform: rotate(45deg); }
  .nav.is-open .nav__burger span::after  { top: 0; transform: rotate(-45deg); }
  .nav__burger { display: inline-flex; }
  .nav__cta { display: none; }
}

/* ============================================================================
   ФУТЕР
   ============================================================================ */

.foot {
  background: var(--paper-deep);
  color: var(--ink);
  padding: clamp(64px, 7vw, 128px) 0 32px;
  border-top: 1px solid var(--rule);
}
.foot a { color: var(--ink); }
.foot__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 56px);
  align-items: start;
  padding-bottom: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 920px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .foot__grid { grid-template-columns: 1fr; }
}
.foot__brand .h-h2 {
  color: var(--ink);
  margin-bottom: 16px;
  max-width: 14ch;
}
.foot__brand .lead { color: var(--ink-soft); max-width: 36ch; }
.foot__col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--mute);
  margin: 0 0 18px;
  font-weight: 400;
}
.foot__col ul { list-style: none; margin: 0; padding: 0; }
.foot__col li { padding: 4px 0; font-size: 15px; }
.foot__col a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s var(--ease);
}
.foot__col a:hover { border-bottom-color: var(--accent-soft); }
.foot__contact-name {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.foot__legal {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.foot__legal .sep { opacity: 0.4; margin: 0 10px; }
@media (max-width: 720px) {
  .foot__legal { font-size: 10px; letter-spacing: 0.16em; }
  .foot__legal .sep { margin: 0 8px; }
}

/* ============================================================================
   КНОПКИ
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn--ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow {
  display: inline-block;
  width: 14px; height: 14px;
  position: relative;
}
.btn .arrow::before,
.btn .arrow::after {
  content: ""; position: absolute; background: currentColor;
}
.btn .arrow::before { left: 0; top: 50%; width: 14px; height: 1px; transform: translateY(-0.5px); }
.btn .arrow::after  { right: 0; top: 50%; width: 8px; height: 1px;
  transform: translateY(-0.5px) rotate(35deg); transform-origin: right center; }

/* ============================================================================
   УТИЛИТЫ
   ============================================================================ */

.divider { height: 1px; background: var(--rule); margin: 0; border: 0; }
hr { border: 0; height: 1px; background: var(--rule); margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

html, body { overflow-x: hidden; }
