/* City Chess — citychess.uz
   Дизайн-токены: брендбук v3.5 (brandbook_v2.html) */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-var-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-var-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --muted: #595959;
  --line: #e5e5e5;
  --red: #e11919;
  --ink-inverse-muted: #999999;
  --radius: 14px;
  --radius-pill: 999px;
  --container: 1120px;
  --pad: 24px;
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@view-transition { navigation: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 18px; z-index: 100;
}
.skip-link:focus { left: 0; }

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

::selection { background: var(--red); color: #fff; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-size: 16px; font-weight: 700; line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #c01212; }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2a2a2a; }

/* ---------- шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-size: 18px; font-weight: 900; letter-spacing: -0.01em;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; }
.brand { transition: color .15s; }
.brand:hover, .brand:focus-visible { color: var(--red); }

.site-nav { display: flex; gap: 22px; }
.site-nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted);
}
.site-nav a:hover { color: var(--ink); }

.lang {
  display: flex; gap: 4px; align-items: center;
}
.lang a {
  text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--muted);
  padding: 6px 8px; border-radius: 6px;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { color: var(--paper); background: var(--ink); }

.header-cta { padding: 11px 20px; font-size: 15px; }

.menu-btn {
  display: none;
  background: none; border: 0; padding: 8px; margin-left: 4px; cursor: pointer;
}
.menu-btn svg { display: block; }

/* ---------- hero: чёрная плашка ---------- */
.hero { background: var(--ink); color: #fff; }
.hero .container { padding-top: 96px; padding-bottom: 96px; }
.overline {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.overline .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex-shrink: 0;
}
.hero h1 {
  margin-top: 24px;
  font-size: clamp(37px, 6.5vw, 76px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.02;
  max-width: 14em;
}
.hero .lede {
  margin-top: 28px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--ink-inverse-muted);
  max-width: 34em;
}
.hero .cta-row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero .status { margin-top: 36px; font-size: 14px; color: var(--ink-inverse-muted); min-height: 1.4em; }

/* ---------- секции ---------- */
.section { padding-top: 96px; }
.section:last-of-type { padding-bottom: 96px; }
.section > .container > h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 40px;
}

/* ---------- карточки учеников ---------- */
.students-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.student {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.student img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; }
.student .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.student h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.title-pill {
  align-self: flex-start;
  margin-top: 10px;
  background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-pill);
  line-height: 1.2;
}
.student ul { margin-top: 16px; display: grid; gap: 7px; }
.student li {
  position: relative;
  padding-left: 18px;
  font-size: 15px; line-height: 1.45; color: var(--muted);
}
.student li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--red); font-weight: 700;
}
.student .fide {
  margin-top: auto; padding-top: 18px;
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line);
}
.student .fide:hover { color: var(--red); text-decoration-color: var(--red); }

/* ряд звёзд: первые три карточки крупнее, остальные компактнее */
.student--star h3 { font-size: 22px; }
.student--star .title-pill { font-size: 12px; padding: 7px 13px; }
.student:not(.student--star) .body { padding: 18px 20px 20px; }
.student:not(.student--star) h3 { font-size: 17px; }
.student:not(.student--star) .title-pill { font-size: 10.5px; padding: 5px 10px; }
.student:not(.student--star) li { font-size: 14px; }
.student:not(.student--star) .fide { font-size: 13.5px; }

/* ---------- форматы ---------- */
.formats-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.format {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.format img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.format .body { padding: 22px; }
.format h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.format p { margin-top: 10px; font-size: 16px; color: var(--muted); }

/* ---------- кому подойдёт ---------- */
.audience-grid {
  display: grid; gap: 40px 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.audience .num {
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: var(--red);
}
.audience h3 { margin-top: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.audience p { margin-top: 10px; font-size: 16px; color: var(--muted); }

/* ---------- цены ---------- */
.prices-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}
.price-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}
.price-card > h3 {
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.price-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.price-card .price-row:first-of-type { margin-top: 14px; }
.price-row:last-child { border-bottom: 0; padding-bottom: 0; }
.price-row .name { font-size: 17px; font-weight: 600; }
.price-row .name small {
  display: block; font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 2px;
}
.price-row .value {
  font-size: 18px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-row .value small { font-size: 13px; font-weight: 500; color: var(--muted); }
.price-note { margin-top: 24px; font-size: 14px; color: var(--muted); }

/* ---------- контакты ---------- */
.contacts-photo {
  border-radius: var(--radius);
  margin-bottom: 40px;
}
.contacts-grid {
  display: grid; gap: 40px 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.contact-item h3 {
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.contact-item .big {
  margin-top: 12px; font-size: 21px; font-weight: 800; letter-spacing: -0.01em;
}
.contact-item .big a { text-decoration: none; }
.contact-item .big a:hover { color: var(--red); }
.contact-item p { margin-top: 12px; font-size: 16px; }
.contact-item .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.contact-item .map-link {
  display: inline-block; margin-top: 10px;
  font-size: 14px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line);
}
.contact-item .map-link:hover { color: var(--red); text-decoration-color: var(--red); }
.contact-item .map-link + .map-link { margin-left: 14px; }
.contact-item .btn { margin-top: 12px; }

/* ---------- футер ---------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
}
.site-footer .container {
  padding-top: 32px; padding-bottom: 40px;
  display: flex; flex-wrap: wrap; gap: 16px 32px;
  align-items: center; justify-content: space-between;
  font-size: 15px; color: var(--muted);
}
.site-footer .socials { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- мобильная версия ---------- */
@media (max-width: 900px) {
  .site-nav, .header-cta, .hero .status { display: none; }
  .menu-btn { display: block; }
  .site-header .container { gap: 14px; height: 60px; }
  .mobile-open .site-nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 12px;
  }
  .mobile-open .site-nav a {
    padding: 14px var(--pad); font-size: 17px; color: var(--ink);
  }
  .hero .container { padding-top: 64px; padding-bottom: 64px; }
  .section { padding-top: 64px; }
  .site-footer { margin-top: 64px; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}

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

@media print {
  .site-header, .hero .cta-row, .site-footer, .menu-btn { display: none; }
  .hero { background: none; color: var(--ink); }
}
