/* ══════════════════════════════════════════════════════════════════════════
   Ustadev Landing — "Industry" design system tokens + page styles.
   Plain CSS on plain HTML: no build step.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #5980a6;
  --color-accent-2: #728fab;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f5f5f8;
  --color-neutral-200: #e7e7ea;
  --color-neutral-300: #d4d4d7;
  --color-neutral-400: #b7b7ba;
  --color-neutral-500: #98989b;
  --color-neutral-600: #7a7a7d;
  --color-neutral-700: #5d5d60;
  --color-neutral-800: #424244;
  --color-neutral-900: #2b2b2d;

  --color-accent-100: #eef6ff;
  --color-accent-200: #d6ebff;
  --color-accent-300: #b5d9fd;
  --color-accent-400: #94bce3;
  --color-accent-500: #749dc4;
  --color-accent-600: #597ea3;
  --color-accent-700: #416180;
  --color-accent-800: #2c455d;
  --color-accent-900: #1d2d3d;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Barlow", system-ui, sans-serif;

  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;
  --space-6: 20.4px;
  --space-8: 27.2px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 7px;
}

/* ── Page ground ────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; background: var(--color-accent-900); }

body {
  margin: 0;
  background: transparent;
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  text-wrap: pretty;

  --paper: var(--color-bg);
  --line: color-mix(in srgb, var(--color-bg) 22%, transparent);
  --mark: color-mix(in srgb, var(--color-bg) 60%, transparent);
  --dim: color-mix(in srgb, var(--color-bg) 72%, transparent);
  --hi: var(--color-accent-400);
}

/* Barlow carries no Cyrillic — Russian swaps to Cyrillic-native
   condensed/grotesque equivalents. */
body[data-lang="ru"] {
  --font-heading: "Oswald", "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Golos Text", "Barlow", system-ui, sans-serif;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent-400); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-300); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent-400); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent-400) 35%, transparent); }

.nowrap { white-space: nowrap; }

/* The hidden attribute must win over component display rules
   (.stats sets display:grid, which would otherwise override it). */
[hidden] { display: none !important; }

/* ── Blueprint frame — registration marks drawn outside the box ─────────── */

.blueprint {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0;
}
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: var(--mark);
}
.blueprint > .corner::before, .blueprint > .corner::after {
  content: ""; position: absolute; background: currentColor;
}
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }

/* accent-700 instead of accent: #5980a6 gives only 3.7:1 against the light
   label — fails WCAG AA. #416180 reads 5.8:1 and stays in the same ramp. */
.btn-primary { background: var(--color-accent-700); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-400); color: var(--color-accent-900); }
.btn-primary:active { background: var(--color-accent-300); color: var(--color-accent-900); }

.btn-secondary { border-color: var(--line); color: var(--paper); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-bg) 8%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-bg) 14%, transparent); }

/* Sizes used on this page */
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 15px; gap: 10px; }
.btn-xl { min-height: 54px; padding: 0 28px; font-size: 17px; gap: 12px; }
.btn-primary.blueprint {
  border-color: var(--color-accent);
  transition: transform 0.25s ease, background 0.15s, color 0.15s;
}

/* ── Tags ───────────────────────────────────────────────────────────────── */

.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
  white-space: nowrap;
}
.tag-outline { border: 1px solid var(--line); color: var(--dim); }

/* ── Navigation ─────────────────────────────────────────────────────────── */

.nav {
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(20px, 5vw, 72px);
  max-width: 1200px; margin: 0 auto;
  box-sizing: border-box;
  color: var(--paper);
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px; letter-spacing: 0.04em; text-transform: uppercase;
  margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--color-accent-400); }

.lang-group { display: flex; gap: 4px; }
.lang-pill {
  appearance: none; cursor: pointer; background: transparent; font: inherit;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  padding: 6px 10px; line-height: 1;
  border: 1px solid var(--line); color: var(--dim);
}
.lang-pill.is-active { border-color: var(--color-accent-400); color: var(--color-accent-400); }

/* On phones the text links hide, but the Telegram CTA stays reachable as an
   icon-only button — it is the page's single conversion path. */
