/**
 * ==============================================================================
 * PHM TECH — FOLHA DE ESTILOS DA PÁGINA PRINCIPAL (PORTAL HOME)
 * Arquitetura Isolada: Consome tokens.css
 * Prof. Paulo Henrique Maciel · PHM Tech
 * ==============================================================================
 */

@import url('tokens.css');

/* =====================================================================
   PHM Academy alignment — home do ecossistema
   A home segue deliberadamente o mesmo ritmo visual do Academy: dark-first,
   tipografia de alto contraste, teal como ação primária e superfícies suaves.
   ===================================================================== */
.phm-home-page {
  background: var(--bg);
}

.phm-home-page .site-header {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom-color: var(--line);
  box-shadow: none;
  backdrop-filter: saturate(180%) blur(20px);
}

.phm-home-page .nav-wrap {
  min-height: 4.75rem;
  height: auto;
  padding-block: .65rem;
}

.phm-home-page .main-nav a,
.phm-home-page .nav-pref-trigger,
.phm-home-page .btn-header-action {
  color: var(--text-soft);
}
.phm-home-page .main-nav a:hover,
.phm-home-page .main-nav a.active,
.phm-home-page .nav-pref-trigger:hover {
  color: var(--teal);
}

.phm-home-page .home-hero-section {
  padding-block: clamp(3.5rem, 6.5vw, 5.5rem);
  background: radial-gradient(ellipse 38rem 28rem at 88% 12%, rgba(45,212,191,.09), transparent 72%), var(--bg);
  border-bottom-color: transparent;
}

.phm-home-page .home-hero-title {
  max-width: 16ch;
  color: var(--navy);
  font-size: clamp(2.25rem, 5.4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.phm-home-page .home-hero-title em { color: var(--teal); font-style: normal; }
.phm-home-page .home-hero-lead { color: var(--text-soft); font-size: clamp(1.05rem, 2.5vw, 1.28rem); }
.phm-home-page .home-hero-badge {
  color: var(--teal);
  background: rgba(45,212,191,.10);
  border-color: rgba(45,212,191,.28);
}

.phm-home-page .home-hero-panel {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-color: var(--line-strong);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
}

.phm-home-page .button.primary,
.phm-home-page .button.light {
  border-radius: 4px;
}
.phm-home-page .button.primary:hover,
.phm-home-page .button.light:hover { transform: translateY(-1px); }

.phm-home-page .home-projects-section { background: var(--bg); }
.phm-home-page .home-section-title,
.phm-home-page .home-intro-title { color: var(--navy); }
.phm-home-page .home-section-lead,
.phm-home-page .home-intro-text { color: var(--text-soft); }
.phm-home-page .home-search-box,
.phm-home-page .project-card,
.phm-home-page .home-metric-item {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.phm-home-page .project-card:hover,
.phm-home-page .home-metric-item:hover { border-color: rgba(45,212,191,.5); box-shadow: var(--shadow-lg); }

@media (max-width: 860px) {
  .phm-home-page .nav-wrap { padding-inline: .75rem; }
  .phm-home-page .main-nav { background: var(--surface); border-color: var(--line-strong); }
}

/* ==========================================================================
   1. HERO PRINCIPAL & MÉTRICAS
   ========================================================================== */
.home-hero-section {
  padding-top: 3.25rem;
  padding-bottom: 3rem;
  text-align: left;
  position: relative;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 62%, var(--teal-soft) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.home-hero-section::after {
  content: '';
  position: absolute;
  width: 34rem;
  height: 34rem;
  right: -12rem;
  top: -18rem;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.08;
  pointer-events: none;
}

.edu-master-hero {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin-inline: auto;
}

@media (min-width: 901px) {
  .edu-master-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    column-gap: 3.5rem;
    align-items: center;
  }

  .home-hero-badge,
  .home-hero-title,
  .home-hero-lead {
    grid-column: 1;
  }

  .home-metrics-bar {
    grid-column: 2;
    grid-row: 1 / span 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    align-self: center;
  }

  .home-metric-item {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: var(--blue);
  margin-bottom: 1.35rem;
}

.home-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 1.15rem;
  letter-spacing: -0.02em;
}

.home-hero-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 760px;
  margin: 0 0 1.35rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
}

.home-hero-actions .button {
  min-height: 44px;
}

/* Barra de Métricas (4 Cards) */
.home-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1040px;
  margin: 0;
}

.home-metric-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.35rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
}

