/* ===== UI audit 2026-10-16: one content column, spacing rhythm, overlaps, mobile fixes ===== */

/* 1. One content column: every page lines up with the header logo and the footer */
.pgx-wrap,.cs-wrap { width:min(1200px,calc(100% - 2*clamp(18px,4vw,48px))); padding-inline:0; }
.sx-band { width:min(1200px,calc(100% - 2*clamp(18px,4vw,48px))); }

/* 2. Header: navigation sits on the right on desktop */
@media (min-width:741px) {
  .portfolio-topbar .topnav { margin-left:auto; }
}

/* 3. Heading rhythm: labels never touch headings, headings never touch text */
.gx-eyebrow,.gx-label,.tx-eyebrow,.tx-label { margin-bottom:14px !important; }
.gx-lede,.tx-lede { margin-top:18px !important; }
.gx h2 + .gx-text,.gx-text + .gx-text { margin-top:16px; }
.tx-intro-grid h2 + p,.tx-intro-grid p + p { margin-top:16px; }
.sx-eyebrow { margin-bottom:24px; }
.sx-label { margin-bottom:22px; }
.sx h1 { line-height:1.08; }
.sx h2 { line-height:1.12; }
.sx-stampbig span,.sx-stampbig b { line-height:1.12; }
.pgx-contacts,.cs .pgx-contacts { align-items:center; }

/* 4. Tap targets for back/source links */
.cs-back,.cs-src { display:inline-flex; align-items:center; min-height:44px; }
.ex-hero .cs-back { display:flex; }

/* 5. FOP */
@media (max-width:900px) {
  .fx .fx-hero-grid { grid-template-columns:1fr; }
}
.fx-stats dd { overflow-wrap:anywhere; }
.fx-line { gap:14px; }
.fx-line::before { display:none; }
.fx-line li { padding:22px 22px 24px; }
.fx-line h3 { margin-top:16px; }
.fx .pgx-tag,.fx .pgx-more,.fx-chips li,.fx-chips b,.fx-no { font-family:'Geologica',Arial,sans-serif; }
.fx h1 { overflow-wrap:break-word; hyphens:auto; }
@media (max-width:420px) {
  .fx-stats div { padding:12px 10px; }
  .fx-stats dt { font-size:24px; }
}

/* 6. Nomad Shooter */
.sx-art figcaption { flex-wrap:wrap; gap:4px 14px; }
.sx-art figcaption span { white-space:nowrap; }
@media (max-width:700px) {
  .sx-art::before { inset:12px -6px -8px 10px; }
}

/* 7. Rise: long Kazakh labels wrap inside their cell */
.rs-spec dt,.rs-spec dd { overflow-wrap:anywhere; }

