/* Régua visual final das páginas públicas. A página inicial é a referência. */
:root {
  --public-header-primary-height: 52px;
  --public-header-secondary-height: 36px;
  --public-header-logo-size: 36px;
  --public-header-action-height: 34px;
  --public-header-brand-font-size: .95rem;
  --public-header-menu-font-size: .78rem;
  --public-header-nav-font-size: .8rem;
  --public-header-login-font-size: .86rem;
  --internal-hero-title-size: clamp(2.4rem, 3.2vw, 3.1rem);
  --internal-hero-description-size: .84rem;
  --public-section-title-size: clamp(2rem, 2.5vw, 2.6rem);
  --public-metric-value-size: clamp(1.6rem, 2vw, 2.1rem);
  --public-subsection-title-size: clamp(1.4rem, 1.8vw, 1.9rem);
  --public-card-title-size: 1.25rem;
  --public-card-body-size: .82rem;
  --public-title-family: var(--font-body);
  --public-title-weight: 700;
}

.site-header {
  width: 100%;
  height: calc(var(--public-header-primary-height) + var(--public-header-secondary-height) + 1px);
}

.site-header > .header-primary {
  width: 100%;
  height: var(--public-header-primary-height);
  min-height: var(--public-header-primary-height);
  max-height: var(--public-header-primary-height);
  padding: 0 clamp(18px, 3.2vw, 56px);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
}

.site-header .menu-trigger {
  min-height: 34px;
  padding: 8px 4px;
  gap: 9px;
  font-size: var(--public-header-menu-font-size);
}