@media (max-width: 720px) {
  .home-hero-section {
    padding-top: 2.5rem;
    padding-bottom: 2.35rem;
  }

  .home-hero-title {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .home-hero-lead {
    font-size: 1.02rem;
  }

  .home-hero-actions {
    margin-bottom: 1.25rem;
  }
}

.home-metric-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.home-metric-number {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--teal);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.home-metric-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ==========================================================================
   2. SEÇÃO DE PROJETOS, BUSCA INSTANTÂNEA & FILTROS
   ========================================================================== */
.home-projects-section {
  padding-top: 4rem;
  padding-bottom: 5rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.home-section-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.home-section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.home-section-lead {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 720px;
  margin: 0 auto;
}

/* Barra de Busca Inteligente */
.home-search-wrapper {
  max-width: 960px;
  margin: 0 auto 1.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-search-box {
  position: relative;
  width: 100%;
}

.home-search-input {
  width: 100%;
  height: 48px;
  padding: 0 1.25rem 0 3rem;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
  box-sizing: border-box;
}

.home-search-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.home-search-input::placeholder {
  color: var(--color-muted);
  opacity: 0.9;
}

.home-search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: inline-flex;
}

.home-search-counter {
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* ==========================================================================
   PADRÃO EDITORIAL TÉCNICO: ABAS ARQUITETÔNICAS CONTÍNUAS
   Navegação por seções de catálogo, substituindo pílulas ovais genéricas de IA
   ========================================================================== */
.project-filters-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.25rem;
  border-bottom: 1px solid var(--editorial-rule-strong);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
  padding-bottom: 0;
}

.project-filters-row::-webkit-scrollbar {
  display: none;
}

.filter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.15rem;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease;
  line-height: 1.2;
  box-shadow: none !important;
}

.filter-pill-btn:hover {
  color: var(--editorial-ink);
  border-bottom-color: var(--line-strong);
  background: transparent;
  transform: none;
}

.filter-pill-btn.active {
  color: var(--editorial-ink);
  font-weight: 750;
  border-bottom: 2.5px solid var(--teal);
  background: transparent;
  box-shadow: none !important;
}

.filter-tab-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: var(--surface-soft);
  color: var(--text-muted);
  border: 1px solid var(--line);
  transition: all 0.18s ease;
}

.filter-pill-btn:hover .filter-tab-count {
  color: var(--editorial-ink);
  border-color: var(--line-strong);
}

.filter-pill-btn.active .filter-tab-count {
  background: rgba(13, 148, 136, 0.12);
  color: var(--teal);
  border-color: rgba(13, 148, 136, 0.3);
}

[data-theme="dark"] .filter-pill-btn.active {
  color: #ffffff;
  border-bottom-color: var(--teal);
  background: transparent !important;
}

[data-theme="dark"] .filter-pill-btn.active .filter-tab-count {
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.35);
}

[data-theme="sepia"] .filter-pill-btn.active {
  color: #2e2116;
  border-bottom-color: #b45309;
}

[data-theme="sepia"] .filter-pill-btn.active .filter-tab-count {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.25);
}

