/* HYPD Arrival - layout and components. Tokens come from hub.css (:root). */

/* ---------- Member home ---------- */
body.home .entry-header, body.page-id-5 .entry-header { display: none !important; }

.hypd-home { margin-top: 8px; }
.hypd-banner { position: relative; overflow: hidden; background: var(--hub-panel); border: 1px solid var(--hub-rule); padding: 34px 32px 30px; margin-bottom: 20px; }
.hypd-banner__glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; }
.hypd-banner__glow--teal { top: -220px; left: -120px; background: radial-gradient(circle, rgba(0,255,200,.14), transparent 65%); }
.hypd-banner__glow--violet { bottom: -260px; right: -140px; background: radial-gradient(circle, rgba(123,97,255,.16), transparent 65%); }
.hypd-banner__kicker { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--hub-teal); margin: 0 0 6px; }
.hypd-banner__title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: clamp(34px, 5vw, 64px); line-height: .95; color: var(--hub-ink); margin: 0; }
.hypd-banner__context { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--hub-dim); margin: 14px 0 0; }

.hypd-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.hypd-card { display: flex; align-items: center; gap: 12px; background: var(--hub-panel); border: 1px solid var(--hub-rule); border-top-width: 2px; padding: 16px 18px; text-decoration: none !important; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.hypd-card:hover { background: var(--hub-raise); transform: translateY(-2px); }
.hypd-card__icon { width: 22px; height: 22px; flex: 0 0 22px; }
.hypd-card__icon svg { width: 100%; height: 100%; display: block; }
.hypd-card__label { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--hub-ink); }
.hypd-card--teal   { border-top-color: var(--hub-teal); }   .hypd-card--teal .hypd-card__icon   { color: var(--hub-teal); }
.hypd-card--pink   { border-top-color: var(--hub-pink); }   .hypd-card--pink .hypd-card__icon   { color: var(--hub-pink); }
.hypd-card--violet { border-top-color: var(--hub-violet); } .hypd-card--violet .hypd-card__icon { color: var(--hub-violet); }
.hypd-card--volt   { border-top-color: #D8FF3E; }           .hypd-card--volt .hypd-card__icon   { color: #D8FF3E; }
.hypd-card--teal:hover { border-color: var(--hub-teal); } .hypd-card--pink:hover { border-color: var(--hub-pink); }
.hypd-card--violet:hover { border-color: var(--hub-violet); } .hypd-card--volt:hover { border-color: #D8FF3E; }

.hypd-home-rail { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }

.hypd-panel { background: var(--hub-panel); border: 1px solid var(--hub-rule); padding: 18px; }
.hypd-panel__title { font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 2.5px; text-transform: uppercase; color: var(--hub-dim); margin: 0 0 14px; }

.hypd-event { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hub-rule); }
.hypd-event:first-of-type { border-top: 0; padding-top: 0; }
.hypd-event__date { width: 48px; flex: 0 0 48px; text-align: center; background: var(--hub-raise); border: 1px solid var(--hub-rule); padding: 6px 0; }
.hypd-event__day { display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 20px; line-height: 1; color: var(--hub-teal); }
.hypd-event__mon { display: block; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--hub-dim); margin-top: 2px; }
.hypd-event__body { min-width: 0; flex: 1; }
.hypd-event__title { font-size: 14px; font-weight: 600; color: var(--hub-ink); margin: 0; }
.hypd-event__time { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--hub-dim); margin: 2px 0 0; }
.hypd-event__join { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--hub-ink); border: 1px solid var(--hub-rule); padding: 6px 12px; text-decoration: none !important; }
.hypd-event__join:hover { border-color: var(--hub-teal); color: var(--hub-teal); }

.hypd-news-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hub-rule); text-decoration: none !important; }
.hypd-news-item:first-of-type { border-top: 0; padding-top: 0; }
.hypd-news-item__thumb { width: 84px; height: 60px; flex: 0 0 84px; background: var(--hub-raise) center/cover no-repeat; }
.hypd-news-item__text { min-width: 0; }
.hypd-news-item__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--hub-ink); }
.hypd-news-item:hover .hypd-news-item__title { color: var(--hub-teal); }
.hypd-news-item__date { display: block; font-family: 'DM Mono', monospace; font-size: 11px; color: var(--hub-dim); margin-top: 4px; }

