:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #2d2d2d;
  --muted: #5a5a5a;
  --primary: #e68a40;
  --primary-dark: #c9742e;
  --primary-light: rgba(230, 138, 64, 0.12);
  --accent: #5a5a5a;
  --border: #e2e8f0;
  --shadow: 0 12px 40px rgba(45, 45, 45, 0.08);
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --header-h: 72px;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

main {
  min-width: 0;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary);
}

.container {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 0.75rem 1rem;
}

.logo {
  flex-shrink: 0;
  display: block;
  text-decoration: none;
  line-height: 0;
}

.logo__img {
  width: auto;
  height: clamp(44px, 10vw, 56px);
  max-width: min(200px, 55vw);
  object-fit: contain;
  object-position: left center;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.25rem;
  align-items: center;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  font-weight: 500;
  padding: 0.35rem 0;
}

.nav a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, var(--primary-light), transparent),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(90, 90, 90, 0.06), transparent),
    var(--bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2rem);
  align-items: start;
}

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

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__lead {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--muted);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(230, 138, 64, 0.3);
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero__cards {
  display: grid;
  gap: 1rem;
}

@media (min-width: 600px) and (max-width: 899px) {
  .hero__cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.25rem);
  box-shadow: var(--shadow);
}

.mini-card h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
}

.mini-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Sections */
.section {
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
}

.section--alt {
  background: var(--surface);
}

.section--compliance {
  background: #f0f2f5;
  overflow-x: clip;
}

.section__title {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 4vw, 2rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section__lead {
  margin: 0 0 1.5rem;
  max-width: 70ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  }
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.5rem);
}

.section--alt .card {
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card__badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
}

.card__list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.card__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
}

@media (min-width: 480px) {
  .card__links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2rem);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }
}

.services-grid h3 {
  margin-top: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.15rem);
}

.services-grid ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

/* Compliance */
.container--compliance {
  min-width: 0;
  max-width: 100%;
}

.compliance-note {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 2.5vw, 0.95rem);
  overflow-wrap: break-word;
  word-break: break-word;
}

.compliance-grid {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.compliance-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.compliance-block p,
.compliance-block li,
.compliance-block dd {
  overflow-wrap: break-word;
  word-break: break-word;
}

.link-break {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.compliance-block h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 2.5vw, 1.15rem);
  color: var(--primary-dark);
}

.compliance-block h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: clamp(0.95rem, 2.5vw, 1rem);
}

.compliance-block ul {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.dl-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 0;
  margin: 0;
}

@media (min-width: 560px) {
  .dl-table {
    grid-template-columns: minmax(120px, 200px) 1fr;
    gap: 0.5rem 1.5rem;
  }
}

.dl-table dt {
  margin: 0.75rem 0 0;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}

.dl-table dt:first-child {
  margin-top: 0;
}

@media (min-width: 560px) {
  .dl-table dt {
    margin-top: 0;
  }
}

.dl-table dd {
  margin: 0 0 0.5rem;
}

@media (min-width: 560px) {
  .dl-table dd {
    margin: 0;
  }
}

.table-wrap {
  max-width: 100%;
  width: 100%;
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  margin: 0;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.data-table th {
  background: var(--surface);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

/* Мобильный вид таблиц: карточки без горизонтальной прокрутки */
@media (max-width: 767px) {
  .table-wrap:has(.data-table--stack) {
    overflow-x: visible;
    border: 0;
    background: transparent;
    margin-inline: 0;
  }

  .data-table--stack {
    table-layout: auto;
  }

  .data-table--stack thead {
    display: none;
  }

  .data-table--stack tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    padding: 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  .data-table--stack tbody tr:last-child {
    margin-bottom: 0;
  }

  .data-table--stack tbody td {
    display: block;
    padding: 0.45rem 0;
    border: 0;
    border-bottom: 1px solid var(--border);
  }

  .data-table--stack tbody td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .data-table--stack tbody td:first-child {
    padding-top: 0;
  }

  .data-table--stack tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
  }
}

@media (min-width: 768px) {
  .table-wrap {
    overflow-x: auto;
  }

  #it-codes .data-table--stack th:first-child,
  #it-codes .data-table--stack td:first-child {
    width: 4.5rem;
  }
}

/* Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2rem);
}

@media (min-width: 560px) {
  .contacts-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Footer */
.footer {
  padding: clamp(1.25rem, 4vw, 1.5rem) 0 clamp(1.5rem, 4vw, 2rem);
  background: #3d3d3d;
  color: #e2e8f0;
}

.footer a {
  color: #f1f5f9;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}

.footer p {
  margin: 0;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .footer__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
  }
}

.footer__nav a {
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer__nav a:hover {
  color: #fff;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0.75rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 8px;
  }

  .nav a:hover {
    background: var(--primary-light);
  }

  :root {
    --header-h: 64px;
  }
}

@media (max-width: 380px) {
  .nav a {
    font-size: 0.85rem;
  }
}
