/* Hub shell — wraps a per-МТК set of prototypes in an iframe carousel.
 * Owned by coordinator. Each /mtkXX/index.html embeds this + provides
 * its own window.HUB_VARIANTS array.
 */

@font-face {
  font-family: "Nolde";
  font-weight: 400;
  font-display: swap;
  src: url("../../../mtk38-globe/fonts/nolde/nolde.otf") format("opentype");
}
@font-face {
  font-family: "20 Kopeek";
  font-weight: 600;
  font-display: swap;
  src: url("../../../mtk38-globe/fonts/kopeek/20-kopeek-demibold.otf") format("opentype");
}
@font-face {
  font-family: "21 Cent";
  font-weight: 400;
  font-display: swap;
  src: url("../../../mtk38-globe/fonts/cent/21Cent.woff") format("woff");
}

:root {
  /* Брендбук-палитра (Ленин-центр / графический дизайн) */
  --amber-black: #000000;
  --white:       #FFFFFF;
  --brass:       #D2B773;  /* латунь */
  --red:         #A02128;  /* сигнальный красный */
  --blue-grey:   #5D8970;  /* сине-серый */
  --window:      #9DA3A8;  /* серое окно */
  --graphite:    #435059;  /* графитовый */
  --telegrey:    #CFD0CF;  /* телосерый */
  --paper:       #F7F9EF;  /* тёплый белый для текста на тёмном */
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--graphite);
  color: var(--paper);
  font-family: "21 Cent", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.hub {
  position: fixed;
  inset: 0;
}

/* Bar overlays the top of the iframe — iframe gets the full viewport,
 * so prototypes that compute 100vh (e.g. centered modals) render
 * correctly. Bar has semi-transparent bg + backdrop blur so the
 * prototype's content peeks through. */
.hub__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
  /* Спокойный полупрозрачный фон, без диагональных полос — убраны
   * по комментарию дизайнера 2026-05-12. */
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(210, 183, 115, 0.18);
  z-index: 100;
  min-height: 48px;
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1), opacity 240ms ease;
}
.hub__bar.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Top-edge hotspot — invisible 12px strip that always intercepts pointer
 * activity to bring the bar back when it's auto-hidden. */
.hub__edge {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  z-index: 99;
  background: transparent;
}

.hub__back {
  font-family: "20 Kopeek", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid rgba(210, 183, 115, 0.5);
  border-radius: 999px;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background 120ms ease, color 120ms ease;
}
.hub__back:hover, .hub__back:focus-visible {
  background: var(--brass);
  color: var(--graphite);
}

.hub__title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.hub__title .sub {
  font-family: "20 Kopeek", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}
.hub__title .name {
  font-family: "Nolde", Georgia, serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub__nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub__label {
  font-family: "20 Kopeek", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}
.hub__label .tag { color: var(--brass); }
.hub__label .counter {
  color: rgba(247, 249, 239, 0.5);
  margin-left: 8px;
}

.hub__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(210, 183, 115, 0.55);
  background: rgba(0, 0, 0, 0.4);
  color: var(--paper);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  display: grid;
  place-items: center;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  padding: 0;
}
.hub__arrow:hover, .hub__arrow:focus-visible {
  background: var(--brass);
  color: var(--graphite);
  border-color: var(--brass);
}

.hub__dots {
  display: flex;
  gap: 10px;
  padding: 0 4px;
}
.hub__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(210, 183, 115, 0.28);
  border: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 120ms ease, transform 120ms ease;
  position: relative;
}
.hub__dot::after {
  /* enlarge touch target */
  content: "";
  position: absolute;
  inset: -10px;
}
.hub__dot.active {
  background: var(--brass);
  transform: scale(1.15);
}

.hub__frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--graphite);
  z-index: 1;
}

/* Vertical kiosk preview: iframe pinned to 9:16 portrait, centered,
 * scaled to fit visitor's browser. Around it — slightly darker shade
 * of graphite so the kiosk frame is visually obvious without
 * dramatic vignette. */
.hub--vertical {
  background: #2c343b; /* шаг темнее --graphite */
}
.hub--vertical .hub__frame {
  inset: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* min() picks whichever side is the binding constraint */
  height: min(100vh, 100vw * 16 / 9);
  width:  min(100vw, 100vh * 9 / 16);
  border: 1px solid rgba(210, 183, 115, 0.25);
  box-shadow:
    0 0 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(210, 183, 115, 0.12) inset;
}

/* Orientation switch pill in the bar */
.hub__orient {
  display: inline-flex;
  border: 1px solid rgba(210, 183, 115, 0.5);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}
.hub__orient button {
  background: transparent;
  border: 0;
  padding: 6px 11px;
  color: var(--paper);
  cursor: pointer;
  touch-action: manipulation;
  font-family: "20 Kopeek", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  transition: background 120ms ease, color 120ms ease;
}
.hub__orient button + button {
  border-left: 1px solid rgba(210, 183, 115, 0.3);
}
.hub__orient button.is-active {
  background: var(--brass);
  color: var(--graphite);
}
.hub__orient button:hover:not(.is-active) {
  background: rgba(210, 183, 115, 0.12);
}

@media (max-width: 720px) {
  .hub__title .name { font-size: 18px; }
  .hub__label { display: none; }
  .hub__orient button { padding: 6px 8px; }
}

/* (consolidated mobile rules above in the orient-switch block) */