.hypd-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hypd-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--hub-raise); border: 1px solid var(--hub-rule); padding: 6px 12px 6px 6px; font-size: 12px; font-weight: 600; color: var(--hub-ink); text-decoration: none !important; }
.hypd-chip img { width: 22px; height: 22px; border-radius: 50%; display: block; }
.hypd-chip:hover { border-color: var(--hub-teal); color: var(--hub-teal); }

.hypd-online { display: flex; padding-left: 8px; }
.hypd-online__user { margin-left: -8px; display: block; }
.hypd-online__user img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--hub-teal); box-shadow: 0 0 0 2px var(--hub-panel); display: block; }
.hypd-online__user:hover { position: relative; z-index: 2; }

/* ---------- Desktop icon rail ---------- */
.hypd-rail { display: none !important; }
@media (min-width: 1200px) {
  body.hypd-has-rail { padding-left: 0; }
  .hypd-rail { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: 84px; background: var(--hub-deep); border-right: 1px solid var(--hub-rule); z-index: 999; padding-top: 96px; }
  .hypd-rail__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 13px 0; color: var(--hub-dim); text-decoration: none !important; box-shadow: inset 0 0 0 0 transparent; }
  .hypd-rail__item svg { width: 22px; height: 22px; }
  .hypd-rail__label { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; }
  .hypd-rail__item:hover { color: var(--hub-ink); background: var(--hub-raise); }
  .hypd-rail__item.is-active { color: var(--hub-ink); background: var(--hub-raise); box-shadow: inset 2px 0 0 var(--hub-teal); }
  .hypd-rail__item.is-active svg { color: var(--hub-teal); }
}

/* ---------- Mobile tab bar ---------- */
.hypd-tabbar { display: none; }
@media (max-width: 899px) {
  body.hypd-has-tabbar { padding-bottom: 86px; }
  .hypd-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; background: var(--hub-deep); border-top: 1px solid var(--hub-rule); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); }
  .hypd-tabbar__item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 2px; color: var(--hub-dim); text-decoration: none !important; }
  .hypd-tabbar__item svg { width: 22px; height: 22px; }
  .hypd-tabbar__item span { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
  .hypd-tabbar__item.is-active { color: var(--hub-teal); box-shadow: inset 0 2px 0 var(--hub-teal); }
  .hypd-tabbar__post { flex: 0 0 56px; width: 56px; height: 56px; margin: -24px 6px 0; display: flex; align-items: center; justify-content: center; background: var(--hub-teal); color: var(--hub-teal-ink); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); box-shadow: 0 0 18px rgba(0,255,200,.45); }
  .hypd-tabbar__post svg { width: 24px; height: 24px; }
}
.hypd-nav-badge { position: absolute; top: 4px; right: 50%; margin-right: -22px; min-width: 16px; padding: 1px 4px; background: var(--hub-pink); color: #fff; font-family: 'DM Mono', monospace; font-size: 10px; line-height: 14px; text-align: center; }

/* ---------- Shared buttons ---------- */
.hypd-btn { display: inline-flex; align-items: center; justify-content: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 17px; letter-spacing: 1.5px; text-transform: uppercase; padding: 14px 30px; text-decoration: none !important; cursor: pointer; border: 1px solid transparent; }
.hypd-btn--primary { background: var(--hub-teal); color: var(--hub-teal-ink) !important; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); box-shadow: 0 0 22px rgba(0,255,200,.35); }
.hypd-btn--primary:hover { filter: brightness(1.08); }
.hypd-btn--ghost { background: transparent; color: var(--hub-ink) !important; border-color: var(--hub-rule); }
.hypd-btn--ghost:hover { border-color: var(--hub-teal); color: var(--hub-teal) !important; }

/* ---------- Logged-out landing ---------- */
body.hypd-landing-body { margin: 0; background: var(--hub-void, #050508); min-height: 100vh; }
.hypd-landing { position: relative; overflow: hidden; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; }
.hypd-landing__glow { position: fixed; width: 60vw; height: 60vw; border-radius: 50%; pointer-events: none; }
.hypd-landing__glow--teal { top: -30vw; left: -20vw; background: radial-gradient(circle, rgba(0,255,200,.12), transparent 65%); }
.hypd-landing__glow--pink { bottom: -30vw; right: -20vw; background: radial-gradient(circle, rgba(255,45,107,.12), transparent 65%); }
.hypd-landing__wordmark { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 56px; letter-spacing: 4px; color: var(--hub-ink); text-shadow: 0 0 24px rgba(0,255,200,.55); margin: 0 0 10px; }
.hypd-landing__wordmark span { color: var(--hub-teal); }
.hypd-landing__title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 6vw, 58px); line-height: 1; color: var(--hub-ink); margin: 0 0 16px; }
.hypd-landing__sub { max-width: 540px; color: var(--hub-dim); font-size: 16px; line-height: 1.6; margin: 0 0 14px; }
.hypd-landing__totals { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--hub-teal); margin: 0 0 10px; }
.hypd-landing__cta { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }

