/* PHD signature layer: small shared components that sit on top of the app styles.
   Unscoped rules use palette tokens only, so every theme follows. Rules that depend on the
   Classic look are scoped to :root:not([data-theme]). Not a source of theme-bridge.css. */

/* ---- Hero: who is here right now ------------------------------------------------------- */
.hero-roster { display: grid; gap: 8px; min-width: 0; }
.hero-roster-title { color: var(--smoke); font-size: .75rem; font-weight: 600; }
.hero-roster-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero-roster-list a { display: block; border-radius: 3px; text-decoration: none; transition: transform var(--t-fast); }
.hero-roster-list a:hover { transform: translateY(-2px); }
.hero-roster-list a:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }
.hero-roster-list .avatar { --size: 40px; display: block; }
.hero-roster-more { display: grid !important; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--line-steel); color: var(--bone-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-roster-more:hover { border-color: var(--line-strong); color: var(--brass-hi); }
@media (max-width: 1099px) {
  .hero-roster-list .avatar { --size: 44px; }
  .hero-roster-more { min-width: 44px; height: 44px; }
}

:root:not([data-theme]) .home-hero-aside {
  padding: 18px 20px 16px;
  border: 1px solid var(--line-steel);
  border-top: 2px solid var(--brass);
  background: linear-gradient(180deg, rgba(11, 15, 16, .74), rgba(11, 15, 16, .9));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .85);
}
:root:not([data-theme]) .hero-roster-title { font-family: var(--font-hud); letter-spacing: .1em; text-transform: uppercase; }
:root:not([data-theme]) .hero-roster-more { font-family: var(--font-display); font-size: 1.05rem; }
:root:not([data-theme]) .home-hero-meta { gap: 0; padding: 0; }
:root:not([data-theme]) .hero-roster + .home-hero-meta { padding-top: 12px; border-top: 1px dashed rgba(155, 164, 166, .2); }
:root:not([data-theme]) .home-hero-meta .hud-row { flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; }
:root:not([data-theme]) .home-hero-meta .hud-row + .hud-row { padding-left: 16px; border-left: 1px solid var(--line-steel); }
:root:not([data-theme]) .home-hero-meta :is(.hud-value, .countdown) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; font-size: 1.45rem; text-align: left; }
:root:not([data-theme]) .home-hero-meta .hud-value small { display: inline; font-size: .72rem; }

/* ---- Members: name line and post count never share a row ------------------------------- */
.member-card > span { display: grid; gap: 2px; min-width: 0; }
.member-card > span > small { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hero-roster-list a { transition: none; }
  .hero-roster-list a:hover { transform: none; }
}

/* ---- Classic: sub-page headers take half the height, content starts on the first screen ---- */
:root:not([data-theme]) .page-hero { min-height: clamp(128px, 11vw, 164px); }
:root:not([data-theme]) .page-hero-inner { padding-top: var(--sp-5); padding-bottom: var(--sp-4); align-items: center; }
:root:not([data-theme]) .page-hero .hud { margin-bottom: 4px; }
:root:not([data-theme]) .page-hero h1 { font-size: clamp(2rem, 1.8vw + 1.1rem, 3rem); }
:root:not([data-theme]) .page-hero p { margin-top: 6px; font-size: var(--fs-md); max-width: 70ch; }

/* ---- Forum overview: the numbers column has one width, so every row lines up -------------- */
@media (min-width: 1101px) {
  .forum-category .forum-channel { grid-template-columns: minmax(0, 1.3fr) 12.5rem minmax(160px, 1fr); }
}

/* ---- Classic home: the camp picture holds still, the dashboard slides over it ------------
   home.js sets --hero-shift (px scrolled) and --hero-cover (0..1) on the stage. The hero box
   scrolls away normally; its layers move against it at different speeds, so the picture seems
   pinned, the copy sinks and fades, and the stat bar arrives as a lit edge. !important beats
   the inline transform of the generic parallax() helper, which the themes keep using. */
:root:not([data-theme]) .home-hero .hero-media {
  transform: translate3d(0, calc(var(--hero-shift, 0px) * .84), 0) scale(calc(1 + var(--hero-cover, 0) * .09)) !important;
  transform-origin: 66% 58%;
}
:root:not([data-theme]) .home-hero .hero-inner {
  transform: translate3d(0, calc(var(--hero-shift, 0px) * .42), 0);
  opacity: calc(1 - var(--hero-cover, 0) * 1.35);
}
:root:not([data-theme]) .home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  opacity: calc(var(--hero-cover, 0) * .6);
  pointer-events: none;
}
:root:not([data-theme]) .app-shell[data-view='home'] .dashboard-statbar {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, rgba(214, 165, 71, .1), rgba(214, 165, 71, .03) 40%, rgba(214, 165, 71, .08)), var(--ink);
  box-shadow: 0 -1px 0 rgba(240, 201, 119, calc(.25 + var(--hero-cover, 0) * .75)), 0 -34px 70px -22px rgba(214, 165, 71, calc(var(--hero-cover, 0) * .5));
}

/* The cards settle into the grid as their row scrolls in: position only, never opacity, so
   everything stays readable. Outer columns travel further, the grid closes like a formation. */
@keyframes home-card-settle { from { transform: translate3d(0, var(--settle, 48px), 0); } to { transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 761px) {
    :root:not([data-theme]) [data-home-dashboard] .home-dashboard-card {
      animation: home-card-settle linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    :root:not([data-theme]) [data-home-dashboard] :is([data-home-card='shout'], [data-home-card='calendar'], [data-home-card='comeback'], [data-home-card='explore']) { --settle: 110px; }
    :root:not([data-theme]) [data-home-dashboard] [data-home-card='gallery'] { --settle: 78px; }
  }
}
