/* ==========================================================================
   СофтДевелопмент — базовые стили
   ========================================================================== */

:root {
  --blue-100: #E7EFFE;
  --blue-200: #C7DBFC;
  --blue-300: #60A5FA;
  --blue-400: #3B82F6;
  --blue-500: #2563EB;
  --blue-600: #2056E0;
  --blue-700: #1D4ED8;
  --navy-900: #081235;

  --color-bg: #ffffff;
  --color-bg-alt: #F5F8FF;
  --color-surface: #ffffff;
  --color-border: #E3E9F5;
  --color-text: #0B1530;
  --color-text-muted: #57628A;
  --color-text-soft: #7C88AC;

  --gradient-brand: linear-gradient(135deg, var(--blue-300) 0%, var(--blue-500) 55%, var(--blue-700) 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(96,165,250,0.16) 0%, rgba(37,99,235,0.10) 100%);

  --shadow-sm: 0 1px 2px rgba(8, 18, 53, 0.06);
  --shadow-md: 0 8px 24px rgba(8, 18, 53, 0.08);
  --shadow-lg: 0 20px 45px rgba(8, 18, 53, 0.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --container-width: 1180px;
  --header-height: 84px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, p { margin: 0; }

button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

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

/* ---------- Section scaffolding ---------- */

section { position: relative; }

.section-pad { padding-block: 96px; }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

#why .section-head {
  max-width: 820px;
}

.section-head.center { margin-inline: auto; text-align: center; }

.section-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.section-head p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--color-text-muted);
}

.bg-alt { background: color-mix(in srgb, var(--color-bg-alt) 60%, transparent); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 99, 235, 0.42); }

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover { border-color: var(--blue-400); color: var(--blue-500); transform: translateY(-2px); }

.btn-ghost {
  background: var(--blue-100);
  color: var(--blue-700);
  border: none;
}
.btn-ghost:hover { background: var(--blue-200); }

.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 100;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  z-index: -1;
}

.site-header.scrolled::before {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img { width: 300px; height: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
  position: relative;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
}

.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-menu-close { display: none; }
.site-header.nav-open .nav-toggle .icon-menu-open { display: none; }
.site-header.nav-open .nav-toggle .icon-menu-close { display: block; }


/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-300);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient-brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon svg {
  width: 26px;
  height: 26px;
  color: var(--blue-600);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 14.5px;
  color: var(--color-text-muted);
}

/* ---------- Hero (landing) ---------- */

.hero-first {
  padding-top: calc(var(--header-height) + 48px);
}

/* ---------- Site-wide background ---------- */

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.site-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.network-lines line {
  stroke: var(--blue-400);
  stroke-width: 1.5;
  opacity: 0.1;
}

.network-lines line:nth-child(4),
.network-lines line:nth-child(11),
.network-lines line:nth-child(18) {
  animation: line-pulse 9s ease-in-out infinite;
}

.network-lines line:nth-child(11) { animation-delay: 3s; }
.network-lines line:nth-child(18) { animation-delay: 6s; }

@keyframes line-pulse {
  0%, 90%, 100% { opacity: 0.1; }
  95% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .network-lines line { animation: none; }
}


/* ---------- Stack ---------- */

.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.stack-cascade {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 641px) {
  .stack-cascade { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .stack-cascade { grid-template-columns: repeat(3, 1fr); }
}

.stack-cascade .stack-card {
  height: 100%;
}

.stack-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.stack-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.stack-cert-link {
  display: block;
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stack-cert-link:hover {
  color: var(--blue-600);
}

.stack-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stack-tags li {
  background: var(--gradient-brand-soft);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.stack-sublabel {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-soft);
  margin: 18px 0 10px;
}

.stack-sublabel:first-of-type { margin-top: 14px; }

.stack-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 641px) {
  .stack-checklist { grid-template-columns: repeat(2, 1fr); }
}

.stack-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.stack-checklist li svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--blue-500);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stack-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue-600);
}

.stack-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Why us ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.why-card {
  display: flex;
  gap: 18px;
  padding: 26px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.why-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-icon svg { width: 22px; height: 22px; color: #fff; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.why-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; }
.why-card p { font-size: 14.5px; color: var(--color-text-muted); }

/* ---------- Pricing ---------- */

.pricing-tables {
  display: grid;
  gap: 28px;
}

.price-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.price-card-head {
  padding: 22px 28px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.price-card-head::-webkit-details-marker { display: none; }
.price-card-head::marker { content: ""; }

.price-card-head-text {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.price-card-head-text h3 { font-size: 18px; font-weight: 700; }
.price-card-head-text span { font-size: 13px; color: var(--color-text-soft); }

.price-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue-600);
  white-space: nowrap;
}

.price-toggle .chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.price-toggle .toggle-label-open { display: none; }
details[open] .price-toggle .toggle-label-closed { display: none; }
details[open] .price-toggle .toggle-label-open { display: inline; }
details[open] .price-toggle .chevron { transform: rotate(180deg); }

.price-table-scroll { overflow-x: auto; }

table.price-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14.5px;
  min-width: 560px;
}

.price-table th:nth-child(1), .price-table td:nth-child(1) { width: 58%; }
.price-table th:nth-child(2), .price-table td:nth-child(2) { width: 24%; }
.price-table th:nth-child(3), .price-table td:nth-child(3) { width: 18%; }

.price-table th {
  text-align: left;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-soft);
  font-weight: 600;
  padding: 12px 28px;
  background: var(--color-bg-alt);
}