/* ---------- Welcome / onboarding ---------- */
body.hypd-welcome-body { margin: 0; background: var(--hub-void, #050508); }
.hypd-welcome { max-width: 760px; margin: 0 auto; padding: 56px 24px 120px; }
.hypd-welcome__progress { display: flex; gap: 8px; margin-bottom: 36px; }
.hypd-welcome__progress span { width: 44px; height: 4px; background: var(--hub-raise); }
.hypd-welcome__progress .is-done, .hypd-welcome__progress .is-active { background: var(--hub-teal); }
.hypd-welcome__kicker { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--hub-dim); margin: 0 0 8px; }
.hypd-welcome__title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 6vw, 48px); line-height: 1; color: var(--hub-ink); margin: 0 0 10px; }
.hypd-welcome__title--sm { font-size: clamp(24px, 4vw, 30px); margin-top: 38px; }
.hypd-welcome__sub { color: var(--hub-dim); font-size: 15px; margin: 0 0 24px; }
.hypd-chipgrid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hypd-chip-toggle { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; color: var(--hub-ink); background: var(--hub-panel); border: 1px solid var(--hub-rule); padding: 12px 20px; cursor: pointer; transition: all .12s ease; }
.hypd-chip-toggle:hover { border-color: var(--hub-teal); }
.hypd-chip-toggle.is-on { background: var(--hub-teal); color: var(--hub-teal-ink); border-color: var(--hub-teal); box-shadow: 0 0 14px rgba(0,255,200,.35); }
.hypd-welcome__cta { position: sticky; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 0 20px; margin-top: 30px; background: linear-gradient(to top, var(--hub-void, #050508) 55%, transparent); }
.hypd-welcome__cta .hypd-btn { width: 100%; max-width: 420px; }
.hypd-welcome__skip { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--hub-dim); text-decoration: none; }
.hypd-welcome__skip:hover { color: var(--hub-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .hypd-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hypd-banner { padding: 24px 20px 22px; }
}
/* ---------- Home: full-width layout, theme sidebars off ---------- */
body.activity.directory.home .widget-area.sidebar-left,
body.activity.directory.home .widget-area.sidebar-right { display: none !important; }
body.activity.directory.home .bb-grid.site-content-grid { display: block !important; }
body.activity.directory.home .content-area.bs-bp-container { width: 100% !important; max-width: none !important; }
/* Server-rendered grid: .hypd-home uses display:contents so the banner, cards
   and rail sit in the same grid as the native composer, tabs and feed. */
body.activity.directory.home .entry-content > .buddypress-wrap { display: grid; grid-template-columns: minmax(0,1fr); gap: 0 24px; max-width: 1180px; margin: 0 auto; }
body.activity.directory.home .hypd-home { display: contents; }
@media (min-width: 1200px) {
  body.activity.directory.home .entry-content > .buddypress-wrap { grid-template-columns: minmax(0,1fr) 340px; }
  body.activity.directory.home .hypd-banner, body.activity.directory.home .hypd-cards { grid-column: 1 / -1; }
  body.activity.directory.home .hypd-home-rail { grid-column: 2; grid-row: 3 / span 40; margin-top: 0; }
  body.activity.directory.home .entry-content > .buddypress-wrap > :not(.hypd-home) { grid-column: 1; }
}
@media (max-width: 1199px) {
  body.activity.directory.home .hypd-home-rail { grid-row: 99; }
}
@media (max-width: 899px) {
  .hypd-cards .hypd-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* ---------- Tab bar: hidden on message threads and while typing ---------- */
@media (max-width: 899px) {
  body.messages .hypd-tabbar, body.hypd-kb-open .hypd-tabbar { display: none; }
  body.messages.hypd-has-tabbar { padding-bottom: 0; }
}