/* Montserrat Black, subset to the glyphs of КИБЕРНЕДЕЛЯ and CYBER WEEK (fonts/OFL-Montserrat.txt). The ZH word
   has no Latin-font glyphs and falls back to a system CJK face. */
@font-face {
  font-family: "JHCW Banner";
  src: url("fonts/montserrat-black-cw.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* The existing strip keeps its original height, color and document position. */
.header__info-cont.jhcw-installed { overflow: visible; }
.jhcw-installed .header__info_l,
.jhcw-installed .header__info_r { position: relative; z-index: 4; }
.jhcw-installed .header__info li.currencies:empty { display: none; }
.jhcw-installed .hamburger { z-index: 5; }

.jhcw-banner {
  --jhcw-width: 280px;
  --jhcw-height: 40px;
  --jhcw-type: 29px;
  --jhcw-cut: polygon(
    28px 0, 35% 0, 35% 4px, 43% 4px, 43% 0,
    calc(100% - 42px) 0, calc(100% - 42px) 5px,
    calc(100% - 23px) 5px, calc(100% - 23px) 12px,
    calc(100% - 10px) 12px, calc(100% - 10px) 20px,
    100% 20px, 100% 29px, calc(100% - 13px) 29px,
    calc(100% - 13px) 36px, calc(100% - 31px) 36px,
    calc(100% - 31px) 40px, 68% 40px, 68% 36px,
    60% 36px, 60% 40px, 23px 40px, 23px 34px,
    12px 34px, 12px 27px, 0 27px, 0 18px,
    8px 18px, 8px 9px, 28px 9px
  );
  position: absolute;
  top: 0;
  left: var(--jhcw-center, 50%);
  transform: translateX(-50%);
  width: var(--jhcw-width);
  height: var(--jhcw-height);
  display: block;
  isolation: isolate;
  z-index: 2;
  overflow: visible;
  text-decoration: none;
  outline-offset: 5px;
  -webkit-tap-highlight-color: transparent;
}
.jhcw-banner, .jhcw-banner * { box-sizing: border-box; }
.jhcw-banner[hidden] { display: none; }
.jhcw-banner:focus-visible { outline: 3px solid #2012ff; }
.jhcw-banner > span { pointer-events: none; }
.jhcw-reveal { position: absolute; inset: 0 0 -7px; }
.jhcw-wall, .jhcw-inside { position: absolute; clip-path: var(--jhcw-cut); }
.jhcw-wall {
  inset: 5px -1px 0;
  background: #69750d;
  background-image:
    linear-gradient(180deg, #4b5b0c, #a9b420),
    repeating-linear-gradient(90deg, transparent 0 5px, #dce44f 5px 7px, transparent 7px 15px);
  box-shadow: 0 4px 3px #292c1a38;
}
.jhcw-inside {
  inset: 0 0 7px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1b10b0;
}
.jhcw-depth { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.jhcw-grid {
  position: absolute;
  inset: 0;
  clip-path: var(--jhcw-inner, inset(6px 6px 4px));
  background:
    linear-gradient(#a2acff26 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(90deg, #a2acff26 1px, transparent 1px) 0 0 / 8px 8px,
    radial-gradient(ellipse at 45% 85%, #5c3cff66, transparent 75%),
    linear-gradient(180deg, #100078, #2500fa 32%, #2100e1);
  box-shadow: inset 4px 5px 5px #080039c9;
}
.jhcw-title {
  position: relative;
  margin: -1px 3px 0 0;
  padding: 0;
  color: #e0e4eb;
  font: 900 var(--jhcw-type)/1 "JHCW Banner", "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", "Arial Black", sans-serif;
  letter-spacing: -.015em;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-text-stroke: .6px #141e45;
  paint-order: stroke fill;
  --jhcw-sides:
    1px 1px 0 #677388,
    2px 2px 0 #414c66,
    3px 3px 0 #27314b,
    4px 4px 0 #111b32,
    5px 5px 0 #060c23,
    6px 7px 2px #03001566;
  text-shadow: var(--jhcw-sides);
  filter: brightness(1);
  transition: filter .2s, text-shadow .2s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.jhcw-banner:hover .jhcw-title,
.jhcw-banner:focus-visible .jhcw-title {
  filter: brightness(1.13);
  text-shadow: var(--jhcw-sides), 0 0 9px #8fbbff66;
}

.jhcw-flight-clip {
  position: absolute;
  inset: 0;
  /* Cubes stay inside the yellow strip: the bottom edge (0) clips them at all widths, so they never cover the
     content below (the notices on mobile, the logo and links of the header row at 768px and wider). */
  clip-path: inset(0 -72px 0 -72px);
  pointer-events: none;
  z-index: 2;
}
.jhcw-block-wall {
  position: absolute;
  inset: 0;
  perspective: 650px;
  perspective-origin: 50% 50%;
  pointer-events: none;
}
.jhcw-particle {
  position: absolute;
  width: var(--cube-w);
  height: var(--cube-h);
  margin-left: calc(var(--cube-w) / -2);
  margin-top: calc(var(--cube-h) / -2);
  transform-style: preserve-3d;
}
.jhcw-cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.jhcw-face {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--cube-w);
  height: var(--cube-h);
  backface-visibility: hidden;
  background: #e0e31c;
  background-image:
    linear-gradient(#f7ff8c94, #f7ff8c94),
    linear-gradient(#f1ef694d, #f1ef694d),
    linear-gradient(#9aab0a73, #9aab0a73),
    linear-gradient(#b8c01761, #b8c01761),
    linear-gradient(#f3f77d66, #f3f77d66);
  background-repeat: no-repeat;
  background-size: 24% 24%, 17% 17%, 21% 21%, 18% 34%, 15% 15%;
  background-position: 15% 14%, 65% 24%, 80% 78%, 15% 75%, 48% 59%;
  box-shadow: inset 1px 1px 0 #f8ff9e99, inset -1px -1px 0 #52640080;
}
.jhcw-face--front {
  transform: translate(-50%,-50%) translateZ(calc(var(--cube-d) / 2));
  background: var(--jhcw-strip, #e0e31c);
  box-shadow: none;
}
.jhcw-texel {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#f7ff8c94,#f7ff8c94) 15% 14% / 24% 24% no-repeat,
    linear-gradient(#f1ef694d,#f1ef694d) 65% 24% / 17% 17% no-repeat,
    linear-gradient(#9aab0a73,#9aab0a73) 80% 78% / 21% 21% no-repeat,
    linear-gradient(#b8c01761,#b8c01761) 15% 75% / 18% 34% no-repeat;
  box-shadow: inset 1px 1px 0 #f8ff9e99, inset -1px -1px 0 #52640080;
  opacity: 0;
}
.jhcw-face--back { transform: translate(-50%,-50%) rotateY(180deg) translateZ(calc(var(--cube-d) / 2)); background-color: #6b7d0d; }
.jhcw-face--right { width: var(--cube-d); transform: translate(-50%,-50%) rotateY(90deg) translateZ(calc(var(--cube-w) / 2)); background-color: #82970f; }
.jhcw-face--left { width: var(--cube-d); transform: translate(-50%,-50%) rotateY(-90deg) translateZ(calc(var(--cube-w) / 2)); background-color: #b4c423; }
.jhcw-face--top { height: var(--cube-d); transform: translate(-50%,-50%) rotateX(90deg) translateZ(calc(var(--cube-h) / 2)); background-color: #f0fc87; }
.jhcw-face--bottom { height: var(--cube-d); transform: translate(-50%,-50%) rotateX(-90deg) translateZ(calc(var(--cube-h) / 2)); background-color: #53670c; }
.jhcw-face--right { background-position: 70% 20%, 22% 48%, 56% 78%, 15% 15%, 78% 90%; }
.jhcw-face--top { background-position: 40% 14%, 84% 68%, 18% 58%, 74% 18%, 48% 90%; }

/* Without the script the banner is not laid out: it could sit over the language switch. */
.jhcw-banner:not(.jhcw-ready) { display: none; }

@media (max-width: 620px) {
  .jhcw-installed .dropdown-languages,
  .jhcw-installed .dropdown-languages > .select { width: 28px; min-width: 28px; }
  .jhcw-installed .dropdown-languages > .select {
    padding: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    transition: none;
  }
  .jhcw-installed .dropdown-languages > .select:after { display: none; }
  .jhcw-installed .dropdown-languages > .select > .language {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .jhcw-installed .header__info_l li.languages { margin-right: 0; }
  /* The currency keeps its symbol and loses its code, so the strip has room for the banner (150px minimum). */
  .jhcw-installed .header__info_l li.currencies .select > span:not(.symbol) { display: none; }
  .jhcw-installed .header__info li.currencies,
  .jhcw-installed .dropdown-currency,
  .jhcw-installed .dropdown-currency > .select { width: auto; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .jhcw-title { transition: none; }
}
