/* Kuzat landing page. Colors are tokens so dark mode only swaps values. */
:root {
  --paper: #f6f1e7;
  --paper-2: #eee6d6;
  --card: #fffdf8;
  --ink: #14171f;
  --ink-2: #4b5160;
  --line: #e2d8c4;
  --teal: #0e6e74;
  --teal-strong: #0a565b;
  --teal-soft: #dcefec;
  --tile: #1f3d8c;
  --saffron: #e9a43b;
  --saffron-ink: #2e1d03;
  --bubble-in: #efe8dc;
  --bubble-out: #0e6e74;
  --bubble-out-ink: #f8fbfa;
  --on-teal: #f6f1e7;
  --shadow: 0 40px 80px -40px rgba(20, 23, 31, .45), 0 12px 32px -16px rgba(20, 23, 31, .22);
  --radius: 22px;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%233a9e9a' stroke-opacity='.12'%3E%3Crect x='17' y='17' width='22' height='22'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.13'%3E%3Crect x='17' y='17' width='22' height='22'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1216;
    --paper-2: #141a20;
    --card: #182028;
    --ink: #f1ebdf;
    --ink-2: #a7afba;
    --line: #26303a;
    --teal: #3cc1bb;
    --teal-strong: #6fd6d0;
    --teal-soft: #12302f;
    --tile: #233f8a;
    --saffron: #f0b356;
    --saffron-ink: #2a1a02;
    --bubble-in: #222b34;
    --bubble-out: #23948f;
    --bubble-out-ink: #f6fffe;
    --on-teal: #06201f;
    --shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), 0 12px 32px -16px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
svg { display: block; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

.f-teal { fill: var(--teal); }
.f-paper { fill: var(--paper); }
.f-saffron { fill: var(--saffron); }
.f-tile { fill: var(--tile); }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--body); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: var(--teal-strong); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; background: var(--ink); color: var(--paper); }
.btn-saffron { background: var(--saffron); color: var(--saffron-ink); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.wordmark { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; }
.nav { display: flex; gap: 24px; margin-left: 12px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--ink-2);
  font: 600 13px/1 var(--body); letter-spacing: .04em;
  min-width: 40px; height: 32px; border-radius: 999px; cursor: pointer;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--teal); color: var(--on-teal); }

/* Hero */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px);
  background-image:
    radial-gradient(60% 60% at 82% 30%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, color-mix(in srgb, var(--saffron) 14%, transparent), transparent 70%),
    var(--pattern);
}
.hero-grid > *, .local-grid > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 50%, transparent); animation: pulse 2.4s infinite; }
.hero h1 { font-size: clamp(1.9rem, 0.4rem + 4.6vw, 4.1rem); line-height: 1.02; margin-top: 22px; text-wrap: balance; }
.lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { margin-top: 20px; font-size: 14px; color: var(--ink-2); }

/* Phone mock */
.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* Example tabs above the phone: one chip per kind of business */
.scenarios-title { font-size: 15px; font-weight: 600; color: var(--ink-2); text-align: center; }
.scenarios { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 470px; margin-bottom: 8px; }
.scenarios button {
  appearance: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  min-height: 46px; padding: 0 18px 0 14px; border-radius: 999px; white-space: nowrap;
  font: 600 16px/1 var(--body); color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease;
}
.scenarios button svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scenarios button:hover { border-color: var(--teal); transform: translateY(-1px); }
.scenarios button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.scenarios button[aria-pressed="true"] svg { stroke: var(--saffron); }
.phone {
  margin: 0; width: min(100%, 380px);
  background: var(--card); border: 1px solid var(--line); border-radius: 30px;
  box-shadow: var(--shadow); overflow: hidden;
  transform: rotate(1.2deg);
}
.phone-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 15px;
  background: conic-gradient(from 200deg, #f58529, #dd2a7b, #8134af, #515bd4, #f58529);
}
.who { display: flex; flex-direction: column; line-height: 1.25; }
.who strong { font-size: 15px; }
.who span { font-size: 12.5px; color: var(--ink-2); }

.chat { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 20px; min-height: 420px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; font-size: 14.5px; line-height: 1.45; }
.msg.in { align-self: flex-start; background: var(--bubble-in); border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-ink); border-bottom-right-radius: 6px; max-width: 100%; }
.gloss { margin-top: 6px; font-size: 12.5px; font-style: italic; opacity: .72; }
.gloss:empty { display: none; }

.draft {
  align-self: flex-end; width: 92%;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px; border-radius: 22px;
  border: 1.5px dashed color-mix(in srgb, var(--teal) 55%, transparent);
  background: color-mix(in srgb, var(--teal-soft) 60%, transparent);
}
.draft-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--teal-strong); padding: 0 4px; }
.draft-label svg { width: 14px; height: 14px; fill: var(--saffron); }
.draft-actions { display: flex; justify-content: flex-end; gap: 6px; }
.chip-btn { font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.chip-btn.send { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 18px; background: var(--bubble-in); }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); opacity: .5; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
.typing.step-5 { align-self: flex-end; }

