:root {
  --background: #f5f7f8;
  --foreground: #16202a;
  --muted: #5b6773;
  --line: rgba(22, 32, 42, 0.14);
  --blue: #0a7fd5;
  --blue-dark: #07568f;
  --teal: #17b7b1;
  --white: #ffffff;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

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

button,
input,
textarea {
  font: inherit;
}

input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.heroImage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.heroOverlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 18, 31, 0.86) 0%, rgba(4, 18, 31, 0.58) 34%, rgba(4, 18, 31, 0.16) 66%, rgba(4, 18, 31, 0.04) 100%),
    linear-gradient(180deg, rgba(4, 18, 31, 0.22), rgba(4, 18, 31, 0.52));
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  font-size: 18px;
  font-weight: 800;
}

.navLinks {
  display: flex;
  gap: 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
}

.navLinks a:hover {
  color: var(--white);
}

.heroContent {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 12vh 0 18vh;
}

.heroPanel {
  max-width: 720px;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 21px;
  line-height: 1.52;
}

.heroFacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.heroFacts span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(4, 18, 31, 0.38);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.primaryButton,
.secondaryButton,
.form button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
}

.primaryButton {
  background: var(--teal);
  color: #06272c;
  padding: 0 24px;
}

.secondaryButton {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: var(--white);
  padding: 0 22px;
  backdrop-filter: blur(12px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(1180px, calc(100% - 40px));
  margin: -72px auto 0;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 70px rgba(15, 37, 58, 0.18);
}

.metric {
  min-height: 144px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
}

.metric strong {
  display: block;
  color: var(--blue-dark);
  font-size: 42px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.section,
.process,
.discussion {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 112px 0 86px;
}

.sectionIntro {
  display: grid;
  grid-template-columns: 0.65fr 1fr;
  gap: 44px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(31px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
}

.featureGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 46px;
}

.feature {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.feature span {
  color: var(--blue);
  font-weight: 900;
}

.feature p {
  margin: 70px 0 0;
  color: #273442;
  font-size: 18px;
  line-height: 1.42;
}

.useCases {
  border-top: 1px solid var(--line);
}

.useCaseGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 46px;
}

.useCaseGrid article {
  height: 100%;
  min-height: 260px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.useCaseGrid span { color: var(--blue); font-weight: 900; }
.useCaseGrid h3 { margin: 38px 0 10px; font-size: 22px; }
.useCaseGrid p { margin: 0; color: var(--muted); line-height: 1.5; }
.useCaseGrid b { display: block; margin-top: 18px; color: var(--blue-dark); }
.useCaseLink article { border-color: rgba(10, 127, 213, 0.4); }
.useCaseLink:hover article { box-shadow: 0 16px 42px rgba(15, 37, 58, 0.1); }

.process {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 56px;
  padding: 76px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps,
.pricingPanel {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.steps {
  counter-reset: step;
  list-style: none;
}

.steps li {
  position: relative;
  min-height: 88px;
  padding: 22px 24px 22px 74px;
  border-radius: 8px;
  background: #eaf2f5;
  color: #273442;
  line-height: 1.45;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 22px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
}

.pricingPanel article {
  min-height: 118px;
  border-radius: 8px;
  background: #eaf2f5;
  padding: 22px 24px;
}

.pricingPanel article > span {
  display: block;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricingPanel strong {
  display: block;
  margin-top: 8px;
  color: #152738;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.05;
}

.pricingPanel p {
  margin: 12px 0 0;
  color: #3d4b59;
  line-height: 1.5;
}

.salaryCalculator {
  border: 1px solid rgba(10, 127, 213, 0.18);
  background: #ffffff;
  box-shadow: 0 18px 58px rgba(15, 37, 58, 0.1);
}

.calculatorControls {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.calculatorControls label,
.calculatorControls legend {
  display: grid;
  gap: 8px;
  color: #273442;
  font-weight: 800;
}

.calculatorControls fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.calculatorControls legend {
  margin: 0 0 10px;
}

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

.optionGrid label {
  cursor: pointer;
}

.optionGrid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.optionGrid span {
  display: grid;
  gap: 6px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
  color: #273442;
  padding: 12px 14px;
  text-transform: none;
}

.optionGrid b {
  color: var(--blue-dark);
  font-size: 17px;
}

.optionGrid input:checked + span {
  border-color: var(--blue);
  background: rgba(10, 127, 213, 0.1);
  box-shadow: 0 0 0 4px rgba(10, 127, 213, 0.1);
}

.optionGrid input:focus-visible + span {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 127, 213, 0.16);
}

.switchField {
  grid-template-columns: 22px 1fr;
  align-items: start;
}

.switchField input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.calculatorBreakdown {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.calculatorBreakdown div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 8px;
  background: #eef5f8;
  padding: 12px 14px;
}

.calculatorBreakdown span {
  color: #50606f;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
}

.calculatorBreakdown b {
  color: #152738;
  font-size: 16px;
  white-space: nowrap;
}

.discussion {
  padding: 64px 0 88px;
}

.contactFallback {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contactFallback summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}

.contactFallback summary::-webkit-details-marker {
  display: none;
}

.contactFallback summary > span:first-child {
  display: grid;
  gap: 7px;
}

.contactFallback summary .eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.contactFallback summary strong {
  font-size: 18px;
}

.summaryAction {
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.contactFallback[open] .summaryAction {
  font-size: 0;
}

.contactFallback[open] .summaryAction::after {
  content: "Скрыть форму";
  font-size: 14px;
}

.contactFallback .form {
  width: min(680px, 100%);
  margin: 4px 0 28px auto;
  box-shadow: none;
  border: 1px solid var(--line);
}

.discussionCopy p:not(.eyebrow) {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}

.topicList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.topicList span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 10px 14px;
  color: #273442;
  font-size: 14px;
}

.form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 60px rgba(15, 37, 58, 0.11);
}

.form label {
  display: grid;
  gap: 8px;
  color: #273442;
  font-weight: 800;
}

.form input,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
  color: var(--foreground);
  padding: 15px 16px;
  outline: none;
}

.form textarea {
  resize: vertical;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 127, 213, 0.12);
}

.form button {
  border: 0;
  background: var(--blue-dark);
  color: var(--white);
  cursor: pointer;
}

.form button:hover {
  background: #064a7b;
}

.formStatus {
  margin: 0;
  border-radius: 8px;
  background: rgba(23, 183, 177, 0.12);
  color: #0f5957;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.42;
}

.aiChatSection {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 24px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.aiChatSection .sectionIntro {
  display: block;
  width: auto;
}

.aiChatSection .sectionIntro > p:not(.eyebrow) {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.agentCapabilities {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.agentCapabilities li {
  position: relative;
  padding-left: 22px;
  color: #273442;
  font-weight: 700;
}

.agentCapabilities li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

.aiChat {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 18px 60px rgba(15, 37, 58, 0.1);
}

.aiChatMessages {
  min-height: 320px;
  max-height: 480px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f7fafc;
}

.aiMessage {
  max-width: 84%;
  padding: 12px 15px;
  border-radius: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.aiMessage.assistant {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
}

.aiMessage.user {
  align-self: flex-end;
  background: var(--blue-dark);
  color: var(--white);
}

.aiMessage.pending {
  color: var(--muted);
}

.aiMessage.error {
  color: #8a2727;
  border-color: rgba(138, 39, 39, 0.25);
}

.aiChatForm {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.aiChatForm textarea {
  resize: vertical;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.aiChatForm button {
  align-self: stretch;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  background: var(--blue-dark);
  color: var(--white);
  cursor: pointer;
}

.aiChatNotice {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 13px;
}

.documentToolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 12px;
}

.documentToolbar button,
.projectDocuments button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue-dark);
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 800;
}

.documentToolbar span,
.projectDocuments span {
  color: var(--muted);
  font-size: 13px;
}

.projectDocuments {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 18px 12px;
  list-style: none;
}

.projectDocuments li {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: #f4f8fa;
  padding: 9px 12px;
}

.projectDocuments strong { overflow-wrap: anywhere; }
.projectDocuments button { margin-left: auto; padding: 5px 9px; }

.visuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 880px) {
  .nav {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  .navLinks {
    gap: 16px;
    flex-wrap: wrap;
  }

  .hero {
    min-height: 880px;
  }

  .heroOverlay {
    background:
      linear-gradient(180deg, rgba(4, 18, 31, 0.94) 0%, rgba(4, 18, 31, 0.78) 56%, rgba(4, 18, 31, 0.42) 100%),
      linear-gradient(90deg, rgba(4, 18, 31, 0.82), rgba(4, 18, 31, 0.24));
  }

  .heroContent {
    padding: 58px 0 170px;
  }

  .lead {
    font-size: 18px;
  }

  .metrics,
  .featureGrid,
  .useCaseGrid,
  .sectionIntro,
  .process,
  .discussion {
    grid-template-columns: 1fr;
  }

  .contactFallback summary {
    align-items: flex-start;
  }

  .aiChatSection {
    grid-template-columns: 1fr;
  }

  .metrics {
    margin-top: -42px;
  }

  .feature p {
    margin-top: 34px;
  }

  .section {
    padding-top: 76px;
  }
}

@media (max-width: 560px) {
  .nav,
  .heroContent,
  .metrics,
  .section,
  .process,
  .discussion {
    width: min(100% - 28px, 1180px);
  }

  .aiChatSection {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    min-height: 820px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .actions,
  .primaryButton,
  .secondaryButton {
    width: 100%;
  }

  .metric,
  .form {
    padding: 22px;
  }

  .featureGrid {
    gap: 12px;
  }

  .useCaseGrid { grid-template-columns: 1fr; }

  .optionGrid {
    grid-template-columns: 1fr;
  }

  .feature {
    min-height: 180px;
  }

  .process,
  .discussion {
    padding: 62px 0;
  }

  .aiChatForm {
    grid-template-columns: 1fr;
  }

  .aiChatForm button {
    min-height: 48px;
  }
}
