/* Labodel — дизайн-система сайта.
   Тёмная тема основная (сохраняем узнаваемость бренда), светлая —
   для тех, у кого система в light. Внешних шрифтов нет намеренно:
   меньше запросов и никакой утечки визитов на сторонние домены. */

:root {
  color-scheme: dark light;

  --brand: #2cd3a7;
  --brand-dim: #1f9d7c;
  --brand-ink: #06231b;

  --bg: #0f1113;
  --bg-soft: #15181b;
  --surface: #1a1e22;
  --surface-2: #21262b;
  --line: #2b3238;
  --line-strong: #3a434b;

  --text: #f2f5f7;
  --text-muted: #9aa6b1;
  --text-dim: #6d7883;

  --ok: #4ade80;
  --err: #f87171;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;

  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --ring: 0 0 0 3px rgba(44, 211, 167, 0.28);

  /* Плавная типографика: один источник размеров на весь сайт */
  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(0.97rem, 0.94rem + 0.15vw, 1.06rem);
  --step-1: clamp(1.14rem, 1.06rem + 0.35vw, 1.34rem);
  --step-2: clamp(1.38rem, 1.22rem + 0.7vw, 1.86rem);
  --step-3: clamp(1.72rem, 1.4rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.8vw, 3.7rem);
}

@media (prefers-color-scheme: light) {
  :root {
    --brand: #12a883;
    --brand-dim: #0d8368;
    --brand-ink: #ffffff;

    --bg: #f7f9fa;
    --bg-soft: #ffffff;
    --surface: #ffffff;
    --surface-2: #f1f4f6;
    --line: #e0e6ea;
    --line-strong: #c8d2d8;

    --text: #10161b;
    --text-muted: #56636e;
    --text-dim: #7d888f;

    --ok: #16794a;
    --err: #b3261e;

    --shadow: 0 14px 34px rgba(16, 22, 27, 0.1);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
}

p {
  margin: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
  display: block;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

/* Переход по якорю не должен уезжать под липкую шапку */
main [id] {
  scroll-margin-top: 80px;
}

.section--soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section__head p {
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-size: var(--step-1);
}

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.85rem;
}

/* ------------------------------------------------------------- шапка */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}

.logo {
  font-size: var(--step-1);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.logo:hover {
  text-decoration: none;
}

.logo__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--brand), var(--brand-dim));
  display: grid;
  place-items: center;
  color: var(--brand-ink);
  font-size: 0.82rem;
  font-weight: 900;
  flex: none;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__menu a {
  color: var(--text-muted);
  font-size: var(--step-0);
  font-weight: 500;
  padding: 0.4rem 0;
}
.nav__menu a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav__menu a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--brand);
}

/* Специфичность 0,2,0 намеренно: правило .btn объявлено ниже и иначе
   перебивает display у кнопки в шапке */
.nav .nav__cta {
  display: none;
}

.nav__burger {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 42px;
  height: 38px;
  cursor: pointer;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}

@media (min-width: 720px) {
  .nav .nav__cta {
    display: inline-flex;
  }
}

@media (max-width: 719px) {
  .nav__burger {
    display: block;
  }
  .nav__menu {
    position: absolute;
    inset: 66px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem clamp(1rem, 4vw, 2rem) 1rem;
    display: none;
  }
  .nav__menu.is-open {
    display: flex;
  }
  .nav__menu a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
  }
  .nav__menu a[aria-current="page"] {
    box-shadow: none;
    color: var(--brand);
  }
}