/* 8. Azbuka: headline and cover fit the phone, numbers in a 2x2 grid */
@media (max-width:700px) {
  .az-hero h1 { font-size:clamp(30px,9.5vw,52px); }
  .az-badge { transform:rotate(-2deg); margin:0 6px; }
  .cs-az .az-nums { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .az-nums li { padding:16px; border-radius:18px; }
  .az-nums b { font-size:34px; }
}

/* 9. Footer links: tidy 2x2 grid on phones */
@media (max-width:740px) {
  .portfolio-footer .footer-links { display:grid; grid-template-columns:repeat(2,max-content); gap:0 28px; justify-content:start; }
}

/* 10. Home hero mosaic: show the archer target, not a cut logo */
.hero-panel .stage-mosaic img:first-child,.stage-mosaic img:first-child { object-position:100% 50%; }

/* 11. FOP hero numbers stay large (the global 12px dt/dd rule is for labels) */
.fx .fx-stats dt { font-size:32px !important; line-height:1; }
.fx .fx-stats dd { overflow-wrap:normal; letter-spacing:.06em; }
@media (max-width:420px) { .fx .fx-stats dt { font-size:26px !important; } .fx .fx-stats dd { letter-spacing:0; } }

/* 12. Tennis labels use one size and tracking */
.tx-label,.tx-eyebrow { font-size:12px !important; letter-spacing:.18em !important; }

/* 11. FOP hero numbers stay large (the global 12px dt/dd rule is for labels) */
@media (max-width:420px) { .fx .fx-stats dt { font-size:26px !important; } .fx .fx-stats dd { letter-spacing:0; } }

/* 12. Tennis labels use one size and tracking */

/* 13. Header: "GAMES" set in the Crocos typeface next to the logo; link to the main site */
.portfolio-topbar .brand>span { display:inline-flex; align-items:center; padding-left:14px; border-left:1px solid currentColor; border-left-color:color-mix(in srgb,currentColor 30%,transparent); font:700 15px/1 "Crocos Site",Arial,sans-serif; letter-spacing:.03em; text-transform:uppercase; color:#18202c; }
.portfolio-topbar .nav-main { gap:4px; font-weight:700; white-space:nowrap; }
.portfolio-topbar .nav-main span { font-size:.85em; opacity:.8; }
@media (max-width:740px) {
  .portfolio-topbar .brand>span { display:inline-flex; font-size:13px; padding-left:10px; }
  .portfolio-topbar .topnav { gap:16px; }
}
@media (max-width:360px) { .portfolio-topbar .brand>span { font-size:12px; padding-left:8px; } .portfolio-topbar .topnav { gap:12px; } }

/* 14. The Crocos typeface now loads (it was shadowed by the cabinet route). Keep it for the brand
   accents and the FOP page, as in the FOP service; other pages keep their approved heading fonts. */
h1,h2,h3 { font-family:'Geologica',Arial,sans-serif; }
.fx h1 { font-size:clamp(28px,3.2vw,46px); line-height:1.22; letter-spacing:-.01em; }
.fx h2 { font-size:clamp(24px,2.6vw,36px); line-height:1.25; letter-spacing:-.01em; }
.fx-row h3 { font-size:clamp(17px,1.6vw,21px); line-height:1.3; letter-spacing:0; }
.fx-line h3 { font-size:19px; letter-spacing:0; }

/* 15. No dead space inside tiles: gallery images fill their cell, cards align their content */
.pgx-shot { display:flex; flex-direction:column; }
.pgx-shot > button { flex:1 1 auto; min-height:0; }
.pgx-shot > button img { height:100%; }
.fx-s1 > button img,.fx-s2 > button img { aspect-ratio:auto; }
@media (max-width:900px) { .fx-s1 > button img,.fx-s2 > button img { aspect-ratio:16/9; } }
.svc-grid li { display:flex; flex-direction:column; justify-content:space-between; gap:18px; min-height:112px; }
.svc-grid li span { margin-bottom:0; }
.ex-grid li { justify-content:space-between; }
.sx-feat { min-height:0; }
.sx-feat h3 { min-height:0; }

/* 16. Section seams: two sections with the same background read as one block, not as a hole */
.fx-brief + .fx-courses { padding-top:0; }
.svc-section { border-top:1px solid #e3e8f4; }

/* 17. Phone header keeps logo, GAMES, cabinet and language on one row */
@media (max-width:480px) {
  .portfolio-topbar .topbar-inner { flex-wrap:wrap; column-gap:8px; }
  .portfolio-topbar .brand { gap:8px; margin-right:auto; }
  .portfolio-topbar .brand-logo { width:96px; }
  .portfolio-topbar .brand>span { font-size:12px; padding-left:8px; letter-spacing:.02em; }
  .portfolio-topbar .nav-cta { padding:0 12px; margin:0; min-height:40px; }
  .portfolio-topbar .language-toggle { margin-left:0; }
}
@media (max-width:340px) { .portfolio-topbar .brand-logo { width:84px; } .portfolio-topbar .nav-cta { padding:0 10px; } }
@media (max-width:360px) {
  .portfolio-topbar .topbar-inner { column-gap:6px; }
  .portfolio-topbar .brand { gap:6px; }
  .portfolio-topbar .brand-logo { width:70px; }
  .portfolio-topbar .brand>span { padding-left:6px; letter-spacing:0; }
  .portfolio-topbar .nav-cta { padding:0 9px; font-size:12px; }
  .portfolio-topbar .language-toggle { width:50px; padding:0 4px; }
}

/* 18. Remaining audit items */
.sx-stampbig span,.sx-stampbig b { line-height:1.22 !important; }
.sn-tag { margin-bottom:14px; }
.az-nums span { hyphens:auto; overflow-wrap:break-word; }
@media (max-width:360px) { .az-nums span { font-size:12px; } .az-nums b { font-size:28px; } }

/* 19: sn-tag spacing; stampbig glyph boxes are tall (Oswald), visual gap verified */
.sn-tag{margin-bottom:22px}

/* 20: dead space inside cards */
.svc-grid li,.ex-grid li{justify-content:flex-start;gap:14px;min-height:0}
.sx-feat h3{margin:22px 0 10px}
.sx-feat p,.sx-feat h3{max-width:440px}
.pr-flow li,.pr-grid article,.sn-verbs li,.tx-card,.loc-mystery{min-height:0}

/* 21: polaroids hug content */
.sn-verbs ol{align-items:start}
