/* Onosoji Platform v3.1.0 — sitewide homepage consistency layer.
   Loaded last. It restores the approved soft-card language across semantic card
   components, balances editorial layouts and keeps the existing homepage portrait
   source untouched. Glass remains reserved for navigation and controls. */

:root {
  --site-radius-xl: 32px;
  --site-radius-lg: 28px;
  --site-radius-md: 22px;
  --site-radius-sm: 18px;
  --site-card: rgba(252, 251, 247, .90);
  --site-card-tint: rgba(238, 232, 219, .48);
  --site-border: rgba(11, 61, 46, .10);
  --site-shadow: 0 18px 46px rgba(5, 39, 30, .055);
  --site-shadow-strong: 0 24px 62px rgba(5, 39, 30, .085);
}

/* Balanced typography without changing the established typefaces. */
.page-hero h1,
.heading-row h2,
.split h2,
.info-card h3,
.world-card h3,
.institution-card h3,
.publication-feature h3,
.portfolio-card h3 {
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   PAGE HEROES — the same soft editorial treatment as the homepage.
   -------------------------------------------------------------------------- */
body:not(.home-executive) .page-hero {
  padding-top: clamp(54px, 6vw, 82px);
  padding-bottom: clamp(56px, 6vw, 86px);
}

body:not(.home-executive) .page-hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .78fr);
  gap: clamp(42px, 6vw, 82px);
  align-items: center;
}

body:not(.home-executive) .page-hero-copy .lede {
  max-width: 660px;
}

body:not(.home-executive) .page-hero-aside > p {
  margin: 0;
  padding: 26px 28px;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-md);
  background: var(--site-card-tint);
  box-shadow: var(--site-shadow);
}

body:not(.home-executive) .page-hero-photo {
  margin: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--site-border);
  border-radius: 34px;
  background: var(--site-card);
  box-shadow: var(--site-shadow-strong);
}

body:not(.home-executive) .page-hero-photo img {
  border-radius: 26px !important;
}

/* Metadata labels should stay soft and fully rounded rather than becoming sharp tabs. */
.page-meta .status-pill:not(a) {
  border: 1px solid rgba(11, 61, 46, .08) !important;
  border-left: 1px solid rgba(11, 61, 46, .08) !important;
  border-radius: 999px !important;
  padding: 8px 12px !important;
  background: rgba(233, 238, 233, .88) !important;
}

/* --------------------------------------------------------------------------
   SEMANTIC CARDS — restore actual cards outside the homepage.
   -------------------------------------------------------------------------- */
body:not(.home-executive) .card-grid {
  gap: clamp(18px, 2.4vw, 28px);
  align-items: stretch;
}

body:not(.home-executive) .info-card:not(.green-card) {
  min-height: 280px;
  padding: clamp(28px, 3vw, 36px) !important;
  overflow: hidden;
  border: 1px solid var(--site-border) !important;
  border-radius: var(--site-radius-lg) !important;
  background: var(--site-card) !important;
  box-shadow: var(--site-shadow);
  display: flex;
  flex-direction: column;
}

body:not(.home-executive) .info-card:not(.green-card) h3 {
  margin-top: 14px !important;
}

body:not(.home-executive) .info-card:not(.green-card) p {
  margin-top: 16px;
}

body:not(.home-executive) .info-card:not(.green-card) .text-link {
  margin-top: auto !important;
  padding-top: 26px;
}

body:not(.home-executive) .info-card.green-card {
  border-radius: var(--site-radius-lg) !important;
  overflow: hidden;
}

body:not(.home-executive) .world-grid {
  gap: clamp(18px, 2.4vw, 28px);
}

body:not(.home-executive) .world-card:not(.world-feature) {
  min-height: 300px !important;
  padding: clamp(28px, 3vw, 36px) !important;
  overflow: hidden;
  border: 1px solid var(--site-border) !important;
  border-radius: var(--site-radius-lg) !important;
  background: var(--site-card) !important;
  box-shadow: var(--site-shadow) !important;
}

body:not(.home-executive) .world-card:not(.world-feature):hover {
  transform: translateY(-3px);
  border-color: rgba(11, 61, 46, .20) !important;
  box-shadow: var(--site-shadow-strong) !important;
}

body:not(.home-executive) .world-card .card-top {
  margin-bottom: 0 !important;
}

body:not(.home-executive) .world-card h3 {
  margin-top: 18px !important;
}

body:not(.home-executive) .world-card .text-link {
  margin-top: auto;
  padding-top: 26px;
}

