:root {
  /* Цвета сайта texnomart.uz */
  --yellow: #fbc100;
  --ink: #333;
  --black: #1a1a1a;
  --page: #f7f7f7;
  --paper: #fff;
  --line: #e4e4e4;
  --muted: #6b6b6b;

  --display: "Dela Gothic One", "Arial Black", sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(1rem, 4vw, 3.5rem);
  --max: 82rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip; /* повёрнутый ценник не должен давать горизонтальную прокрутку */
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
a[data-app] { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--black);
  color: var(--paper);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* ---------- Жёлтая полоса: шапка и первый экран ---------- */

.band {
  background: var(--yellow);
  color: var(--black);
  --hole: var(--yellow);
}

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.top__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  font-size: 0.9375rem;
  font-weight: 500;
}
.top__nav a { text-decoration: none; }
.top__nav a:hover { text-decoration: underline; }
.top__nav .top__phone { font-weight: 700; white-space: nowrap; }

.lang {
  display: inline-flex;
  padding: 3px;
  background: rgba(26, 26, 26, 0.12);
  border-radius: 999px;
}
.lang a {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.lang a:hover { text-decoration: none; background: rgba(26, 26, 26, 0.12); }
.lang a[aria-current="true"] { background: var(--black); color: var(--paper); }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--pad) clamp(3rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero__dates {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.25rem, 10.2vw, 9.25rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-left: -0.04em;
}

.hero__lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  font-weight: 500;
}

