/* Hallmark · macrostructure: Catalogue (card-band body, centred typographic fold) · genre: modern-minimal
 * theme: studied-DNA (source: ~/developer/ACL-01/index.html — acentiallabs, user's own site)
 * paper oklch(98.8% 0.003 252) · accent oklch(44% 0.125 252) deep-blue · display+body: Manrope (local)
 * nav: N1b-lite · footer: Ft1 mast-headed dark · enrichment: none (typography + Tier-A CSS transcripts)
 * motion: marquee strip · button press/lift · nav sheet — 3 primitives, reveals cut
 * studied: yes · DNA-source: file (ACL-01) · Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4
 */
@import url("../../tokens.css");

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-Variable.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body { overflow-x: clip; }

body {
  font-family: var(--font-body);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--page-gutter);
}

h1, h2, h3 { overflow-wrap: anywhere; min-width: 0; }

/* ============ section heads ============ */
.shead { text-align: center; margin-bottom: var(--space-xl); }
.shead h2 {
  font-weight: 800;
  font-size: var(--text-2xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin-inline: auto;
}
.shead p {
  color: var(--color-body);
  max-width: 52ch;
  margin: var(--space-sm) auto 0;
}

/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 16px 28px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.78125rem; /* 12.5px */
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out),
              transform 100ms var(--ease-out);
}
.btn:active { transform: scale(0.96); transition-duration: 60ms; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--solid { background: var(--color-accent); color: var(--color-paper); }
.btn--ghost { border-color: var(--color-rule); color: var(--color-ink); background: transparent; }
.btn--light { background: var(--color-paper); color: var(--color-ink); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1.5px); }
  .btn--solid:hover { background: var(--color-accent-dark); }
  .btn--ghost:hover { border-color: var(--color-ink); }
  .btn--light:hover { background: var(--color-accent-soft); }
}

/* on dark bands the focus ring must stay visible */
.band--dark :focus-visible, .footer :focus-visible { outline-color: var(--color-on-dark); }

/* ============ nav (N1b-lite, DNA topbar) ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-rule);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  height: 62px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
}
.nav__mark {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 9px 9px 9px 2px; /* speech-bubble corner */
  background: var(--color-accent);
  position: relative;
}
.nav__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-paper);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-left: auto;
  font-size: 0.78125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nav__links a { color: var(--color-ink); white-space: nowrap; }
.nav__links a:hover { opacity: 0.55; }
.nav__cta { padding: 12px 20px; }
.nav__cta .btn__short { display: none; }

.nav__burger {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.nav__burger:hover { background: var(--color-card); }

.nav__menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: var(--z-sticky);
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-rule);
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-short) var(--ease-out),
              visibility var(--dur-short);
  visibility: hidden;
}
.nav__menu > div { overflow: hidden; min-height: 0; }
.nav__menu.is-open { grid-template-rows: 1fr; visibility: visible; }
.nav__menu a {
  display: block;
  padding: 16px var(--page-gutter);
  font-size: var(--text-base);
  font-weight: 700;
  border-bottom: 1px solid var(--color-card-2);
}
.nav__menu a:last-child { border-bottom: none; }
.nav__menu a:active { background: var(--color-card); }

/* ============ hero — centred statement, off-axis CTA bar ============ */
.hero {
  padding: clamp(48px, 7vh, 72px) 0 clamp(64px, 9.5vh, 96px);
  text-align: center;
}
.hero h1 {
  font-weight: 800;
  font-size: var(--text-display);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 17ch;
  margin-inline: auto;
}
.hero h1 .u {
  color: var(--color-accent);
}
.hero__sub {
  color: var(--color-body);
  font-size: var(--text-md);
  max-width: 52ch;
  margin: var(--space-lg) auto 0;
}
.hero__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-2xl);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* hero video variant — YouTube iframe cover + navy scrim, text flips to on-dark */
.hero--video {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vh, 120px) 0;
  color: var(--color-on-dark);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: oklch(20% 0.03 258); /* fallback пока видео грузится / reduced-motion */
}
.hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    oklch(20% 0.03 258 / 0.66),
    oklch(19% 0.035 258 / 0.82)
  );
}
.hero--video .wrap { position: relative; z-index: 1; }
.hero--video h1 { color: var(--color-on-dark); }
.hero--video h1 .u { color: oklch(76% 0.1 250); }
.hero--video .hero__sub { color: var(--color-on-dark-2); }
/* кнопки на тёмном видео: крупнее, максимум контраста */
.hero--video .hero__bar .btn {
  padding: 18px 34px;
  font-size: 0.84375rem; /* 13.5px */
}
.hero--video .btn--solid {
  background: var(--color-paper);
  color: var(--color-ink);
}
.hero--video .btn--solid:hover { background: var(--color-accent-soft); }
.hero--video .btn--ghost {
  color: var(--color-on-dark);
  border-width: 2px;
  border-color: oklch(96% 0.005 252 / 0.75);
  background: oklch(20% 0.03 258 / 0.35);
}
.hero--video .btn--ghost:hover { border-color: var(--color-on-dark); background: oklch(20% 0.03 258 / 0.55); }
@media (prefers-reduced-motion: reduce) {
  .hero__media video { display: none; }
}

/* ============ chat proof — transcript card, no fake app chrome ============ */
.proof { padding: var(--space-3xl) 0; }
.proof__card {
  max-width: 640px;
  margin-inline: auto;
  background: var(--color-card);
  border-radius: var(--radius-band);
  padding: clamp(20px, 3.5vw, 32px);
}
.proof__label {
  font-size: var(--text-label);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}
.chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.msg {
  max-width: 86%;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  line-height: 1.45;
  border-radius: var(--radius-bubble);
}
.msg--in {
  background: var(--color-paper);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.msg--out {
  background: var(--color-accent-soft);
  color: var(--color-ink-2);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.chat__meta {
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-mute);
  text-align: right;
  margin-top: var(--space-xs);
}

/* ============ marquee strip (DNA signature) ============ */
.mq {
  overflow: hidden;
  border-block: 1px solid var(--color-rule);
  background: var(--color-paper);
}
.mq__track {
  display: flex;
  width: max-content;
  animation: mq-scroll 44s linear infinite;
}
.mq:hover .mq__track { animation-play-state: paused; }
.mq__group {
  display: flex;
  align-items: center;
  height: 48px;
  flex: none;
}
.mq__item {
  white-space: nowrap;
  font-size: var(--text-label);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-mute);
  padding: 0 28px;
}
.mq__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  flex: none;
  opacity: 0.55;
}
@keyframes mq-scroll { to { transform: translateX(-50%); } }

/* ============ reasons — irregular card grid ============ */
.reasons { padding: var(--space-3xl) 0 var(--space-2xl); }
.reasons__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}
.reason {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: clamp(20px, 2.6vw, 28px);
  min-width: 0;
}
.reason--wide {
  grid-column: span 2;
  background: var(--color-accent-mist);
}
.reason__num {
  display: block;
  font-size: var(--text-label);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.reason h3 {
  font-weight: 800;
  font-size: var(--text-lg);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
}
.reason p {
  color: var(--color-body);
  font-size: 0.9375rem;
}

/* ============ delivery — Cloud vs Box diptych ============ */
.delivery { padding: var(--space-2xl) 0 var(--space-3xl); }
.delivery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}
.dcard {
  border-radius: var(--radius-band);
  padding: clamp(24px, 3.4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
}
.dcard--cloud { background: var(--color-card); }
.dcard--box { background: var(--color-ink); color: var(--color-on-dark); }

.dcard__tag {
  font-size: var(--text-label);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.dcard--box .dcard__tag { color: var(--color-on-dark-2); }
.dcard h3 {
  font-weight: 800;
  font-size: var(--text-xl);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.dcard__lead { color: var(--color-body); }
.dcard--box .dcard__lead { color: var(--color-on-dark-2); }

.dcard ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  color: var(--color-body);
  font-size: 0.9375rem;
}
.dcard--box ul { color: var(--color-on-dark-2); }
.dcard li {
  position: relative;
  padding-left: 24px;
}
.dcard li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(-45deg);
}
.dcard--box li::before { border-color: var(--color-on-dark-2); }
.dcard .btn { margin-top: auto; align-self: flex-start; }

/* ============ verticals — dialog cards ============ */
.verticals { padding: 0 0 var(--space-3xl); }
.verticals__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}
.vcard {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: clamp(20px, 2.8vw, 32px);
  min-width: 0;
}
.vcard h3 {
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}
.vcard__desc {
  margin-top: var(--space-2xs);
  color: var(--color-body);
  font-size: 0.9375rem;
}
.vcard .chat { margin-top: var(--space-md); }
.vcard .msg { font-size: 0.84375rem; }