body:not(.home-executive) .world-feature {
  border-radius: var(--site-radius-xl) !important;
  box-shadow: var(--site-shadow-strong);
}

body:not(.home-executive) .institution-grid {
  gap: clamp(18px, 2.4vw, 28px);
}

body:not(.home-executive) .institution-card {
  min-height: 310px;
  padding: clamp(28px, 3vw, 36px) !important;
  overflow: hidden;
  border: 1px solid var(--site-border) !important;
  border-radius: var(--site-radius-lg) !important;
  background: var(--site-card) !important;
  box-shadow: var(--site-shadow);
}

body:not(.home-executive) .institution-card > div {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body:not(.home-executive) .institution-card .text-link {
  margin-top: auto;
  padding-top: 24px;
  align-self: flex-start;
}

/* Selected experience is a card system wherever it appears. */
body:not(.home-executive) .sector-card-grid {
  gap: 18px !important;
  border: 0 !important;
  background: transparent !important;
}

body:not(.home-executive) .sector-card-grid article,
body:not(.home-executive) .sector-card-grid article:nth-child(odd) {
  padding: 24px 26px !important;
  border: 1px solid var(--site-border) !important;
  border-radius: var(--site-radius-md) !important;
  background: var(--site-card) !important;
  box-shadow: 0 10px 28px rgba(5, 39, 30, .035);
}

body:not(.home-executive) .selected-experience-accordion {
  overflow: hidden;
  border: 1px solid var(--site-border) !important;
  border-radius: var(--site-radius-lg) !important;
  background: var(--site-card-tint) !important;
  box-shadow: var(--site-shadow);
}

/* --------------------------------------------------------------------------
   GROUPED EVIDENCE SURFACES — bounded, rounded, and deliberately not loose rules.
   -------------------------------------------------------------------------- */
.process-grid,
.impact-metrics,
.stats-grid,
.proof-metrics {
  overflow: hidden;
  border: 1px solid var(--site-border) !important;
  border-radius: var(--site-radius-lg) !important;
  background: rgba(252, 251, 247, .72) !important;
  box-shadow: var(--site-shadow);
}

.process-step {
  padding: clamp(26px, 3vw, 34px);
}

.featured-organisations {
  overflow: hidden;
  padding: 20px 24px !important;
  border: 1px solid var(--site-border) !important;
  border-radius: var(--site-radius-md) !important;
  background: var(--site-card) !important;
  box-shadow: var(--site-shadow);
}

.callout,
.register-note {
  overflow: hidden;
  border: 1px solid var(--site-border) !important;
  border-left: 3px solid var(--gold) !important;
  border-radius: var(--site-radius-md) !important;
  background: var(--site-card) !important;
  box-shadow: 0 12px 32px rgba(5, 39, 30, .04);
}

.quote-panel,
.feature-panel,
.media-frame {
  border-radius: var(--site-radius-lg) !important;
}

/* --------------------------------------------------------------------------
   HOMEPAGE FEATURED PUBLICATIONS — equal rhythm, balanced titles, aligned actions.
   -------------------------------------------------------------------------- */
.home-executive .publication-feature-grid {
  align-items: stretch;
  gap: 24px;
}

.home-executive .publication-feature,
.home-executive .publication-feature-dark {
  min-height: 470px;
  padding: clamp(32px, 4vw, 50px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start !important;
  border-radius: var(--home-radius-lg, 28px) !important;
}

.home-executive .publication-feature h3 {
  max-width: 16ch;
  margin: 18px 0 18px;
  font-size: clamp(2.15rem, 3vw, 3.25rem);
  line-height: 1.02;
  text-wrap: balance;
}

.home-executive .publication-feature > p:not(.label) {
  max-width: 52ch;
}

.home-executive .publication-feature .button-row {
  margin-top: auto !important;
  padding-top: 32px;
}

/* --------------------------------------------------------------------------
   WORK PAGE — use the former dead space to explain the portfolio architecture.
   -------------------------------------------------------------------------- */
.page-work .page-hero-grid {
  align-items: stretch;
}

.page-work .page-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portfolio-architecture-mini {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.portfolio-architecture-mini article {
  padding: 14px 16px 15px;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-sm);
  background: var(--site-card-tint);
}

.portfolio-architecture-mini span {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.portfolio-architecture-mini strong {
  display: block;
  font-family: var(--display);
  font-size: .98rem;
  line-height: 1.42;
  letter-spacing: -.015em;
}

.page-work .page-hero-photo,
.page-work .page-hero-photo img {
  height: 100%;
}

.page-work .page-hero-photo img {
  min-height: 520px;
  object-fit: cover;
  object-position: center 18%;
}

/* --------------------------------------------------------------------------
   ASSURANCE PAGE — rebalance the testing-leadership section as one finished card.
   -------------------------------------------------------------------------- */
.page-assurance .leadership-responsibility-section .split {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 76px);
  align-items: center;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-xl);
  background: var(--site-card);
  box-shadow: var(--site-shadow-strong);
}

.page-assurance .leadership-responsibility-section h2 {
  max-width: 12ch;
  font-size: clamp(2.6rem, 4.5vw, 4.7rem);
  line-height: 1.01;
}

.page-assurance .leadership-responsibility-section .large-copy {
  max-width: 23ch;
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  line-height: 1.22;
}

.page-assurance .leadership-responsibility-section .statement > p:last-of-type {
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   PUBLIC PORTFOLIO ARCHITECTURE — register-driven, filtered public view.
   -------------------------------------------------------------------------- */
.portfolio-architecture {
  display: grid;
  gap: clamp(58px, 7vw, 86px);
}

.portfolio-intro-card {
  padding: clamp(30px, 4vw, 48px);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-xl);
  background: var(--green);
  color: var(--cream);
  box-shadow: var(--site-shadow-strong);
}

.portfolio-intro-card .eyebrow {
  color: var(--gold-light);
}

.portfolio-intro-card h2 {
  max-width: 17ch;
  font-size: clamp(2.5rem, 4.5vw, 4.7rem);
}

.portfolio-intro-card p {
  max-width: 70ch;
  margin-top: 20px;
  color: rgba(255,255,255,.70);
}

.portfolio-group {
  display: grid;
  gap: 24px;
}

.portfolio-group-heading {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: end;
}

.portfolio-group-heading h2 {
  font-size: clamp(2.2rem, 3.8vw, 3.8rem);
}

.portfolio-group-heading p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
}