/* ==========================================================================
   3. GRID DE CARDS: PADRÃO EDITORIAL TÉCNICO & HUMANISTA
   Substituição das caixas pastel/glow por diagramação arquitetônica de catálogo
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--editorial-rule-strong, var(--line));
  border-radius: 6px;
  padding: 1.35rem 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.project-card-body {
  display: flex;
  flex-direction: column;
}

.project-card-header,
.project-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--editorial-rule, rgba(15, 23, 42, 0.06));
}

.project-card-kicker {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.project-card-num {
  color: var(--teal);
  font-weight: 750;
}

.project-card-slash {
  color: var(--editorial-rule-strong, #cbd5e1);
  margin: 0 0.3rem;
  user-select: none;
}

.project-card-cat {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.16rem 0.5rem;
  border-radius: 3px;
  background: var(--surface-soft);
  color: var(--text-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.project-card h3,
.project-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--editorial-ink, var(--navy));
  margin: 0.25rem 0 0.45rem 0;
  line-height: 1.3;
  letter-spacing: -0.015em;
  transition: color 0.18s ease;
}

.project-card:hover h3,
.project-card:hover .project-card-title {
  color: var(--teal);
}

.project-card p,
.project-card-desc {
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--text-soft);
  margin: 0 0 1.25rem 0;
}

.project-card .card-link,
.card-link,
[data-theme="light"] .project-card .card-link,
[data-theme="light"] .card-link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.58rem 0.85rem !important;
  margin-top: auto !important;
  border-radius: 4px !important;
  border: 1px solid var(--line-strong, #cbd5e1) !important;
  background: var(--surface-soft, #f1f5f9) !important;
  color: var(--navy, #0b1e3d) !important;
  font-family: var(--font-body) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  line-height: 1.2 !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
}

.project-card .card-link-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
}

.project-card .card-link-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: inherit;
  line-height: 1.2;
  display: inline-block;
  vertical-align: middle;
}

.project-card .card-link svg,
.card-link svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  color: var(--teal, #0d9488) !important;
  transition: transform 0.2s ease, color 0.2s ease;
}

.project-card-tag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--surface, #ffffff);
  color: var(--text-muted, #64748b);
  border: 1px solid var(--line, #e2e8f0);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

/* Hover no Modo Claro: Ganha destaque harmônico */
.project-card:hover .card-link,
.project-card:focus-visible .card-link,
[data-theme="light"] .project-card:hover .card-link,
[data-theme="light"] .project-card:focus-visible .card-link {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
}

.project-card:hover .card-link svg,
.project-card:focus-visible .card-link svg,
[data-theme="light"] .project-card:hover .card-link svg,
[data-theme="light"] .project-card:focus-visible .card-link svg {
  color: #ffffff !important;
  transform: translateX(3px);
}

