/* ==========================================================================
   {НАЗВАНИЕ_КОМПАНИИ} — стили
   Палитра: тёмно-синие тона, акцент — холодный бирюзовый, тёплый янтарь на CTA
   ========================================================================== */

:root {
  --navy-950: #050B1A;
  --navy-900: #071127;
  --navy-800: #0B1A3B;
  --navy-700: #12285A;
  --navy-600: #1E3A78;
  --ink: #EAF0FF;
  --ink-muted: #A3B1D1;
  --line: rgba(163, 177, 209, 0.16);
  --accent: #5CD8FF;
  --accent-deep: #2AA7D6;
  --amber: #F5B84A;
  --amber-deep: #D99A26;

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-0: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --fs-1: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --fs-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
  --fs-3: clamp(2.4rem, 1.6rem + 3.2vw, 4.4rem);

  --container: 1180px;
  --radius: 14px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--navy-900);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(30,58,120,.55), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(18,40,90,.6), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .6em; color: #fff; }
h1 { font-size: var(--fs-3); }
h2 { font-size: var(--fs-2); }
h3 { font-size: var(--fs-1); }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head p { color: var(--ink-muted); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; background: var(--amber); color: var(--navy-950);
  padding: .6rem 1rem; border-radius: 8px; font-weight: 700; z-index: 100; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.6rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--amber); color: var(--navy-950);
  box-shadow: 0 10px 30px -10px rgba(245,184,74,.6);
}
.btn-primary:hover { background: #ffc964; transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(245,184,74,.75); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,17,39,.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-color: var(--line); background: rgba(7,17,39,.9); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }

.logo { display: inline-flex; align-items: center; gap: .65rem; color: #fff; font-weight: 800; letter-spacing: -0.01em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: conic-gradient(from 210deg, var(--accent), var(--navy-600) 55%, var(--amber));
  box-shadow: inset 0 0 0 2px var(--navy-900);
}
.logo-text { font-size: 1.1rem; }

.main-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.nav-list a { color: var(--ink-muted); font-weight: 600; font-size: .95rem; position: relative; }
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px;
  background: var(--accent); transition: right .3s var(--ease);
}
.nav-list a:hover, .nav-list a.is-active { color: #fff; text-decoration: none; }
.nav-list a:hover::after, .nav-list a.is-active::after { right: 0; }

.header-phone { color: #fff; font-weight: 700; white-space: nowrap; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(4rem, 9vw, 8rem) clamp(3rem, 7vw, 6rem); overflow: hidden; isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-kicker { color: var(--accent); font-weight: 700; margin-bottom: 1rem; }
.hero-lead { font-size: var(--fs-1); color: var(--ink-muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, auto); gap: 2.5rem; margin: 3rem 0 0; padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.hero-stats > div { display: flex; flex-direction: column-reverse; position: relative; }
.hero-stats dt { color: var(--ink-muted); font-size: .9rem; }
.hero-stats dd { margin: 0; font-size: 2.2rem; font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1; }
.stat-suffix { position: absolute; left: 3.2ch; bottom: 1.5rem; font-size: 1.2rem; font-weight: 800; color: var(--accent); }

.hero-figure {
  margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden;
  transform: rotate(-2deg);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px var(--line);
  animation: hero-in 1.1s var(--ease) both;
}
.hero-figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 55%, rgba(7,17,39,.55));
  pointer-events: none;
}
.hero-figure img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-content > * { animation: rise .9s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: .08s; }
.hero-content > :nth-child(3) { animation-delay: .16s; }
.hero-content > :nth-child(4) { animation-delay: .24s; }
.hero-content > :nth-child(5) { animation-delay: .32s; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hero-in { from { opacity: 0; transform: rotate(-6deg) translateY(30px) scale(.96); } to { opacity: 1; transform: rotate(-2deg); } }

/* ---------- About ---------- */
.about { background: linear-gradient(180deg, transparent, rgba(11,26,59,.55) 30%, rgba(11,26,59,.55) 70%, transparent); }
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about-text p { color: var(--ink-muted); max-width: 66ch; }
.about-text p:first-of-type { color: var(--ink); font-size: 1.08rem; }

figure.about-figure, figure.advantages-figure { margin: 0; }
.about-figure img, .advantages-figure img {
  border-radius: var(--radius-lg); object-fit: cover; width: 100%;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.7), 0 0 0 1px var(--line);
}
.about-figure img { aspect-ratio: 9/11; }
.advantages-figure img { aspect-ratio: 4/3; }
figcaption { margin-top: .8rem; font-size: .88rem; color: var(--ink-muted); padding-left: .9rem; border-left: 2px solid var(--accent); }

/* ---------- Services ---------- */
.services-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.service {
  position: relative; padding: 1.8rem 1.6rem 1.6rem; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30,58,120,.35), rgba(11,26,59,.5));
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .35s;
  overflow: hidden;
}
.service::before {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(92,216,255,.28), transparent 70%);
  transition: transform .5s var(--ease); transform: scale(.6);
}
.service:hover { transform: translateY(-6px); border-color: rgba(92,216,255,.45); }
.service:hover::before { transform: scale(1); }
.service-icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 1.2rem; }
.service h3 { font-size: 1.15rem; }
.service p { color: var(--ink-muted); font-size: .95rem; }
.service-link { font-weight: 700; font-size: .92rem; }