/* ------------------------------------------------------------- кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-align: center;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn:active {
  transform: none;
}

.btn--primary {
  background: var(--brand);
  color: var(--brand-ink);
}
.btn--primary:hover {
  background: color-mix(in srgb, var(--brand) 86%, white);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

/* --------------------------------------------------------------- герой */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto;
  height: 130%;
  background: radial-gradient(
      ellipse 50% 45% at 18% 12%,
      color-mix(in srgb, var(--brand) 22%, transparent),
      transparent 70%
    ),
    radial-gradient(
      ellipse 45% 40% at 88% 70%,
      color-mix(in srgb, var(--brand) 12%, transparent),
      transparent 70%
    );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero p.hero__lead {
  color: var(--text-muted);
  font-size: var(--step-2);
  margin-top: 1.1rem;
  max-width: 34ch;
  line-height: 1.45;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
}

.hero__note {
  margin-top: 1.1rem;
  color: var(--text-dim);
  font-size: var(--step--1);
}

/* Ровный блок 2×2: auto-fit давал 3+1 и ломал ритм героя */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

@media (max-width: 400px) {
  .hero__stats {
    grid-template-columns: 1fr;
  }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.stat__value {
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand);
  display: block;
}

.stat__label {
  color: var(--text-muted);
  font-size: var(--step--1);
  margin-top: 0.15rem;
}

/* ------------------------------------------------------------- карточки */

.grid {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.25rem);
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card p {
  color: var(--text-muted);
}

a.card {
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
a.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.card__num {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: var(--step-0);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
}

.card__arrow {
  margin-top: auto;
  color: var(--brand);
  font-weight: 650;
  font-size: var(--step--1);
}

/* ------------------------------------------------------------ предметы */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 0.42rem 0.95rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  background: var(--surface);
}

.chip--brand {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

/* --------------------------------------------------------------- форма */

.form-wrap {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (min-width: 900px) {
  .form-wrap {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3.5vw, 2rem);
}

.field {
  display: block;
  margin-bottom: 1.1rem;
}

.field__label {
  display: block;
  font-size: var(--step--1);
  font-weight: 650;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.field__hint {
  display: block;
  font-weight: 400;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--err);
}

.field__error {
  display: none;
  color: var(--err);
  font-size: var(--step--1);
  margin-top: 0.35rem;
}
.field__error.is-shown {
  display: block;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--step--1);
  display: none;
}
.form-status.is-shown {
  display: block;
}
.form-status--ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: color-mix(in srgb, var(--ok) 10%, transparent);
}
.form-status--err {
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 45%, transparent);
  background: color-mix(in srgb, var(--err) 10%, transparent);
}

.form-side ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.form-side li {
  display: flex;
  gap: 0.7rem;
  color: var(--text-muted);
}

.form-side li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 800;
  flex: none;
}

/* ----------------------------------------------------------------- FAQ */

.faq {
  display: grid;
  gap: 0.7rem;
  max-width: 78ch;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
}

.faq details[open] {
  border-color: var(--line-strong);
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--brand);
  font-size: var(--step-1);
  font-weight: 400;
  flex: none;
}
.faq details[open] summary::after {
  content: "−";
}

.faq p {
  color: var(--text-muted);
  margin-top: 0.7rem;
}

/* --------------------------------------------------------------- CTA */

.cta {
  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--brand) 16%, var(--surface)),
    var(--surface)
  );
  border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 3rem);
  text-align: center;
}

.cta p {
  color: var(--text-muted);
  margin: 0.8rem auto 0;
  max-width: 52ch;
}

.cta .hero__actions {
  justify-content: center;
}

/* ------------------------------------------------------------- подвал */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: clamp(2rem, 5vw, 3rem) 0 1.75rem;
  margin-top: clamp(2rem, 6vw, 4rem);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links a {
  color: var(--text-muted);
  font-size: var(--step--1);
}
.footer__links a:hover {
  color: var(--brand);
}

.footer__bottom {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: var(--step--1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* ------------------------------------------------------------ утилиты */

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

.skip-link {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 100;
  background: var(--brand);
  color: var(--brand-ink);
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 650;
  transition: transform 0.18s ease;
}
.skip-link:focus {
  transform: translate(-50%, 0);
  text-decoration: none;
}
