:root {
  --ink: #11151a;
  --ink-2: #171d23;
  --ink-3: #202832;
  --paper: #f1eadc;
  --paper-2: #fff7e8;
  --muted: #aab4bc;
  --line: #36424d;
  --amber: #e7b75f;
  --green: #8fca81;
  --cyan: #6ac8c8;
  --coral: #e5786d;
  --white: #f7f3ea;
  --ink-on-paper: #15191f;
  --muted-on-paper: #53606a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Якоря не должны прятаться под фиксированной шапкой. */
section[id] {
  scroll-margin-top: 96px;
}

/* ---------- Шапка ---------- */

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 21, 26, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--ink-on-paper);
  background: var(--amber);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

nav a:hover,
.text-link:hover {
  color: var(--amber);
}

.header-cta {
  justify-self: end;
  padding: 10px 16px;
  border: 1px solid rgba(231, 183, 95, 0.5);
  border-radius: 6px;
  color: var(--amber);
  font-weight: 600;
  font-size: 14px;
}

.header-cta:hover {
  background: rgba(231, 183, 95, 0.12);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: 140px clamp(20px, 6vw, 88px) 80px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 78% 28%, rgba(106, 200, 200, 0.18), transparent 27%),
    radial-gradient(circle at 22% 74%, rgba(231, 183, 95, 0.14), transparent 28%),
    linear-gradient(130deg, #11151a 0%, #15191f 48%, #0f1419 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  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: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 92%);
}

.hero-content {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(40px, 5.4vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

.hero-copy {
  max-width: 640px;
  color: #d5d9dc;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--ink-on-paper);
  background: var(--amber);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.button.full {
  width: 100%;
  cursor: pointer;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 44px 0 0;
}

.hero-metrics div {
  min-width: 170px;
  flex: 1 1 170px;
  max-width: 240px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-metrics dt {
  color: var(--green);
  font-size: 32px;
  font-weight: 700;
}

.hero-metrics dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

/* Диаграмма справа: обычный поток, перекрытия с текстом невозможны.
   Ниже 1100px скрывается целиком — вместе с линией-«позвоночником». */
.hero-map {
  position: relative;
  display: none;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  flex-direction: column;
  gap: 20px;
  padding-left: 44px;
}

.hero-map::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 20px;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(231, 183, 95, 0.05),
    rgba(231, 183, 95, 0.55) 30%,
    rgba(106, 200, 200, 0.55) 62%,
    rgba(143, 202, 129, 0.65)
  );
}

.hero-map::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(231, 183, 95, 0.9);
  animation: spine-pulse 6s ease-in-out infinite;
}

.vault-node,
.storage-rack {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(23, 29, 35, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.vault-node {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
}

.vault-node span {
  font-size: 18px;
  font-weight: 700;
}

.vault-node small {
  color: var(--muted);
  font-size: 13px;
}

.vault-node.y360 {
  margin-right: 72px;
}

.vault-node.cloud {
  margin-left: 40px;
  border-color: rgba(231, 183, 95, 0.42);
}

.vault-node.agent {
  margin-right: 40px;
  border-color: rgba(106, 200, 200, 0.42);
}

.storage-rack {
  margin-left: 72px;
  padding: 20px 22px;
  border-color: rgba(143, 202, 129, 0.42);
}

.rack-label {
  display: block;
  margin-bottom: 14px;
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
}

.storage-rack i {
  display: block;
  height: 14px;
  margin-top: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(143, 202, 129, 0.3), rgba(143, 202, 129, 0.08));
}

/* ---------- Секции ---------- */

section:not(.hero) {
  padding: 96px clamp(20px, 6vw, 88px);
}

.section-heading {
  margin-bottom: 48px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 5.2vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: pretty;
}

h3 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.pain-grid,
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pain-grid article,
.plan,
.arch-node {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-2);
}

.pain-grid article {
  padding: 28px;
}

.pain-grid span,
.steps span {
  display: block;
  margin-bottom: 30px;
  color: var(--amber);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pain-grid p,
.steps p,
.plan li,
.security-list {
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Архитектура ---------- */

.architecture {
  background: var(--paper);
  color: var(--ink-on-paper);
}

.architecture .eyebrow {
  color: #8a5d18;
}

.architecture-board {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 44px minmax(150px, 1fr) 44px minmax(150px, 1fr) 44px minmax(150px, 1fr);
  align-items: center;
  gap: 12px;
}

.arch-node {
  min-height: 168px;
  padding: 24px;
  background: #fff8eb;
  border-color: #d4c8b5;
}

.arch-node b {
  display: block;
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.2;
}

.arch-node span {
  color: var(--muted-on-paper);
  font-size: 15px;
  line-height: 1.45;
}

.arch-arrow {
  height: 2px;
  background: var(--amber);
  position: relative;
}

.arch-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  border-left: 10px solid var(--amber);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* ---------- Шаги ---------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 0;
  margin: 0;
}

.steps li {
  border-top: 2px solid var(--line);
  padding-top: 22px;
}

.steps strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 700;
}

/* ---------- Безопасность ---------- */

.security {
  background: #0f1318;
}

.security-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(300px, 0.95fr);
  gap: 42px;
  align-items: start;
}

