/* The brand hub (templates/hub.html): a city super-app home — a dark
   header with the wordmark and the search over its edge, a grid of venue
   tiles, carousels, a bottom tab bar. Colours come from the venue theme
   (app.css variables): --pass-bg is the dark of the header, --copper the
   brand colour of the stripes, --accent the colour of the buttons. */
body.hub { background: var(--surface); margin: 0; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.h-app { max-width: 560px; margin: 0 auto; min-height: 100vh; }
.h-tab[hidden], .h-results[hidden] { display: none; }
.h-svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header: the dark of the card, an orange ring in the corner. */
.h-head { position: relative; overflow: hidden; background: var(--pass-bg, #1d1d1f); color: var(--pass-fg, #fff);
  border-radius: 0 0 28px 28px; padding: calc(18px + env(safe-area-inset-top)) 20px 46px; }
.h-head::before { content: ""; position: absolute; right: -70px; top: -40px; width: 230px; height: 230px; border-radius: 50%;
  border: 34px solid var(--copper); opacity: .13; pointer-events: none; }
.h-head::after { content: ""; position: absolute; right: -60px; bottom: -30px; width: 170px; height: 120px; transform: rotate(32deg);
  background: repeating-linear-gradient(90deg, var(--copper) 0 10px, transparent 10px 24px); opacity: .18; pointer-events: none; }
.h-head > * { position: relative; z-index: 1; }
.h-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--copper); text-decoration: none; }
.h-logo img { border-radius: 9px; }
.h-logo span { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.9rem; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.h-bell { position: relative; color: var(--copper); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.h-bell .h-svg { width: 28px; height: 28px; }
.h-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 2px var(--pass-bg, #1d1d1f); }
.h-tagline { margin: 14px 0 0; color: color-mix(in srgb, var(--copper) 80%, var(--pass-fg, #fff)); font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; }

/* Search over the header's edge. */
.h-search { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; margin: -26px 16px 0; padding: 0 16px;
  height: 52px; background: var(--surface); border-radius: 16px; color: var(--muted);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); }
.h-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.05rem; color: var(--text); padding: 0; }
.h-search input::placeholder { color: var(--muted); }
.h-search input::-webkit-search-cancel-button { filter: grayscale(1); }

.h-main { padding: 18px 16px 24px; }
.h-h1 { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.8rem; margin: 4px 0 14px; }
.h-h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.25rem; margin: 22px 0 10px; }
.h-note { color: var(--muted); font-size: .85rem; line-height: 1.45; margin: 12px 2px; }
.h-back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .9rem; margin: 0 0 4px -6px; }

/* Tiles: four in a row, light, rounded; one may wear the brand colour,
   a closed one is grey with «Скоро». */
.h-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.h-tile { position: relative; display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 96px; padding: 12px 4px 10px;
  border-radius: 18px; background: var(--bg); color: var(--text); text-decoration: none; text-align: center;
  font-size: .8rem; line-height: 1.2; font-weight: 600; transition: transform .12s ease; }
.h-tile:active { transform: scale(.96); }
.h-tile .h-svg { width: 30px; height: 30px; }
.h-tile > span { overflow-wrap: break-word; hyphens: auto; }
.h-tile em { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: .58rem; font-weight: 800; letter-spacing: .03em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 99px; background: var(--copper); color: #fff; }
.h-tile-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 20px -12px var(--accent); }
.h-tile-accent em { background: #fff; color: var(--accent); }
.h-tile-soon { color: color-mix(in srgb, var(--muted) 75%, transparent); background: color-mix(in srgb, var(--bg) 70%, var(--surface)); cursor: default; }
.h-tile-soon .h-svg { opacity: .55; }
.h-tile-soon em { background: color-mix(in srgb, var(--muted) 22%, var(--surface)); color: var(--muted); }

/* Carousels: cards that snap, the next one peeking out. */
.h-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px;
  scrollbar-width: none; overscroll-behavior-x: contain; }
.h-carousel::-webkit-scrollbar { display: none; }
.h-carousel > * { scroll-snap-align: start; scroll-margin-left: 16px; flex: none; }
.h-banners { margin-top: 20px; }

.h-banner { position: relative; overflow: hidden; width: 84%; max-width: 420px; min-height: 158px; box-sizing: border-box; border-radius: 22px;
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: #fff; background: var(--pass-bg, #111); }
.h-banner::after { content: ""; position: absolute; right: -36px; top: -20px; width: 130px; height: 220px; transform: rotate(32deg);
  background: repeating-linear-gradient(90deg, var(--copper) 0 12px, transparent 12px 26px); opacity: .45; pointer-events: none; }
.h-banner > * { position: relative; z-index: 1; max-width: 78%; }
.h-banner b { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.5rem; line-height: 1.05; text-transform: uppercase; }
.h-banner span { font-size: .88rem; line-height: 1.35; opacity: .86; }
.h-banner em { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 0; font-style: normal; font-weight: 800; font-size: .85rem;
  padding: 7px 8px 7px 14px; border-radius: 99px; background: var(--copper); color: #111; }
.h-banner em .h-svg { width: 18px; height: 18px; stroke-width: 2.2; }
.h-banner-accent { background: var(--accent); }
.h-banner-accent::after { background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 26px); opacity: .16; }
.h-banner-accent em { background: #fff; color: var(--accent); }
.h-banner-light { background: var(--bg); color: var(--text); }
.h-banner-light em { background: var(--text); color: var(--surface); }
.h-banner-photo { background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .2)), var(--photo) center / cover; color: #fff; }
.h-banner-photo::after { display: none; }

/* Sections with «Все ›». */
.h-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.h-sec h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.4rem; margin: 0; line-height: 1.15; }
.h-sec a { display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.h-sec a .h-svg { width: 18px; height: 18px; stroke-width: 2.2; }

/* Posters: the trainers like film posters. */
.h-poster { width: 40%; max-width: 190px; display: grid; gap: 4px; text-decoration: none; color: var(--text); }
.h-poster img, .h-poster-ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 20%; border-radius: 14px;
  background: var(--surface-2); display: block; }
.h-poster-ph { display: grid; place-items: center; font-family: var(--display); font-size: 3rem; color: var(--muted); }
.h-poster b { margin-top: 6px; font-weight: 800; line-height: 1.2; }
.h-poster span { color: var(--muted); font-size: .82rem; }

/* Plans: small dark cards with the price in the brand colour. */
.h-plan { width: 56%; max-width: 260px; box-sizing: border-box; display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 20px;
  text-decoration: none; background: var(--bg); color: var(--text); }
.h-plan span { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.h-plan b { font-weight: 800; line-height: 1.25; min-height: 2.5em; }
.h-plan em { font-style: normal; font-family: var(--display); font-weight: var(--display-weight); font-size: 1.45rem; color: var(--accent); }

/* Cards and rows. */
.h-card { background: var(--bg); border-radius: 20px; padding: 16px 18px; margin: 0 0 12px; display: grid; gap: 6px; }
.h-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.h-card-flush { padding: 4px 0; list-style: none; gap: 0; }
.h-news { display: block; margin: 20px 0 0; padding: 14px 16px; border-radius: 18px; background: var(--bg); color: var(--text); text-decoration: none; }
.h-news p { margin: 6px 0 0; line-height: 1.45; }
.h-tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px;
  border-radius: 99px; background: var(--accent); color: #fff; }

.h-rows { list-style: none; margin: 0 0 12px; padding: 0; }
.h-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--text); }
.h-row > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.h-row b { font-weight: 700; line-height: 1.25; }
.h-row div span { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.h-row > .h-svg { color: var(--muted); width: 20px; height: 20px; }
.h-row-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); flex: none; }
.h-results .h-row-ico { background: var(--bg); }
.h-row-ico .h-svg { width: 22px; height: 22px; }
.h-row-soon { opacity: .55; }
.h-card-flush .h-row + .h-row, .h-card-flush li + li { border-top: 1px solid var(--line); }
.h-results .h-rows li + li { border-top: 1px solid var(--line); }
.h-empty { color: var(--muted); text-align: center; padding: 26px 10px; }

