/* Buttons */
.btn {
  --btn-bg: var(--brand-blue);
  --btn-fg: var(--surface-white);
  --btn-bd: transparent;
  --btn-shadow: 0 0 0 transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition:
    background 0.22s var(--ease-out),
    color 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    transform 0.22s var(--ease-out),
    filter 0.22s var(--ease-out);
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  filter: brightness(1.06);
  --btn-shadow: 0 10px 24px rgba(6, 17, 31, 0.16);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
  --btn-shadow: 0 4px 12px rgba(6, 17, 31, 0.12);
}

.btn:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
  transform: none;
  box-shadow: none;
}

.btn--primary {
  --btn-bg: var(--brand-blue);
  --btn-fg: #fff;
}

.btn--primary:hover {
  --btn-bg: #2a6ae0;
  --btn-shadow: 0 12px 28px rgba(31, 92, 211, 0.35);
  filter: none;
}

.btn--lg {
  min-height: 52px;
  padding: 0.85rem 1.55rem;
  font-size: 1.05rem;
}

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--ink-900);
  --btn-bd: rgba(1, 44, 90, 0.22);
}

.btn--secondary:hover {
  --btn-bg: rgba(31, 92, 211, 0.08);
  --btn-fg: var(--brand-blue);
  --btn-bd: var(--brand-blue);
  filter: none;
  --btn-shadow: 0 8px 20px rgba(31, 92, 211, 0.12);
}

.section--ink .btn--secondary,
.btn--secondary.on-dark {
  --btn-fg: #fff;
  --btn-bd: var(--line-dark);
}

.section--ink .btn--secondary:hover,
.btn--secondary.on-dark:hover {
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-fg: #fff;
  --btn-bd: #fff;
  filter: none;
}

.btn--ghost {
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-fg: #fff;
  --btn-bd: var(--line-dark);
}

.btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.16);
  --btn-bd: rgba(255, 255, 255, 0.7);
  filter: none;
  --btn-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.btn--text {
  --btn-bg: transparent;
  --btn-fg: var(--brand-blue);
  --btn-bd: transparent;
  min-height: auto;
  padding: 0.25rem 0;
}

.btn--text:hover {
  transform: none;
  box-shadow: none;
  filter: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Explicit subsection / page jump */
.btn--go::after {
  content: "→";
  display: inline-block;
  margin-left: 0.15rem;
  transition: transform 0.22s var(--ease-out);
}

.btn--go:hover::after {
  transform: translateX(5px);
}

.btn--go:active::after {
  transform: translateX(2px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--brand-blue);
  text-decoration: none;
  transition: color 0.2s var(--ease-out), gap 0.2s var(--ease-out);
}

.link-arrow::after {
  content: "→";
  display: inline-block;
  transition: transform 0.22s var(--ease-out);
}

.link-arrow:hover {
  color: var(--brand-cyan);
  gap: 0.55rem;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.link-arrow .icon {
  transition: transform var(--dur-fast) var(--ease-out);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn--go::after,
  .link-arrow,
  .link-arrow::after {
    transition: none;
  }

  .btn:hover,
  .btn:active {
    transform: none;
  }
}

/* Icon */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--lg {
  width: 2rem;
  height: 2rem;
}

/* Eyebrow & heading block */
.eyebrow {
  margin: 0;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-cyan);
}

.section-heading {
  display: grid;
  gap: 0.85rem;
  max-width: min(100%, 56rem);
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  /* Глобальный h2={22ch} даёт 3–4 строки — на секциях тянем до ~2 строк без уменьшения кегля */
  max-width: none;
}

.section-heading .lead {
  margin-top: 0.25rem;
  max-width: 46rem;
}

/* Chips & badges */
.metric-chip,
.status-badge,
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
}

.metric-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  color: #e8eef7;
}

.metric-chip strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fff;
}

.status-badge {
  gap: 0.45rem;
  padding: 0.42rem 0.85rem 0.42rem 0.7rem;
  background: #0f6b4d;
  color: #fff;
  border: none;
  box-shadow:
    0 0 0 2px #fff,
    0 4px 14px rgba(6, 17, 31, 0.35);
  text-shadow: none;
}

.status-badge::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: #9dffd0;
  box-shadow: none;
}

.status-badge--order {
  background: #a35f14;
  color: #fff;
}

.status-badge--order::before {
  background: #ffd28a;
}

.status-badge--ask {
  background: var(--brand-blue);
  color: #fff;
}

.status-badge--ask::before {
  background: #c5d7ff;
}

.filter-chip {
  border: 1px solid var(--line-light);
  background: var(--surface-white);
  color: var(--steel-700);
  cursor: pointer;
}