/* ---------- Advantages ---------- */
.advantages-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.advantages-figure { order: -1; }
.advantages-text > p { color: var(--ink-muted); }
.advantage-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.advantage-list li {
  padding: 1rem 1.2rem 1rem 1.4rem; border-left: 3px solid var(--navy-600); color: var(--ink-muted);
  background: rgba(11,26,59,.45); border-radius: 0 var(--radius) var(--radius) 0;
  transition: border-color .3s, background .3s;
}
.advantage-list li:hover { border-color: var(--amber); background: rgba(18,40,90,.6); }
.advantage-list strong { display: block; color: #fff; margin-bottom: .2rem; }

/* ---------- Process ---------- */
.process { background: linear-gradient(180deg, transparent, rgba(11,26,59,.55) 30%, rgba(11,26,59,.55) 70%, transparent); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 26px; left: 5%; right: 5%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .5;
}
.step { counter-increment: step; position: relative; padding-top: 4.2rem; }
.step::before {
  content: counter(step);
  position: absolute; top: 0; left: 0; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: var(--navy-950);
  background: var(--accent); box-shadow: 0 0 0 8px var(--navy-900), 0 0 0 9px var(--line);
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-muted); font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq-inner { max-width: 820px; }
.faq-list { display: grid; gap: .75rem; margin-top: 2rem; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(11,26,59,.45); overflow: hidden; transition: border-color .3s; }
.faq-item[open] { border-color: rgba(92,216,255,.45); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.1rem 3.2rem 1.1rem 1.4rem; font-weight: 700; color: #fff; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 1.4rem; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item p { margin: 0; padding: 0 1.4rem 1.2rem; color: var(--ink-muted); }
.faq-item .faq-body { overflow: hidden; }

/* ---------- Contacts ---------- */
.contacts { position: relative; }
.contacts-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2rem, 4vw, 3.5rem); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800) 60%, var(--navy-900));
  border: 1px solid var(--line);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.8);
}
.contacts-text > p { color: var(--ink-muted); }
.contacts-info { font-style: normal; margin-top: 1.5rem; color: var(--ink-muted); }
.contacts-info a { color: #fff; font-weight: 700; font-size: 1.1rem; }

.contact-form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .9rem; color: var(--ink-muted); font-weight: 600; }
.field input, .field textarea {
  font: inherit; color: #fff; padding: .85rem 1rem; border-radius: 10px;
  background: rgba(5,11,26,.6); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(92,216,255,.18); }
.field input.is-invalid { border-color: #ff7a7a; }
.form-note { font-size: .82rem; color: var(--ink-muted); margin: 0; }
.form-status { min-height: 1.4em; margin: 0; font-weight: 600; color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: 3rem; background: var(--navy-950); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-brand p, .footer-contacts p { color: var(--ink-muted); font-size: .92rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-nav a, .footer-contacts a { color: var(--ink-muted); display: block; }
.footer-nav a:hover, .footer-contacts a:hover { color: #fff; }
.footer-contacts { display: grid; gap: .4rem; align-content: start; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.2rem; font-size: .82rem; color: var(--ink-muted); }

.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy-700); color: #fff; border: 1px solid var(--line);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s; z-index: 40;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { text-decoration: none; background: var(--navy-600); }

/* ---------- Scroll reveal (управляется script.js) ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-list, .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { transform: none; max-width: 640px; }
  @keyframes hero-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
  .about-grid, .advantages-grid, .contacts-grid { grid-template-columns: 1fr; }
  .advantages-figure { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .header-phone { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: .5rem; cursor: pointer;
  }
  .nav-toggle span { width: 24px; height: 2px; background: #fff; transition: transform .3s, opacity .3s; }
  .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); }
  .nav-list {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--navy-950); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .4s var(--ease);
  }
  .nav-list.is-open { max-height: 420px; }
  .nav-list li a { display: block; padding: .9rem 1.25rem; }
  .nav-list a::after { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .services-list, .steps, .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-canvas { display: none; }
}