.project-card:hover .project-card-tag,
[data-theme="light"] .project-card:hover .project-card-tag {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Modos Escuro e Sépia */
[data-theme="dark"] .project-card {
  background: var(--surface);
  border-color: var(--editorial-rule-strong);
  box-shadow: none;
}

[data-theme="dark"] .project-card:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .project-card-header,
[data-theme="dark"] .project-card .card-top {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Modo Escuro */
[data-theme="dark"] .project-card .card-link,
[data-theme="dark"] .card-link {
  background: #0f1a30 !important;
  color: #f1f5f9 !important;
  border: 1px solid #334e7a !important;
  box-shadow: none !important;
}

[data-theme="dark"] .project-card .card-link svg,
[data-theme="dark"] .card-link svg {
  color: #38bdf8 !important;
}

[data-theme="dark"] .project-card-tag {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

[data-theme="dark"] .project-card:hover .card-link,
[data-theme="dark"] .project-card:focus-visible .card-link {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35) !important;
}

[data-theme="dark"] .project-card:hover .card-link svg,
[data-theme="dark"] .project-card:focus-visible .card-link svg {
  color: #ffffff !important;
  transform: translateX(3px);
}

[data-theme="dark"] .project-card:hover .project-card-tag {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Modo Sépia */
[data-theme="sepia"] .project-card {
  background: var(--surface);
  border-color: var(--editorial-rule-strong);
}

[data-theme="sepia"] .project-card:hover {
  border-color: var(--teal);
}

[data-theme="sepia"] .project-card .card-link,
[data-theme="sepia"] .card-link {
  background: #eae1cf !important;
  color: #3c2817 !important;
  border: 1px solid #ded2bd !important;
  box-shadow: none !important;
}

[data-theme="sepia"] .project-card .card-link svg,
[data-theme="sepia"] .card-link svg {
  color: #78401a !important;
}

[data-theme="sepia"] .project-card-tag {
  background: #f4ecdc;
  color: #6b553e;
  border-color: #ded2bd;
}

[data-theme="sepia"] .project-card:hover .card-link,
[data-theme="sepia"] .project-card:focus-visible .card-link {
  background: #78401a !important;
  color: #ffffff !important;
  border-color: #78401a !important;
  box-shadow: 0 3px 10px rgba(120, 64, 26, 0.2) !important;
}

[data-theme="sepia"] .project-card:hover .card-link svg,
[data-theme="sepia"] .project-card:focus-visible .card-link svg {
  color: #ffffff !important;
  transform: translateX(3px);
}

[data-theme="sepia"] .project-card:hover .project-card-tag {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}



/* ==========================================================================
   4. SEÇÃO MANIFESTO / POR QUE EXISTIMOS (COMPOSIÇÃO EDITORIAL)
   ========================================================================== */
.home-intro-section {
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4.75rem 0;
  position: relative;
}

.home-intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.home-intro-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.85rem;
}

.home-intro-kicker-num {
  color: var(--teal);
}

.home-intro-kicker-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

.home-intro-kicker-label {
  color: var(--text-soft);
}

.home-intro-title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 3.4vw, 2.75rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
}

.home-intro-title em {
  font-family: var(--font-serif, 'Newsreader', Georgia, serif);
  font-style: italic;
  font-weight: 400;
  color: var(--teal);
}

.home-intro-content-col {
  border-left: 2px solid var(--teal);
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.home-intro-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-soft);
  margin: 0;
}

.home-intro-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.home-intro-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 4px !important;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.65rem 1.35rem;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.home-intro-cta svg {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.home-intro-cta:hover svg {
  transform: translateX(2px);
}

.home-intro-meta-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
  padding: 0.3rem 0.65rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  user-select: none;
}

[data-theme="dark"] .home-intro-title em {
  color: var(--teal);
}

[data-theme="dark"] .home-intro-content-col {
  border-left-color: var(--teal);
}

[data-theme="dark"] .home-intro-meta-badge {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
}

/* Animação para filtro de cards */
@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   5. RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 900px) {
  .home-intro-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .home-intro-content-col {
    padding-left: 1.25rem;
  }
}

@media (max-width: 768px) {
  .home-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-grid {
    grid-template-columns: 1fr;
  }

  .home-intro-section {
    padding: 3.5rem 0;
  }
}

/* ==========================================================================\n+   NOVA INTERFACE DO PORTAL — COMPOSIÇÃO EDITORIAL\n+   ========================================================================== */
.home-hero-section {
  padding: 3.25rem 0 2.25rem;
  background: var(--bg);
}

.edu-master-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 3rem;
  align-items: center;
  max-width: 1160px;
}

.home-hero-copy {
  max-width: 680px;
}

.home-hero-badge {
  margin-bottom: 1rem;
  background: var(--surface);
  border-color: var(--line-strong);
}

.home-hero-title {
  font-size: clamp(2.6rem, 5.4vw, 4.65rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
  margin-bottom: 1.25rem;
}

.home-hero-title em {
  color: var(--teal);
  font-style: normal;
}

.home-hero-lead {
  max-width: 600px;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.35rem;
}

.home-hero-panel {
  min-height: 300px;
  padding: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius-lg) + 4px);
  background: linear-gradient(155deg, var(--navy) 0%, var(--blue) 72%, var(--teal) 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.home-hero-panel::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  right: -90px;
  bottom: -90px;
}

.home-panel-kicker {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  opacity: .72;
}

