/* easyph.uz — colors mirror the app's tokens (mobile/lib/core/theme/tokens.dart). Mobile-first. */
:root {
  color-scheme: light;
  --primary: #1E5EFF;
  --on-primary: #FFFFFF;
  --accent: #FF7A1A;
  --on-accent: #0B1B3F;
  --primary-soft: #E3EBFF;
  --on-primary-soft: #0A1F66;
  --bg: #F5F7FB;
  --surface: #FFFFFF;
  --surface-2: #EEF1F7;
  --outline: #DCE1EA;
  --text: #101828;
  --text-2: #5B6475;
  --badge-bg: #101828;
  --badge-text: #FFFFFF;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --primary: #5B8CFF;
    --on-primary: #0A1433;
    --accent: #FF9447;
    --primary-soft: #1A2A55;
    --on-primary-soft: #D6E2FF;
    --bg: #0B0F1A;
    --surface: #151B2B;
    --surface-2: #1E2638;
    --outline: #2A3348;
    --text: #F2F4F7;
    --text-2: #98A2B3;
    --badge-bg: #F2F4F7;
    --badge-text: #0B0F1A;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #5B8CFF;
  --on-primary: #0A1433;
  --accent: #FF9447;
  --primary-soft: #1A2A55;
  --on-primary-soft: #D6E2FF;
  --bg: #0B0F1A;
  --surface: #151B2B;
  --surface-2: #1E2638;
  --outline: #2A3348;
  --text: #F2F4F7;
  --text-2: #98A2B3;
  --badge-bg: #F2F4F7;
  --badge-text: #0B0F1A;
  --shadow: none;
}

/* Only the current language is visible. Without JS the page stays in Uzbek. */
html[data-lang="uz"] [data-l]:not([data-l="uz"]),
html[data-lang="ru"] [data-l]:not([data-l="ru"]),
html[data-lang="en"] [data-l]:not([data-l="en"]) { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
img { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ico { width: 22px; height: 22px; flex: none; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--outline); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.logo img { border-radius: 9px; }
.controls { display: flex; align-items: center; gap: 8px; }
.langs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.langs button { border: 0; background: none; cursor: pointer; padding: 6px 10px; min-width: 40px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-2); }
/* Keyed on html[data-lang] (set in <head>) so the right pill shows from first paint, without a transition. */
html[data-lang="uz"] [data-set-lang="uz"],
html[data-lang="ru"] [data-set-lang="ru"],
html[data-lang="en"] [data-set-lang="en"] { background: var(--primary); color: var(--on-primary); }
.theme { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--outline); background: var(--surface); }
.theme .ico { width: 20px; height: 20px; }
.ico-sun { display: none; }
:root[data-theme="dark"] .ico-sun { display: block; }
:root[data-theme="dark"] .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-sun { display: block; }
  :root:not([data-theme="light"]) .ico-moon { display: none; }
}

/* Hero */
.hero { padding: 40px 0 48px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--primary-soft);
  color: var(--on-primary-soft); font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(34px, 9vw, 60px); font-weight: 800; }
.hero h1::after { content: ""; display: block; width: 64px; height: 6px; margin-top: 18px; border-radius: 3px; background: var(--accent); }
.lead { margin-top: 18px; font-size: 18px; color: var(--text-2); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }

.badge { display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 14px; border-radius: 12px;
  background: var(--badge-bg); color: var(--badge-text); }
.badge-mark { width: 26px; height: 26px; fill: var(--accent); }
.badge-text { display: flex; flex-direction: column; line-height: 1.15; }
.badge-text small { font-size: 11px; opacity: .8; letter-spacing: .02em; }
.badge-text strong { font-size: 18px; font-weight: 700; }
.tg, .btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; border-radius: 12px; }
.tg { padding: 13px 16px; color: var(--text); background: var(--surface); border: 1px solid var(--outline); }
.tg .ico { color: var(--primary); }
.btn { padding: 13px 18px; background: var(--primary); color: var(--on-primary); }

