/* HP Data Room — body utility styles (Q6 hybrid: gamme topbar + utility body).
   Tokens verified emitted by hp-brand-tokens on the gamme; fallbacks for safety. */

/* White background + ink text on every Data Room page (public, portal, login).
   The gamme default is a dark body: `html body{background:deep-navy;color:ivory}`
   = specificity (0,0,0,2). The semantic body class `body.hp-data-room-page`
   = (0,0,1,1) beats it cleanly — class outweighs element — won by specificity,
   no override hammer (same single-source class strategy as the gamme chrome).
   The page content lives in .hp-data-room (also white): the body rule covers it. */
body.hp-data-room-page {
  background: #ffffff;
  color: var(--hp-colors-ink, #1a1a1a);
}

/* Page title (theme <h1> inside .hentry): centered, generous top margin,
   coloured with the fund's marble main-dark token (--hp-deep, per-fund via
   brand.yml). Selector (0,0,2,1) wins by specificity — no override hammer. */
body.hp-data-room-page .hentry h1 {
  text-align: center;
  margin-top: clamp(3rem, 8vh, 6rem);
  margin-bottom: var(--hp-spacing-xl, 2.5rem);
  font-family: var(--hp-typography-font-title, "Marcellus"), serif;
  font-weight: 400;
  font-size: var(--hp-typography-scale-3xl, 2.5rem);
  color: var(--hp-deep, #142851);
}

.hp-data-room {
  max-width: var(--hp-layout-max-width, 1280px);
  margin: 0 auto;
  padding: var(--hp-spacing-2xl, 4rem) var(--hp-spacing-lg, 1.5rem);
  font-family: var(--hp-typography-font-body, "Tenor Sans"), serif;
  color: var(--hp-colors-ink, #1a1a1a);
  background: #ffffff;
  text-align: center;
}

.hp-data-room-h2 {
  font-family: var(--hp-typography-font-title, "Marcellus"), serif;
  font-weight: 400;
  font-size: var(--hp-typography-scale-2xl, 2rem);
  color: var(--hp-colors-ink, #1a1a1a);
  margin: 0 0 var(--hp-spacing-lg, 1.5rem);
}

.hp-data-room--portal,
.hp-data-room--login {
  text-align: left;
}

.hp-data-room--login {
  max-width: 40rem;
}

/* Secondary (request access) link — sits UNDER the CTA button; uppercase + larger
   per direction, still quiet (underlined, gold on hover). */
.hp-data-room-secondary {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--hp-typography-font-body, "Tenor Sans"), serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hp-colors-text-secondary, #5a6680);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hp-data-room-secondary:hover,
.hp-data-room-secondary:focus {
  color: var(--hp-accent, #b0986e);
}

.hp-data-room-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 46rem;
  margin: 0 auto var(--hp-spacing-xl, 2.5rem);
  text-align: center;
}

/* CTA wrapper — plain centered block (NOT flex). A flex parent blockifies its
   items (display:inline-block -> block), which made the button render as a
   full-width block bar instead of home's compact inline-block. text-align:center
   keeps the inline-block button compact + centered exactly like home; the
   secondary link (display:block below) stacks UNDER the button. */
.hp-data-room-cta-wrap {
  text-align: center;
  margin: var(--hp-spacing-xl, 2.5rem) 0 0;
}

/* Primary CTA ("Data Room — Private Access") — a LITERAL copy of the home
   button's design, made fully explicit so it never depends on the page context.
   The home CTA renders from the shared `.hp-cta-button` base PLUS an inherited
   body font-size (~1rem) and line-height (the Bricks page resolves these from
   the section). On the /data-room/ page (theme-rendered, not Bricks) those
   inherited values differ, so the button rendered taller. We pin every box-
   affecting property to the home button's computed values here. Descendant
   selector (0,2,0) beats `.hp-cta-button` (0,1,0) without !important, regardless
   of stylesheet source order — fix once for all. */
.hp-data-room .hp-data-room-cta {
  display: inline-block;
  box-sizing: border-box;
  background: var(--hp-accent);
  color: var(--hp-colors-ink, #1a1a1a);
  font-family: var(--hp-typography-font-body, "Tenor Sans"), serif;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: var(--hp-typography-letter-spacing-cta-button, 0.28em);
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2.2rem;
  vertical-align: middle;
  white-space: nowrap;   /* keep the label on ONE line — wrapping doubled the height (16px → 32px) vs home */
}

.hp-data-room-section {
  margin-bottom: var(--hp-spacing-2xl, 4rem);
}

.hp-data-room-section-title {
  font-family: var(--hp-typography-font-title, "Marcellus"), serif;
  font-size: var(--hp-typography-scale-xl, 1.5rem);
  font-weight: 400;
  color: var(--hp-colors-ink, #1a1a1a);
  margin: 0 0 var(--hp-spacing-lg, 1.5rem);
  padding-bottom: var(--hp-spacing-sm, 0.5rem);
  border-bottom: 1px solid var(--hp-colors-rule, rgba(200, 168, 76, 0.35));
}

.hp-data-room-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-data-room-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--hp-spacing-md, 1rem);
  padding: var(--hp-spacing-sm, 0.5rem) 0;
  border-bottom: 1px solid var(--hp-colors-rule, rgba(200, 168, 76, 0.35));
}

.hp-data-room-link {
  flex: 1 1 auto;
  font-family: var(--hp-typography-font-body, "Tenor Sans"), serif;
  color: var(--hp-colors-ink, #1a1a1a);
  text-decoration: none;
}

.hp-data-room-link:hover,
.hp-data-room-link:focus {
  color: var(--hp-accent, #b0986e);
  text-decoration: underline;
}

.hp-data-room-meta {
  flex: 0 0 auto;
  font-size: var(--hp-typography-scale-xs, 0.75rem);
  color: var(--hp-colors-text-secondary, #5a6680);
  white-space: nowrap;
}

.hp-data-room-empty {
  font-style: italic;
  color: var(--hp-colors-text-secondary, #5a6680);
}

@media (max-width: 760px) {
  .hp-data-room {
    padding: var(--hp-spacing-xl, 2.5rem) var(--hp-spacing-md, 1rem);
  }
  .hp-data-room-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }
}

/* ───────────── Phase 2.1 — language filter tabs + badges ───────────── */

/* Q3 — filter tabs (All / FR / EN), quiet-luxury (sober, underline-free). */
.hp-data-room-filter {
  display: flex;
  gap: var(--hp-spacing-sm, 0.5rem);
  margin-bottom: var(--hp-spacing-xl, 2.5rem);
  padding-bottom: var(--hp-spacing-md, 1rem);
  border-bottom: 1px solid var(--hp-colors-rule, rgba(200, 168, 76, 0.35));
}

.hp-data-room-filter-tab {
  font-family: var(--hp-typography-font-body, "Tenor Sans"), serif;
  font-size: var(--hp-typography-scale-sm, 0.875rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--hp-spacing-xs, 0.25rem) var(--hp-spacing-md, 1rem);
  background: transparent;
  border: 1px solid var(--hp-colors-rule, rgba(200, 168, 76, 0.35));
  color: var(--hp-colors-text-secondary, #5a6680);
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.hp-data-room-filter-tab:hover,
.hp-data-room-filter-tab:focus {
  color: var(--hp-colors-ink, #1a1a1a);
  border-color: var(--hp-accent, #b0986e);
}

.hp-data-room-filter-tab.is-active {
  background: var(--hp-deep, #142851);
  color: var(--hp-ivory, #faf7f0);
  border-color: var(--hp-deep, #142851);
}

/* Q2 — language badge (FR / EN / —). */
.hp-data-room-badge {
  flex: 0 0 auto;
  display: inline-block;
  font-family: var(--hp-typography-font-body, "Tenor Sans"), serif;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  line-height: 1;
  padding: 2px 6px;
  border: 1px solid var(--hp-colors-rule, rgba(200, 168, 76, 0.35));
  color: var(--hp-colors-text-secondary, #5a6680);
  text-transform: uppercase;
}

.hp-data-room-badge--fr {
  border-color: var(--hp-accent, #b0986e);
  color: var(--hp-accent, #b0986e);
}

.hp-data-room-badge--en {
  border-color: var(--hp-colors-text-secondary, #5a6680);
  color: var(--hp-colors-text-secondary, #5a6680);
}

/* Filter active — hide non-matching docs (unknown shown only when no filter). */
.hp-data-room--portal[data-filter="fr"] .hp-data-room-list li:not([data-lang="fr"]),
.hp-data-room--portal[data-filter="en"] .hp-data-room-list li:not([data-lang="en"]) {
  display: none;
}
