/* ========================= RESET & BASE ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--ink-800);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(20px, 5vw, 48px);
  padding-right: clamp(20px, 5vw, 48px);
}

/* Type scale */
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.01em; line-height: 1.12; }
h1 { font-size: clamp(2.1rem, 3.6vw + 1rem, 3.6rem); }
h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2.2rem); }
h3 { font-size: clamp(1.15rem, 0.8vw + 1rem, 1.4rem); }
p  { font-size: clamp(1rem, 0.3vw + 0.9rem, 1.08rem); line-height: 1.7; color: var(--ink-700); margin: 0; }

/* Focus visibility — қолжетімділік */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Скроллбар (жеңіл акцент) */
::selection { background: var(--gold-300); color: var(--ink-900); }

/* Артқа қайту сілтемесі — барлық ішкі беттерде ортақ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-700);
  padding: 8px 4px;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.back-link svg { width: 18px; height: 18px; transition: transform var(--dur-fast) var(--ease-out); }
.back-link:hover { color: var(--gold-700); transform: translateX(-3px); }
.back-link:hover svg { transform: translateX(-3px); }

/* Іш бет үстіңгі жолағы */
.page-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-line);
}
.page-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.brand-mini {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--ink-800);
  letter-spacing: -0.01em;
}