/* Tana AI — sayt (tanaai.app). Brend: oq + qora (#111111) + to'q sariq aksent (#F2602F).
   O'lchamlar: telefon < 640 · planshet 640–1023 · noutbuk 1024–1439 · katta ekran ≥ 1440.
   Bosh qism noutbukda bitta ekranga sig'adi (balandlikka qarab kichrayadi). */
:root {
  --ink: #111111;
  --ink-2: #3A3A3C;
  --muted: #6E6E73;
  --faint: #A1A1A6;
  --line: #E5E5EA;
  --soft: #F5F5F7;
  --bg: #FFFFFF;
  --accent: #F2602F;
  --accent-grad: linear-gradient(145deg, #FF8A57, #F2602F);
  --ink-grad: linear-gradient(145deg, #3A3A3C, #111111);
  --radius: 22px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 12px 32px -12px rgba(17, 17, 17, .14);
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --head: 64px;
  --sec: clamp(56px, 8vw, 104px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .85); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(17, 17, 17, .06); padding-top: env(safe-area-inset-top); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: var(--head); max-width: none; }   /* to'liq kenglik: tugma ekranning o'ng burchagida */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 18px; letter-spacing: -.02em; flex-shrink: 0; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 6px 14px -6px rgba(17,17,17,.45); }
.brand-ai { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: clamp(14px, 2vw, 26px); margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.top .btn { margin-left: 8px; }
.top .btn.push { margin-left: auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 50px; padding: 0 22px; border-radius: 14px; font: inherit; font-weight: 650; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--ink-grad); color: #fff; box-shadow: 0 8px 20px -10px rgba(17, 17, 17, .7), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-dark:hover { box-shadow: 0 12px 26px -10px rgba(17, 17, 17, .75), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-accent { background: var(--accent-grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(242, 96, 47, .75), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-accent:hover { box-shadow: 0 14px 28px -10px rgba(242, 96, 47, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: 0 0 0 1px #D4D4D8, 0 6px 16px -10px rgba(17, 17, 17, .3); }
.btn-sm { height: 42px; padding: 0 16px; font-size: 15px; border-radius: 12px; gap: 7px; }
.btn-sm svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  min-height: calc(100vh - var(--head)); min-height: calc(100svh - var(--head));
  padding-top: clamp(24px, 5vh, 64px); padding-bottom: clamp(24px, 5vh, 64px);
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--accent); background: #FFF1EB; padding: 6px 12px; border-radius: 999px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-grad); }
h1 { font-size: clamp(34px, min(4.7vw, 7.6vh), 66px); line-height: 1.04; letter-spacing: -.035em; margin: clamp(12px, 2.4vh, 20px) 0; font-weight: 800; text-wrap: balance; }
h1 em { font-style: normal; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, min(1.45vw, 2.5vh), 20px); color: var(--muted); max-width: 34em; margin: 0 0 clamp(20px, 3.6vh, 30px); }
.lead.tight { margin-bottom: 24px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: clamp(18px, 3vh, 26px) 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.5 5.2L7 9.7 4.6 7.3l-1 1L7 11.7l5.5-5.5z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.5 5.2L7 9.7 4.6 7.3l-1 1L7 11.7l5.5-5.5z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* Telefon rasmlari: kengligi ekran eni va balandligiga qarab (noutbukda ekranga sig'adi) */
.phones { --pw: clamp(200px, min(19vw, 30vh), 290px); position: relative; height: calc(var(--pw) * 2.32); width: calc(var(--pw) * 1.95); max-width: 100%; margin: 0 auto; }
.phone { position: absolute; width: var(--pw); border-radius: calc(var(--pw) * .155); background: #111; padding: calc(var(--pw) * .033); box-shadow: 0 40px 80px -30px rgba(17, 17, 17, .45), 0 0 0 1px rgba(17, 17, 17, .08); }
.phone img { border-radius: calc(var(--pw) * .125); width: 100%; height: auto; background: #fff; }
.phone.a { left: 0; top: 4%; transform: rotate(-4deg); z-index: 2; }
.phone.b { right: 0; top: 0; transform: rotate(5deg); z-index: 1; }
.glow { position: absolute; inset: 12% 4% 6% 8%; background: radial-gradient(closest-side, rgba(242, 96, 47, .22), rgba(242, 96, 47, 0)); filter: blur(10px); }

/* ---------- Sections ---------- */
section { padding: var(--sec) 0; }
.hero { padding: 0; }
.sec-head { max-width: 660px; margin: 0 0 clamp(24px, 4vw, 40px); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 12px; font-weight: 780; text-wrap: balance; }
.sec-head p { color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); margin: 0; }
.soft { background: var(--soft); }

.loop { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { background: #fff; border-radius: var(--radius); padding: clamp(20px, 2.4vw, 28px); box-shadow: var(--shadow); }
.step .n { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--accent-grad); box-shadow: 0 8px 18px -8px rgba(242, 96, 47, .7); margin-bottom: 18px; }
.step:nth-child(2) .n { background: var(--ink-grad); box-shadow: 0 8px 18px -8px rgba(17, 17, 17, .6); }
.step:nth-child(3) .n { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.step h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.2vw, 26px); background: #fff; }
.card .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #FFF1EB; color: var(--accent); margin-bottom: 14px; }
.card .ic svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.data { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 48px); align-items: center; }
.flow { background: #fff; border-radius: 28px; padding: clamp(20px, 2.6vw, 30px); box-shadow: var(--shadow); }
.flow-row { display: flex; align-items: center; gap: 14px; }
.node { flex: 1; border-radius: 18px; padding: 16px; text-align: center; font-weight: 650; font-size: 15px; background: var(--soft); }
.node small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; margin-top: 2px; }
.node.cloud { background: var(--ink-grad); color: #fff; }
.node.cloud small { color: rgba(255, 255, 255, .7); }
.arrow { display: flex; flex-direction: column; align-items: center; color: var(--accent); font-size: 12px; font-weight: 700; gap: 2px; min-width: 64px; }
.arrow svg { width: 44px; height: 14px; }
.flow-note { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: #FFF6F2; color: var(--ink-2); font-size: 14px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.ticks li::before { content: ""; width: 26px; height: 26px; border-radius: 9px; background: #FFF1EB url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2602F' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/16px no-repeat; }
.ticks b { display: block; font-size: 16px; }
.ticks span { color: var(--muted); font-size: 15px; }

/* O'rnatish bo'limi */
.dl { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0 auto clamp(28px, 4vw, 40px); }
.dl .btn { height: 56px; padding: 0 28px; font-size: 17px; border-radius: 16px; }
.dl small { color: var(--muted); font-size: 14px; text-align: center; }
.install { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.os { background: #fff; border-radius: var(--radius); padding: clamp(20px, 2.2vw, 26px); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.os h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 19px; }
.os h3 svg { width: 24px; height: 24px; }
.os ol { margin: 0 0 18px; padding-left: 20px; color: var(--ink-2); font-size: 15px; display: grid; gap: 8px; }
.os .btn { margin-top: auto; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); color: var(--muted); font-size: 14px; }
.store b { color: var(--ink); font-size: 15px; display: block; line-height: 1.1; }
.store svg { width: 24px; height: 24px; color: var(--ink); }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; background: #fff; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 650; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

.band { background: var(--ink-grad); color: #fff; border-radius: clamp(24px, 3vw, 32px); padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 40px); text-align: center; position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -180px; background: radial-gradient(closest-side, rgba(242, 96, 47, .55), rgba(242, 96, 47, 0)); }
.band h2 { position: relative; }
.band p { position: relative; color: rgba(255, 255, 255, .72); margin: 0 auto 24px; max-width: 32em; font-size: clamp(16px, 1.4vw, 18px); }
.band .ctas { position: relative; justify-content: center; }
.band .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }

.foot { padding: 36px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.foot .wrap::before { content: ""; flex-basis: 100%; height: 1px; background: var(--line); margin-bottom: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Huquqiy sahifalar ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) max(var(--gutter), env(safe-area-inset-left)) 24px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 44px); margin: 8px 0; }
.doc .meta { color: var(--faint); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: clamp(19px, 2vw, 22px); margin: 34px 0 10px; letter-spacing: -.02em; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 6px; }
.doc .box { background: var(--soft); border-radius: 18px; padding: 18px 20px; margin: 20px 0; }
.doc .box.warn { background: #FFF6F2; }
.doc a { color: var(--accent); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--ink); }

/* ---------- O'rnatish oynasi (telefonda pastdan chiqadi, kompyuterda markazda) ---------- */
.sheet { border: 0; padding: 0; margin: auto; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border-radius: 26px; background: #fff; color: var(--ink); box-shadow: 0 40px 100px -30px rgba(17, 17, 17, .5); overflow: auto; }
.sheet::backdrop { background: rgba(17, 17, 17, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 0; }
.sheet-head img { width: 44px; height: 44px; border-radius: 12px; }
.sheet-app { margin: 0; font-weight: 750; font-size: 17px; }
.sheet-meta { margin: 0; color: var(--muted); font-size: 13px; }
.sheet-x { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--soft); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.sheet-x svg { width: 20px; height: 20px; }
.sheet-title { font-size: 22px; margin: 18px 20px 6px; letter-spacing: -.02em; }
.sheet-sub { margin: 0 20px 14px; color: var(--muted); font-size: 15px; }
.sheet-steps { list-style: none; margin: 0 20px; padding: 0; display: grid; gap: 10px; }
.sheet-steps li { display: grid; grid-template-columns: 22px 40px 1fr; align-items: center; gap: 10px; background: var(--soft); border-radius: 16px; padding: 12px 14px; font-size: 15px; line-height: 1.4; }
.sheet-n { font-weight: 800; color: var(--accent); text-align: center; }
.sheet-ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.sheet-ic svg { width: 22px; height: 22px; }
.sheet-note { margin: 14px 20px 0; padding: 12px 14px; border-radius: 14px; background: #FFF6F2; font-size: 14px; color: var(--ink-2); }
.sheet-open { display: flex; margin: 18px 20px 12px; }
.sheet-alt { display: block; margin: 0 auto 18px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; padding: 8px 12px; }
.sheet-alt[hidden] { display: none; }
.sheet-note a { color: var(--accent); font-weight: 600; }

/* ---------- Moslashuv ---------- */
@media (min-width: 1440px) {
  :root { --wrap: 1240px; }
}
/* Planshet va kichik noutbuk */
@media (max-width: 1023px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; padding-bottom: 48px; }
  h1 { font-size: clamp(36px, 6.6vw, 56px); }
  .lead { font-size: clamp(16px, 2.2vw, 19px); }
  .phones { --pw: clamp(200px, 32vw, 260px); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .loop, .install { grid-template-columns: 1fr; }
  .nav { display: none; }
  .top .btn { margin-left: auto; }
}
/* Telefon */
@media (max-width: 639px) {
  :root { --head: 58px; }
  .brand { font-size: 17px; }
  .brand img { width: 30px; height: 30px; }
  .hero .wrap { padding-top: 28px; padding-bottom: 40px; gap: 32px; }
  h1 { font-size: clamp(32px, 9.4vw, 44px); }
  .ctas { flex-direction: column; }
  .ctas .btn { width: 100%; }
  .phones { --pw: min(44vw, 210px); }
  .grid { grid-template-columns: 1fr; }
  .flow-row { flex-direction: column; }
  .arrow { min-width: 0; margin: 4px 0; flex-direction: row; gap: 8px; }
  .arrow svg { transform: rotate(90deg); width: 28px; }
  .dl .btn { width: 100%; }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
  .sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet[open] { animation: sheet-up .25s ease-out; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
/* Juda tor ekran (320–359) */
@media (max-width: 359px) {
  .top .btn-sm { padding: 0 12px; }
  .phones { --pw: 43vw; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .sheet[open] { animation: none; }
}
