/* Home page (F4d, 04 §3.1), ported from docs/design/f1/a/site.css (home rules) onto the tokens in site.css.
   Order: headline and lead, the wide hero photo with the decision card, the news split, «Оролцоо тоогоор»
   (with the «Жендер» block in the same band), the latest files, the app band.
   The resets below undo site.css's reboot-style margins inside .home only ((0,0,1) via :where). */

:where(.home) :is(h1, h2, h3, p, ul, figure, dl, dd) { margin: 0; }
:where(.home) ul { padding: 0; list-style: none; }
:where(.home) img { display: block; }

/* ---------- Hero: headline first, then one big real photo ---------- */
.hero { padding-block: var(--s8) var(--s7); }
.hero h1 { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--track-display); font-weight: 700; max-width: 20ch; }
.hero-row { display: grid; grid-template-columns: minmax(0, 40ch) auto; justify-content: space-between; align-items: end; gap: var(--s6); margin-top: var(--s6); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { position: relative; margin-top: var(--s7); }
.hero-photo .ph { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: 50% 38%; border-radius: var(--r-xl); }
.hero-photo figcaption { position: absolute; left: 20px; bottom: 20px; padding: 8px 14px; border-radius: var(--r-pill); background: rgb(255 255 255 / .94); font-size: var(--fs-meta); font-weight: 500; color: var(--ink); }
.decision { position: absolute; right: 24px; bottom: -40px; width: min(400px, 44%); padding: var(--s5); border-radius: var(--r-lg); background: #fff; box-shadow: var(--e2); color: var(--ink); text-decoration: none; display: grid; gap: 6px; transition: transform var(--t-med) var(--ease); }
.decision:hover { transform: translateY(-2px); color: var(--ink); }
.decision .tag { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-meta); font-weight: 600; color: var(--ink-2); }
.decision .tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.decision strong { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; overflow-wrap: anywhere; }
.decision .meta { color: var(--ink-2); }
.decision .go { color: var(--blue); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; }
.decision .go .ic { transition: transform var(--t-fast) var(--ease); }
.decision:hover .go .ic { transform: translateX(3px); }

/* ---------- Latest news: one lead story + a quiet list ---------- */
.news-split { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s8); }
.news-split > * { min-width: 0; }
.story { display: grid; align-content: start; gap: var(--s4); color: var(--ink); text-decoration: none; }
.story:hover { color: var(--ink); }
.story .ph { overflow: hidden; border-radius: var(--r-lg); background: var(--surface); }
.story img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform var(--t-med) var(--ease), opacity 400ms var(--ease); }
.story:hover img { transform: scale(1.04); }
.story .noimg { display: grid; place-items: center; aspect-ratio: 16 / 9; }
.story .noimg img { width: 130px; aspect-ratio: auto; opacity: .5; }
.story:hover .noimg img { transform: none; }
.story h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.story:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.story p { color: var(--ink-2); max-width: var(--measure); }
.list { display: grid; align-content: start; }
.list a { display: grid; grid-template-columns: 1fr 112px; gap: var(--s5); padding-block: var(--s5); color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.list a.no-img { grid-template-columns: 1fr; }
.list a:hover { color: var(--ink); }
.list li:first-child a { padding-top: 0; }
.list a > div { min-width: 0; }
.list img { width: 112px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.list h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; margin-top: 6px; overflow-wrap: anywhere; transition: color var(--t-fast) var(--ease); }
.list a:hover h3 { color: var(--blue); }

/* ---------- Participation in numbers: a sentence, not a stat grid ---------- */
.facts { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s8); align-items: center; }
.facts > * { min-width: 0; }
.facts > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 60% 50%; border-radius: var(--r-xl); }
.facts h2 { font-size: var(--fs-h2); }
.statement { font-size: clamp(1.625rem, 1.1rem + 1.7vw, 2.5rem); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; margin-top: var(--s5); }
.statement .n { font-weight: 700; color: var(--blue); white-space: nowrap; }
.split-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); margin-top: var(--s7); }
.split-figures > div { display: grid; gap: 2px; }
.split-figures > div:last-child { text-align: right; }
.split-figures dt { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: var(--fs-meta); font-weight: 400; }
.split-figures dt::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--blue); }
.split-figures > div:last-child dt { justify-content: flex-end; }
.split-figures > div:last-child dt::before { background: var(--blue-soft); }
.split-figures dd { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
/* The UB share: an SVG so the width is an attribute, not an inline style. It grows once in view. */
.share-bar { display: block; width: 100%; height: 10px; margin-top: 12px; border-radius: 5px; overflow: hidden; }
.bar-track { fill: var(--blue-soft); }
.bar-fill { fill: var(--blue); }
html.js [data-grow] .bar-fill { transform: scaleX(0); transform-origin: 0 0; }
html.js [data-grow].is-in .bar-fill { transform: none; transition: transform 800ms var(--ease-out) 150ms; }
/* Membership levels (kept on the home page per the client, 04 §3.4) */
.levels-h { margin-top: var(--s6); font-size: var(--fs-meta); font-weight: 600; letter-spacing: 0; color: var(--ink-2); }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s4) var(--s5); margin-top: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.levels > div { display: grid; align-content: start; gap: 2px; }
.levels dt { color: var(--ink-2); font-size: var(--fs-meta); font-weight: 400; line-height: 1.35; }
.levels dd { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.source { margin-top: var(--s5); }

/* «Жендер» (partials/gender-stats) continues this band; its styles live in css/pages/gender.css (F4g). */

/* ---------- Latest files ---------- */
.home-docs .doc { background: var(--surface); box-shadow: none; }
.home-docs .doc:hover { background: var(--surface-2); }
.home-docs .doc > div { min-width: 0; }
.home-docs .doc h3 { overflow-wrap: anywhere; }
.home-docs .well { background: #fff; }
.also { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s5); }

/* ---------- App band ---------- */
.appband { display: grid; grid-template-columns: 6fr 5fr; align-items: center; border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.appband .txt { padding: var(--s8); }
.appband h2 { font-size: var(--fs-h2); }
.appband p { color: var(--ink-2); margin-top: var(--s4); max-width: 44ch; }
.appband ul { display: grid; gap: 10px; margin-top: var(--s5); }
.appband li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.appband li .ic { color: var(--blue); }
.appband img.ph { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.appband .stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s6); }
.appband .stores a { display: block; border-radius: 10px; transition: transform var(--t-fast) var(--ease); }
.appband .stores a:hover { transform: translateY(-1px); }
.appband .stores a:active { transform: scale(.97); }
.appband .stores img { height: 52px; width: auto; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-grow] .bar-fill { transform: none !important; transition: none !important; }
  .story:hover img, .appband .stores a:hover, .appband .stores a:active, .decision:hover .go .ic { transform: none; }
}