.security-copy {
  color: #c8cdd2;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
}

.text-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--amber);
  font-weight: 600;
}

.security-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.security-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.security-list li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 14px;
  background: var(--green);
  border-radius: 50%;
}

/* ---------- Тарифы ---------- */

.plans {
  background: var(--ink);
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 28px;
}

.plan.featured {
  background: var(--paper);
  color: var(--ink-on-paper);
  border-color: #d4c8b5;
}

.plan-label {
  margin-bottom: 10px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan.featured .plan-label {
  color: #8a5d18;
}

.plan h3 {
  margin-bottom: 0;
}

.plan ul {
  display: grid;
  gap: 11px;
  padding-left: 18px;
  margin: 22px 0 28px;
}

.plan.featured li {
  color: #4c4536;
}

.plan .button {
  margin-top: auto;
}

/* ---------- Контакт ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: 52px;
  background: var(--paper);
  color: var(--ink-on-paper);
}

.contact .eyebrow {
  color: #8a5d18;
}

.contact p {
  max-width: 660px;
  color: var(--muted-on-paper);
  font-size: 18px;
  line-height: 1.55;
}

.contact h2 {
  margin-bottom: 18px;
}

.lead-form {
  position: relative;
  padding: 26px;
  border: 1px solid #d2c6b3;
  border-radius: 8px;
  background: #fff8eb;
}

.lead-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: #39424b;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cabda9;
  border-radius: 6px;
  padding: 0 13px;
  background: #fbf2e2;
  color: var(--ink-on-paper);
  font-family: inherit;
  /* 16px, иначе iOS зумит страницу при фокусе на поле. */
  font-size: 16px;
  font-weight: 400;
}

textarea {
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(231, 183, 95, 0.75);
  outline-offset: 2px;
}

.label-hint {
  color: #7c8590;
  font-weight: 400;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.lead-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form-status {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.form-status.success {
  background: #e4f2e2;
  border: 1px solid #a9cfa4;
  color: #2c5a2a;
}

.form-status.error {
  background: #f7e3de;
  border: 1px solid #d9a99e;
  color: #7c3323;
}

.form-status a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.form-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: #78828d;
}

/* ---------- Подвал ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding: 34px clamp(20px, 6vw, 88px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer span {
  color: var(--white);
  font-weight: 700;
}

/* ---------- Анимация ---------- */

@keyframes spine-pulse {
  0% {
    transform: translateY(0);
    background: var(--amber);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  55% {
    background: var(--cyan);
  }
  88% {
    opacity: 1;
  }
  100% {
    transform: translateY(430px);
    background: var(--green);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-map::after {
    animation: none;
    opacity: 0;
  }

  .button:hover {
    transform: none;
  }
}

/* ---------- Брейкпоинты ---------- */

@media (min-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr);
  }

  .hero-map {
    display: flex;
  }
}

@media (max-width: 1080px) {
  .architecture-board {
    grid-template-columns: 1fr;
  }

  .arch-arrow {
    width: 2px;
    height: 34px;
    margin-left: 26px;
  }

  .arch-arrow::after {
    right: -5px;
    top: auto;
    bottom: -1px;
    border-top: 10px solid var(--amber);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 0;
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  nav {
    display: none;
  }

  .hero {
    padding-top: 122px;
  }

  .security-layout,
  .contact {
    grid-template-columns: 1fr;
  }

  .pain-grid,
  .plan-grid,
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 14px 18px;
  }

  .header-cta {
    display: none;
  }

  section:not(.hero) {
    padding: 72px 20px;
  }

  .hero {
    padding-bottom: 64px;
  }

  .hero-metrics div {
    max-width: none;
  }
}
