/*
 * JAHONORO — asos: shriftlar, reset, tipografiya, fokus, harakatni kamaytirish.
 */

/* Bodoni Moda va Onest — o'zgaruvchan (variable) woff2, OFL litsenziyasi (assets/fonts/OFL-*.txt) */
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/BodoniModa-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/BodoniModa-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/Onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/Onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: var(--vh);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body.has-sheet {
  overflow: hidden;
}

h1, h2, h3, h4, p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

img,
svg {
  display: block;
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}

/* Raqamlar: Bodoni, ustun bo'lib tekis */
.num {
  font-family: var(--font-display);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

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

/* Klaviatura fokusi — oltin halqa */
:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-ring) solid var(--gold);
  outline-offset: var(--focus-ring);
}

::selection {
  background: var(--gold-soft);
}

/* ---------- Ilova qobig'i ---------- */

.app {
  min-height: var(--vh);
}

.view {
  min-height: var(--vh);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--sp-8));
  opacity: 0;
  transition: opacity var(--dur-page) linear;
}

.view.is-in {
  opacity: 1;
}

body.no-tabbar .view {
  padding-bottom: calc(var(--safe-bottom) + var(--sp-8));
}

.page {
  padding: calc(var(--safe-top) + var(--sp-5)) var(--page-x) 0;
  max-width: 640px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 500;
}

/* Telegram tashqarisida / kirish yo'q */
.gate {
  min-height: var(--vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--page-x);
  text-align: center;
}

.gate__logo {
  font-family: var(--font-display);
  font-size: var(--fs-logo-lg);
  line-height: var(--lh-h1);
  font-weight: 500;
  letter-spacing: var(--ls-logo);
}

.gate__text {
  max-width: 34ch;
  color: var(--text-2);
}

/* ---------- Harakatni kamaytirish ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .view {
    transition: opacity 100ms linear !important;
  }

  .sheet-layer .sheet-backdrop,
  .toast {
    transition: opacity 100ms linear !important;
  }
}
