/* ==========================================================================
   infoline — ҰБТ дайындық платформасы
   Дизайн жүйесі. Токендер мен қозғалыс макеттен (Infoline.dc.html) алынды;
   мұнда олар inline стиль емес, қайта қолданылатын кластарға айналды.
   ========================================================================== */

@font-face { font-family: "JUZ40"; src: url("fonts/JUZ40-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JUZ40"; src: url("fonts/JUZ40-Medium.otf")  format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JUZ40"; src: url("fonts/JUZ40-Bold.otf")    format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kellion"; src: url("fonts/Kellion-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

/* --- Токендер ----------------------------------------------------------- */

:root, [data-theme="light"] {
  --brand: "Kellion", "JUZ40", Georgia, serif;
  --display: "JUZ40", "Kellion", Georgia, serif;
  --ui: "JUZ40", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Бет — ТАЗА АҚ. Кремді жерде (#fffcf2) түстер бәсеңдеу көрінетін;
     ақ фонда акцент пен vivid түстер әлдеқайда қанық шығады. */
  --bg: #ffffff;  --fg: #0d0b14;  --fg2: #332e4d;  --fg3: #625b82;
  --line: #e2dcf7;  --accent: #2f18ff;  --accent-fg: #ffffff;
  /* Бөлектелген бет — ақ фонда көріну үшін жеңіл лавандалық реңк
     (бұрын сары, сосын ақ еді — ақ бет келгенде ол жоғалып кететін). */
  --surface2: #f5f2ff;  --surface2-inner: #ffffff;
  --card: #ffffff;  --solid: #0d0b14;  --solid-fg: #ffffff;
  --term: #0d0b14;  --term-fg: #f7f5ff;  --glass: rgba(255, 255, 255, 0.72);

  --aurora-a: rgba(255, 20, 140, 0.55);
  --aurora-b: rgba(47, 24, 255, 0.48);
  --aurora-c: rgba(0, 219, 150, 0.5);
  --grid: rgba(13, 11, 20, 0.06);

  /* Ақ фонда таза, қанық реңктер */
  --v1: #ff0f86;  --v2: #2f18ff;  --v3: #00c184;  --v4: #ffbe00;  --v5: #ff5100;

  /* Күй түстері — кремді жерде де, қара жерде де 4.5:1-ден асады */
  --ok: #0a7d55;  --warn: #9a5b00;  --danger: #c0341d;
  --ok-soft: rgba(10, 125, 85, 0.1);
  --warn-soft: rgba(154, 91, 0, 0.1);
  --danger-soft: rgba(192, 52, 29, 0.09);

  --radius-lg: 40px;  --radius-md: 16px;  --radius-pill: 100px;
  --pad-card: 40px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

[data-theme="dark"] {
  --bg: #0b0a14;  --fg: #f5f2ff;  --fg2: #c2bbe4;  --fg3: #8d85b6;
  --line: #2a2550;  --accent: #8877ff;  --accent-fg: #0b0a14;
  --surface2: #1d1a38;  --surface2-inner: rgba(11, 10, 20, 0.55);
  --card: #16142a;  --solid: #f5f2ff;  --solid-fg: #0b0a14;
  --term: #07060f;  --term-fg: #efebff;  --glass: rgba(245, 242, 255, 0.08);

  --aurora-a: rgba(255, 95, 174, 0.35);
  --aurora-b: rgba(136, 119, 255, 0.42);
  --aurora-c: rgba(40, 232, 174, 0.28);
  --grid: rgba(245, 242, 255, 0.07);

  --v1: #ff5fae;  --v2: #8877ff;  --v3: #28e8ae;  --v4: #ffd24d;  --v5: #ff7a33;

  --ok: #4ee0ab;  --warn: #ffc24d;  --danger: #ff8a70;
  --ok-soft: rgba(78, 224, 171, 0.12);
  --warn-soft: rgba(255, 194, 77, 0.12);
  --danger-soft: rgba(255, 138, 112, 0.12);
}

/* --- Негіз + браузердің өз беттері -------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ui);
  font-size: 16px;
  letter-spacing: -0.4px;
  -webkit-font-smoothing: antialiased;
}

/* Браузер әдепкілері ешбір дизайн жүйесіне тиесілі емес — оларды да боямыз. */
::selection { background: color-mix(in oklch, var(--accent) 22%, transparent); color: var(--fg); }
:root { accent-color: var(--accent); caret-color: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in oklch, var(--fg) 24%, transparent) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: color-mix(in oklch, var(--fg) 20%, transparent);
  border-radius: 9999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: color-mix(in oklch, var(--fg) 34%, transparent); background-clip: content-box; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--fg); }

/* Сандар бағандары жылжымауы үшін */
.tnum, .stat__value, .count__value, .step__index { font-variant-numeric: tabular-nums; }

/* --- Layout -------------------------------------------------------------- */

.shell { max-width: 1432px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0 80px; display: flex; flex-direction: column; gap: 16px; }
.rule { height: 1px; background: var(--line); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--tight { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid__feature { grid-column: span 2; min-width: 0; }
@media (max-width: 720px) { .grid__feature { grid-column: span 1; } }

.row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { align-items: flex-end; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack--lg { gap: 24px; }
.spacer { margin-left: auto; }

/* --- Типографика --------------------------------------------------------- */

.h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 5vw, 48px); line-height: 1.28; letter-spacing: -0.96px;
  margin: 0; text-wrap: balance;
}
.h2 { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.32; letter-spacing: -0.64px; margin: 0; text-wrap: balance; }
.h3 { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.32; letter-spacing: -0.48px; margin: 0; text-wrap: balance; }

.label { font-size: 12px; text-transform: uppercase; letter-spacing: -0.4px; color: var(--fg3); }
.label--fg2 { color: var(--fg2); }
.body { font-size: 14px; line-height: 1.35; color: var(--fg2); }
.body--lg { font-size: 20px; line-height: 1.35; letter-spacing: -0.4px; }
.measure { max-width: 68ch; }
.mono { font-family: var(--mono); font-size: 13px; line-height: 1.6; letter-spacing: -0.2px; }

/* --- Карточкалар --------------------------------------------------------- */

.card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--pad-card); display: flex; flex-direction: column; gap: 24px; min-width: 0;
}
.card--fill {
  background: var(--surface2);
  border-color: color-mix(in oklch, var(--accent) 14%, transparent);
  box-shadow: 0 1px 2px color-mix(in oklch, var(--fg) 5%, transparent),
              0 16px 40px -30px color-mix(in oklch, var(--accent) 45%, transparent);
}
.card--fill .label { color: var(--fg3); }
.card--term { background: var(--term); border-color: transparent; color: var(--term-fg); }
.card--term .label { color: color-mix(in oklch, var(--term-fg) 58%, transparent); }
.card--tight { padding: 24px 28px; gap: 8px; }
@media (max-width: 640px) {
  .card { padding: 28px; border-radius: 28px; }
  .stats { gap: 24px; }
  .stat__value { font-size: 28px; }
  .kpi__value { font-size: 32px; }
  .list__row { gap: 12px; padding: 20px 0; }
  .list__title { font-size: 20px; }
  .carousel > * { flex: 0 0 92%; }
  .btn { padding: 14px 24px; }
}

/* --- Түймелер ------------------------------------------------------------ */

.btn {
  font-family: inherit; font-size: 14px; text-transform: uppercase; letter-spacing: -0.28px;
  border-radius: var(--radius-pill); padding: 16px 32px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--accent-fg);
  transition: transform 420ms var(--ease), box-shadow 420ms var(--ease),
              background-color 240ms ease, color 240ms ease, border-color 240ms ease;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 24px -12px color-mix(in oklch, var(--fg) 45%, transparent); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.975); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn--solid { background: var(--solid); color: var(--solid-fg); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn--quiet { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--sm { padding: 12px 24px; font-size: 12px; letter-spacing: -0.4px; }
.btn--md { padding: 14px 28px; }
.btn--icon { padding: 0; width: 38px; height: 38px; justify-content: center; border-color: var(--line); background: transparent; color: var(--fg); }
.btn--icon svg { width: 16px; height: 16px; display: block; }
.btn--icon:disabled { opacity: .35; }

.btn[data-loading="true"] { position: relative; color: transparent; }
.btn[data-loading="true"]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 9999px;
  color: var(--accent-fg); animation: il-spin .7s linear infinite;
}
.btn--ghost[data-loading="true"]::after, .btn--quiet[data-loading="true"]::after { color: var(--fg); }

/* --- Пилюлялар / тегтер --------------------------------------------------- */

.pill {
  border: 1px solid var(--line); border-radius: 9999px; padding: 8px 16px;
  font-size: 12px; text-transform: uppercase; letter-spacing: -0.4px;
  background: var(--bg); color: var(--fg2); white-space: nowrap;
}
.pill--accent { color: var(--accent); }
.pill--ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in oklch, var(--ok) 32%, transparent); }
.pill--warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in oklch, var(--warn) 32%, transparent); }
.pill--danger { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in oklch, var(--danger) 32%, transparent); }