@media (max-width: 640px) {
  .nav { gap: 12px; }
  .nav a:not(.nav-cta) { display: none; }
  .nav .nav-cta { display: inline-flex; min-height: 34px; padding: 0 10px; }
  .nav .nav-cta .cta-text { display: none; }
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px);
  box-sizing: border-box;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  max-width: 820px;
  padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px);
}
.hero-title {
  font-size: clamp(44px, 6.5vw, 88px);
  line-height: 1.02; letter-spacing: 0.01em; text-transform: uppercase;
  margin: 0 0 0 -0.04em;
}
.hero-title > span { display: block; }
.hero-title-hi { color: var(--hi); }
.hero-sub {
  font-size: 17px; line-height: 1.5; color: var(--dim);
  max-width: 52ch; margin: 28px 0 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ── Sections ───────────────────────────────────────────────────────────── */

.section { padding: 56px 0 24px; position: relative; }

/* The oversized ghost numeral that anchors each section */
.section-index {
  position: absolute; right: -0.04em; top: 24px;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(96px, 14vw, 200px); line-height: 1; letter-spacing: -0.02em;
  color: var(--paper); opacity: 0.06;
  pointer-events: none; user-select: none;
  font-feature-settings: "tnum" 1;
}
.kicker {
  display: block; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 600;
  color: var(--hi); margin-bottom: 12px;
}
.rule { height: 1px; border: 0; background: var(--line); margin: 0 0 40px; }
.rule-tight { margin-bottom: 32px; }
.section-title {
  font-size: clamp(36px, 5vw, 64px); line-height: 1.04;
  letter-spacing: 0.01em; text-transform: uppercase;
  margin: 0 0 0 -0.04em; max-width: 14ch;
}
.lede {
  font-size: 17px; line-height: 1.5; color: var(--dim);
  max-width: 56ch; margin: 20px 0 40px;
}
.note {
  margin: 32px 0 0; font-size: 15px; line-height: 1.5;
  color: var(--dim); max-width: 60ch;
}

/* ── Service + case panels ──────────────────────────────────────────────── */

.grid-services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px;
}
.grid-cases {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px;
}
.panel {
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.panel-case { gap: 16px; }
.panel-num {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600; color: var(--hi);
  font-feature-settings: "tnum" 1;
}
.panel-case .panel-num { color: var(--dim); }
.panel-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 24px; line-height: 1.1; letter-spacing: 0.02em;
  text-transform: uppercase; margin: 0;
}
.panel-case .panel-title {
  font-size: 22px; line-height: 1.15; letter-spacing: 0.01em;
  text-transform: none; flex: 1;
}
.panel-desc { margin: 0; font-size: 15px; line-height: 1.5; color: var(--dim); }
.panel-case .panel-desc { font-size: 14px; }
.panel-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ── Stats strip ────────────────────────────────────────────────────────── */

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border: 1px solid var(--line); margin-top: 40px;
}
.stat { padding: 20px 24px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 40px; line-height: 1; color: var(--hi);
  font-feature-settings: "tnum" 1;
}
.stat-label {
  margin-top: 8px; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim);
}

/* ── Tech stack ─────────────────────────────────────────────────────────── */

.stack { display: flex; flex-wrap: wrap; gap: 10px; }
.stack-item {
  border: 1px solid var(--line); padding: 10px 16px;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--paper); white-space: nowrap;
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 12px; max-width: 820px; }
.faq-item { border: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px; line-height: 1.2; letter-spacing: 0.02em; text-transform: uppercase;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--hi); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p {
  margin: 0; padding: 0 20px 18px;
  font-size: 15px; line-height: 1.55; color: var(--dim); max-width: 70ch;
}

/* ── CTA ────────────────────────────────────────────────────────────────── */

.section-cta { padding: 72px 0 56px; }
.cta-panel {
  padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
}
.cta-copy { min-width: 0; }
.cta-title {
  font-size: clamp(32px, 4.5vw, 56px); line-height: 1.04;
  letter-spacing: 0.01em; text-transform: uppercase; margin: 0;
}
.cta-sub { margin: 20px 0 0; font-size: 16px; line-height: 1.5; color: var(--dim); max-width: 52ch; }
.cta-panel .btn-xl { margin-top: 28px; }
.cta-free {
  margin: 14px 0 0; font-size: 14px; letter-spacing: 0.02em;
  color: var(--color-accent-400);
}
.cta-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; }

/* Haqiqiy QR — t.me/itusta_bot ga olib boradi. SVG o'z ichida ochiq fon va
   quiet-zone bilan keladi, shuning uchun bu yerda faqat o'lcham va ramka. */
.qr {
  width: 160px; height: 160px; display: block;
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.cta-qr:hover .qr { border-color: var(--color-accent-400); }
.qr-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }

@media (max-width: 720px) {
  .cta-panel { grid-template-columns: 1fr; }
  .cta-qr { align-items: flex-start; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center;
  padding: 28px 0 40px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--dim);
}
.footer-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--paper); margin-right: auto;
}

/* ── Background canvas + hero reveal ────────────────────────────────────── */

#scene {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; transition: opacity 0.3s linear;
}

@keyframes letterIn {
  from { opacity: 0; filter: blur(10px); transform: translateY(0.12em); }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
.glyph { display: inline-block; animation: letterIn 0.7s cubic-bezier(.2,.7,.2,1) both; }
.word { display: inline-block; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glyph { animation: none; }
}
