/* ── Página inicial ──────────────────────────────────────────
   Hero em styles.css; tokens e peças base em css/project.css. */

.hm-page { --pj-alt: #F0EFF5; }
[data-theme="dark"] .hm-page { --pj-alt: #262A33; --pj-card: #2D323C; }

.hm-section { padding: 7rem 0; }
.hm-section--alt { background: var(--pj-alt); }

.hm-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 3.5rem;
  border-bottom: 2px solid var(--text);
}
.hm-title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
  color: var(--text);
}
#sobre .hm-title { margin-bottom: 1.5rem; max-width: 18ch; }
.hm-head-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .95rem; font-weight: 700; color: var(--pj-accent); text-decoration: none; white-space: nowrap; }
.hm-head-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Projetos ───────────────────────────────────────────── */
.hm-projects { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.hm-proj {
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--pj-card);
  border: 1px solid var(--pj-line);
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hm-proj:hover { transform: translateY(-4px); border-color: var(--pj-accent); box-shadow: 0 28px 50px -34px rgba(0,0,0,.35); }

.hm-proj-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-bottom: 1px solid var(--pj-line);
}
.hm-proj-visual img { width: 100%; height: auto; display: block; transition: transform .35s ease; }
.hm-proj:hover .hm-proj-visual img,
.hm-proj:hover .hm-proj-wordmark { transform: scale(1.04); }
.hm-proj-wordmark { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: #2A5A72; text-align: center; transition: transform .35s ease; }

.hm-proj-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: .35rem .8rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 800;
  color: #fff;
}

.hm-proj-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.75rem 2rem 2rem; flex: 1; }
.hm-proj-meta { display: flex; align-items: center; gap: .75rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.hm-proj-num { color: var(--pj-accent); }
.hm-proj-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.015em; color: var(--text); margin-top: .25rem; }
.hm-proj-cats { font-size: .9rem; font-weight: 600; color: var(--text-2); }
.hm-proj-desc { font-size: 1rem; line-height: 1.65; color: var(--text-2); margin-top: .35rem; }
.hm-proj-cta { margin-top: auto; padding-top: 1rem; font-size: .95rem; font-weight: 700; color: var(--pj-accent); }

/* o projeto em destaque ocupa a linha toda, com imagem ao lado */
.hm-proj--featured { grid-column: 1 / -1; flex-direction: row; }
.hm-proj--featured .hm-proj-visual { flex: 1.15; aspect-ratio: auto; min-height: 340px; border-bottom: none; border-right: 1px solid var(--pj-line); }
.hm-proj--featured .hm-proj-body { flex: 1; justify-content: center; padding: 2.5rem 3rem; }
.hm-proj--featured .hm-proj-title { font-size: clamp(1.9rem, 3vw, 2.4rem); }
.hm-proj--featured .hm-proj-desc { font-size: 1.05rem; }
.hm-proj--featured .hm-proj-cta { margin-top: 1rem; padding-top: .5rem; }

/* ── Serviços ───────────────────────────────────────────── */
.hm-services { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 1.25rem; }
.hm-srv {
  background: var(--pj-card);
  border: 1px solid var(--pj-line);
  border-radius: 1.1rem;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.hm-srv-icon { width: 48px; height: 48px; border-radius: .75rem; background: var(--pj-alt); color: var(--pj-accent); display: flex; align-items: center; justify-content: center; margin-bottom: .5rem; }
.hm-srv-title { font-size: 1.2rem; font-weight: 800; line-height: 1.25; color: var(--text); }
.hm-srv-desc { font-size: 1rem; line-height: 1.6; color: var(--text-2); }

.hm-srv--featured { background: var(--pj-brand); border-color: var(--pj-brand); }
[data-theme="dark"] .hm-srv--featured { background: #1E3A5F; border-color: #1E3A5F; }
.hm-srv-eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pj-kicker-light); }
.hm-srv--featured .hm-srv-title { font-size: 1.6rem; color: #fff; margin-top: auto; }
.hm-srv--featured .hm-srv-desc { color: rgba(255,255,255,.75); }
.hm-srv-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.hm-srv-tags span { font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.85); background: rgba(255,255,255,.12); padding: .3rem .75rem; border-radius: 100px; }

.hm-about-actions { margin-top: 2rem; }

/* ── Página Portfolio (reutiliza os cartões acima) ──────── */
.pf-hero { padding-top: 4.5rem; }
.pf-hero .pj-hero-lead { margin-bottom: 4rem; }
.pf-section { padding-top: 4rem; }
.pf-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.pf-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.pf-filters .port-filter { min-height: 44px; padding: .6rem 1.25rem; font-size: .95rem; background: var(--pj-alt); }
.pf-filters .port-filter.active { background: var(--pj-brand); border-color: var(--pj-brand); color: #fff; }
[data-theme="dark"] .pf-filters .port-filter.active { background: #4A90D9; border-color: #4A90D9; color: #0D0D1C; }
.pf-count { font-size: .9rem; font-weight: 600; color: var(--text-2); }
.hm-proj.hidden { display: none; }
.pf-empty { flex-direction: column; align-items: center; text-align: center; gap: .75rem; padding: 4rem 2rem; border: 2px dashed var(--pj-line); border-radius: 1.25rem; color: var(--pj-accent); }
.pf-empty-title { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.pf-empty-text { font-size: 1rem; color: var(--text-2); max-width: 44ch; }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .hm-section { padding: 5rem 0; }
  .hm-proj--featured { flex-direction: column; }
  .hm-proj--featured .hm-proj-visual { min-height: 0; aspect-ratio: 16 / 9; border-right: none; border-bottom: 1px solid var(--pj-line); }
  .hm-proj--featured .hm-proj-body { padding: 1.75rem 2rem 2rem; }
  .hm-services { grid-template-columns: 1fr 1fr; }
  .hm-srv--featured { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .hm-section { padding: 4rem 0; }
  .hm-head { flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 2.5rem; padding-bottom: 1.5rem; }
  .hm-projects { grid-template-columns: 1fr; gap: 1.25rem; }
  .hm-proj-body, .hm-proj--featured .hm-proj-body { padding: 1.5rem; }
  .hm-proj-title { font-size: 1.4rem; }
  .hm-services { grid-template-columns: 1fr; }
  .hm-srv { padding: 1.5rem; }
}