/* --- Өрістер -------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field > .label { text-transform: uppercase; }

.input, .textarea {
  font-family: inherit; font-size: 14px; letter-spacing: -0.28px; color: var(--fg);
  background: var(--card); border: 1px solid var(--line);
  transition: border-color 260ms ease, box-shadow 260ms ease;
}
.input { border-radius: var(--radius-pill); padding: 12px 20px; }
.textarea {
  border-radius: var(--radius-md); padding: 20px; width: 100%;
  font-family: var(--mono); font-size: 13px; line-height: 1.6; resize: vertical; min-height: 320px;
}
.input:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--danger) 18%, transparent);
}

.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice__btn {
  font-family: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: -0.4px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg2);
  border-radius: 9999px; padding: 8px 18px; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.choice__btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* --- Статистика ----------------------------------------------------------- */

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.32; letter-spacing: -0.64px; }
.stat__label { font-size: 12px; text-transform: uppercase; color: var(--fg2); letter-spacing: -0.4px; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; }

.kpi__value { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.35; letter-spacing: -0.8px; }

/* --- Тізім жолдары -------------------------------------------------------- */

.list { display: flex; flex-direction: column; }
.list__row {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0;
  font: inherit; color: inherit; cursor: pointer; width: 100%;
  transition: background-color 200ms ease;
}
.list__row:hover { background: color-mix(in oklch, var(--accent) 5%, transparent); }
.list__row:last-child { border-bottom: 0; }
.list__title { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.32; letter-spacing: -0.48px; }
.list__go { font-size: 14px; text-transform: uppercase; letter-spacing: -0.28px; }

