/* The public site of АІ-простір: one stylesheet for the landing (both languages), the privacy page and the door of the app.
   No inline styles anywhere: the pages are served with `style-src 'self'` (deploy/edge/Caddyfile).
   A browser keeps this file for a while by its own guess: when the pages' markup comes to depend on a change here, raise
   the «?v=N» in the pages' links to site.css and site.js (and in web/index.html). */
@font-face { font-family: "Onest"; src: url("/fonts/Onest.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;      /* the browser's own parts follow the theme: scrollbars, checkboxes, time fields */
  --bg: #ffffff; --bg2: #f3f6fa; --ink: #13202f; --mute: #556274; --line: #dde4ee;
  --brand: #184878; --brand2: #2a6cb0; --on-brand: #ffffff; --chip: #e6eef8;
  --glow: rgba(42, 108, 176, .16); --card: #ffffff; --me: #184878; --on-me: #ffffff; --ok: #1f8a5b;
  --shadow: 0 1px 2px rgba(19, 32, 47, .05), 0 12px 32px rgba(19, 32, 47, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f141b; --bg2: #141b25; --ink: #e8edf4; --mute: #9aa8b8; --line: #263142;
    --brand: #5b9bdc; --brand2: #8bbcf0; --on-brand: #0f141b; --chip: #1c2735;
    --glow: rgba(91, 155, 220, .18); --card: #161d27; --me: #2a6cb0; --on-me: #ffffff; --ok: #5cc998;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; scrollbar-color: color-mix(in srgb, var(--mute) 50%, transparent) transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 "Onest", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand2); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--brand2); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--bg); padding: 8px 12px; border-radius: 8px; }

/* --- header ---------------------------------------------------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
       backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
       border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.top.stuck { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.logo img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--mute); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.tools { display: flex; align-items: center; gap: 10px; }
.lang { color: var(--mute); text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }
.lang:hover { color: var(--ink); border-color: var(--mute); }
@media (max-width: 860px) { .nav { display: none; } }

/* --- buttons --------------------------------------------------------------------------------------------------------- */
.btn { display: inline-block; background: var(--brand); color: var(--on-brand); padding: 13px 22px; border-radius: 11px; text-decoration: none;
       font-weight: 600; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--glow); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--mute); box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 15px; border-radius: 9px; }

/* --- hero ------------------------------------------------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto -10%; height: 520px; pointer-events: none;
                background: radial-gradient(60% 60% at 70% 40%, var(--glow), transparent 70%), radial-gradient(40% 50% at 15% 20%, var(--glow), transparent 70%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.025em; text-wrap: balance; }
.hero .sub { font-size: 20px; color: var(--mute); margin: 0 0 28px; max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.eyebrow { display: inline-block; background: var(--chip); color: var(--brand2); font-size: 14px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 44px; } }

/* --- the chat of the hero: a real conversation of the office, played line by line ------------------------------------------- */
.chat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; }
.chat .bar { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; font-weight: 600; font-size: 15px; }
.chat .bar img { width: 28px; height: 28px; border-radius: 8px; }
.chat .bar small { display: block; font-weight: 400; color: var(--mute); font-size: 13px; }
.chat .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-left: auto; }
.chat ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.chat li { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.chat li.me { align-self: flex-end; background: var(--me); color: var(--on-me); border-bottom-right-radius: 5px; }
.chat li.office { align-self: flex-start; background: var(--bg2); border-bottom-left-radius: 5px; }
.chat li b { font-weight: 600; }
.chat li .who { display: block; font-size: 12.5px; color: var(--brand2); font-weight: 600; margin-bottom: 2px; }
.chat li.done { border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 9%, var(--card)); }
.chat li.typing { color: var(--mute); letter-spacing: 3px; padding: 6px 14px; }
.chat.play li { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.chat.play li.on { opacity: 1; transform: none; }
/* several conversations, one at a time: without the script only the first is shown, with it the one that plays */
.chat ol + ol { display: none; }
.chat.play ol { display: flex; }
.chat.play ol.off { display: none; }
.chat.play { align-self: start; }      /* it grows down from the top of its place; the place itself is held by the script */
.chat.play li.wait { display: none; }
.chat.play.measure li.wait { display: block; }
.chat.play.measure li.typing { display: none; }

/* --- sections -------------------------------------------------------------------------------------------------------- */
section { padding: 64px 0; border-top: 1px solid var(--line); }
section.alt { background: var(--bg2); }
h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.18; margin: 0 0 12px; letter-spacing: -0.015em; text-wrap: balance; }
.lead { color: var(--mute); max-width: 720px; margin: 0 0 32px; font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.grid + .grid { margin-top: 16px; }
/* nine specialists and six promises: three in a row leaves nobody alone on the last one */
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.three { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand2) 35%, var(--line)); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--mute); font-size: 15.5px; }
.num { font-size: 40px; font-weight: 700; line-height: 1.1; margin-bottom: 6px; letter-spacing: -0.02em;
       background: linear-gradient(120deg, var(--brand), var(--brand2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badge { width: 40px; height: 40px; border-radius: 11px; background: var(--chip); color: var(--brand2); display: grid; place-items: center;
         font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.steps { counter-reset: s; display: grid; gap: 0; max-width: 780px; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; padding: 0 0 26px 54px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
                    background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; }
.steps li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.chips li { background: var(--chip); border-radius: 999px; padding: 5px 13px; font-size: 14.5px; }
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; max-width: 720px; margin: 0 0 20px; }
.lead-form[hidden] { display: none; }
.lead-form label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--mute); }
.lead-form label:nth-of-type(n+3), .lead-form .cta, .lead-form .said { grid-column: 1 / -1; }
.lead-form input, .lead-form textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; }
.lead-form textarea { resize: vertical; }
.lead-form input:focus, .lead-form textarea:focus { border-color: var(--brand2); outline: none; box-shadow: 0 0 0 3px var(--glow); }
.lead-form button { font: inherit; font-weight: 600; cursor: pointer; }
.lead-form button:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.lead-form .said { margin: 0; min-height: 1.6em; color: var(--ok); }
.lead-form .bait { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .lead-form { grid-template-columns: 1fr; } }
.contact { color: var(--mute); font-size: 15px; margin-top: 14px; }
footer { padding: 28px 0 44px; color: var(--mute); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer a { color: var(--mute); }

/* --- appearing on scroll: only when the script says it can (html.js), and never against the person's wish --------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .grid.reveal > * { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .grid.reveal.in > * { opacity: 1; transform: none; }
.js .grid.reveal.in > *:nth-child(2) { transition-delay: .07s; }
.js .grid.reveal.in > *:nth-child(3) { transition-delay: .14s; }
.js .grid.reveal.in > *:nth-child(4) { transition-delay: .21s; }
.js .grid.reveal.in > *:nth-child(5) { transition-delay: .28s; }
.js .grid.reveal.in > *:nth-child(6) { transition-delay: .35s; }
.js .grid.reveal.in > *:nth-child(n+7) { transition-delay: .42s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .grid.reveal > *, .chat.play li, .btn, .card { transition: none; opacity: 1; transform: none; }
}

/* --- a page of text (privacy) and a small notice page (the door of the app) -------------------------------------------- */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
.doc h1 { font-size: 30px; line-height: 1.25; margin: 0 0 4px; }
.doc h1.next { margin-top: 40px; }
.doc h2 { font-size: 21px; margin: 36px 0 8px; letter-spacing: 0; }
.doc h3 { font-size: 17px; margin: 20px 0 4px; }
.doc p, .doc ul { margin: 8px 0; }
.doc ul { padding-left: 22px; }
.doc .dim { opacity: .7; }
.doc hr { border: 0; border-top: 1px solid currentColor; opacity: .2; margin: 48px 0 0; }
.notice { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px 16px; }
.notice main { max-width: 520px; }
.notice h1 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; }
.notice p { color: var(--mute); margin: 0 0 16px; }