.timer { margin-top: 2rem; }
.timer__label { font-size: 0.9375rem; font-weight: 500; margin-bottom: 0.5rem; }
.timer__cells { display: flex; gap: 0.5rem; }
.timer__cell {
  min-width: 4.75rem;
  padding: 0.6rem 0.75rem 0.55rem;
  background: var(--black);
  color: var(--paper);
  border-radius: 10px;
  text-align: center;
}
.timer__cell b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.875rem;
  line-height: 1.1;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.timer__cell span { font-size: 0.8125rem; color: #d6d6d6; }

.btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 1.6rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  transition: background-color 0.15s;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero__actions .btn { margin-top: 0; }
.btn--outline { color: var(--black); box-shadow: inset 0 0 0 2px var(--black); }
.btn--outline:hover { background: var(--black); color: var(--paper); }
.btn--yellow { background: var(--yellow); color: var(--black); }
.btn--yellow:hover { background: #ffd43b; }
.btn--dark { background: var(--black); color: var(--paper); }
.btn--dark:hover { background: #000; }
.btn--tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #2aabee;
  color: #fff;
}
.btn--tg:hover { background: #1c93d1; }
.btn--tg .btn__tg { flex: none; }
.btn--tg.is-disabled { opacity: 0.55; cursor: default; pointer-events: none; }
.btn--ghost {
  background: var(--paper);
  color: var(--black);
  box-shadow: inset 0 0 0 2px var(--line);
}
.btn--ghost:hover { background: var(--yellow); box-shadow: none; }

/* Главный ценник, висит на шнурке */
.hero__tag {
  position: relative;
  justify-self: center;
  width: min(100%, 25rem);
  padding-top: 4.5rem;
  transform-origin: 50% 0;
  transform: rotate(-4deg);
  animation: swing 2.2s cubic-bezier(0.3, 0.6, 0.3, 1) both;
}
.hero__tag::before {
  /* шнурок */
  content: "";
  position: absolute;
  left: 50%;
  top: -40vh;
  height: calc(40vh + 4.5rem + 1.6rem);
  width: 2px;
  background: var(--black);
}

@keyframes swing {
  0% { transform: rotate(13deg); }
  22% { transform: rotate(-11deg); }
  44% { transform: rotate(3deg); }
  66% { transform: rotate(-7deg); }
  84% { transform: rotate(-2.5deg); }
  100% { transform: rotate(-4deg); }
}

/* ---------- Ценник ---------- */

.tag {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--paper);
  color: var(--black);
  border-radius: 16px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(51, 51, 51, 0.08);
}
.tag::before {
  /* отверстие под шнурок: цвет фона, на котором лежит ценник */
  content: "";
  position: absolute;
  top: 0.9rem;
  left: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: -0.45rem;
  border-radius: 50%;
  background: var(--hole, var(--page));
  box-shadow: inset 0 1px 2px rgba(51, 51, 51, 0.18);
  z-index: 2;
}

.tag__off {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  padding: 0.3rem 0.6rem 0.35rem;
  background: var(--black);
  color: var(--yellow);
  font-family: var(--display);
  font-size: 1.125rem;
  line-height: 1;
  border-radius: 8px;
}

.tag__photo {
  aspect-ratio: 4 / 3;
  padding: 2.4rem 1.5rem 0.5rem;
  display: grid;
  place-items: center;
}
.tag__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tag__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.25rem 1.1rem;
}
.tag__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
.tag__variant { font-size: 0.9375rem; color: var(--muted); margin-top: 0.15rem; }
.tag__specs {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.tag__prices { margin-top: auto; padding-top: 1rem; }
.tag__old {
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.tag__new {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tag__new small { font-size: 0.6em; font-weight: 600; }

/* отрывной корешок с выгодой */
.tag__stub {
  padding: 0.7rem 1.25rem;
  background: var(--yellow);
  border-top: 2px dashed var(--black);
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-variant-numeric: tabular-nums;
}

/* Крупный вариант на первом экране: на жёлтом фоне корешок чёрный */
.tag--hero { border-radius: 20px; box-shadow: 0 24px 50px rgba(26, 26, 26, 0.28); }
.tag--hero::before { top: 1.1rem; width: 1.1rem; height: 1.1rem; margin-left: -0.55rem; }
.tag--hero .tag__off { font-size: 1.75rem; padding: 0.45rem 0.8rem 0.5rem; top: 1.1rem; right: 1.1rem; }
.tag--hero .tag__photo { padding-top: 3.2rem; }
.tag--hero .tag__title { font-size: 1.375rem; }
.tag--hero .tag__new { font-size: clamp(1.75rem, 3vw, 2.375rem); }
.tag--hero .tag__specs { display: none; }
.tag--hero .tag__stub { background: var(--black); color: var(--yellow); border-top-color: var(--paper); }

/* ---------- Товары ---------- */

.deals, .how {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad);
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.1;
  color: var(--black);
}

.deals__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 2rem;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1.25rem;
}

/* ---------- Приложение ---------- */

.app { padding: 0 var(--pad); }
.app__inner {
  max-width: calc(var(--max) - 2 * var(--pad));
  margin: 0 auto clamp(2.5rem, 6vw, 5rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--black);
  color: var(--paper);
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.app__text { flex: 1 1 22rem; }
.app h2 { color: var(--yellow); }
.app__text p { margin-top: 0.75rem; max-width: 30rem; font-size: 1.125rem; }
.app__actions .btn { margin-top: 0; }
.app :focus-visible { outline-color: var(--yellow); }

/* ---------- Плавающая кнопка приложения ---------- */

.sticky {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 5;
  padding: 0.95rem 1.5rem;
  background: var(--black);
  color: var(--yellow);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(26, 26, 26, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.sticky.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ---------- Как купить ---------- */

.how { border-top: 1px solid var(--line); }
.how__list {
  list-style: none;
  counter-reset: step;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
}
.how__list li { counter-increment: step; }
.how__list li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--display);
  font-size: 1.375rem;
  line-height: 1;
  margin-bottom: 0.9rem;
}
.how__list h3 { font-size: 1.1875rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--black); }
.how__list p { max-width: 26rem; }
.how__list a { white-space: nowrap; font-weight: 600; }

/* ---------- Подвал ---------- */

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.foot p { max-width: 46rem; }

/* ---------- Адаптив ---------- */

@media (max-width: 56rem) {
  .hero { grid-template-columns: 1fr; }
  .hero__tag { width: min(100%, 21rem); padding-top: 3rem; margin-top: 1rem; }
  .hero__tag::before { top: 0; height: calc(3rem + 1.6rem); }
}

@media (max-width: 44rem) {
  .top__nav a[href^="#"] { display: none; }
}

@media (max-width: 30rem) {
  .sticky { left: 1rem; right: 1rem; bottom: 1rem; text-align: center; }
  .foot { padding-bottom: 6rem; }
  .top__logo img { width: 124px; height: auto; }
  .top__nav .top__phone { display: none; }
  .timer__cells { gap: 0.4rem; }
  .timer__cell { min-width: 0; flex: 1 1 0; padding: 0.55rem 0.3rem 0.5rem; }
  .timer__cell b { font-size: clamp(1.25rem, 6.4vw, 1.75rem); }
  .timer__cell span { font-size: clamp(0.6875rem, 2.7vw, 0.8125rem); white-space: nowrap; }
  .btn { display: block; text-align: center; }
  .btn--tg { display: flex; }
  .grid { grid-template-columns: 1fr; }
  /* На телефонах ценник выпрямляем и убираем качание, иначе наклон
     вылезает за край экрана и обрезается. */
  .hero__tag {
    animation: none;
    transform: none;
    width: min(100%, 20rem);
    padding-top: 2.75rem;
  }
  .hero__tag::before { top: 0; height: 2.75rem; }
}

@media (max-width: 22.5rem) {
  /* Совсем узкие экраны (≈320px): уменьшаем крупные надписи */
  .hero__title { font-size: 2.875rem; }
  .tag--hero .tag__new { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__tag { animation: none; }
  .btn, .sticky { transition: none; }
}
