/* BirgaGo bosh sahifasi va /login (docs/06 §17.41). Dark Gold (docs/05) + Buxoro koshinlari (ko‘k, firuza), ikat va suzani. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  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;
}

:root {
  color-scheme: dark;
  --bg: #0c0f14;
  --night: #06080f;     /* teaser osmoni */
  --surface: #171c24;
  --surface-raised: #1d2430;
  --border: #2b3441;
  --text: #f2f0ea;
  --text-secondary: #adb5c2;
  --text-muted: #8f99a8;
  --gold: #c9a86a;
  --gold-hover: #d9ba7f;
  --gold-pressed: #b99555;
  --gold-bright: #e2bd76; /* teaser yoritilishi */
  --on-gold: #11151b;
  --focus: #e3c88f;
  --danger: #ff8c8c;
  --success: #66d79a;
  --tile: #1d4e89;
  --tile-deep: #0f2238;
  --turquoise: #2e9c9a;
  --radius-control: 12px;
  --radius-card: 16px;
  --gutter: 16px;
  --wrap: 1200px;

  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%232E9C9A' stroke-opacity='.2' stroke-width='1.4'%3E%3Cpath d='M40 8l8 24 24 8-24 8-8 24-8-24-24-8 24-8Z'/%3E%3Cpath d='M40 20 60 40 40 60 20 40Z'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3C/g%3E%3C/svg%3E");
  --suzani: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='12' viewBox='0 0 48 12'%3E%3Cg fill='none' stroke='%23C9A86A' stroke-opacity='.6' stroke-width='1.2'%3E%3Ccircle cx='12' cy='6' r='4'/%3E%3Ccircle cx='12' cy='6' r='1.4' fill='%23C9A86A' fill-opacity='.7'/%3E%3Cpath d='M26 6q5-5 10 0q-5 5-10 0Z'/%3E%3C/g%3E%3C/svg%3E");
  --ikat-band: linear-gradient(90deg, transparent, var(--gold) 12%, #2ba6a8 30%, #b23a48 50%, #2ba6a8 70%, var(--gold) 88%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/24px Inter, system-ui, sans-serif; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--gold); color: var(--on-gold); padding: 10px 16px; border-radius: var(--radius-control); font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { color: var(--gold); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Tugmalar va havolalar ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border-radius: var(--radius-control); border: 1px solid transparent; font: 600 16px/24px Inter, system-ui, sans-serif;
  text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--gold); color: var(--on-gold); }
.btn--gold:hover { background: var(--gold-hover); }
.btn--gold:active { background: var(--gold-pressed); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--ghost { border-color: var(--border); color: var(--text); background: rgba(12, 15, 20, .35); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-hover); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 18px; border-radius: 999px; box-shadow: 0 0 40px rgba(226, 189, 118, .22); }
.btn--block { width: 100%; }
.link {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); font-weight: 500; text-decoration: underline;
  text-underline-offset: 4px; text-decoration-color: rgba(201, 168, 106, .45); background: none; border: 0; padding: 0; font-size: 15px; cursor: pointer; font-family: inherit;
}
.link:hover { color: var(--gold-hover); text-decoration-color: currentColor; }

/* ---------- Sarlavha ---------- */

.top {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px; border-bottom: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease;
}
.top--solid, .top--page { background: rgba(12, 15, 20, .92); border-bottom-color: var(--border); }
@supports (backdrop-filter: blur(8px)) { .top--solid, .top--page { background: rgba(12, 15, 20, .78); backdrop-filter: blur(8px); } }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand__name { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -.01em; }
.brand__name span { color: var(--gold); }
.top__nav { display: none; gap: 28px; }
.top__nav a { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 0; }
.top__nav a:hover { color: var(--text); }
.top__actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-control); overflow: hidden; background: rgba(12, 15, 20, .5); }
.lang button { min-width: 40px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--text-muted); font: 600 13px/18px Inter, system-ui, sans-serif; letter-spacing: .04em; cursor: pointer; }
.lang button[aria-pressed='true'] { color: var(--gold); background: var(--surface-raised); }
.lang button:hover { color: var(--text); }

/* ---------- Teaser (canvas) ---------- */

.teaser { position: relative; height: 700vh; background: var(--night); }
.teaser__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--night); }
.teaser__canvas { width: 100%; height: 100%; }
.teaser__hint {
  position: absolute; left: 50%; bottom: calc(6.5vh + 16px); transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column;
  align-items: center; gap: 8px; color: var(--text); opacity: .85; font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  pointer-events: none; white-space: nowrap;
}
.teaser__hint i { width: 12px; height: 12px; border-right: 2px solid var(--gold-bright); border-bottom: 2px solid var(--gold-bright); transform: rotate(45deg); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px) rotate(45deg); } }
.teaser__cta {
  position: absolute; left: 50%; top: 64%; transform: translate(-50%, -50%); z-index: 3; display: flex; flex-direction: column;
  align-items: center; gap: 12px; opacity: 0; pointer-events: none;
}
.teaser__cta .btn svg { width: 22px; height: 22px; }

