/* =========================================================
   TezQR × Alif — лендинг акции «2% keshbek»
   Брейкпоинт: 768px (mobile < 768 ≤ desktop)
   ========================================================= */

:root {
  /* Цвета кампании (из Figma-креативов) */
  --green-bg-top: #00CA76;
  --green-bg-bottom: #00C673;
  --green-ring: #01BA6D;     /* тёмные кольца на фоне hero */
  --green-deep: #02511F;     /* таймер, калькулятор, текст на лайме */
  --lime: #9DFC49;           /* основная кнопка */
  --orange: #F55D05;         /* TezQR */

  /* Нейтральные (как на alifmobi.uz/tezqr) */
  --white: #FFFFFF;
  --black: #000000;
  --ink: #111111;
  --ink-2: #121826;
  --muted: #6B6D6C;
  --step-number: #ABABAB;
  --surface: #F3F4F6;        /* карточки, футер */
  --surface-step: #F5F5F5;   /* карточки шагов */
  --surface-what: #F6FBF8;   /* карточка «Что такое TezQR» */

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(56px, 7vw, 112px);
  --h2: clamp(26px, 3.47vw, 50px);
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green-deep); outline-offset: 3px; border-radius: 8px; }
.hero :focus-visible, .final :focus-visible, .header :focus-visible { outline-color: var(--white); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* Видимость по устройству */
.only-mobile { display: none !important; }
@media (max-width: 767.98px) {
  .only-mobile { display: flex !important; }
  .only-desktop { display: none !important; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 30px;
  border-radius: var(--radius-pill); border: 0;
  font: 700 18px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(.97); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; font-weight: 600; }
.btn--block { width: 100%; }
.btn--lime { background: var(--lime); color: var(--green-deep); }
.btn--white { background: var(--white); color: var(--green-deep); }
.btn--outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.85); font-weight: 600; font-size: 17px; padding: 0 26px; }
.btn__icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Заголовки секций ---------- */
.h2 {
  max-width: 1100px; margin: 0 auto clamp(32px, 4vw, 56px); padding: 0 var(--gutter);
  text-align: center; font-size: var(--h2); line-height: 1.02; font-weight: 800; letter-spacing: -0.04em; color: var(--black);
}
.h2--left { margin: 0; padding: 0; text-align: left; letter-spacing: -0.035em; line-height: 1.05; }

/* ---------- Header (прозрачный, поверх hero) ---------- */
.header { position: absolute; inset: 0 0 auto 0; z-index: 30; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.header__logo img { height: 30px; width: auto; }
.header__actions { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; padding: 3px; border-radius: var(--radius-pill); background: rgba(2,81,31,.22); }
.lang__btn {
  min-height: 38px; padding: 0 14px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--white); font: 600 14px/1 var(--font); cursor: pointer;
}
.lang__btn[aria-pressed="true"] { background: var(--white); color: var(--green-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background: linear-gradient(180deg, var(--green-bg-top) 0%, var(--green-bg-bottom) 100%);
}
.hero__grid {
  display: grid; gap: 28px 32px; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
  grid-template-areas: "copy visual" "actions visual";
  padding-top: 128px; padding-bottom: 72px;
}
.hero__copy { grid-area: copy; display: flex; flex-direction: column; gap: 28px; align-self: end; position: relative; z-index: 2; }
.hero__visual { grid-area: visual; position: relative; }
.hero__actions { grid-area: actions; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; align-self: start; position: relative; z-index: 2; }
.lockup { display: flex; align-items: center; gap: 14px; }
.lockup__alif { height: 34px; width: auto; }
.lockup__x { font-size: 26px; line-height: 1; }
.lockup__tezqr { width: 49px; height: 49px; }
.hero__title { font-size: clamp(30px, 4.7vw, 68px); line-height: 1.04; font-weight: 800; letter-spacing: -0.04em; }
.hero__period { font-size: 20px; font-weight: 600; }

/* Колесо: кольца фона + вращающееся кольцо + статичные «2%» */
.wheel { position: relative; width: 100%; max-width: 500px; margin: 0 auto; aspect-ratio: 1; }
.wheel__rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wheel__rings circle { fill: none; stroke: var(--green-ring); }
.wheel__ring, .wheel__two { position: absolute; inset: 0; width: 100%; height: 100%; }
.wheel__ring { animation: wheel-rock 7s cubic-bezier(.45,0,.55,1) infinite; transform-origin: 50% 50%; will-change: transform; }
@keyframes wheel-rock {
  0%   { transform: rotate(0deg); }
  35%  { transform: rotate(9deg); }   /* плавно вправо */
  50%  { transform: rotate(9deg); }   /* пауза */
  85%  { transform: rotate(0deg); }   /* плавно назад */
  100% { transform: rotate(0deg); }
}

/* Таймер */
.timer-block { display: flex; flex-direction: column; gap: 10px; }
.timer-block__label { font-size: 15px; font-weight: 600; }
.timer { display: grid; grid-template-columns: repeat(4, 84px); gap: 8px; }
.timer__cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 0 10px; border-radius: 16px; background: var(--green-deep); color: var(--white);
}
.timer__v { font-size: 34px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer__l { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.85); }

