/* ==========================================================
   IT-ОПОРА — design tokens
   ========================================================== */
:root {
  /* colour */
  --navy-950: #0a1e38;
  --navy-900: #0d2748;
  --navy-800: #14335c;
  --navy-700: #1b4276;
  --ink: #172b4d;
  --ink-muted: #61758b;
  --ink-soft: #4d6278;
  --blue: #238df2;
  --blue-light: #3d9cff;
  --blue-pale: #eaf4fe;
  --sky-bg: #eef6fd;
  --paper: #ffffff;
  --line: #e1e9f2;
  --on-dark: #ffffff;
  --on-dark-muted: #b8cbde;
  --on-dark-soft: #9cb9d5;

  /* type */
  --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* layout */
  --container: 1220px;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-card: 0 1px 2px rgba(13, 39, 72, 0.06), 0 12px 28px -14px rgba(13, 39, 72, 0.18);
}

/* ==========================================================
   Reset
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  z-index: 999;
}

:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

/* ==========================================================
   Type helpers
   ========================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--blue);
  margin: 0 0 12px;
  text-transform: none;
}
.eyebrow-light { color: var(--blue-light); }

h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.18;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h2.light { color: var(--on-dark); }

.section-note {
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 360px;
}

.text-link {
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.text-link:hover { text-decoration: underline; }
.text-link--light { color: var(--on-dark); }

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(35, 141, 242, 0.55);
}
.btn-primary:hover { background: #1b7bd6; transform: translateY(-1px); }
.btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: inherit;
}
.btn-outline:hover { border-color: currentColor; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: var(--blue);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand-tag { font-size: 12px; color: var(--on-dark-soft); }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  color: #dce9f5;
  font-size: 15px;
  font-weight: 500;
}
.main-nav a:hover { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.header-phone { display: flex; flex-direction: column; align-items: flex-end; color: #fff; }
.phone-number { font-weight: 700; font-size: 15px; }
.phone-hours { font-size: 12px; color: var(--on-dark-soft); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; }

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  padding: 72px 0 88px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.hero-title {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 6px 0 22px;
}
.accent-light { color: var(--blue-light); }
.hero-lead {
  color: #d9e6f1;
  font-size: 18px;
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-photo {
  margin: 0;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
  background: var(--navy-800);
}
.hero-photo img { width: 100%; height: 420px; object-fit: cover; }
.hero-photo figcaption {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--on-dark-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================
   Section head
   ========================================================== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 48px;
}
.section-head--dark { align-items: flex-end; }

/* ==========================================================
   Services
   ========================================================== */
.services { padding: 96px 0; background: var(--paper); }
.card-grid { display: grid; gap: 24px; }
.services-grid { grid-template-columns: repeat(3, 1fr); }

.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-s);
  background: var(--blue-pale);
  font-size: 22px;
}
.service-card h3 { font-size: 21px; font-weight: 700; color: var(--ink); }
.service-card > p { color: var(--ink-muted); font-size: 15px; line-height: 1.55; }
.check-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.check-list li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
}
.service-card .text-link { margin-top: auto; }

/* ==========================================================
   Advantages
   ========================================================== */
.advantages { padding: 96px 0; background: var(--sky-bg); }
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.advantage { display: flex; align-items: flex-start; gap: 14px; }
.check-badge {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.advantage h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.advantage p { font-size: 13.5px; color: var(--ink-muted); line-height: 1.5; }

/* ==========================================================
   Technologies
   ========================================================== */
.technologies { padding: 96px 0 64px; background: var(--paper); }
.tech-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 40px;
}
.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.tech-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.tech-list .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

/* ==========================================================
   Cases
   ========================================================== */
.cases { padding: 96px 0; background: var(--navy-900); }
.cases-grid { grid-template-columns: repeat(3, 1fr); }
.case-card {
  background: var(--paper);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.case-card img { width: 100%; height: 190px; object-fit: cover; }
.case-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.case-body h3 { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.case-result { font-size: 13px; color: var(--ink-muted); }
.case-body .text-link { align-self: flex-start; }
.cases-disclaimer {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--on-dark-soft);
}

/* ==========================================================
   CTA
   ========================================================== */
.cta { padding: 56px 0; background: var(--sky-bg); }
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-text { display: flex; align-items: flex-start; gap: 16px; max-width: 560px; }
.check-badge--lg { width: 44px; height: 44px; font-size: 20px; }
.cta-text h2 { font-size: 22px; margin-bottom: 4px; }
.cta-text p { color: var(--ink-muted); font-size: 15px; }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer { background: var(--navy-900); color: #fff; padding-top: 56px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: #dce9f5; font-size: 14px; }
.footer-nav a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.footer-phone { font-weight: 700; font-size: 14px; color: #fff; }
.footer-hours, .footer-email { font-size: 12.5px; color: var(--on-dark-soft); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px 26px;
  font-size: 12px;
  color: #7f9ab4;
}

/* ==========================================================
   Modal
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 56, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
/* [hidden] must win over the display:flex above — without this rule the
   modal stays visible on load and ignores the `hidden` attribute entirely */
.modal-overlay[hidden] {
  display: none;
}
.modal {
  position: relative;
  background: #fff;
  border-radius: var(--radius-l);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px 30px;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.4);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--sky-bg);
  font-size: 18px;
  color: var(--ink-muted);
}
.modal h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.modal-sub { color: var(--ink-muted); font-size: 14px; margin-bottom: 22px; }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.modal-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.modal-form input,
.modal-form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  resize: vertical;
}
.modal-form input:focus,
.modal-form textarea:focus { border-color: var(--blue); }
.modal-fineprint { font-size: 11.5px; color: var(--ink-muted); text-align: center; margin-top: -4px; }

.modal-step--success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.modal-step--success .check-badge--lg { margin-bottom: 4px; }
.modal-step--success p { color: var(--ink-muted); margin-bottom: 12px; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1080px) {
  .services-grid,
  .advantages-grid,
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .advantage:nth-child(4) { grid-column: 1; }
}

@media (max-width: 900px) {
  .main-nav, .header-phone { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-900);
    padding: 8px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .main-nav.is-open ul { flex-direction: column; gap: 4px; }
  .main-nav.is-open a { display: block; padding: 12px 0; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-photo img { height: 280px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 680px) {
  .services-grid,
  .advantages-grid,
  .cases-grid { grid-template-columns: 1fr; }
  .advantage:nth-child(4) { grid-column: auto; }
  .header-inner { padding-top: 12px; padding-bottom: 12px; }
  .hero { padding: 44px 0 56px; }
  .services, .advantages, .technologies, .cases { padding: 64px 0; }
  .footer-inner { flex-direction: column; }
  .footer-contact { align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