/* ---------- Phones and tablets (≤ 1080 px; checked at 360 px) ---------- */
@media (max-width: 1080px) {
  .hero { padding-block: var(--s6) var(--s5); }
  .hero-row { grid-template-columns: 1fr; margin-top: var(--s4); gap: var(--s5); }
  .actions .btn { flex: 1 1 100%; }
  .hero-photo { margin-top: var(--s6); }
  .hero-photo img { aspect-ratio: 4 / 3; border-radius: var(--r-lg); object-position: 50% 30%; }
  .hero-photo figcaption { left: 12px; bottom: 12px; right: 12px; width: fit-content; font-size: .9375rem; }
  .decision { position: static; width: auto; margin-top: var(--s4); box-shadow: none; background: var(--surface); }
  .news-split, .facts, .appband { grid-template-columns: 1fr; gap: var(--s6); }
  .list a { grid-template-columns: 1fr 88px; gap: var(--s4); }
  .list img { width: 88px; }
  .facts > img { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
  .split-figures { grid-template-columns: 1fr 1fr; gap: 12px; }
  .split-figures dd { font-size: 1.625rem; }
  .levels { grid-template-columns: 1fr 1fr; }
  .appband .txt { padding: var(--s6) var(--s5); }
  .appband img.ph { min-height: 0; aspect-ratio: 4 / 3; order: -1; }
  .appband .stores img { height: 48px; }
}