/* ---------- Популярные места ---------- */
.places { background: var(--white); padding: clamp(40px, 5.56vw, 80px) 0 24px; display: flex; flex-direction: column; gap: 16px; }
.places__title { font-size: clamp(22px, 2.36vw, 34px); font-weight: 700; letter-spacing: -0.03em; }
.marquee { overflow: hidden; padding: 14px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 24s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__set { display: flex; gap: 16px; padding-right: 16px; }
.logo-tile {
  flex: none; width: 220px; height: 112px; border-radius: 28px; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.logo-tile img { object-fit: contain; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Что такое TezQR ---------- */
.what { background: var(--white); padding: var(--section-y) 0 clamp(16px, 2vw, 32px); }
.what__card {
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(24px, 4vw, 72px);
  background: var(--surface-what); border-radius: clamp(28px, 3vw, 44px);
  padding: clamp(28px, 4vw, 56px) clamp(24px, 5vw, 72px);
}
.what__media { flex: 1 1 300px; min-width: 0; display: flex; justify-content: center; }
.what__media img { width: 100%; max-width: 400px; height: auto; }
.what__text { flex: 1.3 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.what__text p { font-size: clamp(17px, 1.6vw, 22px); line-height: 1.55; color: var(--muted); }

/* ---------- Как оплатить (липкие карточки) ---------- */
.steps { background: var(--white); padding: var(--section-y) var(--gutter); }
.steps .h2 { padding: 0; }
.steps__list { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; display: flex; flex-direction: column; gap: 24px; }
.step {
  position: sticky; top: calc(96px + var(--i) * 24px);
  display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  background: var(--surface-step); border-radius: clamp(24px, 2.2vw, 32px);
  padding: clamp(22px, 2.2vw, 32px) clamp(22px, 2.2vw, 32px) 0;
  box-shadow: 0 -16px 40px -28px rgba(0,0,0,.25);
}
.step__n { font-size: clamp(36px, 3.9vw, 56px); line-height: 1; font-weight: 700; font-style: italic; color: var(--step-number); }
.step__title { font-size: clamp(17px, 1.7vw, 24px); line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.step__img { width: 100%; max-width: clamp(240px, 22vw, 320px); height: auto; margin: 12px auto 0; }

/* ---------- Преимущества ---------- */
.benefits { background: var(--white); padding: var(--section-y) 0; }
.benefits__grid { display: flex; flex-wrap: wrap; gap: 16px; }
.benefit {
  flex: 1 1 300px; min-width: 0; min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 28px; border-radius: 24px; background: var(--surface);
}
.benefit img { width: 72px; height: 72px; }
.benefit p { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.4; color: var(--ink-2); }

/* ---------- Таблица + калькулятор ---------- */
.benefit-calc { background: var(--white); padding: var(--section-y) 0; }
.calc-grid { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.5vw, 32px); align-items: stretch; }
.table-wrap { flex: 1.2 1 440px; min-width: 0; overflow-x: auto; border-radius: 24px; background: var(--surface); align-self: start; }
.cb-table { width: 100%; min-width: 330px; border-collapse: collapse; font-size: clamp(14px, 1.4vw, 17px); }
.cb-table th, .cb-table td { padding: 18px 16px; text-align: left; white-space: nowrap; border-bottom: 1px solid rgba(0,0,0,.06); }
.cb-table th { font-weight: 600; color: var(--muted); border-bottom-color: rgba(0,0,0,.08); }
.cb-table th.is-alif { font-weight: 700; color: var(--green-deep); background: rgba(157,252,73,.6); }
.cb-table td:nth-child(1) { font-weight: 600; color: var(--ink); }
.cb-table td:nth-child(2) { font-weight: 700; color: var(--green-deep); background: rgba(157,252,73,.25); }
.cb-table td:nth-child(3) { color: var(--muted); }
.cb-table tr:last-child td { border-bottom: 0; }

.calc {
  flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  padding: 28px; border-radius: 28px; background: var(--green-deep); color: var(--white);
}
.calc__label { font-size: 20px; line-height: 1.3; font-weight: 700; }
.calc__spend { font-size: clamp(30px, 3.2vw, 40px); font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.calc__range { width: 100%; margin: 0; height: 32px; accent-color: var(--lime); cursor: pointer; }
.calc__results { display: flex; gap: 12px; }
.calc__box { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 18px; }
.calc__box span { font-size: 14px; font-weight: 600; }
.calc__box strong { font-size: clamp(20px, 2.1vw, 26px); font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.calc__box--alif { background: var(--lime); color: var(--green-deep); }
.calc__box--no { background: rgba(255,255,255,.14); color: rgba(255,255,255,.88); }
.calc__bar { height: 8px; border-radius: var(--radius-pill); background: rgba(255,255,255,.14); overflow: hidden; }
.calc__fill { height: 100%; width: 50%; border-radius: var(--radius-pill); background: var(--lime); transition: width .2s ease; }
.calc__note { font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.88); }

/* ---------- FAQ ---------- */
.faq { background: var(--white); padding: clamp(24px, 4vw, 56px) 0 var(--section-y); }
.faq__list { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 10px; }
.faq__item { background: var(--surface); border-radius: 20px; }
.faq__item summary {
  list-style: none; cursor: pointer; min-height: 60px; padding: 20px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: none; width: 22px; height: 22px;
  background: no-repeat center / 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(180deg); }
.faq__item p { padding: 0 22px 22px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.faq__cta { padding: 0 22px 22px; }

/* ---------- Финальный CTA ---------- */
.final { color: var(--white); background: linear-gradient(180deg, var(--green-bg-top) 0%, var(--green-bg-bottom) 100%); }
.final__inner { display: flex; flex-direction: column; gap: 22px; padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); }
.final__title { font-size: var(--h2); line-height: 1.04; font-weight: 800; letter-spacing: -0.04em; }
.final .timer { grid-template-columns: repeat(4, minmax(0, 84px)); }
.final__buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); color: var(--ink); }
.footer__inner { display: flex; flex-direction: column; gap: 36px; padding-top: clamp(40px, 5vw, 64px); padding-bottom: 32px; }
.footer__logo { height: 32px; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.footer__col { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col--wide { flex: 2 1 320px; }
.footer__col h3 { font-size: 15px; font-weight: 700; }
.footer__col p, .footer__col a { font-size: 14px; line-height: 1.5; color: var(--muted); text-decoration: none; }
.footer__col a:hover { color: var(--ink); text-decoration: underline; }
.footer__copy { font-size: 14px; color: var(--muted); border-top: 1px solid rgba(0,0,0,.08); padding-top: 20px; }

/* ---------- Mobile sticky CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  align-items: center; gap: 12px;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--white); border-top: 1px solid rgba(0,0,0,.08);
}
.sticky-cta__timer { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sticky-cta__timer span { font-size: 12px; color: var(--muted); }
.sticky-cta__timer strong { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sticky-cta .btn { flex: none; min-height: 50px; font-weight: 700; font-size: 16px; }

/* =========================================================
   Mobile (< 768px)
   ========================================================= */
@media (max-width: 767.98px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } /* место под фиксированную панель */
  .header__logo img { height: 26px; }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "visual" "actions";
    gap: 18px; padding-top: 92px; padding-bottom: 32px;
  }
  .hero__copy { gap: 18px; }
  .hero__actions { gap: 18px; align-items: stretch; }
  .lockup { gap: 10px; }
  .lockup__alif { height: 26px; }
  .lockup__x { font-size: 20px; }
  .lockup__tezqr { width: 38px; height: 38px; }
  .hero__period { font-size: 16px; }
  .wheel { max-width: 340px; margin: 4px auto 8px; }

  .timer-block__label { font-size: 14px; }
  .timer { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .timer__cell { padding: 10px 0 8px; }
  .timer__v { font-size: 28px; }

  .final__buttons { flex-direction: column; }
  .final__buttons .btn { width: 100%; }

  .calc { padding: 22px; }
  .calc__box { padding: 14px; }
  .calc__box strong { font-size: 19px; white-space: normal; }
}

/* Планшет: колесо чуть меньше, чтобы заголовок не сжимался */
@media (min-width: 768px) and (max-width: 1099.98px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); }
}

/* Уважение к настройке «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  .wheel__ring, .marquee__track { animation: none; }
  html { scroll-behavior: auto; }
}