.site-header .menu-color-grid {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.site-header .header-brand {
  gap: 8px;
  font-size: var(--public-header-brand-font-size);
  line-height: 1;
}

.site-header .header-brand img {
  width: var(--public-header-logo-size);
  height: var(--public-header-logo-size);
  flex: 0 0 var(--public-header-logo-size);
  padding: 5px;
}

.site-header .header-actions {
  min-width: 0;
  gap: 7px;
}

.site-header .header-actions .flag-button,
.site-header .header-actions .theme-toggle,
.site-header .header-actions .login-button {
  height: var(--public-header-action-height);
  min-height: var(--public-header-action-height);
  max-height: var(--public-header-action-height);
}

.site-header .header-actions .flag-button { width: 48px; }
.site-header .header-actions .theme-toggle { width: 34px; flex-basis: 34px; }
.site-header .header-actions .login-button {
  min-width: 74px;
  padding-inline: 14px;
  border-radius: 9px;
  font-size: var(--public-header-login-font-size);
}

.site-header > .header-secondary {
  width: 100%;
  height: var(--public-header-secondary-height);
  min-height: var(--public-header-secondary-height);
  max-height: var(--public-header-secondary-height);
  padding: 0 clamp(18px, 3.2vw, 56px);
  gap: clamp(12px, 4vw, 62px);
}

.site-header > .header-secondary a {
  min-height: var(--public-header-secondary-height);
  padding-inline: 7px;
  font-size: var(--public-header-nav-font-size);
  line-height: 1;
}

.site-header > .header-secondary a.active,
.site-header > .header-secondary a[aria-current="page"] {
  color: #1479ed;
  box-shadow: inset 0 -3px #1479ed;
}

/* Largura única do menu lateral em todas as páginas públicas. */
.site-menu-drawer {
  width: min(300px, calc(100vw - 34px));
}

.site-header + .site-menu-layer + main,
.site-header + .site-menu-layer + .school-shell {
  padding-top: calc(var(--public-header-primary-height) + var(--public-header-secondary-height) + 1px);
}

/* Hierarquia tipográfica compartilhada por todas as páginas públicas. */
.slide-copy h1,
.catalog-hero h1,
.club-hero .catalog-hero-copy h1,
.editorial-page-hero h1,
.bi-hero h1,
.school-profile-copy h1 {
  font-family: var(--public-title-family);
  font-size: var(--internal-hero-title-size);
  font-weight: var(--public-title-weight);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.slide-copy p,
.catalog-hero p,
.club-hero .catalog-hero-copy p,
.editorial-page-hero p,
.bi-hero p,
.school-profile-copy > p {
  font-size: var(--internal-hero-description-size);
  line-height: 1.5;
}

.neural-copy h2,
.section-heading h2,
.results h2,
.journey h2,
.constellation-copy h2,
.catalog-section-heading h2,
.page-section-title h2,
.bi-neural-heading h2,
.school-story h2,
.school-gallery-section h2 {
  font-family: var(--public-title-family);
  font-size: var(--public-section-title-size);
  font-weight: var(--public-title-weight);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.editorial-column > header h3,
.help-section h2,
.catalog-modal h2,
.content-modal h2,
.school-modal-content h2 {
  font-family: var(--public-title-family);
  font-size: var(--public-subsection-title-size);
  font-weight: var(--public-title-weight);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.objective-grid h3,
.bi-explanation h2,
.journey-grid h3,
.school-body h3,
#profile-tab-content h3,
.page-card-copy strong,
.editorial-feature h4 {
  font-family: var(--public-title-family);
  font-size: var(--public-card-title-size);
  font-weight: var(--public-title-weight);
  line-height: 1.25;
}

.objective-grid p,
.bi-explanation p,
.journey-grid p,
.school-body p,
#profile-tab-content p,
.page-card-copy > span,
.editorial-feature p {
  font-size: var(--public-card-body-size);
  line-height: 1.55;
}

.catalog-metrics b,
.metric-grid b,
.constellation-stats b,
.profile-stat-grid b {
  font-family: var(--public-title-family);
  font-size: var(--public-metric-value-size);
  font-weight: var(--public-title-weight);
  line-height: 1;
}

/* Altura compacta herdada do antigo hero de Ciência em Dados. */
@media (min-width: 921px) {
  .catalog-hero,
  .editorial-page-hero,
  .bi-hero {
    height: 225px;
    min-height: 225px;
  }

  .catalog-hero.club-hero {
    height: 225px;
    min-height: 225px;
  }

  .club-neural-visual { height: 201px; }
}

@media (max-width: 760px) {
  :root {
    --public-header-primary-height: 58px;
    --public-header-secondary-height: 43px;
    --public-header-logo-size: 38px;
    --public-header-action-height: 42px;
    --public-header-brand-font-size: .9rem;
    --public-header-menu-font-size: .76rem;
    --public-header-nav-font-size: .78rem;
    --public-header-login-font-size: .82rem;
    --internal-hero-title-size: clamp(2rem, 8vw, 2.5rem);
    --internal-hero-description-size: .84rem;
    --public-section-title-size: clamp(1.75rem, 7vw, 2.15rem);
    --public-metric-value-size: clamp(1.5rem, 6vw, 1.9rem);
    --public-subsection-title-size: clamp(1.35rem, 5.5vw, 1.75rem);
    --public-card-title-size: 1.08rem;
  }

  .site-header > .header-primary {
    padding-inline: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
  }

  .site-header .menu-trigger { min-height: 42px; padding-inline: 5px; }
  .site-header .header-brand { gap: 7px; font-size: var(--public-header-brand-font-size); }
  .site-header .header-actions { gap: 5px; }
  .site-header .header-actions .flag-button { width: 51px; }
  .site-header .header-actions .theme-toggle { width: 42px; flex-basis: 42px; }
  .site-header .header-actions .login-button { min-width: 68px; padding-inline: 10px; font-size: var(--public-header-login-font-size); }
  .site-header > .header-secondary { padding-inline: 12px; justify-content: flex-start; gap: 22px; }
  .site-header > .header-secondary a { padding-inline: 4px; }
}

@media (max-width: 520px) {
  .site-header > .header-secondary { gap: 18px; }
}