/* Catalogue cards. */
.h-cards { display: grid; gap: 12px; }
.h-vcard { background: var(--bg); border-radius: 22px; padding: 16px; display: grid; gap: 12px; }
.h-vcard-head { display: flex; align-items: center; gap: 12px; }
.h-vcard-head > i { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; flex: none; }
.h-vcard-head > i .h-svg { width: 26px; height: 26px; }
.h-vcard-head > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.h-vcard-head b { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.25rem; line-height: 1.1; }
.h-vcard-head span { color: var(--muted); font-size: .85rem; line-height: 1.3; }
.h-vcard-meta { display: grid; gap: 6px; margin: 0; color: var(--muted); font-size: .85rem; }
.h-vcard-meta span { display: flex; align-items: center; gap: 8px; }
.h-vcard-meta .h-svg { width: 18px; height: 18px; }
.h-vcard-soon { opacity: .7; }
.h-pill { font-style: normal; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 99px;
  background: var(--copper); color: #fff; align-self: flex-start; }
.h-pill-soon { background: color-mix(in srgb, var(--muted) 22%, var(--surface)); color: var(--muted); }

.h-btn { display: block; text-align: center; background: var(--accent); color: #fff; border-radius: 14px; padding: 13px 16px; font-weight: 800;
  text-decoration: none; margin: 8px 0 0; }
.h-btn-ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-2, var(--line)); }
.h-btn-off { background: color-mix(in srgb, var(--muted) 18%, var(--surface)); color: var(--muted); }
.h-place .h-btn { margin-top: 4px; }

