/* ============================================================
   МетДиджитал — сайт-визитка
   ============================================================ */

:root {
  --navy: #0c2233;
  --navy-2: #12314a;
  --ink: #17262f;
  --muted: #5b6b78;
  --primary: #1465a8;
  --primary-dark: #0e4c86;
  --accent: #1fb4c5;
  --accent-soft: #e2f5f7;
  --bg: #f5f8fa;
  --card: #ffffff;
  --line: #e2eaf0;
  --ok: #148f5b;
  --ok-soft: #e2f5ec;
  --dev: #c07a11;
  --dev-soft: #fdf1dc;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(12, 34, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(12, 34, 51, 0.16);
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.center { text-align: center; }

.section { padding: 88px 0; }
[id] { scroll-margin-top: 84px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 10px;
}
.eyebrow.center::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 10px;
}

.section-lead {
  max-width: 640px;
  margin: 0 auto 48px;
  color: var(--muted);
  font-size: 1.06rem;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn-sm { padding: 9px 18px; border-radius: 8px; }

/* ---------- Плашки статусов ---------- */
.pill {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.ok  { background: var(--ok-soft); color: var(--ok); }
.pill.dev { background: var(--dev-soft); color: var(--dev); }

.ico { width: 20px; height: 20px; flex: none; }

/* ============================================================
   Шапка
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(12, 34, 51, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
}
.brand-mark {
  width: 34px;
  height: 34px;
  padding: 5px;
  box-sizing: content-box;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
}
.brand-mark path:first-child { stroke: #fff; }
.brand-mark path:nth-child(2),
.brand-mark circle { stroke: var(--accent); }
.brand-name { font-size: 1.18rem; font-weight: 400; letter-spacing: -0.01em; }
.brand-name strong { font-weight: 800; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav > a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.site-nav > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  transition: right 0.25s;
}
.site-nav > a:not(.btn):hover::after { right: 0; }
.site-nav .nav-cta { margin-left: 6px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(31, 180, 197, 0.18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 90px);
  mask-image: radial-gradient(800px 500px at 30% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(800px 500px at 30% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
  padding: 92px 0 96px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cdeef2;
  background: rgba(31, 180, 197, 0.14);
  border: 1px solid rgba(31, 180, 197, 0.35);
  border-radius: 999px;
  padding: 7px 16px;
  margin: 0 0 26px;
}
.hero-badge .ico { width: 15px; height: 15px; color: var(--accent); }

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 540px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 46px;
}

.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 0;
  padding: 26px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.hero-stats span { font-size: 0.86rem; color: rgba(255, 255, 255, 0.66); }

/* Мок-окно в hero */
.hero-art { position: relative; }
.mock-window {
  position: relative;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  background: #eef3f7;
  border-bottom: 1px solid var(--line);
}
.mock-titlebar .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d3dde5;
}
.mock-titlebar .dot:first-child { background: var(--accent); }
.mock-title {
  margin-left: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.mock-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.mock-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f4f8;
}
.mock-list li:last-child { border-bottom: none; }
.mock-list li .ico {
  width: 26px; height: 26px;
  color: var(--primary);
  stroke-width: 3;
}
.mock-list li .pill { margin-left: auto; }

.mock-scale {
  height: 14px;
  background:
    repeating-linear-gradient(to right,
      rgba(20, 101, 168, 0.45) 0 1.5px, transparent 1.5px 14px,
      rgba(20, 101, 168, 0.45) 14px 16.5px, transparent 16.5px 28px) left center / 100% 8px no-repeat;
  margin: 4px 22px 16px;
  opacity: 0.55;
}

/* ============================================================
   О компании
   ============================================================ */
.about { background: var(--card); }
.about-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}
.about-copy p { color: var(--muted); }
.about-copy h2 { margin-bottom: 18px; }

.check-list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 600;
  color: var(--ink);
}
.check-list .ico {
  margin-top: 4px;
  color: var(--ok);
  width: 19px;
  height: 19px;
}

/* ============================================================
   Продукты
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.product-icon svg { width: 34px; height: 34px; }

.product-card .pill { align-self: flex-start; margin-bottom: 14px; }
.product-card h3 { margin-bottom: 10px; }
.product-card p { font-size: 0.92rem; color: var(--muted); margin-bottom: 14px; flex-grow: 1; }

.product-note {
  font-size: 0.78rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary) !important;
  margin: 0 !important;
}
.product-card.is-dev { border-style: dashed; }
.product-card.is-dev .product-icon { background: var(--dev-soft); color: var(--dev); }
.product-card.is-dev .product-note { color: var(--dev) !important; }

/* ============================================================
   Как это работает
   ============================================================ */
.how { background: var(--navy); color: #fff; }
.how .eyebrow { color: var(--accent); }
.how .section-lead { color: rgba(255, 255, 255, 0.72); }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 0 56px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 34px 28px 28px;
}
.step-num {
  position: absolute;
  top: -18px;
  left: 24px;
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  background: var(--accent);
  border-radius: 9px;
  padding: 7px 14px;
  letter-spacing: 0.04em;
}
.step-card h3 { margin: 10px 0 8px; }
.step-card p {
  margin: 0;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.75);
}

.screens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.screens figure {
  margin: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.screens figure:hover { transform: translateY(-4px); border-color: rgba(31, 180, 197, 0.5); }
.screens a { display: block; }
.screens img { width: 100%; height: auto; }
.screens figcaption {
  padding: 14px 20px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================
   Контакты
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 28px;
  text-align: center;
}
.contact-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}
.contact-icon .ico { width: 24px; height: 24px; }
.contact-card h3 { font-size: 1rem; margin-bottom: 6px; }
.contact-card p { margin: 0; color: var(--muted); font-weight: 500; }
.contact-card a { text-decoration: none; font-weight: 600; }

.requisites {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0;
}

/* ============================================================
   Подвал
   ============================================================ */
.site-footer {
  background: #eef2f5;
  border-top: 1px solid var(--line);
  padding: 52px 0 40px;
  text-align: center;
}
.fsi-logo {
  height: 64px;
  width: auto;
  margin: 0 auto 24px;
}
.grant-note {
  max-width: 820px;
  margin: 0 auto 18px;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--muted);
}
.copyright {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

/* ============================================================
   Анимации появления
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .product-card, .screens figure { transition: none; }
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; padding: 72px 0 80px; }
  .hero-art { max-width: 520px; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 820px) {
  .section { padding: 64px 0; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(12, 34, 51, 0.12);
    display: none;
    padding: 8px 24px 18px;
  }
  .site-nav.open { display: flex; }
  .site-nav > a:not(.btn) {
    padding: 14px 2px;
    border-bottom: 1px solid #f0f4f8;
    font-size: 1rem;
  }
  .site-nav > a:not(.btn)::after { display: none; }
  .site-nav .nav-cta {
    margin: 16px 0 0;
    text-align: center;
  }

  .about-inner { grid-template-columns: 1fr; gap: 36px; }
  .about-media { max-width: 420px; }
  .screens { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .product-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .mock-list li { padding: 13px 16px; font-size: 0.88rem; }
  .fsi-logo { height: 52px; }
}