.portfolio-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portfolio-card {
  min-height: 280px;
  padding: clamp(26px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-lg);
  background: var(--site-card);
  box-shadow: var(--site-shadow);
}

.portfolio-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.portfolio-card-type {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.portfolio-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--ux-soft-green, #e9eee9);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.portfolio-card h3 {
  margin-top: 28px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.portfolio-card p {
  margin-top: 16px;
  color: var(--muted);
}

.portfolio-card .text-link {
  margin-top: auto;
  padding-top: 24px;
  align-self: flex-start;
}

.portfolio-public-note {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius-sm);
  background: var(--site-card-tint);
  color: var(--muted);
  font-size: .92rem;
}

/* Organisation page now shows institutions only; products sit in the portfolio architecture. */
.page-organisations .institution-card .tagline {
  display: inline-block;
  margin-top: 14px;
}

@media (max-width: 980px) {
  body:not(.home-executive) .page-hero-grid,
  .portfolio-group-heading,
  .page-assurance .leadership-responsibility-section .split {
    grid-template-columns: 1fr;
  }

  body:not(.home-executive) .page-hero-grid {
    gap: 34px;
  }

  .page-work .page-hero-photo img {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .portfolio-card-grid {
    grid-template-columns: 1fr;
  }

  .page-assurance .leadership-responsibility-section h2,
  .page-assurance .leadership-responsibility-section .large-copy {
    max-width: none;
  }
}

@media (max-width: 760px) {
  body:not(.home-executive) .page-hero {
    padding-top: 34px;
    padding-bottom: 48px;
  }

  body:not(.home-executive) .page-hero-aside > p,
  body:not(.home-executive) .info-card:not(.green-card),
  body:not(.home-executive) .world-card:not(.world-feature),
  body:not(.home-executive) .institution-card,
  .portfolio-card,
  .page-assurance .leadership-responsibility-section .split {
    border-radius: 22px !important;
  }

  body:not(.home-executive) .page-hero-photo,
  .portfolio-intro-card,
  .process-grid,
  .impact-metrics,
  .stats-grid,
  .proof-metrics {
    border-radius: 24px !important;
  }

  .home-executive .publication-feature,
  .home-executive .publication-feature-dark {
    min-height: 0;
    padding: 30px 24px;
    border-radius: 24px !important;
  }

  .home-executive .publication-feature h3 {
    max-width: none;
    font-size: clamp(1.9rem, 8vw, 2.65rem);
  }

  .portfolio-card-top {
    flex-direction: column;
  }

  .portfolio-status {
    align-self: flex-start;
  }
}