/* --- Қадамдар ------------------------------------------------------------- */

.step { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step__dot { width: 10px; height: 10px; border-radius: 9999px; background: var(--line); flex: none; transition: background-color 300ms ease; }
.step__label { font-size: 16px; letter-spacing: -0.4px; color: var(--fg3); flex: 1 1 200px; transition: color 300ms ease; }
.step__meta { font-size: 12px; text-transform: uppercase; letter-spacing: -0.4px; color: var(--fg3); }
.step[data-state="active"] .step__dot { background: var(--accent); animation: il-pulse 1.6s ease-in-out infinite; }
.step[data-state="active"] .step__label { color: var(--fg); }
.step[data-state="done"] .step__dot { background: var(--ok); }
.step[data-state="done"] .step__label { color: var(--fg2); }
.step[data-state="failed"] .step__dot { background: var(--danger); }
.step[data-state="failed"] .step__label { color: var(--danger); }

.progress { flex: 1 1 200px; height: 1px; background: var(--line); position: relative; min-width: 120px; }
/* width емес, transform анимацияланады: width-ті жандандыру әр кадрда
   layout қайта есептеуге мәжбүрлейді (layout thrash). */
.progress__bar {
  position: absolute; inset: 0; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 420ms var(--ease); will-change: transform;
}

/* --- Терминал ------------------------------------------------------------- */

.term { display: flex; flex-direction: column; gap: 10px; font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--term-fg); max-height: 420px; overflow-y: auto; }
.term__line { overflow-wrap: anywhere; }
.term__line[data-level="error"] { color: #ff8a70; }
.term__line[data-level="warn"] { color: #ffc24d; }
.term__line[data-level="done"] { color: #4ee0ab; }

/* --- IDLE код терезесі ---------------------------------------------------- */

/* Backend-тің PNG-інде IDLE терезесінің тақырып жолағы мен мәзірі БҰРЫННАН
   бар (code_render.py оларды өзі салады), сондықтан мұнда қайта салмаймыз —
   әйтпесе жақтау екі рет көрінеді. Сурет өз өлшемінен ҮЛКЕЙТІЛМЕЙДІ: 313px
   PNG-ді 640px-ке созу мәтінді бұлдыратады. */
.idle {
  display: inline-block; max-width: 100%;
  border-radius: 6px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px rgba(20, 18, 26, .10), 0 8px 24px -14px rgba(20, 18, 26, .45);
}
.idle__img { display: block; width: auto; max-width: 100%; height: auto; }
.idle__frame { overflow-x: auto; max-width: 100%; }

/* --- Нұсқалар ------------------------------------------------------------- */

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.option {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 20px;
  font-size: 14px; line-height: 1.35; letter-spacing: -0.28px;
  display: flex; gap: 12px; min-width: 0; background: var(--bg);
}
.option[data-correct="true"] { border-color: var(--accent); }
.option__letter { color: var(--fg3); text-transform: uppercase; flex: none; }
.option[data-correct="true"] .option__letter { color: var(--accent); }
.option__text { color: var(--fg); overflow-wrap: anywhere; }

/* --- Карусель ------------------------------------------------------------- */

.carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; align-items: stretch; padding: 4px 0 16px; }
.carousel::-webkit-scrollbar { height: 0; }
.carousel { scrollbar-width: none; }
.carousel > * { flex: 0 0 min(88%, 880px); scroll-snap-align: center; }

.nav-pills {
  display: flex; align-items: center; gap: 8px; overflow-x: auto;
  scroll-snap-type: x proximity; max-width: min(100%, 620px);
  padding: 6px 2px; scrollbar-width: none;
  /* Шетіндегі көмескілеу — тізімнің жалғасатынын көрсетеді */
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.nav-pills::-webkit-scrollbar { height: 0; }
.nav-pill {
  flex: none; scroll-snap-align: center; font-family: inherit;
  background: transparent; color: var(--fg2); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 10px 18px;
  font-size: 12px; text-transform: uppercase; letter-spacing: -0.4px; cursor: pointer;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}
.nav-pill:hover { border-color: var(--fg3); color: var(--fg); }
.nav-pill[aria-current="page"] { background: var(--solid); color: var(--solid-fg); border-color: var(--solid); }
.nav-pill:disabled { opacity: .35; cursor: not-allowed; }
.nav-pill:disabled:hover { border-color: var(--line); color: var(--fg2); }

/* --- Хабарламалар --------------------------------------------------------- */

.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius-md); padding: 16px 20px; font-size: 14px; line-height: 1.4; }
.notice--danger { background: var(--danger-soft); color: var(--danger); }
.notice--warn { background: var(--warn-soft); color: var(--warn); }
.notice--ok { background: var(--ok-soft); color: var(--ok); }
.notice a { color: inherit; }

.errors { display: flex; flex-direction: column; gap: 10px; }
.errors__item { font-size: 14px; line-height: 1.35; color: var(--fg2); padding-left: 16px; border-left: 1px solid var(--danger); }

.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 0; }
.empty__text { font-size: 16px; color: var(--fg2); letter-spacing: -0.4px; max-width: 52ch; }