.home-panel-orbit {
  width: 132px;
  height: 132px;
  margin: 1.1rem auto 1.2rem;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.home-orbit-core {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 900;
  letter-spacing: -.04em;
}

.home-orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-light);
  box-shadow: 0 0 0 5px rgba(45,212,191,.16);
}

.home-orbit-dot-1 { top: 12px; left: 30px; }
.home-orbit-dot-2 { right: 5px; top: 67px; }
.home-orbit-dot-3 { bottom: 13px; left: 25px; }

.home-panel-title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: .35rem;
}

.home-panel-text { color: rgba(255,255,255,.76); font-size: .88rem; }
.home-panel-link { color: #fff; font-weight: 700; font-size: .86rem; }
.home-panel-link:hover { color: var(--teal-light); }

.home-metrics-bar {
  max-width: 1160px;
  margin: 2rem auto 0;
  grid-template-columns: repeat(4, 1fr);
  gap: .7rem;
}

.home-metric-item {
  min-height: 92px;
  padding: 1rem;
  text-align: left;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.home-metric-number { font-size: 1.45rem; }

@media (max-width: 900px) {
  .edu-master-hero { grid-template-columns: 1fr; gap: 1.75rem; }
  .home-hero-panel { max-width: 520px; width: 100%; }
  .home-hero-title { font-size: clamp(2.4rem, 8vw, 3.6rem); }
}

@media (max-width: 620px) {
  .home-hero-section { padding-top: 2.25rem; }
  .home-hero-actions .button { flex: 1 1 100%; justify-content: center; }
  .home-metrics-bar { grid-template-columns: repeat(2, 1fr); margin-top: 1.35rem; }
  .home-metric-item { min-height: 82px; padding: .8rem; }
  .home-metric-number { font-size: 1.2rem; }
}

/* Cards de projetos: hierarquia clara entre categoria, nome e ação. */
.project-card {
  min-height: 238px;
  padding: 1.35rem 1.35rem 1.15rem;
}

.project-card .card-top {
  margin-bottom: .85rem;
}

.project-card .project-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.project-card .project-badge {
  padding: .28rem .65rem;
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.project-card h3 {
  font-size: 1.16rem;
  letter-spacing: -.015em;
}

.project-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.project-card .card-link {
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
}

@media (max-width: 620px) {
  .project-card { min-height: 205px; }
}

/* Direção editorial alternativa: menos ornamentação, mais acesso ao conteúdo. */
.home-hero-section {
  padding: 2.5rem 0 1.75rem;
  background: var(--surface);
}

.home-hero-section::after { display: none; }

.edu-master-hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 2rem;
  align-items: stretch;
}

.home-hero-title {
  font-size: clamp(2.35rem, 4.6vw, 3.8rem);
  letter-spacing: -.045em;
}

.home-hero-lead { font-size: 1rem; max-width: 650px; }

.home-hero-panel {
  min-height: 0;
  padding: 1.35rem;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-hero-panel::after { display: none; }
.home-panel-kicker { color: var(--teal); opacity: 1; }
.home-panel-orbit { width: 76px; height: 76px; margin: 1rem 0; border-color: var(--line-strong); }
.home-orbit-core { width: 46px; height: 46px; background: var(--navy); color: #fff; font-size: .85rem; }
.home-orbit-dot { width: 7px; height: 7px; box-shadow: none; }
.home-panel-title { color: var(--navy); font-size: 1.1rem; }
.home-panel-text { color: var(--text-soft); }
.home-panel-link { color: var(--blue); }
.home-panel-link:hover { color: var(--teal); }

.home-metrics-bar { margin-top: 1.5rem; }

@media (max-width: 900px) {
  .edu-master-hero { grid-template-columns: 1fr; }
  .home-hero-panel { max-width: 100%; }
  .home-panel-orbit { margin-block: .75rem; }
}

/* Contraste explícito da direção editorial no tema escuro. */
[data-theme="dark"] .home-hero-panel {
  background: #14213d;
  border-color: #2b4775;
}

[data-theme="dark"] .home-panel-kicker { color: #5eead4; }
[data-theme="dark"] .home-panel-title { color: #f8fafc; }
[data-theme="dark"] .home-panel-text { color: #cbd5e1; }
[data-theme="dark"] .home-panel-link { color: #7dd3fc; }
[data-theme="dark"] .home-panel-orbit { border-color: #496795; }
[data-theme="dark"] .home-orbit-core { background: #081426; color: #f8fafc; }
[data-theme="dark"] .home-hero-badge { background: #16284d; border-color: #385785; color: #7dd3fc; }
[data-theme="dark"] .home-metric-item { background: #14213d; border-color: #2b4775; }

/* Integração da direção aprovada no protótipo à home oficial. */
.home-hero-section {
  background: linear-gradient(120deg, var(--surface) 0%, var(--bg) 64%, var(--teal-soft) 100%);
  padding-top: 3.5rem;
  padding-bottom: 1.75rem;
}

.home-hero-title {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1;
}

.home-hero-panel {
  background: linear-gradient(145deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 20px 45px rgba(16, 33, 63, .18);
}

.home-panel-kicker { color: var(--teal-light); }
.home-panel-title { color: #fff; }
.home-panel-text { color: rgba(255,255,255,.78); }
.home-panel-link { color: #fff; }
.home-panel-orbit { border-color: rgba(255,255,255,.3); }
.home-orbit-core { background: #fff; color: var(--navy); }

.home-metrics-bar { margin-top: 1.25rem; }
.home-metric-item { min-height: 86px; border-radius: 14px; }

.project-grid { gap: 1.25rem; }
.project-card { min-height: 220px; border-radius: 6px; }
.project-card:hover { transform: translateY(-2px); }

@media (max-width: 620px) {
  .home-hero-section { padding-top: 2.25rem; padding-bottom: 1.25rem; }
  .home-hero-title { font-size: clamp(2.35rem, 13vw, 3.4rem); }
  .home-hero-panel { border-radius: 18px; }
  .project-card { min-height: 190px; }
}

/* Serviço complementar: fica fora da grade de projetos. */
.home-service-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}
.home-service-kicker {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--teal);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.home-service-callout h3 { margin: .25rem 0 .15rem; color: var(--navy); font-size: 1.05rem; }
.home-service-callout p { margin: 0; color: var(--text-soft); font-size: .85rem; }
.home-service-callout { position: relative; }
.home-carrossel-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(300px, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.home-carrossel-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.home-carrossel-panel h3 { margin: .25rem 0 .8rem; }
.home-carrossel-close { border:0; background:transparent; color:var(--text-soft); font-size:1.4rem; cursor:pointer; line-height:1; }
.home-carrossel-field { display:flex; flex-direction:column; gap:.35rem; margin:.7rem 0; }
.home-carrossel-field label { display:flex; justify-content:space-between; font-size:.78rem; font-weight:700; color:var(--text-soft); }
.home-carrossel-field select { width:100%; padding:.5rem; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--surface-soft); color:var(--text); }
.home-carrossel-open { width:100%; justify-content:center; margin-top:.5rem; background:var(--teal) !important; border-color:var(--teal) !important; color:#fff !important; }
.home-carrossel-open:hover, .home-carrossel-open:focus-visible { background:#0f766e !important; border-color:#0f766e !important; color:#fff !important; }
.home-carrossel-config-link { display:inline-flex; align-items:center; justify-content:center; gap:.35rem; margin-top:.65rem; width:100%; color:var(--teal); font-size:.78rem; font-weight:700; text-decoration:none; }
.home-carrossel-config-link:hover { color:var(--blue); text-decoration:underline; }
@media (max-width: 640px) {
  .home-service-callout { align-items: flex-start; flex-direction: column; }
  .home-service-callout .button { width: 100%; justify-content: center; }
}