.filter-chip[aria-pressed="true"],
.filter-chip.is-active {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: rgba(31, 92, 211, 0.08);
}

/* Form field */
.field {
  display: grid;
  gap: 0.4rem;
}

.field__label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--steel-700);
}

.field__control,
.field select,
.field textarea,
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--surface-white);
  color: var(--ink-900);
  font: inherit;
}

.file-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
}

.file-field__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--surface-white);
  color: var(--ink-900);
  font: inherit;
  cursor: pointer;
}

.file-field__btn:hover {
  border-color: var(--brand-cyan);
}

.file-field__name {
  font-size: var(--fs-small);
  color: var(--steel-700);
}

.file-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: var(--fs-small);
  color: var(--steel-700);
  cursor: pointer;
}

.form-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.1rem 0 0;
  accent-color: var(--brand-cyan);
  cursor: pointer;
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field__control:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--brand-cyan);
}

.field__hint,
.field__error {
  font-size: var(--fs-small);
}

.field__hint {
  color: var(--steel-500);
}

.field__error {
  color: var(--danger);
}

.field.is-invalid .field__control,
.field.is-invalid input,
.field.is-invalid textarea,
.field.is-invalid select {
  border-color: var(--danger);
}

/* Cards used as interactive containers */
.task-card,
.direction-card,
.service-card,
.case-card,
.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--surface-white);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.task-card:hover,
.direction-card:hover,
.case-card:hover,
.product-card:hover {
  border-color: rgba(31, 92, 211, 0.45);
}

.task-card .icon {
  color: var(--brand-blue);
}

.quote-card {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  border-left: 3px solid var(--brand-cyan);
  background: var(--surface-cold);
}

.quote-card blockquote {
  margin: 0;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
}

/* Category cards (legacy hook kept for stubs; homepage uses .cat-feature) */
.category-card {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 280px;
  padding: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-white);
  color: var(--ink-900);
  text-decoration: none;
  border: 1px solid rgba(1, 44, 90, 0.08);
  box-shadow: 0 14px 36px rgba(1, 44, 90, 0.08);
}

.category-card img {
  position: absolute;
  inset: auto 0 0 auto;
  width: 58%;
  height: 70%;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 16px 24px rgba(6, 17, 31, 0.25));
  pointer-events: none;
}

.category-card__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.5rem;
  max-width: 18rem;
}

.category-card__content p {
  color: var(--steel-700);
  font-size: var(--fs-small);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Lead modal — contextual scenario applications */
.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lead-modal[hidden] {
  display: none !important;
}

.lead-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 17, 31, 0.58);
  backdrop-filter: blur(2px);
}

.lead-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  max-height: min(92vh, 860px);
  overflow: auto;
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface-white);
  box-shadow: 0 28px 64px rgba(6, 17, 31, 0.28);
  overscroll-behavior: contain;
}

.lead-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--steel-700);
}

.lead-modal__head {
  display: grid;
  gap: 0.45rem;
  padding-right: 2.5rem;
  margin-bottom: 1.15rem;
}

.lead-modal__head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

.lead-modal__desc {
  margin: 0;
  color: var(--steel-700);
  font-size: 0.98rem;
  line-height: 1.45;
}

.lead-modal__badge {
  margin: 0.35rem 0 0;
  justify-self: start;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(31, 92, 211, 0.08);
  color: var(--brand-blue);
  font-size: var(--fs-small);
  font-weight: 700;
}

.lead-modal__form {
  display: grid;
  gap: 0.95rem;
}

.lead-modal__fields {
  display: grid;
  gap: 0.85rem;
}

.lead-modal__fields .field--half {
  min-width: 0;
}

@media (min-width: 640px) {
  .lead-modal__dialog {
    padding: 1.75rem 1.6rem 1.5rem;
  }

  .lead-modal__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-modal__fields .field--full {
    grid-column: 1 / -1;
  }
}

.choice-set {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.choice-set label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--surface-cold);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-900);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.choice-set input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-set label:has(input:checked) {
  border-color: var(--brand-blue);
  background: rgba(31, 92, 211, 0.1);
  color: var(--brand-blue);
}

.choice-set label:has(input:focus-visible) {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

.lead-modal__actions {
  display: grid;
  gap: 0.45rem;
}

.lead-modal__aside {
  margin: 0;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line-light);
  font-size: var(--fs-small);
  color: var(--steel-500);
}

.lead-modal__aside a {
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: none;
}

.lead-modal__aside a:hover {
  text-decoration: underline;
}

@media (max-width: 639px) {
  .lead-modal {
    padding: 0;
    align-items: end;
  }

  .lead-modal__dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
}