/* ---------- Hikoya boblari ---------- */

.story { position: relative; padding: 96px 0 40px; background: linear-gradient(180deg, var(--night) 0%, var(--bg) 18%); }
.story::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--ikat-band); opacity: .7; }
.section__title { margin: 10px 0 28px; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.15; font-weight: 600; letter-spacing: -.015em; max-width: 24ch; text-wrap: balance; }
.section__lead { color: var(--text-secondary); font-size: 18px; line-height: 28px; max-width: 46ch; }
.chapters { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 20px; }
.chapter {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 28px 24px 28px 20px;
  border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); overflow: hidden;
}
.chapter::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--gold), var(--turquoise)); }
.chapter__n { font-size: 28px; line-height: 1; font-weight: 700; color: rgba(201, 168, 106, .55); font-variant-numeric: tabular-nums; padding-top: 4px; }
.chapter__body { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.chapter__kicker { color: var(--gold); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.chapter__line { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.35; font-weight: 600; max-width: 38ch; text-wrap: pretty; }
.chapter__quote { color: var(--gold-hover); font-size: 20px; line-height: 28px; font-weight: 500; }
.chapter__tag { display: inline-flex; padding: 7px 14px; border-radius: 16px; border: 1px solid rgba(201, 168, 106, .45); background: rgba(201, 168, 106, .1); color: var(--gold); font-size: 14px; line-height: 20px; font-weight: 600; }

/* Scroll’da ochilish — JS yo‘q bo‘lsa ham matn ko‘rinadi (sinf faqat JS qo‘shganda yashiradi) */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(28px); }

/* ---------- Bo‘limlar ---------- */

.section { position: relative; padding: 72px 0; scroll-margin-top: 64px; }
.story { scroll-margin-top: 64px; }
.frame { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px 24px 24px; overflow: hidden; }
.frame::before { content: ''; position: absolute; inset: 0 0 auto; height: 12px; background: var(--suzani) repeat-x center / 48px 12px; opacity: .5; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.steps__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold); font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.steps h3, .card h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
.steps p, .card p { color: var(--text-secondary); }
.section--tiles { background: linear-gradient(180deg, var(--bg) 0%, var(--tile-deep) 18%, var(--tile-deep) 82%, var(--bg) 100%); overflow: hidden; }
.section--tiles::before { content: ''; position: absolute; inset: 0; background: var(--girih); background-size: 96px 96px; opacity: .5; mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); pointer-events: none; }
.section--tiles .wrap { position: relative; }
.split { display: grid; gap: 28px; align-items: center; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding: 16px 18px 16px 52px; border-radius: var(--radius-card); background: rgba(23, 28, 36, .85); border: 1px solid var(--border); }
.ticks li::before { content: ''; position: absolute; left: 18px; top: 50%; width: 18px; height: 10px; margin-top: -7px; border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); transform: rotate(-45deg); }
.section--enter { background: linear-gradient(180deg, var(--bg), #11161e); }
.section--enter::after { content: ''; position: absolute; inset: auto 0 0; height: 12px; background: var(--suzani) repeat-x center / 48px 12px; opacity: .5; }
/* Kartalar bir xil tuzilishda: ikonka, sarlavha, matn — pastda tugma va izoh qatori (uchala kartada bir chiziqda) */
.join { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 4px;
  background: rgba(201, 168, 106, .1); border: 1px solid rgba(201, 168, 106, .3);
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card__actions { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.card__meta { color: var(--text-muted); font-size: 13px; line-height: 20px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.card__meta.link { color: var(--gold); font-size: 14px; }

.foot { border-top: 1px solid var(--border); padding: 40px 0 28px; }
/* Maxfiylik siyosati (/privacy) — o‘qish uchun tor ustun */
.legal { padding-top: 104px; padding-bottom: 56px; }
.legal__doc { max-width: 720px; }
.legal__doc h1 { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.01em; }
.legal__doc h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin: 32px 0 8px; }
.legal__doc p, .legal__doc li { color: var(--text-secondary); line-height: 1.65; }
.legal__doc p { margin: 8px 0; }
.legal__doc ul { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; }
.legal__doc strong { color: var(--text); font-weight: 600; }
.legal__doc a { color: var(--gold); }
.legal__meta { font-size: 14px; margin-top: 4px !important; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot__tag { color: var(--text-secondary); margin-top: 8px; }
.foot__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot__links a { display: inline-flex; min-height: 40px; align-items: center; color: var(--text-secondary); text-decoration: none; }
.foot__links a:hover { color: var(--gold); }
.foot__copy { color: var(--text-muted); font-size: 13px; margin-top: 20px; }

/* ---------- /login ---------- */

.auth {
  min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 96px var(--gutter) 48px;
  background:
    radial-gradient(80% 60% at 80% 0%, rgba(201, 168, 106, .14), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(46, 156, 154, .12), transparent 60%),
    linear-gradient(180deg, var(--night), var(--bg));
}
.auth__card { width: 100%; max-width: 440px; }
.auth__card.frame { padding: 36px 24px 28px; }
.auth__title { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -.01em; }
.auth__lead { color: var(--text-secondary); margin-top: 6px; }
.auth__notice { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-control); background: rgba(241, 193, 107, .1); border: 1px solid rgba(241, 193, 107, .35); color: #f1c16b; font-size: 14px; line-height: 20px; }
.auth__view { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.auth__msg { color: var(--text-secondary); font-size: 14px; line-height: 20px; }
.auth__ok { color: var(--success); font-size: 14px; line-height: 20px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-top: 22px; border-radius: var(--radius-control); background: #10141b; border: 1px solid var(--border); }
.segmented button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font: 600 14px/20px Inter, system-ui, sans-serif; cursor: pointer; }
.segmented button[aria-selected='true'] { background: var(--surface-raised); color: var(--gold); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child, .field > label { color: var(--text-secondary); font-size: 14px; line-height: 20px; font-weight: 500; }
.field input {
  width: 100%; min-height: 52px; padding: 0 14px; border-radius: var(--radius-control); border: 1px solid var(--border);
  background: #10141b; color: var(--text); font: 400 16px/24px Inter, system-ui, sans-serif;
}
.field input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid='true'] { border-color: var(--danger); }
.field__hint { color: var(--text-muted); font-size: 13px; line-height: 18px; }
.field__pw { position: relative; display: block; }
.field__pw input { padding-right: 52px; }
.field__eye { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); cursor: pointer; display: grid; place-items: center; }
.field__eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.field__eye[aria-pressed='true'] { color: var(--gold); }
.phone { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-control); background: #10141b; }
.phone:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.phone span { display: grid; place-items: center; padding: 0 4px 0 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.phone input { border: 0; outline: none; background: transparent; padding-left: 6px; font-variant-numeric: tabular-nums; }
.phone input:focus { outline: none; }
.code input { letter-spacing: .4em; font-size: 22px; font-variant-numeric: tabular-nums; text-align: center; }
.auth__error { color: var(--danger); font-size: 14px; line-height: 20px; }

/* ---------- Moslashuv ---------- */

@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .section { padding: 104px 0; }
  .story { padding: 120px 0 56px; }
  .chapter { grid-template-columns: 88px 1fr; padding: 36px 40px 36px 28px; }
  .chapter__n { font-size: 40px; }
  .chapter--alt { margin-left: 8%; }
  .chapters { gap: 24px; }
  .split { grid-template-columns: 1.1fr 1fr; gap: 48px; }
  .auth__card.frame { padding: 44px 40px 36px; }
}
@media (min-width: 1024px) { .top__nav { display: flex; } }

/* Telefon: bob raqami matn ustida — matnga butun kenglik */
@media (max-width: 599px) {
  .chapter { grid-template-columns: 1fr; gap: 10px; padding: 24px 20px; }
  .chapter__n { font-size: 22px; }
}

/* Planshet: «Biz bilan» kartalari bitta ustunda, yotiq — ikonka | matn | tugma (ikki ustunda biri yolg‘iz qolmasin) */
@media (min-width: 600px) and (max-width: 1023px) {
  .join { grid-template-columns: 1fr; }
  .join .card {
    display: grid; grid-template-columns: 48px 1fr minmax(220px, 260px); grid-template-rows: auto 1fr;
    column-gap: 20px; row-gap: 6px; align-items: start; padding: 32px 24px 24px;
  }
  .join .card__icon { grid-row: 1 / span 2; margin: 0; }
  .join .card > h3, .join .card > p { grid-column: 2; }
  .join .card__actions { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0; align-self: center; }
}
@media (max-width: 420px) {
  .brand__name { display: none; }
  .teaser__cta .btn--lg { font-size: 16px; padding: 0 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .teaser__hint i { animation: none; }
  .reveal, .btn { transition: none; }
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
}