.price-table td {
  padding: 16px 28px;
  border-top: 1px solid var(--color-border);
  vertical-align: top;
}

.price-table td.price-name { font-weight: 600; color: var(--color-text); }
.price-table td.price-name .price-desc { color: var(--color-text-muted); font-size: 13.5px; font-weight: 400; margin-top: 4px; }
.price-table td.price-value { white-space: nowrap; font-weight: 700; color: var(--blue-600); font-size: 15px; text-align: right; }
.price-table td.price-unit { color: var(--color-text-soft); white-space: nowrap; text-align: center; }
.price-table th:nth-child(2) { text-align: right; }
.price-table th:nth-child(3) { text-align: center; }

.price-disclaimer {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--color-text-soft);
  text-align: center;
}

.price-disclaimer a { text-decoration: underline; text-underline-offset: 2px; }

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

.cta-banner-inline {
  margin-bottom: 40px;
}

.cta-banner-inner {
  position: relative;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  padding: 40px 64px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-banner-inner h2 {
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-banner-inner p { margin-top: 10px; color: rgba(255,255,255,0.85); font-size: 15px; }

.cta-banner-inner .btn {
  flex-shrink: 0;
}

.cta-banner-inner .btn-secondary {
  background: #fff;
  color: var(--blue-700);
  border: none;
}
.cta-banner-inner .btn-secondary:hover { transform: translateY(-2px); background: #F4F8FF; }

.cta-consent {
  position: absolute;
  right: 24px;
  bottom: 10px;
  margin: 0;
  white-space: nowrap;
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(255,255,255,0.55);
  text-align: right;
}

.cta-consent a { color: rgba(255,255,255,0.8); text-decoration: underline; text-underline-offset: 2px; }

.cta-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cta-consent {
  font-size: 11.5px;
  color: rgba(255,255,255,0.65);
  text-align: center;
}

.cta-consent a { color: rgba(255,255,255,0.9); text-decoration: underline; text-underline-offset: 2px; }


/* ---------- Contacts ---------- */

.contacts-grid {
  display: grid;
}

.requisites-body { padding: 0 28px 26px; }

.requisites-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }

.requisites-list div { display: flex; flex-direction: row; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.requisites-list dt { flex-shrink: 0; font-size: 12px; color: var(--color-text-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.requisites-list dt::after { content: ":"; }
.requisites-list dd { margin: 0; font-size: 14.5px; font-weight: 600; }
.requisites-list .full { grid-column: 1 / -1; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.72);
  padding-block: 68px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand img { width: 200px; height: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; font-style: italic; line-height: 1.7; max-width: 200px; color: #fff; }

.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a, .footer-col p { font-size: 14px; color: rgba(255,255,255,0.65); }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

.footer-bottom a { color: rgba(255,255,255,0.65); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile nav ---------- */

@media (max-width: 960px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .main-nav {
    display: flex;
    position: fixed;
    inset: var(--header-height) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    padding: 28px 24px;
    background: var(--color-bg);
    gap: 4px;
    overflow-y: auto;
  }

  .site-header.nav-open .main-nav a {
    padding: 16px 4px;
    border-bottom: 1px solid var(--color-border);
    font-size: 17px;
    color: var(--color-text);
  }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section-pad { padding-block: 64px; }
  .hero-first { padding-top: calc(var(--header-height) + 32px); }
  .services-grid { grid-template-columns: 1fr; }
  .requisites-list { grid-template-columns: 1fr; }
  .cta-banner-inner { flex-direction: column; padding: 40px 28px; text-align: center; }
  .cta-consent { position: static; margin-top: 16px; white-space: normal; text-align: center; }
  .cta-banner-inner .btn { align-self: center; margin-top: 4px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stack-cert-link { white-space: normal; overflow: visible; text-overflow: clip; }

  .service-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 16px;
    row-gap: 4px;
  }

  .service-icon {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
  }

  .service-card h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin-bottom: 0;
  }

  .service-card p {
    grid-column: 2;
    grid-row: 2;
  }
}
