/* OfficeSentinel AI Terminal — site styles. Dark Fluent look, matching the application. */

:root {
  color-scheme: dark;
  --bg: #1b1b1b;
  --surface: #242424;
  --card: #2b2b2b;
  --card-2: #313131;
  --border: #383838;
  --border-2: #3d3d3d;
  --text: #f5f5f5;
  --text-2: #cfcfcf;
  --text-3: #a3a3a3;
  --accent: #0b6fd1;
  --accent-2: #6cb8ff;
  --accent-soft: #1f3346;
  --danger: #c42b1c;
  --ok: #16c60c;
  --warn: #f3c792;
  --lim: #e74856;
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, "JetBrains Mono", ui-monospace, Menlo, monospace;
  --container: 1120px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

code, kbd, pre { font-family: var(--mono); }
code {
  background: #1e1e1e;
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 0.08em 0.4em;
  font-size: 0.92em;
  color: var(--text);
}
kbd {
  background: #1e1e1e;
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.05em 0.45em;
  font-size: 0.88em;
}
pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
@media (min-width: 720px) { :root { --gutter: 24px; } }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(27, 27, 27, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand span small { display: block; font-weight: 400; color: var(--text-3); font-size: 0.75rem; line-height: 1; margin-top: 2px; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.site-nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.site-nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--card);
  border: 1px solid var(--border-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 42px; height: 38px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: currentColor; margin: 3px auto; border-radius: 2px;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-nav .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #1a7fe3; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { background: var(--card); border-color: #4a4a4a; }
.btn--lg { min-height: 48px; padding: 0 24px; font-size: 1.05rem; }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 760px; margin-bottom: 36px; }
.eyebrow {
  display: inline-block;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.lead { font-size: 1.2rem; color: var(--text-2); }
.muted { color: var(--text-3); }
.small { font-size: 0.9rem; }

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

.hero {
  padding: 56px 0 48px;
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(11, 111, 209, 0.25), transparent 60%),
    radial-gradient(600px 300px at 90% 10%, rgba(108, 184, 255, 0.10), transparent 60%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero { padding: 80px 0 72px; }
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
}
.hero h1 { margin-bottom: 18px; }
.hero .lead { font-size: 1.25rem; margin-bottom: 26px; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero__note { color: var(--text-3); font-size: 0.92rem; }
.hero__note b { color: var(--text-2); font-weight: 600; }

/* ---------- Terminal mock ---------- */

.term {
  background: #0c0c0c;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  font-size: 0.86rem;
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #1f1f1f;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.8rem;
}
.term__dots { display: inline-flex; gap: 6px; }
.term__dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3a; display: inline-block; }
.term__tabs {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  background: #171717;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.term__tabs::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #242424;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 0.8rem;
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip--active { background: var(--accent-soft); color: #fff; border-color: #2d4a66; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot--ok { background: var(--ok); }
.dot--unread { background: var(--lim); }
.tag {
  font-style: normal;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: #333;
  color: var(--text-2);
  line-height: 1.5;
}
.tag--wait { background: #3a2f12; color: var(--warn); }
.tag--lim { background: #4a1a1a; color: #ff8a8a; font-weight: 700; }
.tag--ok { background: #16361a; color: #8be68e; }

.term__body {
  padding: 14px 16px 16px;
  color: #cccccc;
  line-height: 1.55;
  font-size: 0.86rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.term__body .p { font-weight: 700; }
.p--me { color: #6cb8ff; }
.p--backend { color: #8be68e; }
.p--reviewer { color: #f3c792; }
.p--server { color: #d6a7ff; }
.p--frontend { color: #61d6d6; }
.term__body .out { color: #8f8f8f; }
.term__body .hl { color: #f5f5f5; }
.term__body .ok { color: #8be68e; }
.term__body .err { color: #ff8a8a; }
.term__caption { padding: 8px 16px 12px; color: var(--text-3); font-size: 0.78rem; border-top: 1px solid var(--border); background: #111; font-family: var(--font); }

/* Inline (in-content) terminal blocks */
.term--inline { box-shadow: none; margin: 20px 0; }

/* ---------- Cards and grids ---------- */

.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card h3 { margin: 0; }
.card p { color: var(--text-2); }
.card--link { color: inherit; transition: border-color 0.15s, transform 0.15s; }
.card--link:hover { border-color: var(--accent-2); text-decoration: none; transform: translateY(-2px); }
.card__more { margin-top: auto; color: var(--accent-2); font-weight: 600; font-size: 0.95rem; }
.card__icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-2);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.card--pain { border-left: 3px solid var(--danger); }
.card--pain h3 { font-size: 1.1rem; }

/* Pillars */
.pillars { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { padding: 24px; border-radius: var(--radius); background: linear-gradient(180deg, #2b2b2b, #262626); border: 1px solid var(--border); }
.pillar .num { font-family: var(--mono); color: var(--accent-2); font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; display: block; }
.pillar h3 { font-size: 1.3rem; }
.pillar p { color: var(--text-2); }

/* Two audiences */
.audience { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .audience { grid-template-columns: 1fr 1fr; } }
.audience__col { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.audience__col h3 { font-size: 1.35rem; margin-bottom: 14px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; color: var(--text-2); }
.checks li::before {
  content: "";
  position: absolute; left: 0; top: 0.42em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid #2d4a66;
}
.checks li::after {
  content: "";
  position: absolute; left: 5px; top: calc(0.42em + 3px);
  width: 5px; height: 8px;
  border: solid var(--accent-2); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checks li b { color: var(--text); font-weight: 600; }

/* ---------- Comparison table ---------- */

.cmp { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cmp th, .cmp td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.cmp tr:last-child td { border-bottom: 0; }
.cmp th { background: var(--card-2); color: var(--text); font-weight: 600; font-size: 0.95rem; }
.cmp td:first-child { color: var(--text); font-weight: 600; width: 22%; }
.cmp td.old { color: var(--text-3); }
.cmp td.new { color: var(--text); background: rgba(11, 111, 209, 0.07); }
.cmp td.sav { color: var(--accent-2); font-weight: 600; width: 18%; }
.cmp td.sav small { display: block; color: var(--text-3); font-weight: 400; font-size: 0.82rem; }
@media (max-width: 720px) {
  .cmp thead { display: none; }
  .cmp, .cmp tbody, .cmp tr, .cmp td { display: block; width: 100%; }
  .cmp td { border-bottom: 0; padding: 10px 16px; }
  .cmp td:first-child { padding-top: 16px; width: auto; }
  .cmp td:last-child { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
  .cmp td.old::before { content: "Обычный терминал: "; color: var(--text-3); font-weight: 600; }
  .cmp td.new::before { content: "OfficeSentinel AI Terminal: "; color: var(--accent-2); font-weight: 600; }
  .cmp td.sav::before { content: "Меньше токенов: "; color: var(--text-3); font-weight: 600; }
  .cmp td.sav { width: auto; }
}

/* ---------- Steps ---------- */

.steps { display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700;
  margin-bottom: 12px;
}
.step h3 { font-size: 1.15rem; }
.step p { color: var(--text-2); }

/* ---------- Trust ---------- */

.trust { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust__item { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.trust__item strong { display: block; font-size: 1.5rem; color: var(--text); margin-bottom: 4px; font-weight: 700; letter-spacing: -0.01em; }
.trust__item span { color: var(--text-2); font-size: 0.95rem; }

/* ---------- Headline stat ---------- */

.headline-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 24px;
  align-items: center;
  margin: 0 0 28px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(11, 111, 209, 0.22), rgba(11, 111, 209, 0.06));
  border: 1px solid #2d4a66;
}
.headline-stat strong {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.headline-stat p { margin: 0; font-size: 1.1rem; color: var(--text); }
.headline-stat p small { display: block; color: var(--text-3); font-size: 0.88rem; margin-top: 4px; }
@media (max-width: 560px) { .headline-stat { grid-template-columns: 1fr; gap: 8px; } }

.hero__stat {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  max-width: 560px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(11, 111, 209, 0.12);
  border: 1px solid #2d4a66;
  color: var(--text-2);
  font-size: 0.95rem;
}
.hero__stat b { font-size: 1.6rem; line-height: 1; color: var(--accent-2); font-weight: 700; white-space: nowrap; }
.hero__stat span { flex: 1; }
.hero__stat a { white-space: nowrap; }

/* ---------- Legal pages ---------- */
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.05rem; }
.legal .lang-switch { display: flex; gap: 8px; margin: 0 0 20px; }
.legal .lang-switch a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--text-2); font-size: 0.9rem; }
.legal .lang-switch a:hover { background: var(--card); text-decoration: none; }

/* ---------- Requirements ---------- */

.req { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.req li { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.req li:last-child { border-bottom: 0; }
.req li b { color: var(--text); font-weight: 600; }
@media (max-width: 560px) { .req li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Screenshot placeholder ---------- */

.shot {
  margin: 24px 0;
  border: 1px dashed #4a4a4a;
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, #222 0 12px, #262626 12px 24px);
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-3);
  padding: 20px;
}
.shot figcaption { font-size: 0.95rem; }
.shot figcaption b { display: block; color: var(--text-2); font-weight: 600; margin-bottom: 4px; }
.shot img { border-radius: var(--radius); }
.shot--real { border: 1px solid var(--border-2); background: none; aspect-ratio: auto; padding: 0; display: block; }
.shot--real figcaption { padding: 10px 14px; text-align: left; }

/* ---------- Feature pages ---------- */

.subnav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav .container { display: flex; gap: 6px; }
.subnav a {
  white-space: nowrap;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
}
.subnav a:hover { background: var(--card); text-decoration: none; color: var(--text); }
.subnav a.is-active { background: var(--accent-soft); color: #fff; border-color: #2d4a66; }

.page-hero { padding: 56px 0 36px; }
.page-hero .container { max-width: 820px; }
.page-hero .lead { font-size: 1.22rem; }

.prose { max-width: 820px; }
.prose h2 { margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--text-2); }
.prose li { margin-bottom: 0.4em; }
.prose li b, .prose p b { color: var(--text); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.97rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; background: var(--card-2); }
.prose td { color: var(--text-2); }
.prose td code { white-space: nowrap; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  color: var(--text);
  margin: 20px 0;
}
.callout--warn { border-left-color: var(--warn); background: #3a2a17; }

.how { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 8px 0 8px; }
@media (min-width: 860px) { .how { grid-template-columns: 1fr 1fr; } }
.how__item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.how__item h3 { font-size: 1.1rem; margin: 0 0 6px; }
.how__item p { color: var(--text-2); font-size: 0.98rem; }
.how__item ul { padding-left: 1.2em; color: var(--text-2); font-size: 0.97rem; margin: 6px 0 0; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; vertical-align: middle; }
.pill--lim { background: #4a1a1a; color: #ff8a8a; }
.pill--wait { background: #3a2f12; color: var(--warn); }
.pill--ok { background: #16361a; color: #8be68e; }
.pill--ps { background: #333; color: var(--text-2); }

.next { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .next { grid-template-columns: 1fr 1fr; } }

/* Progress bar demo (TZ page) */
.progress { margin: 18px 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.progress__title { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; margin-bottom: 10px; }
.progress__title span:last-child { color: var(--text-3); font-weight: 400; font-size: 0.9rem; }
.progress__bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #3a3a3a; }
.progress__bar i { display: block; height: 100%; }
.progress__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 0.86rem; color: var(--text-2); }
.progress__legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0 28px; color: var(--text-3); font-size: 0.92rem; }
.site-footer .container { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .site-footer .container { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { color: var(--text-2); margin-bottom: 10px; font-size: 0.95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text-2); }
.site-footer .brand { margin-bottom: 10px; }
.site-footer .copy { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.notfound h1 { font-size: 4rem; color: var(--accent-2); margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card--link, .btn { transition: none; }
}
