/* The public site, ahoy.kz: the home pages (index.html, en/index.html) and the
   legal pages written by api/cmd/legalpages. The palette is a signal flag's:
   cobalt, signal yellow, ink. site.js plays the chat in the hero and starts
   the small demos; without it every demo shows its finished state. */
@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600&family=Unbounded:wght@500;700&display=swap");

:root {
  color-scheme: light dark;
  --sea: #1b3fe4; --sea-deep: #1230b8; --flag: #ffd21f; --buoy: #ff4d2e; --night: #0b1437;
  --paper: #ffffff; --foam: #eef2ff; --ink: #0b1437; --muted: #525c80; --line: #d9dff2;
  --link: #1b3fe4;
  --display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #080d28; --foam: #111a47; --ink: #eef2ff; --muted: #a9b3d9; --line: #263070;
          --link: #9db1ff; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--text); }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.wrap, .top, .foot { max-width: 74rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Header: on the legal pages it sits on paper, on the home page on cobalt. */
.top { display: flex; align-items: center; gap: 28px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink);
         font: 700 22px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.brand::before { content: ""; width: 34px; height: 34px; border-radius: 9px; background: url(/icon.svg) center / cover; }
.top nav { display: flex; gap: 24px; }
.top nav a, .lang { font-size: 15px; font-weight: 500; text-decoration: none; }
.top nav a:hover, .lang:hover { text-decoration: underline; text-underline-offset: 4px; }

.sea { background: var(--sea); color: #fff; }
.sea .brand, .sea .top nav a, .sea .lang { color: #fff; }
.sea .brand::before { width: 38px; height: 31px; border-radius: 0; background: url(/mark.svg) center / contain no-repeat; }
@media (max-width: 720px) { .top nav { display: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 72px);
        align-items: center; padding-top: clamp(24px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero h1 { font: 700 clamp(30px, 4.5vw, 58px)/1.08 var(--display); letter-spacing: -0.03em; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--flag); }
.hero .lead { margin-top: 24px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: #dfe6ff; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.button { display: inline-block; padding: 15px 26px; border-radius: 999px; background: var(--flag); color: var(--night);
          font-weight: 600; text-decoration: none; transition: transform .15s; }
.button:hover { transform: translateY(-2px); }
.sea .quiet { color: #fff; font-weight: 500; text-underline-offset: 5px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }

/* The chat in the hero */
.demo { min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs button { padding: 8px 16px; border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 999px; background: none;
               color: #fff; font: 500 15px/1.2 var(--text); cursor: pointer; }
.tabs button:hover { border-color: #fff; }
.tabs button[aria-selected="true"] { background: var(--flag); border-color: var(--flag); color: var(--night); }
.chat { display: flex; flex-direction: column; height: clamp(430px, 62vh, 520px); border-radius: 28px;
        background: #f3f5ff; color: var(--night); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(4, 12, 60, .7); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #fff; border-bottom: 1px solid #e3e8fa; }
.avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
          background: var(--night); color: var(--flag); font: 700 15px/1 var(--display); }
.who { min-width: 0; margin-right: auto; line-height: 1.25; }
.who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { font-size: 13px; color: #525c80; }
.channel { flex: none; padding: 5px 11px; border-radius: 999px; background: #e7ecff; font-size: 13px; font-weight: 500; }
.chat-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
             padding: 16px; overflow: hidden;
             -webkit-mask-image: linear-gradient(transparent, #000 44px); mask-image: linear-gradient(transparent, #000 44px); }
.msg { flex: none; max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 15.5px; line-height: 1.4;
       animation: pop .22s ease-out both; }
.msg.a { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; }
.msg.c { align-self: flex-end; background: var(--flag); border-bottom-right-radius: 6px; }
.msg.s { align-self: center; max-width: 100%; padding: 4px 12px; background: none; color: #525c80; font-size: 13px; text-align: center; }
.msg time { display: block; margin-top: 2px; font-size: 11.5px; color: #6a7396; text-align: right; }
.msg.c time { color: #6b5600; }
.msg table { border-collapse: collapse; width: 100%; margin: 2px 0 6px; }
.msg td { padding: 3px 0; vertical-align: top; }
.msg td + td { padding-left: 16px; text-align: right; white-space: nowrap; }
.msg tr.sum td { padding-top: 6px; border-top: 1px dashed #c3cbe6; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips span { padding: 5px 11px; border-radius: 999px; background: #e7ecff; font-weight: 500; font-size: 14px; }
.pay { display: block; margin-top: 8px; padding: 9px 14px; border-radius: 12px; background: var(--sea); color: #fff;
       font-weight: 600; text-align: center; }
.file { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.file::before { content: ""; width: 14px; height: 18px; border-radius: 3px; background: var(--night); }
.typing { display: flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--night); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* Sections */
.block { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); }
.block > h2, .cta h2 { font: 700 clamp(26px, 3.4vw, 42px)/1.12 var(--display); letter-spacing: -0.03em; max-width: 18em; text-wrap: balance; }
.block > h2 + p { margin-top: 18px; max-width: 38em; font-size: 19px; color: var(--muted); }

/* What Ahoy does: one row per kind of business, with a small demo */
.engine { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center;
          margin-top: clamp(40px, 6vw, 80px); }
.engine:nth-of-type(even) .art { order: -1; }
.engine h3 { font: 500 clamp(21px, 2.2vw, 28px)/1.2 var(--display); letter-spacing: -0.02em; }
.engine p { margin-top: 14px; max-width: 30em; color: var(--muted); }
.engine li { position: relative; margin-top: 10px; padding-left: 26px; max-width: 30em; }
.engine li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 9px; background: var(--sea);
                     clip-path: polygon(0 0, 100% 0, 72% 50%, 100% 100%, 0 100%); }
@media (max-width: 760px) {
  .engine { grid-template-columns: minmax(0, 1fr); }
  .engine:nth-of-type(even) .art { order: 0; }
}

.art { display: grid; place-items: center; min-height: 320px; padding: clamp(20px, 4vw, 40px); border-radius: 28px;
       color: var(--night); font-size: 15.5px; }
.art-sales { background: var(--flag); }
.art-booking { background: #dfe6ff; }
.art-leads { background: var(--night); }
.art-plans { background: var(--sea); }
.sheet { width: min(100%, 340px); padding: 20px 22px; border-radius: 18px; background: #fff; }
.sheet b { font-weight: 600; }
.sheet .row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.sheet .row + .row { border-top: 1px dashed #c9d0ea; }
.sheet .row.sum { font-weight: 600; border-top: 2px solid var(--night); }
.sheet small { display: block; color: #525c80; font-size: 13.5px; }
.receipt { position: relative; }
.stamp { position: absolute; right: -14px; bottom: -18px; padding: 7px 14px; border: 2.5px solid var(--buoy); border-radius: 10px;
         background: #fff; color: var(--buoy); font: 700 13px/1.2 var(--display); transform: rotate(-7deg); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.slot { padding: 9px 0; border-radius: 10px; background: #eef2ff; font-weight: 500; text-align: center; }
.slot.busy { background: none; color: #9aa3c4; text-decoration: line-through; }
.slot.pick { background: var(--sea); color: #fff; }
.field { padding: 8px 0; }
.field + .field { border-top: 1px solid #e3e8fa; }
.field span { display: block; color: #525c80; font-size: 13.5px; }
.field b { display: inline-block; }
.status { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-weight: 600; }
.status::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #17a34a; }
.visits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin: 14px 0; }
.visits i { aspect-ratio: 1; border: 2px solid var(--night); border-radius: 50%; }
.visits i.on { background: var(--night); }

/* The demos start empty and fill in when scrolled into view (site.js adds
   .js to <html> and .in to the demo). */
.step, .stamp, .slot.pick, .visits i.on, .field b { transition: opacity .35s, transform .35s, background .3s, color .3s, clip-path .5s steps(14); transition-delay: calc(var(--i, 0) * .32s + .25s); }
.js .art:not(.in) .step { opacity: 0; transform: translateY(8px); }
.js .art:not(.in) .stamp { opacity: 0; transform: rotate(-7deg) scale(1.5); }
.js .art:not(.in) .slot.pick { background: #eef2ff; color: var(--night); }
.js .art:not(.in) .visits i.on { background: none; }
.js .art:not(.in) .field b { clip-path: inset(0 100% 0 0); }
.field b { clip-path: inset(0 0 0 0); }

/* Why you can trust it with customers */
.tint { background: var(--foam); }
.facts { margin-top: clamp(28px, 4vw, 48px); border-top: 2px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 40px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 clamp(18px, 1.8vw, 22px)/1.25 var(--display); letter-spacing: -0.02em; }
.facts dd { color: var(--muted); max-width: 36em; }
@media (max-width: 720px) { .facts > div { grid-template-columns: minmax(0, 1fr); } }

/* How to connect: a real sequence, so it is numbered */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 28px 40px;
         margin-top: clamp(28px, 4vw, 48px); counter-reset: n; }
.steps li { counter-increment: n; }
.steps li::before { content: counter(n); display: block; margin-bottom: 10px; color: var(--sea); font: 700 54px/1 var(--display); }
@media (prefers-color-scheme: dark) { .steps li::before { color: var(--flag); } }
.steps b { display: block; margin-bottom: 6px; font-size: 19px; font-weight: 600; }
.steps span { color: var(--muted); }

/* Write to us */
.cta { background: var(--flag); color: var(--night); }
.cta .wrap { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }
.cta p { margin: 18px 0 28px; max-width: 34em; font-size: 19px; }
.cta .button { background: var(--night); color: #fff; }

.about { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 8px; }
.about h2 { font: 500 20px/1.3 var(--display); letter-spacing: -0.02em; }
.company { margin-top: 14px; max-width: 44em; color: var(--muted); }
.company p + p { margin-top: 6px; }

/* Legal pages */
.doc { max-width: 46rem; margin: 0 auto; padding: 24px var(--gutter) 32px; overflow-wrap: break-word; }
.doc h1 { font: 700 clamp(24px, 3.4vw, 32px)/1.2 var(--display); letter-spacing: -0.03em; margin: 16px 0 12px; }
.doc h2 { font: 500 18px/1.3 var(--display); letter-spacing: -0.02em; margin: 32px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.doc p, .doc li { margin: 7px 0; }
.doc ul { padding-left: 1.3em; list-style: disc; }

.foot { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 22px; padding-bottom: 44px; color: var(--muted); font-size: 15px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot p { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
