/*
 * birgaapp.uz — bitta CSS, uchinchi tomon so'rovsiz (38-UI-SPEC.md §1, §8.3).
 * Shriftlar o'z serverida: Hanken Grotesk 600 (ttf) sarlavhalar uchun,
 * Inter 400/600 (woff2) matn uchun. JS o'chiq bo'lsa ham sahifa to'liq
 * ishlaydi — mundarija ajratish (toc.js) faqat ixtiyoriy yaxshilash.
 */

:root {
  --bg: #fbfaf8;
  --bg-alt: #f6f3ef;
  --ink: #15141a;
  --body-text: #35333b;
  --muted: #6b6873;
  --tertiary: #a9a6a0;
  --line: #ece7e0;
  --iridescent: linear-gradient(90deg, #8ec5ff, #c9b6ff, #ffc4d6, #ffd9a8);
  --wrap: 1040px;
  --text-col: 720px;
  --toc-col: 240px;
  --gap: 72px;
  --font-display: 'Hanken Grotesk', 'Zalando Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/HankenGrotesk-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--body-text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
}

h1 {
  font-size: 54px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 23px;
  line-height: 1.25;
}

p {
  margin: 0 0 16px;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  height: 3px;
  background: var(--iridescent);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-right: auto;
}

.brand-mark {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--iridescent);
}

.site-nav {
  display: flex;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-link.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.lang-switcher {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 999px;
}

.lang-link.is-active {
  background: var(--ink);
  color: #fff;
}

/* Hero */

.hero {
  padding-top: 56px;
  padding-bottom: 32px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

.hero-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 16px 0 0;
}

.hero-meta a {
  text-decoration: underline;
}

.meta-dot {
  color: var(--tertiary);
  padding: 0 4px;
}

/* Legal doc layout: TOC + sections */

.page-body {
  padding-bottom: 72px;
}

.doc-layout {
  display: grid;
  grid-template-columns: var(--toc-col) 1fr;
  gap: var(--gap);
  align-items: start;
}

.toc {
  position: sticky;
  top: 24px;
}

.toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  padding-left: 10px;
  border-left: 2px solid transparent;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--ink);
  border-left-color: var(--ink);
}

.toc-mobile {
  display: none;
}

.doc-sections {
  max-width: var(--text-col);
}

.doc-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.doc-section:first-child {
  padding-top: 0;
}

.doc-section:last-child {
  border-bottom: none;
}

.section-bullets {
  margin: 0;
  padding-left: 20px;
}

.section-bullets li {
  margin-bottom: 8px;
}

/* Delete-account page */

.lead {
  max-width: var(--text-col);
  font-size: 16.5px;
  color: var(--body-text);
  margin-bottom: 40px;
}

.cards-grid,
.panels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.card,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

.card h2,
.panel h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-note {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}

.button {
  display: inline-block;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  margin: 4px 0;
}

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.deleted-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deleted-list li {
  padding-left: 18px;
  position: relative;
}

.deleted-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tertiary);
}

.kept-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kept-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.kept-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.kept-row dt {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

.kept-row dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}

.footer-text {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links .nav-link {
  border-bottom: none;
  padding-bottom: 0;
}

/* 404 */

.not-found {
  padding: 96px 0;
  text-align: center;
}

/* Accessibility */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* «Политика конфиденциальности» kabi uzun so'z tor ekranda sarlavhadan
   toshib chiqmasin — kerak bo'lsa bo'g'in bo'yicha bo'linadi. */
h1,
h2 {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Mobile ( <= 640px ) — 38-UI-SPEC.md §8.2 */

@media (max-width: 640px) {
  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 20px;
  }

  body {
    font-size: 15.5px;
    line-height: 1.65;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  /* Uzun ruscha nomlar 375 px ga sig'maydi — pill'lar yangi qatorga o'tadi,
     sahifa gorizontal aylanmaydi. */
  .site-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-link {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
  }

  .nav-link.is-active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
  }

  .doc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .toc-desktop {
    display: none;
  }

  .toc-mobile {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
  }

  .toc-mobile summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
  }

  .toc-mobile ul {
    margin-top: 12px;
  }

  .cards-grid,
  .panels-grid {
    grid-template-columns: 1fr;
  }

  .kept-row {
    flex-direction: column;
    gap: 4px;
  }

  .kept-row dd {
    text-align: left;
  }
}

/* Eng tor telefonlar (<= 360px): sarlavha biroz kichikroq. */

@media (max-width: 360px) {
  h1 {
    font-size: 26px;
  }
}