/* ============ final CTA band ============ */
.final { padding: 0 var(--page-gutter) var(--space-3xl); }
.final__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--color-ink);
  color: var(--color-on-dark);
  border-radius: var(--radius-band);
  padding: clamp(44px, 7vw, 88px) clamp(24px, 6vw, 88px);
  text-align: center;
}
.final h2 {
  font-weight: 800;
  font-size: var(--text-2xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin-inline: auto;
}
.final p {
  color: var(--color-on-dark-2);
  max-width: 46ch;
  margin: var(--space-md) auto var(--space-xl);
}

/* ============ footer — Ft1 mast-headed, dark ============ */
.footer {
  background: var(--color-ink);
  color: var(--color-on-dark-2);
  padding: var(--space-2xl) 0 var(--space-xl);
  font-size: var(--text-sm);
  line-height: 1.7;
}
.footer__brand {
  color: var(--color-on-dark);
  font-weight: 800;
  font-size: var(--text-md);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.footer__brand .nav__mark { width: 22px; height: 22px; border-radius: 8px 8px 8px 2px; }
.footer__tagline { margin-top: var(--space-2xs); }
.footer__contacts {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-lg);
}
.footer__contacts a { color: var(--color-on-dark); font-weight: 700; white-space: nowrap; }
.footer__contacts a:hover { color: var(--color-on-dark-2); }
.footer__rule {
  height: 1px;
  background: var(--color-ink-2);
  margin: var(--space-lg) 0;
  border: none;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); }
.footer__legal a { white-space: nowrap; }
.footer__legal a:hover { color: var(--color-on-dark); }

/* ============ responsive ============ */
@media (max-width: 60rem) {
  .reasons__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery__grid, .verticals__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 46.25rem) { /* 740px */
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; margin-left: auto; }
  .nav__cta { order: 2; padding: 12px 16px; }
  .nav__menu { display: grid; }
}

@media (max-width: 40rem) {
  .hero { padding-top: var(--space-xl); }
  .hero__bar { margin-top: var(--space-xl); }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1 1 100%; }
    .reasons { padding-block: var(--space-2xl) var(--space-xl); }
  .delivery { padding-block: var(--space-xl) var(--space-2xl); }
  .verticals { padding-bottom: var(--space-2xl); }
  .final { padding-bottom: var(--space-2xl); }
}

@media (max-width: 35rem) {
  .reasons__grid { grid-template-columns: minmax(0, 1fr); }
  .reason--wide { grid-column: auto; }
  .msg { max-width: 94%; }
}

@media (max-width: 28.75rem) { /* 460px — short CTA label in the bar */
  .nav__cta .btn__full { display: none; }
  .nav__cta .btn__short { display: inline; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mq__track { animation: none; }
  .nav__menu { transition: none; }
  .btn, .btn:active { transition: none; transform: none; }
  .btn:hover { transform: none; }
}

/* ============ появление (reveal-once; активно только при html.anim из JS) ============ */
.anim [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}
.anim [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 900ms var(--ease-out) var(--d, 0ms),
              transform 900ms var(--ease-out) var(--d, 0ms);
}
/* реплики чата: мягкий pop */
.anim [data-msg] {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
}
.anim [data-msg].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 550ms var(--ease-out),
              transform 550ms var(--ease-out);
}
