/* =========================================================
   TRI-IT — базовые стили
   ========================================================= */

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

  --accent-1: #22d3ee;
  --accent-2: #6366f1;
  --accent-grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --ok: #22c55e;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;

  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .35);
  --container: 1180px;

  color-scheme: dark;
}

/* ---------- тёмная тема (по умолчанию) ---------- */
:root,
:root[data-theme="dark"] {
  --bg: #0a0e13;
  --bg-soft: #0e141b;
  --surface: #121922;
  --surface-2: #161f2b;
  --border: #22303f;
  --text: #e7edf3;
  --text-dim: #94a3b3;
  --header-bg: rgba(10, 14, 19, .72);
}

/* ---------- светлая тема ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fa;
  --bg-soft: #eef2f6;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --border: #e1e7ee;
  --text: #10161e;
  --text-dim: #566274;
  --header-bg: rgba(244, 247, 250, .78);
  --shadow: 0 20px 50px -22px rgba(20, 30, 50, .25);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f7fa;
    --bg-soft: #eef2f6;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border: #e1e7ee;
    --text: #10161e;
    --text-dim: #566274;
    --header-bg: rgba(244, 247, 250, .78);
    --shadow: 0 20px 50px -22px rgba(20, 30, 50, .25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent-grad);
  border-radius: 2px;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }
p { line-height: 1.65; color: var(--text-dim); margin: 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head p { margin-top: 14px; font-size: 17px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

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

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

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent-grad);
  color: #05070a;
}
.btn-primary:hover { box-shadow: 0 12px 30px -10px rgba(99, 102, 241, .55); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent-1); color: var(--accent-1); }

.btn-block { width: 100%; }

/* ---------- header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.logo img { width: 30px; height: 30px; }
.logo .dot { color: var(--accent-1); }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
}
.nav a:hover { color: var(--text); }

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

.theme-toggle {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
}
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.burger span, .burger::before, .burger::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease, top .2s ease;
}
.burger::before { top: 15px; }
.burger span { top: 20px; }
.burger::after { top: 25px; }
.burger.open::before { top: 20px; transform: rotate(45deg); }
.burger.open::after { top: 20px; transform: rotate(-45deg); }
.burger.open span { opacity: 0; }

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 74px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav.open { max-height: 420px; }
  .nav a { padding: 16px 24px; border-bottom: 1px solid var(--border); }
  .burger { display: block; }
}

/* ---------- hero ---------- */
.hero {
  padding: 168px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -220px; right: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(34,211,238,.25), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -260px; left: -200px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(99,102,241,.22), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); letter-spacing: -.02em; }
.hero .accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead { font-size: 18px; margin-top: 22px; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 40px;
  margin-top: 64px;
}
.hero-stats .num { font-size: 30px; font-weight: 800; }
.hero-stats .num span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .lbl { font-size: 13.5px; color: var(--text-dim); margin-top: 4px; }
@media (max-width: 560px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* ---------- карточки услуг ---------- */
.grid-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .grid-services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-services { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 30px 26px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-1);
  box-shadow: var(--shadow);
}
.card .icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--accent-grad);
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; stroke: #05070a; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 14.5px; }

.card.card-highlight {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border-color: var(--accent-2);
  position: relative;
}
.card.card-highlight::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--accent-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .5;
  pointer-events: none;
}

/* ---------- преимущества ---------- */
.grid-why {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .grid-why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-why { grid-template-columns: 1fr; } }

.why-item { padding: 4px; }
.why-item .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.why-item .icon svg { width: 22px; height: 22px; stroke: var(--accent-1); }
.why-item h3 { font-size: 17px; margin-bottom: 8px; }
.why-item p { font-size: 14.5px; }

/* ---------- процесс ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  counter-reset: step;
}
@media (max-width: 980px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

.process-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 24px 20px;
  position: relative;
}
.process-item .step-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-1);
  margin-bottom: 12px;
  letter-spacing: .04em;
}
.process-item h3 { font-size: 16.5px; margin-bottom: 8px; }
.process-item p { font-size: 13.5px; }

/* ---------- о нас ---------- */
.about-wrap {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) { .about-wrap { grid-template-columns: 1fr; gap: 36px; } }

.about-text p { font-size: 16px; margin-bottom: 16px; }
.about-list { display: grid; gap: 12px; margin-top: 26px; }
.about-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--text);
}
.about-list li svg { width: 18px; height: 18px; stroke: var(--ok); flex-shrink: 0; margin-top: 2px; }

.about-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 34px;
  display: grid;
  gap: 22px;
}
.about-panel .row { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.about-panel .row:last-child { border-bottom: none; padding-bottom: 0; }
.about-panel .row .val { font-size: 26px; font-weight: 800; }
.about-panel .row .val span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-panel .row .lbl { font-size: 14px; color: var(--text-dim); text-align: right; max-width: 55%; }

/* ---------- контакты ---------- */
.contacts-wrap {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 40px;
}
@media (max-width: 900px) { .contacts-wrap { grid-template-columns: 1fr; } }

.contact-info { display: grid; gap: 18px; align-content: start; }
.contact-info .item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 20px 22px;
  display: flex; align-items: center; gap: 14px;
}
.contact-info .item .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.contact-info .item .icon svg { width: 20px; height: 20px; stroke: var(--accent-1); }
.contact-info .item .lbl { font-size: 12.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.contact-info .item .val { font-size: 15.5px; font-weight: 600; margin-top: 2px; }
.contact-info .item a.val:hover { color: var(--accent-1); }

.social-row { display: flex; gap: 10px; margin-top: 4px; }
.social-row a {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
}
.social-row a:hover { border-color: var(--accent-1); }
.social-row svg { width: 20px; height: 20px; stroke: var(--text); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 34px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-dim); }
.field input, .field textarea, .field select {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 13px 14px;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--text);
  resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent-1);
}
.form-note { font-size: 12.5px; color: var(--text-dim); margin-top: 14px; }
.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-s);
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .35);
  color: var(--ok);
  font-size: 14px;
}
.form-success.show { display: flex; }
.form-success svg { width: 18px; height: 18px; stroke: var(--ok); flex-shrink: 0; }

/* ---------- CTA полоса ---------- */
.cta-strip {
  border-radius: var(--radius-l);
  padding: 56px;
  background: linear-gradient(120deg, rgba(34,211,238,.14), rgba(99,102,241,.14));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-strip h2 { font-size: 28px; max-width: 480px; }
.cta-strip p { margin-top: 10px; }

/* ---------- footer ---------- */
.footer { padding: 60px 0 30px; border-top: 1px solid var(--border); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 44px;
}
@media (max-width: 900px) { .footer-top { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

.footer-brand p { margin-top: 14px; font-size: 14px; max-width: 280px; }
.footer h4 { font-size: 14px; margin-bottom: 16px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { font-size: 14.5px; color: var(--text-dim); }
.footer ul a:hover { color: var(--accent-1); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- утилиты / анимации появления ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

::selection { background: var(--accent-2); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent-1); color: #05070a;
  padding: 10px 16px; border-radius: 8px; z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }
