/* Concept Hub side widget. For concept previews only, not part of the final website.
   Open on load, slides away after 1 second, edge arrow opens and closes it. */

.hub {
  --hub-bg: #151515;
  --hub-line: rgba(201, 164, 90, 0.45);
  --hub-gold: #c9a45a;
  --hub-accent: #c9a45a;
  --hub-accent-ink: #151515;
  --hub-text: #f2ede4;
  --hub-muted: #a8a099;
  --hub-top: 84px;

  position: fixed;
  z-index: 90; /* below the site nav (100) and the mobile menu (99) */
  right: 16px;
  top: var(--hub-top);
  width: 296px;
  max-height: calc(100vh - var(--hub-top) - 24px);
  max-height: calc(100svh - var(--hub-top) - 24px);
  display: flex;
  flex-direction: column;
  background: var(--hub-bg);
  color: var(--hub-text);
  border: 1px solid var(--hub-line);
  border-radius: 12px;
  box-shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.8);
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
  transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1), box-shadow 0.45s ease;
}
.hub[data-concept="v4"],
.hub[data-concept="v2"],
.hub[data-concept="v3"] { --hub-accent: #f01d4f; --hub-accent-ink: #ffffff; }

.hub[data-hidden="true"] { transform: translateX(calc(100% + 16px)); box-shadow: none; }

/* Hidden content must not be reachable with the keyboard. The handle stays outside this rule. */
.hub[data-hidden="true"] .hub__head,
.hub[data-hidden="true"] .hub__panel { visibility: hidden; transition: visibility 0s linear 0.45s; }

/* Arrow on the left edge of the panel, still visible when the panel is hidden */
.hub__handle {
  position: absolute;
  left: -34px;
  top: 18px;
  width: 34px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--hub-line);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: var(--hub-bg);
  color: var(--hub-accent);
  cursor: pointer;
}
.hub__handle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}
.hub[data-hidden="true"] .hub__handle svg { transform: rotate(180deg); }
.hub__handle:focus-visible { outline: 3px solid var(--hub-accent); outline-offset: 2px; }

.hub__head { display: grid; gap: 10px; padding: 14px 14px 12px; }
.hub__tier { margin: 0; font-weight: 600; font-size: 0.9375rem; color: var(--hub-gold); }
.hub__back {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: var(--hub-accent);
  color: var(--hub-accent-ink);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s ease;
}
.hub__back:hover { filter: brightness(1.12); }
.hub__back:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.hub__panel {
  overflow-y: auto;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(242, 237, 228, 0.14);
  overscroll-behavior: contain;
}
.hub__panel h3 {
  margin: 0 0 8px;
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--hub-gold);
}
.hub__panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hub__panel li { position: relative; padding-left: 22px; font-size: 0.86rem; line-height: 1.4; }
.hub__panel li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.3em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--hub-gold);
  border-bottom: 2px solid var(--hub-gold);
  transform: rotate(-45deg);
}
.hub__note { margin: 14px 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--hub-muted); }

@media (max-width: 760px) {
  .hub { --hub-top: 80px; right: 10px; width: min(276px, calc(100vw - 64px)); }
  .hub[data-hidden="true"] { transform: translateX(calc(100% + 10px)); }
  .hub__head { padding: 12px 12px 10px; }
  .hub__panel { padding: 10px 12px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hub, .hub__handle svg, .hub__back { transition: none; }
  .hub[data-hidden="true"] .hub__head,
  .hub[data-hidden="true"] .hub__panel { transition: none; }
}
@media print { .hub { display: none; } }