/* «Карта в Wallet». */
.h-cta { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; padding: 16px; border-radius: 20px; text-decoration: none;
  background: var(--pass-bg, #111); color: var(--pass-fg, #fff); }
.h-cta > i { width: 46px; height: 46px; border-radius: 14px; background: var(--copper); color: #111; display: grid; place-items: center; flex: none; }
.h-cta > div { flex: 1; display: grid; gap: 2px; }
.h-cta span { font-size: .85rem; opacity: .8; line-height: 1.35; }
.h-cta > .h-svg { opacity: .7; }

/* «Карты в Wallet»: each venue's card as a small dark pass. */
.h-lead { color: var(--muted); line-height: 1.45; margin: -4px 0 16px; }
.h-passes { display: grid; gap: 12px; }
.h-pass { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 92px; box-sizing: border-box;
  padding: 16px; border-radius: 20px; text-decoration: none; color: var(--pass-fg, #fff); background: var(--pass-bg, #111);
  box-shadow: 0 14px 26px -18px rgba(0, 0, 0, .7); }
.h-pass::after { content: ""; position: absolute; right: -24px; top: -30px; width: 90px; height: 170px; transform: rotate(32deg);
  background: repeating-linear-gradient(90deg, var(--copper) 0 9px, transparent 9px 20px); opacity: .28; pointer-events: none; }
.h-pass > * { position: relative; z-index: 1; }
.h-pass-mark { width: 48px; height: 48px; border-radius: 13px; background: var(--copper); color: #fff; display: grid; place-items: center; flex: none; }
.h-pass-mark .h-svg { width: 28px; height: 28px; stroke-width: 1.9; }
.h-pass-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.h-pass-text b { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.2rem; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; }
.h-pass-text span { font-size: .84rem; opacity: .8; line-height: 1.3; }
.h-pass em { flex: none; display: inline-flex; align-items: center; font-style: normal; font-weight: 800; font-size: .8rem; padding: 7px 6px 7px 12px;
  border-radius: 99px; background: var(--pass-fg, #fff); color: var(--pass-bg, #111); }
.h-pass em .h-svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* QR tab. */
.h-qr-art { display: grid; place-items: center; height: 150px; margin: 0 0 14px; border-radius: 24px; background: var(--pass-bg, #111); color: var(--copper); }
.h-qr-art .h-svg { width: 84px; height: 84px; stroke-width: 1.4; }

/* Trainers. */
.h-trainers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.h-trainer { background: var(--bg); border-radius: 18px; overflow: hidden; display: grid; align-content: start; }
.h-trainer img, .h-trainer .h-poster-ph { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 20%; display: block; border-radius: 0; }
.h-trainer div { display: grid; gap: 4px; padding: 10px 12px 14px; }
.h-trainer span { color: var(--muted); font-size: .8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.h-trainer em { font-style: normal; font-weight: 700; font-size: .8rem; }

/* Prices. */
.h-prices li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.h-prices li div { display: grid; gap: 2px; }
.h-prices li span { color: var(--muted); font-size: .82rem; }
.h-prices em { font-style: normal; font-weight: 800; text-align: right; white-space: nowrap; }

/* Bottom bar, as in a phone app. */
.h-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 560px; margin: 0 auto; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); }
.h-nav a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; text-decoration: none; color: var(--muted); font-size: .7rem; }
.h-nav a.on { color: var(--text); font-weight: 700; }
.h-nav a.on .h-svg { stroke: var(--accent); stroke-width: 2; }

@media (max-width: 350px) {
  .h-grid { grid-template-columns: repeat(3, 1fr); }
  .h-logo span { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .h-tile { transition: none; }
}
