/* ===== Кодекс Лабс — стили ===== */
:root {
  --ink: #1C1E26;
  --ink-2: #262933;
  --ink-3: #343846;
  --blue: #0A5DFF;
  --blue-2: #3B7CFF;
  --blue-dim: rgba(10, 93, 255, 0.14);
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --text: #1C1E26;
  --muted: #5B6072;
  --muted-light: #9BA1B3;
  --line: #E4E7EE;
  --line-dark: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 20px; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.accent { color: var(--blue); }

/* ===== Brand ===== */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 40px; height: auto; flex: none; }
.brand__word { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.brand__word img { height: auto; }
.brand__word-1 { width: 118px; }
.brand__word-2 { width: 84px; }
.brand--light .brand__word-1, .header.is-dark .brand__word-1, .header.menu-open .brand__word-1 { filter: brightness(0) invert(1); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 10px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
  white-space: nowrap;
}
.btn--sm { padding: 10px 18px; font-size: 15px; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px -8px rgba(10, 93, 255, 0.6); }
.btn--primary:hover { background: var(--blue-2); transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(10, 93, 255, 0.7); }
.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.08); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 248, 250, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.header.is-dark { background: rgba(28, 30, 38, 0.72); border-color: var(--line-dark); color: #fff; }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.nav { display: flex; align-items: center; gap: 32px; font-weight: 500; font-size: 15px; }
.nav a:not(.btn) { position: relative; opacity: .8; transition: opacity .2s; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:not(.btn):hover { opacity: 1; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav__cta { margin-left: 8px; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; flex-direction: column; justify-content: center; gap: 5px; }
.burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 80% -10%, #1F2A4A 0%, var(--ink) 55%);
  padding: 72px 0 80px;
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 100%);
}
.hero__glow {
  position: absolute; width: 700px; height: 700px; right: -180px; top: -220px;
  background: radial-gradient(circle, rgba(10, 93, 255, 0.45) 0%, rgba(10, 93, 255, 0) 65%);
  filter: blur(20px);
}
.hero__chevron {
  position: absolute; width: 520px; right: -60px; top: 50%; transform: translateY(-50%) rotate(-8deg);
  opacity: .10; filter: drop-shadow(0 30px 60px rgba(10, 93, 255, 0.5));
  animation: floatY 9s ease-in-out infinite;
}
@keyframes floatY { 0%, 100% { transform: translateY(-50%) rotate(-8deg); } 50% { transform: translateY(-46%) rotate(-6deg); } }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.6fr 1fr; align-items: end; gap: 48px; }
.hero__side { padding-bottom: 6px; }
.hero__title { font-size: clamp(34px, 4vw, 52px); font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.hero__lead { font-size: clamp(16px, 1.3vw, 18px); color: rgba(255, 255, 255, 0.72); max-width: 480px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.eyebrow--dark { color: var(--muted); }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-dim); }

/* ===== Sections ===== */
.section { padding: 112px 0; }
.section--dark { background: var(--ink); color: #fff; }
.section__head { max-width: 720px; margin-bottom: 56px; }
.section__head h2 { margin-top: 16px; }
.section__lead { margin-top: 18px; color: var(--muted); font-size: 18px; }
.section__lead--light { color: rgba(255, 255, 255, 0.7); }

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

/* ===== Cards ===== */
.card {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue);
  transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(28, 30, 38, 0.35); border-color: transparent; }
.card:hover::before { transform: scaleY(1); }
.card__icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--blue-dim); color: var(--blue);
  display: grid; place-items: center; margin-bottom: 22px;
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.about__head h2 { margin-top: 16px; }
.about__facts { display: grid; gap: 0; margin-top: 36px; border-top: 1px solid var(--line-dark); }
.about__facts li { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-size: 14px; color: rgba(255, 255, 255, 0.55); }
.about__facts span { font-weight: 600; font-size: 16px; color: #fff; }
.about__body { display: grid; gap: 22px; padding-top: 52px; }
.about__body p { color: rgba(255, 255, 255, 0.72); font-size: 17px; }
.about__body p:first-child { color: #fff; font-size: clamp(20px, 2vw, 24px); font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.about__body p:first-child::before { content: ""; display: block; width: 56px; height: 3px; background: var(--blue); margin-bottom: 22px; }
/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px 28px; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(28, 30, 38, 0.35); }
.step__num { font-family: var(--mono); font-size: 13px; color: var(--blue); letter-spacing: 0.1em; }
.step h3 { margin: 14px 0 10px; font-size: 19px; }
.step p { color: var(--muted); font-size: 15px; }
.step:not(:last-child)::after {
  content: ""; position: absolute; right: -14px; top: 44px; width: 8px; height: 8px;
  border-top: 2px solid var(--muted-light); border-right: 2px solid var(--muted-light); transform: rotate(45deg);
}

/* ===== Contacts ===== */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contacts__main h2 { margin-top: 16px; }
.contacts__links { display: grid; gap: 12px; margin-top: 40px; }
.contact-link {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line-dark);
  transition: border-color .25s, transform .25s var(--ease);
}
.contact-link:hover { border-color: var(--blue); transform: translateX(4px); }
.contact-link__label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, 0.5); }
.contact-link__value { font-weight: 600; font-size: 17px; }

.requisites { background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 32px; }
.requisites h3 { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line-dark); }
.requisites__list { display: grid; gap: 14px; }
.requisites__list div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; font-size: 15px; }
.requisites__list dt { color: rgba(255, 255, 255, 0.5); }
.requisites__list dd { margin: 0; color: #fff; }

/* ===== Footer ===== */
.footer { background: #14161C; color: rgba(255, 255, 255, 0.6); padding: 40px 0; border-top: 1px solid var(--line-dark); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__copy { font-size: 14px; }
.footer__nav { display: flex; gap: 24px; font-size: 14px; }
.footer__nav a:hover { color: #fff; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.grid .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: .08s; }
.grid .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: .16s; }
.grid .reveal:nth-child(4), .steps .reveal:nth-child(4) { transition-delay: .24s; }
.grid .reveal:nth-child(5) { transition-delay: .32s; }
.grid .reveal:nth-child(6) { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__chevron { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2)::after { display: none; }
  .about, .contacts { grid-template-columns: 1fr; gap: 40px; }
  .about__body { padding-top: 0; }
  .hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .hero__chevron { width: 380px; right: -120px; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .hero { padding: 88px 0 72px; }
  @media (max-width: 600px) {
  .grid--3, .steps { grid-template-columns: 1fr; }
  .step::after { display: none !important; }
  .requisites { padding: 24px 20px; }
  .requisites__list div { grid-template-columns: 1fr; gap: 2px; }
  .contact-link { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hero__chevron { width: 380px; right: -160px; opacity: .12; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ===== Legal page ===== */
.legal { padding: 72px 0 112px; }
.legal__inner { max-width: 800px; }
.legal h1 { font-size: clamp(28px, 4.5vw, 48px); margin: 16px 0 12px; overflow-wrap: anywhere; hyphens: auto; }
.legal__meta { color: var(--muted); font-size: 15px; margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.legal h2 { font-size: 22px; margin: 40px 0 14px; }
.legal p { margin-bottom: 12px; color: #2E3140; }
.legal ul { list-style: disc; padding-left: 24px; margin-bottom: 14px; }
.legal li { margin-bottom: 6px; color: #2E3140; }
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal__contacts { margin-top: 12px; padding: 20px 24px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.legal__contacts p { margin-bottom: 4px; }
