/* ATCODEX Hub's door on atcodexschool.com (redesign 2, 2026-12-02, "the wall of creativity").
   A tilted wall of example projects from every stage, subject and game scrolls down without end behind the words.
   Wide screens: the wall fills the card and fades into the dark side that holds the words; the three pillars run
   across the bottom. Phones: the wall is a band above the words. hub-card.js repeats the tiles so the loop has no
   seam and pauses the wall while the card is off screen; motion only when the visitor allows it. */
.door-hub { --door-glow: #7c5cff26; --door-accent: #d9cfff; border-color: rgba(167, 139, 250, .32); }
.door-hub:hover { border-color: rgba(167, 139, 250, .62); box-shadow: 0 40px 90px #0008, 0 0 70px #7c5cff30; }

/* the wall */
.door-hub .door-art.hxw { -webkit-mask-image: none; mask-image: none; perspective: none; }
.hxw::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(270deg, #071731 0%, #071731f2 46%, #07173180 54%, transparent 64%), linear-gradient(0deg, #061226 0%, #06122600 30%),
    linear-gradient(180deg, #0a1d3c99 0%, transparent 14%); }
.hxw-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hxw-wall { position: absolute; top: -30%; bottom: -30%; left: -6%; width: 66%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start;
  direction: ltr; transform: perspective(1600px) rotateX(16deg) rotateY(-14deg) rotateZ(11deg); transform-origin: 40% 50%; }
.hxw-col { min-width: 0; will-change: transform; }
.hxw-tile { display: block; margin-bottom: 14px; padding: 8px 8px 10px; border-radius: 16px; direction: rtl; text-align: start;
  background: linear-gradient(160deg, #13294f, #0a1836); border: 1px solid #6f9fe02e; box-shadow: 0 14px 30px #0009; }
html[lang="en"] .hxw-tile { direction: ltr; }
.hxw-cover { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 11px; font-style: normal; color: var(--ink, #fff);
  background: radial-gradient(circle at 28% 22%, #ffffff4d, transparent 52%), linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: inset 0 1px 0 #ffffff55, 0 8px 20px var(--cg); }
/* square covers at a period of five, so every copy of a column matches and the loop has no jump */
.hxw-col:nth-child(odd) .hxw-tile:is(:nth-child(5n+2), :nth-child(5n+4)) .hxw-cover, .hxw-col:nth-child(even) .hxw-tile:is(:nth-child(5n+1), :nth-child(5n+3)) .hxw-cover { aspect-ratio: 1 / 1; }
.hxw-cover svg { width: 42%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hxw-cover.t { font: 800 30px/1 Cairo, Arial, sans-serif; } .hxw-cover.en { font-family: Arial, sans-serif; } .hxw-cover.s { font-size: 20px; }
.hxw-tile b { display: block; margin-top: 7px; font-size: 12.5px; font-weight: 800; line-height: 1.45; color: #eef3ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hxw-tile small { display: block; font-size: 10.5px; line-height: 1.6; color: #8ea2c1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hxw .k-coral { --c1: #ff9f7d; --c2: #e0553b; --cg: #ff7b5a59; }
.hxw .k-blue { --c1: #74adff; --c2: #2f6fe0; --cg: #3f86ff59; }
.hxw .k-cyan { --c1: #86dcff; --c2: #1f9ad6; --cg: #38bdf859; }
.hxw .k-violet { --c1: #bba2ff; --c2: #7048f0; --cg: #8b5cf659; }
.hxw .k-green { --c1: #7debc0; --c2: #149a68; --cg: #34d39959; }
.hxw .k-teal { --c1: #6aeedd; --c2: #0e9384; --cg: #2dd4bf59; }
.hxw .k-gold { --c1: #ffe0a0; --c2: #e6a83f; --cg: #e6a83f66; --ink: #2a1a05; }
.hxw .k-amber { --c1: #fdd36a; --c2: #d98a0b; --cg: #f59e0b59; --ink: #2a1a05; }
.hxw .k-pink { --c1: #ffa8d4; --c2: #db4f97; --cg: #ec489959; }
.hxw .k-rose { --c1: #ff93a5; --c2: #d33b5c; --cg: #f43f5e59; }
.hxw .k-indigo { --c1: #9aaaff; --c2: #4352d8; --cg: #6366f159; }

/* the words */
.hxd-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap; }
.hxd-free { flex: none; padding: 3px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.6;
  color: #f3c77a; background: rgba(243, 199, 122, .07); border: 1px solid rgba(243, 199, 122, .42); }
.door-hub h2 { margin: 16px 0 2px; font: 800 clamp(36px, 3.8vw, 54px)/1.12 Arial, sans-serif; letter-spacing: .4px; }
.door-hub h2 bdi { direction: ltr; unicode-bidi: isolate; background: linear-gradient(100deg, #ffffff 0%, #e4ecff 55%, #c3d2ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.door-hub h2 b { font-weight: inherit; background: linear-gradient(100deg, #efe9ff 0%, #b49cff 40%, #70d8ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.door-hub .hxd-tagline { margin: 8px 0 12px; max-width: 540px; font-size: clamp(18px, 1.75vw, 23px); font-weight: 800; line-height: 1.6; color: #f1f5ff; }
.door-hub .door-body > p:not(.hxd-tagline) { max-width: 540px; font-size: 15.5px; line-height: 2; }
.door-hub .door-cta { margin-top: 26px; padding-top: 0; }

/* the three pillars */
.hxd-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(148, 180, 230, .13);
  background: rgba(3, 11, 27, .85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hxd-band > div { display: flex; align-items: flex-start; gap: 14px; padding: 22px 26px 24px; }
.hxd-band > div + div { border-inline-start: 1px solid rgba(148, 180, 230, .11); }
.hxd-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #dcd2ff;
  background: rgba(139, 108, 255, .11); border: 1px solid rgba(167, 139, 250, .26); }
.hxd-ico svg { width: 20px; height: 20px; }
.hxd-txt { display: block; min-width: 0; }
.hxd-txt > b { display: block; font-size: 15px; font-weight: 700; line-height: 1.55; color: #eef2fb; }
.hxd-txt > small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.8; color: var(--muted); }

@media (min-width: 821px) {
  .door-hub { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); grid-template-rows: minmax(520px, auto) auto;
    grid-template-areas: "art body" "band band"; }
  /* not placed in a grid cell, so the wall fills the whole card behind the words */
  .door-hub .door-art.hxw { position: absolute; inset: 0; z-index: -1; height: auto; }
  .door-hub .door-body { grid-area: body; justify-content: center; padding: 56px 44px 44px 26px; }
  .hxd-band { grid-area: band; }
}
@media (max-width: 820px) {
  .door-hub .door-art.hxw { height: 300px; }
  .hxw::after { background: linear-gradient(0deg, #071731 0%, #07173100 45%), linear-gradient(180deg, #0a1d3c99 0%, transparent 18%); }
  .hxw-wall { top: -55%; bottom: -55%; left: -14%; width: 128%; grid-template-columns: repeat(4, minmax(0, 1fr)); transform: perspective(1200px) rotateX(18deg) rotateZ(9deg); }
  .hxw-col:nth-child(5) { display: none; }
  .door-hub .door-body { padding-top: 6px; }
  .hxd-band { grid-template-columns: 1fr; margin-top: 18px; }
  .hxd-band > div { padding: 18px 22px; }
  .hxd-band > div + div { border-inline-start: 0; border-top: 1px solid rgba(148, 180, 230, .11); }
}
@media (max-width: 600px) {
  .door-hub .door-art.hxw { height: 250px; }
  .door-hub .door-kicker { letter-spacing: 1px; }
  .hxd-band > div { padding: 16px 18px; }
}

/* motion: the columns fall at different speeds; paused while the card is off screen */
@media (prefers-reduced-motion: no-preference) {
  .hxw-wall[data-loop] .hxw-col { animation: hub-wall-fall 30s linear infinite; }
  .hxw-wall[data-loop] .hxw-col:nth-child(2) { animation-duration: 24s; animation-delay: -9s; }
  .hxw-wall[data-loop] .hxw-col:nth-child(3) { animation-duration: 33s; animation-delay: -4s; }
  .hxw-wall[data-loop] .hxw-col:nth-child(4) { animation-duration: 26s; animation-delay: -15s; }
  .hxw-wall[data-loop] .hxw-col:nth-child(5) { animation-duration: 29s; animation-delay: -11s; }
  .hxw[data-idle] *, .hxw[data-idle] *::before { animation-play-state: paused !important; }
}
@keyframes hub-wall-fall { from { transform: translateY(-50%); } to { transform: translateY(0); } }