.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg,
    color-mix(in oklch, var(--fg) 6%, transparent) 25%,
    color-mix(in oklch, var(--fg) 11%, transparent) 37%,
    color-mix(in oklch, var(--fg) 6%, transparent) 63%);
  background-size: 400% 100%;
  animation: il-shimmer 1.4s ease infinite;
}

/* --- Топ жолағы + шапка ---------------------------------------------------- */

.topbar {
  background: var(--accent); color: var(--accent-fg);
  min-height: 44px; display: flex; align-items: center; justify-content: center;
  gap: 14px; padding: 10px 24px; flex-wrap: wrap; text-align: center; font-size: 13px;
}
.topbar--warn { background: var(--warn); color: #fff; }
.topbar--note { background: var(--accent); color: var(--accent-fg); }
.topbar a { color: inherit; text-decoration: underline; }
.topbar__tag { flex: none; border: 1px solid rgba(255,255,255,.65); border-radius: 9999px; padding: 5px 14px; font-size: 11px; white-space: nowrap; }

.header { min-height: 80px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 20px 0; }

.logo { display: flex; align-items: center; gap: 14px; margin-right: auto; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.logo__mark { position: relative; width: 36px; height: 36px; flex: none; }
.logo__ring { position: absolute; inset: 0; border: 2px solid var(--v2); border-radius: 9px; animation: il-spin 11s linear infinite; }
.logo__blob { position: absolute; inset: 9px; background: var(--v1); animation: il-morph 4.6s ease-in-out infinite; }
.logo__dot { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 9999px; background: var(--v3); animation: il-pulse 2.6s ease-in-out infinite; }
.logo__word { display: flex; align-items: baseline; font-family: var(--brand); font-size: 30px; line-height: 1; letter-spacing: .5px; }
.logo__letter { animation: il-rise 620ms var(--ease) both; }

.footer {
  background: var(--term); color: var(--term-fg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 80px; padding: 96px 24px 40px;
}
.footer__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(242,237,233,.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(242,237,233,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
}
/* Көлбеу жүгіртпе жол — макеттің футеріндегі белгісі. */
.marquee {
  position: absolute; left: -10%; right: -10%; top: 38%;
  transform: rotate(-4deg); overflow: hidden; pointer-events: none;
  border-top: 1px solid rgba(242,237,233,.12);
  border-bottom: 1px solid rgba(242,237,233,.12);
  padding: 14px 0; background: rgba(242,237,233,.03);
}
.marquee__track {
  display: flex; width: max-content;
  animation: unt-marquee 28s linear infinite;
  font-size: 14px; text-transform: uppercase; letter-spacing: -0.28px;
  color: rgba(242,237,233,.5);
}
.marquee__track > span { padding-right: 24px; white-space: pre; }
@keyframes unt-marquee { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
.footer__inner {
  position: relative; max-width: 1432px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 64px;
  will-change: transform, opacity;
}
.footer__head { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 48px); line-height: 1.26; letter-spacing: -0.96px; text-wrap: balance; }
.footer__body { font-size: 14px; line-height: 1.5; color: color-mix(in oklch, var(--term-fg) 82%, transparent); max-width: 60ch; }
.footer__giant {
  will-change: transform;
  font-family: var(--brand); font-size: clamp(64px, 18vw, 280px); line-height: .82; letter-spacing: -.02em;
  background: linear-gradient(100deg, #ff9473, var(--aurora-b) 45%, #a7fccd);
  -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none;
}
.footer__meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; text-transform: uppercase; letter-spacing: -0.4px; color: color-mix(in oklch, var(--term-fg) 62%, transparent); }

/* --- Hero ----------------------------------------------------------------- */

.hero { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg); }
.hero__inner { position: relative; padding: 80px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.hero__title { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 5.6vw, 70px); line-height: 1.2; letter-spacing: -1.2px; margin: 0; max-width: 20ch; text-wrap: balance; }
.hero__sub { font-size: 20px; line-height: 1.35; letter-spacing: -0.4px; color: var(--fg2); margin: 0; max-width: 62ch; text-wrap: pretty; }
.hero__badge { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9999px; padding: 9px 20px; font-size: 12px; letter-spacing: .2px; color: var(--fg2); background: var(--glass); }
.hero__badge::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: var(--accent); flex: none; }
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 58% 46% at 50% 44%,
    var(--bg) 0%,
    color-mix(in oklch, var(--bg) 72%, transparent) 52%,
    transparent 78%);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.aurora { position: absolute; border-radius: 9999px; filter: blur(80px); pointer-events: none; animation: unt-aurora 18s ease-in-out infinite; }
.aurora--a { right: -80px; top: -140px; width: 440px; height: 440px; background: linear-gradient(135deg, var(--aurora-a), var(--aurora-b)); }
.aurora--b { left: -120px; bottom: -160px; width: 380px; height: 380px; background: linear-gradient(135deg, var(--aurora-c), var(--aurora-b)); animation-duration: 24s; animation-direction: reverse; }
@media (max-width: 720px) {
  .hero__inner { padding: 56px 24px; gap: 20px; }
  .hero__sub { font-size: clamp(15px, 4.2vw, 20px); }
  .hero__badge { font-size: 11px; padding: 8px 16px; text-wrap: balance; }
  /* Тік, тар hero-да дөңгелек scrim мәтін аймағын жаппай қалады —
     эллипсті кеңейтіп, ауроны шетке ысырамыз. */
  .hero__scrim {
    background: radial-gradient(ellipse 130% 52% at 50% 52%,
      var(--bg) 0%,
      color-mix(in oklch, var(--bg) 84%, transparent) 58%,
      color-mix(in oklch, var(--bg) 40%, transparent) 82%,
      transparent 100%);
  }
  .aurora { filter: blur(64px); opacity: .75; }
}

/* --- Қозғалыс -------------------------------------------------------------- */

@keyframes il-spin { to { transform: rotate(360deg); } }
@keyframes il-morph {
  0%, 100% { border-radius: 4px; transform: rotate(0deg) scale(1); }
  35% { border-radius: 50%; transform: rotate(120deg) scale(.78); }
  70% { border-radius: 2px; transform: rotate(225deg) scale(1.1); }
}
@keyframes il-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.9); opacity: .45; } }
@keyframes il-rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes unt-aurora {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6%, -4%, 0) scale(1.18); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes il-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Макетте экранға кіру анимациясы ЖОҚ: қозғалыс скроллмен байланысқан
   (motion.js — прогресс, скроллда шығу, футер параллаксы, карусель тереңдігі). */

.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 50; pointer-events: none; }
.scroll-progress > span {
  display: block; height: 2px; width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
}

/* Карусель слайдтарының тереңдігін motion.js басқарады, сондықтан мұндағы
   transition тек оны тегіс қылу үшін. */
.carousel > * { transition: transform 420ms var(--ease), opacity 420ms var(--ease); }

/* Макеттегідей НҮКТЕЛІ өшіру: тек әрдайым жүретін сәндік қозғалыстар.
   Бұрын мұнда `*` бойынша жалпы ереже тұрған — ол «Reduce motion» қосулы
   пайдаланушыда логотипті қоса БӘРІН тоқтатып, бетті мүлдем қатырып
   тастайтын. Макет олай істемейді. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  .aurora, .logo__mark *, .logo__letter, .marquee__track { animation: none !important; }
  .logo__letter { opacity: 1 !important; transform: none !important; }
  .carousel > * { opacity: 1 !important; transform: none !important; }
  .scroll-progress { display: none; }
}

/* --- Көмекші --------------------------------------------------------------- */

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