/* Phone mock-up (decorative) */
.mock { justify-self: center; width: min(300px, 82vw); aspect-ratio: 9 / 18.5; border-radius: 40px; padding: 10px;
  background: #101828; box-shadow: 0 30px 60px -20px rgba(30, 94, 255, .45); transform: rotate(-3deg); }
.m-screen { height: 100%; border-radius: 31px; background: var(--bg); padding: 16px 12px; overflow: hidden; }
.m-bar { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.m-bar img { border-radius: 6px; }
.m-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--outline); color: var(--text-2); margin-bottom: 12px; }
.m-search .ico { width: 16px; height: 16px; }
.m-search span { height: 8px; width: 55%; border-radius: 4px; background: var(--surface-2); }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-card { background: var(--surface); border-radius: 14px; padding: 6px 6px 10px; box-shadow: var(--shadow);
  border: 1px solid var(--outline); font-size: 11px; }
.m-img { aspect-ratio: 1; border-radius: 10px; margin-bottom: 8px; }
.h1 { background: linear-gradient(140deg, #1E5EFF, #7FA2FF); }
.h2 { background: linear-gradient(140deg, #FF7A1A, #FFC08F); }
.h3 { background: linear-gradient(140deg, #0A1F66, #5B8CFF); }
.h4 { background: linear-gradient(140deg, #5B6475, #DCE1EA); }
.m-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-price { font-weight: 800; font-size: 14px; }
.m-chip { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft);
  color: var(--on-primary-soft); font-size: 10px; font-weight: 600; }

/* Features */
.features { padding: 48px 0; }
.features h2, .support h2 { font-size: clamp(26px, 6vw, 36px); font-weight: 800; }
.feat-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.feat { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feat-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
  background: var(--primary-soft); color: var(--primary); }
.feat:nth-child(even) .feat-ico { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.feat h3 { font-size: 18px; margin-bottom: 6px; }
.feat p { color: var(--text-2); }

/* Support */
.support { padding: 8px 0 56px; }
.support-box { display: flex; flex-direction: column; gap: 20px; }
.support-box > div { display: grid; gap: 8px; }
.support-box p { color: var(--text-2); }
.support .wrap { border-radius: 24px; padding: 28px 20px; background: var(--surface); border: 1px solid var(--outline);
  max-width: 1048px; width: calc(100% - 32px); }

/* Legal pages and simple pages */
.doc { max-width: 760px; padding-top: 28px; padding-bottom: 56px; }
.doc h1 { font-size: clamp(28px, 7vw, 40px); font-weight: 800; margin-top: 16px; }
.meta { color: var(--text-2); font-size: 14px; margin-top: 8px; }
.prose { margin-top: 24px; display: grid; gap: 16px; font-size: 17px; }
.back { display: inline-block; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.back:hover { color: var(--primary); }
.simple { max-width: 560px; padding-top: 64px; padding-bottom: 72px; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 16px; }
.simple-ico { border-radius: 18px; }
.simple h1 { font-size: clamp(26px, 7vw, 36px); font-weight: 800; }
.simple p { color: var(--text-2); font-size: 17px; }

/* Footer */
.foot { border-top: 1px solid var(--outline); padding: 20px 0 28px; color: var(--text-2); font-size: 14px; }
.foot-row { display: flex; flex-direction: column; gap: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: var(--text-2); }
.foot-links a:hover { color: var(--primary); }

@media (min-width: 600px) {
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .support-box { flex-direction: row; align-items: center; justify-content: space-between; }
  .support .wrap { padding: 36px 40px; }
  .foot-row { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 900px) {
  .hero { padding: 72px 0 64px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .feat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .theme, .tg, .btn, .back, .foot-links a { transition: background-color .15s, color .15s, transform .15s; }
  .tg:active, .btn:active, .theme:active { transform: scale(.97); }
}
