:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  --header: #08080f;
  --page: #0c1320;
  --ink: #f4f7ff;
  --muted: #b3c0d5;
  --accent: #a8cbff;
  --primary: #1f6feb;
  --line: #34475f;
  --panel: #162439;
  --surface: #1b2c43;
  --paper: #edf3fa;
  --paper-line: #cfdbec;
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid #83b4ff; outline-offset: 4px; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.wrap { width: min(1112px, calc(100% - 40px)); margin-inline: auto; }
.section { padding-block: clamp(49px, 7vw, 96px); border-top: 1px solid var(--line); }
[id] { scroll-margin-top: 82px; }

.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #ffffff1a; background: #08080fdf; backdrop-filter: blur(8px); }
.header-inner, .portal-nav, .header-actions { display: flex; align-items: center; }
.header-inner { justify-content: space-between; height: 64px; gap: 18px; }
.logo img { width: 111px; height: auto; }
.portal-nav { gap: 4px; }
.header-actions { gap: 8px; }
.nav-group { position: relative; }
.nav-item, .nav-group summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #ffffff9c;
  font-size: 14px;
  line-height: 20px;
}
.nav-group summary { list-style: none; cursor: pointer; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after {
  width: 6px;
  height: 6px;
  margin-top: -3px;
  transform: rotate(45deg);
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
}
.nav-group[open] summary::after { margin-top: 3px; transform: rotate(225deg); }
.nav-item:hover, .nav-group summary:hover, .nav-links a:hover { color: var(--ink); background: #ffffff12; }
.nav-links { position: absolute; top: calc(100% + 5px); left: 0; width: 246px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--header); box-shadow: 0 12px 24px #0008; }
.nav-links a { display: block; border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.nav-links a[aria-current="page"] { color: var(--accent); }
.language { padding: 4px 8px; border: 1px solid #ffffff1a; border-radius: 8px; color: #ffffffa8; font-family: ui-monospace, monospace; font-size: 12px; }
.language:hover { color: var(--ink); background: #ffffff12; }
.menu-toggle, .mobile-actions { display: none; }

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}
.button-primary { color: #fff; background: var(--primary); }
.button-primary:hover { background: #195cc3; }
.button-outline { border-color: #526a8a; color: #e4edff; }
.button-outline:hover { background: var(--surface); }
.header-cta { min-height: 33px; padding: 5px 11px; font-weight: 550; }
.text-link { display: inline-flex; align-items: baseline; gap: 7px; color: var(--accent); font-size: 14px; font-weight: 550; line-height: 1.45; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 23px; }

.hero { background: radial-gradient(ellipse at 82% 12%, #192f51, #101c30 45%, var(--page) 76%); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .94fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  padding-block: clamp(37px, 6.5vw, 94px);
}
.hero-kicker { margin-bottom: 14px; color: var(--accent); font-size: 15px; font-weight: 650; }
h1 { font-size: clamp(33px, 5.25vw, 70px); font-weight: 700; line-height: 1.01; letter-spacing: -.058em; }
h1 em { display: block; color: var(--accent); font-style: normal; }
.hero-lead { max-width: 45ch; margin-top: 22px; color: #d4e1f5; font-size: 18px; line-height: 1.55; }
.hero-tabs-label { margin-top: 32px; color: var(--muted); font-size: 13px; }
.scenario-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.scenario-tabs button { min-height: 40px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--page); font-size: 14px; cursor: pointer; }
.scenario-tabs button:hover { color: var(--ink); }
.scenario-tabs button[aria-selected="true"] { border-color: #5f84b5; color: var(--accent); background: #203451; }
.hero-tabs { margin-top: 8px; }
.hero-tabs button { border-radius: 99px; font-size: 13px; }

.hero-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  min-height: 518px;
  align-items: flex-end;
  padding: 160px 16px 16px;
  overflow: hidden;
  border: 1px solid #3b5173;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 24px 65px #05091090;
}
.stage-photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 265px; object-fit: cover; object-position: 52% 47%; }
.hero-stage::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #0b152610, #0c1320 62%); content: ""; }
.desk { width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #0c1320ed; box-shadow: 0 12px 28px #05091091; backdrop-filter: blur(4px); }
.desk-top, .desk-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 11px 14px; color: var(--muted); font-size: 13px; }
.desk-top { border-bottom: 1px solid var(--line); }
.desk-name { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 630; }
.agent-mark { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #06132b; background: var(--accent); font-size: 11px; font-weight: 750; }
.desk-panel { display: grid; min-height: 226px; align-content: start; gap: 9px; padding: 12px 14px; }
.channel-demo { min-width: 0; margin: 0; padding: 0; border: 0; }
.channel-demo label { display: inline-block; margin: 0 3px 8px 0; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 12px; cursor: pointer; }
.channel-demo input:checked + label { border-color: #82b8ff; color: var(--ink); background: #294a73; }
.channel-demo input:focus-visible + label { outline: 2px solid #86b7f9; outline-offset: 2px; }
.channel-sample { display: none; gap: 8px; }
#demo-telegram:checked ~ .sample-telegram,
#demo-instagram:checked ~ .sample-instagram,
#demo-site:checked ~ .sample-site { display: grid; }
.message { width: fit-content; max-width: 92%; padding: 8px 10px; border-radius: 9px 9px 9px 3px; background: var(--surface); }
.message.outgoing { justify-self: end; border-radius: 9px 9px 3px 9px; background: #223e60; }
.message span, .desk-details dt { color: var(--muted); font-size: 12px; }
.message p { margin-top: 3px; font-size: 14px; line-height: 1.42; }
.desk-details > div { display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr); gap: 8px; padding-block: 9px; border-bottom: 1px solid var(--line); font-size: 14px; }
.desk-details > div:last-child { border-bottom: 0; }
.desk-details dd, .desk-footer strong { font-weight: 650; }
.desk-footer { border-top: 1px solid var(--line); background: var(--panel); }
.desk-footer strong { color: var(--accent); }
.voice-panel .message { width: 100%; max-width: none; }
.voice-panel audio { width: 100%; height: 36px; }
.voice-result { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 10px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; line-height: 1.4; }
.voice-result strong, .voice-result span { display: block; }
.voice-result span { margin-top: 2px; color: var(--muted); }
.desk-button { min-height: 34px; padding: 4px 8px; border: 0; border-radius: 6px; color: #fff; background: #245ca7; font-size: 13px; font-weight: 650; cursor: pointer; }
.desk-button:hover { background: #306bb9; }

h2 { font-size: clamp(28px, 3.22vw, 39px); font-weight: 690; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
h3 { font-size: 19px; font-weight: 650; line-height: 1.26; letter-spacing: -.018em; }
.section-lead { max-width: 740px; margin-bottom: 27px; }
.section-lead > p { margin-top: 11px; color: var(--muted); font-size: 16px; line-height: 1.54; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 14px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.flow li { position: relative; padding: 13px 7px; color: #e5eeff; font-size: 14px; font-weight: 620; text-align: center; }
.flow li:not(:last-child)::after { position: absolute; right: -5px; color: var(--accent); content: "→"; }
.workflow-grid, .industry-panel, .start-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); gap: 14px; }
.record-example, .module-card, .industry-panel { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.record-example { display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: 1px; padding: 19px; background: radial-gradient(ellipse at top right, #223a5d, var(--panel) 75%); }
.record-example > div { min-width: 0; padding: 13px; background: #0d1726; }
.record-example > div:first-child { border-radius: 8px 0 0 8px; }
.record-example > div:last-child { border-radius: 0 8px 8px 0; }
.record-example h3 { margin-bottom: 10px; color: var(--accent); font-size: 14px; }
.record-example p { margin-top: 5px; font-size: 14px; line-height: 1.48; }
.record-example .record-note { color: var(--muted); font-size: 13px; }
.module-card { padding: 14px; }
.module-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-tabs button { padding-inline: 4px; font-size: 13px; background: transparent; }
.module-panel { padding: 13px 3px 2px; }
.module-panel p, .industry-panel p, .automation-grid ul, .channels p, .faq p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.53; }
.section-actions { margin-top: 16px; }
.industry-tabs { margin-bottom: 14px; }
.industry-panel { gap: 30px; align-items: center; padding: clamp(17px, 3.3vw, 34px); }
.industry-panel h3 { font-size: 23px; }
.industry-panel dl { padding: 1px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--page); }
.industry-panel dl div { display: grid; grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.industry-panel dl div:last-child { border-bottom: 0; }
.industry-panel dt { color: var(--muted); }
.industry-panel dd { font-weight: 600; }

.automation { background: #111d2f; }
.automation-grid, .channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.automation-grid article, .channels article { padding: clamp(15px, 2.5vw, 25px); }
.automation-grid article + article { border-left: 1px solid var(--line); }
.automation-grid ul { display: grid; gap: 13px; padding: 0; list-style: none; }
.automation-grid li { padding-left: 11px; border-left: 1px solid #7694ba; }
.automation-grid .text-link { margin-top: 13px; }
.channels-section { color: #1d314d; background: var(--paper); }
.channels-grid { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: clamp(23px, 5vw, 50px); align-items: center; }
.channels-grid .section-lead { margin-bottom: 0; }
.channels-grid .section-lead > p, .channels p { color: #465f80; }
.channels-grid .text-link { margin-top: 12px; color: #174fa6; }
.channels { border-color: var(--paper-line); background: #f5f8fc; }
.channels article { border-right: 1px solid var(--paper-line); }
.channels article:nth-child(3n) { border-right: 0; }
.channels article:nth-child(n+4) { border-top: 1px solid var(--paper-line); }

.start { background: radial-gradient(ellipse at 15% 25%, #142b49, var(--page) 76%); }
.start-grid { gap: clamp(24px, 5vw, 50px); align-items: start; }
.faq { border-top: 1px solid var(--line); }
.faq details { padding-block: 12px; border-bottom: 1px solid var(--line); }
.faq summary { width: fit-content; font-weight: 620; cursor: pointer; }
.faq summary::marker { color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); background: var(--header); }
.footer { display: grid; grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr)); align-items: start; gap: 23px; padding-block: 28px; color: var(--muted); font-size: 14px; }
.footer > div { display: grid; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.footer strong { color: var(--ink); font-weight: 650; }
.footer a:hover { color: var(--accent); }
.copyright { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid #ffffff1a; font-size: 12px; }

@media (max-width: 1023px) {
  .desktop-action { display: none; }
  .portal-nav { display: none; position: absolute; inset: 64px 0 auto; max-height: calc(100dvh - 65px); overflow: auto; padding: 8px 20px 18px; border-bottom: 1px solid var(--line); background: var(--header); }
  .menu-toggle[aria-expanded="true"] { background: var(--surface); }
  .site-header[data-menu-open] .portal-nav { display: block; }
  .menu-toggle { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--ink); background: transparent; cursor: pointer; }
  .menu-toggle span { width: 15px; height: 2px; border-radius: 1px; background: currentColor; box-shadow: 0 -5px currentColor, 0 5px currentColor; }
  .nav-links { position: static; width: auto; margin-left: 12px; padding: 1px 5px; border: 0; box-shadow: none; }
  .mobile-actions { display: flex; gap: 8px; margin-top: 12px; }
  .mobile-actions > a { flex: 1; }
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; width: min(680px, calc(100% - 40px)); }
  .hero-stage { min-height: 450px; padding-top: 145px; }
  .channels-grid { grid-template-columns: 1fr; }
  .footer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer > .logo { grid-column: 1 / -1; }
}

@media (max-width: 610px) {
  .wrap, .hero-grid { width: calc(100% - 36px); }
  h1 { font-size: clamp(33px, 10vw, 48px); }
  .hero-lead { margin-top: 16px; font-size: 16px; }
  .hero-tabs-label { margin-top: 20px; }
  .actions { gap: 10px 14px; margin-top: 17px; }
  .hero-stage { min-height: 0; padding: 122px 8px 8px; }
  .stage-photo { height: 192px; }
  .desk-panel { min-height: 234px; padding-inline: 10px; }
  .desk-top, .desk-footer { padding-inline: 10px; }
  .flow li { font-size: 12px; }
  .workflow-grid, .industry-panel, .start-grid, .automation-grid { grid-template-columns: 1fr; }
  .industry-panel { gap: 18px; }
  .record-example { padding: 8px; }
  .record-example > div { padding: 9px; }
  .automation-grid article + article { border-top: 1px solid var(--line); border-left: 0; }
  .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channels article:nth-child(n) { border-right: 1px solid var(--paper-line); border-top: 0; }
  .channels article:nth-child(even) { border-right: 0; }
  .channels article:nth-child(n+3) { border-top: 1px solid var(--paper-line); }
  .channels article p { font-size: 14px; }
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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