/* Chat sequence. Messages are visible by default; app.js adds .play only when the page is on screen,
   so a background tab or screenshot never shows an empty phone. */
.step-2 { display: none; }
.phone.play .step-2 { display: inline-flex; }
.phone.play :is(.step-1, .step-2, .step-3, .step-4, .step-5) { opacity: 0; animation: rise .5s ease forwards; }
.phone.play .step-1 { animation-delay: .3s; }
.phone.play .step-2 { animation: rise .4s ease 1.1s forwards, gone .01s linear 2.6s forwards; }
.phone.play .step-3 { animation-delay: 2.6s; }
.phone.play .step-4 { animation-delay: 4.2s; }
.phone.play .step-5 { animation-delay: 5.2s; }

/* Questions marquee */
.questions { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); background: var(--paper-2); overflow: hidden; }
.questions h2, .how h2, .features h2, .local h2 { font-size: clamp(1.9rem, 4vw, 3rem); text-wrap: balance; }
.section-lead { margin-top: 18px; font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); }
.questions .section-lead { margin-inline: auto; max-width: 36em; }
.marquee {
  margin-top: 44px; display: flex; flex-direction: column; gap: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.track.reverse { animation-direction: reverse; animation-duration: 54s; }
.track ul { display: flex; gap: 14px; padding-right: 14px; }
.track li {
  white-space: nowrap; padding: 12px 20px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-weight: 500; font-size: 16px;
}
.track li:nth-child(3n+2) { background: var(--teal-soft); border-color: transparent; }

/* How it works */
.how, .features { padding: clamp(72px, 10vw, 128px) 0; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: 16px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; counter-reset: step; }
.step {
  position: relative; padding: 30px 28px 32px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.num {
  display: block; font-family: var(--display); font-weight: 700; font-size: 56px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--teal); margin-bottom: 26px;
}
.step h3 { font-size: 21px; }
.step p { margin-top: 10px; color: var(--ink-2); }

/* Features */
.features { border-top: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--paper); padding: 32px 28px 34px; }
.feature svg { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--teal-soft); fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 22px; }
.feature h3 { font-size: 18px; }
.feature p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }

/* Made in Tashkent */
.local { padding: clamp(64px, 9vw, 112px) 0; background: var(--paper-2); border-top: 1px solid var(--line); }
.local-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.industries { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.industries li {
  padding: 9px 16px; border-radius: 999px; font-weight: 500; font-size: 15px;
  background: var(--card); border: 1px solid var(--line);
}
.industries li:nth-child(-n+3) { background: var(--teal-soft); border-color: transparent; color: var(--teal-strong); }
.tile {
  position: relative; aspect-ratio: 1; width: min(100%, 400px); justify-self: end;
  border-radius: 36px; background-color: var(--tile); background-image: var(--pattern-light);
  display: grid; place-items: center; box-shadow: var(--shadow); overflow: hidden;
}
.tile::after { content: ""; position: absolute; inset: 14px; border-radius: 26px; border: 1.5px solid rgba(255, 255, 255, .22); }
.tile-star { width: 54%; height: auto; animation: turn 60s linear infinite; }
.tile-coords { position: absolute; bottom: 30px; font: 600 12px/1 var(--body); letter-spacing: .18em; color: rgba(255, 255, 255, .8); }

/* Call to action */
.cta { padding: clamp(72px, 10vw, 120px) 0; background-color: var(--teal-strong); background-image: var(--pattern-light); color: #f6f1e7; }
@media (prefers-color-scheme: dark) { .cta { background-color: #0b4a4e; } }
.cta-inner { text-align: center; max-width: 820px; }
.cta h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); text-wrap: balance; }
.cta p { margin: 18px auto 0; max-width: 34em; font-size: clamp(17px, 1.5vw, 19px); opacity: .88; }
.cta .btn { margin-top: 32px; }
.cta-mail { margin-top: 16px; font-size: 15px; }
.cta-mail a { color: inherit; opacity: .85; }

/* Footer */
.site-footer { padding: 28px 0 36px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: 14px; color: var(--ink-2); }
.footer-brand { display: flex; align-items: baseline; gap: 10px; }
.footer-brand .wordmark { font-size: 18px; color: var(--ink); }
.footer-meta a { color: inherit; }

/* Animations */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gone { to { opacity: 0; height: 0; padding: 0; margin: -5px 0; overflow: hidden; } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .track { width: auto; flex-wrap: wrap; justify-content: center; }
  .track ul + ul { display: none; }
  .track ul { flex-wrap: wrap; justify-content: center; padding: 0 16px; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* Layout breakpoints */
@media (max-width: 960px) {
  .hero-grid, .local-grid { grid-template-columns: 1fr; }
  .phone { transform: none; }
  .tile { justify-self: start; width: min(100%, 340px); }
  .steps, .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-inner { height: 60px; gap: 12px; }
  .header-actions .btn-small { display: none; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .chat { min-height: 0; }
  .tile { width: 100%; }
}

/* Small utilities (no inline styles: the CSP blocks them) */
.mx-auto { margin-inline: auto; }
.justify-center { justify-content: center; }
