/* ==========================================================================
   Página inicial (prefixo .hm-): hero, grade "bento" de seções e novidades.
   ========================================================================== */

/* ---------- Hero ---------- */
.hm-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(48px, 9vw, 112px) 0 clamp(48px, 8vw, 96px);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.hm-hero-fundo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

/* Formas orgânicas desfocadas */
.hm-forma {
  position: absolute; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  filter: blur(40px); opacity: .9;
  animation: hm-flutua 24s ease-in-out infinite alternate;
}
.hm-forma-1 { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; left: -12vw; top: -18vw; background: var(--accent-soft); }
.hm-forma-2 { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; right: 18%; bottom: -14vw; background: color-mix(in srgb, var(--accent) 22%, transparent); animation-duration: 30s; }
.hm-forma-3 { width: 20vw; height: 20vw; max-width: 280px; max-height: 280px; left: 38%; top: 8%; background: var(--bg-alt); animation-duration: 36s; }
@keyframes hm-flutua {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(4%, 6%) rotate(18deg); }
}

/* Mosaico de fotos recentes, inclinado e esmaecido à direita */
.hm-mosaico {
  position: absolute; top: -12%; right: -6%; width: min(58vw, 760px); height: 135%;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-content: start;
  transform: rotate(-8deg);
  opacity: .55;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 45%, #000 80%, transparent 100%), linear-gradient(to bottom, transparent, #000 15%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 45%, #000 80%, transparent 100%), linear-gradient(to bottom, transparent, #000 15%, #000 80%, transparent);
  mask-composite: intersect;
  animation: hm-desliza 60s linear infinite alternate;
}
.hm-mosaico img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hm-mosaico img:nth-child(3n + 2) { transform: translateY(40px); }
@keyframes hm-desliza { from { transform: rotate(-8deg) translateY(0); } to { transform: rotate(-8deg) translateY(-6%); } }

.hm-hero-inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center;
}
.hm-hero-texto { max-width: 640px; }

.hm-avatar {
  width: clamp(120px, 16vw, 200px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 6px solid var(--surface); box-shadow: var(--shadow-lg);
  background: var(--surface);
  align-self: start;
}
.hm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hm-avatar-inicial {
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--text)));
  color: var(--accent-text);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 8vw, 6rem); line-height: 1;
}

.hm-hero h1 { margin-bottom: .3em; font-size: clamp(2.4rem, 6.5vw, 4.4rem); line-height: 1.02; }
.hm-ola {
  display: block; font-family: var(--font-body); font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: .35em;
}
.hm-aceno { display: inline-block; transform-origin: 70% 70%; animation: hm-acena 2.6s ease-in-out 1s 2; }
@keyframes hm-acena {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
}
.hm-nome {
  display: block;
  background: linear-gradient(100deg, var(--text) 30%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hm-titulo { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--accent); margin-bottom: .8em; }
.hm-bio { font-size: 1.08rem; color: var(--text); }
.hm-bio p:last-child { margin-bottom: 0; }
.hm-cidade { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .95rem; margin: 1em 0 0; }
.hm-cidade svg { color: var(--accent); flex: none; }
.hm-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; }
.hm-rede { padding: 8px 14px; font-size: .9rem; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(6px); }

/* ---------- Blocos ---------- */
.hm-bloco { padding-top: clamp(48px, 7vw, 88px); }
.hm-cab { margin-bottom: clamp(20px, 3vw, 32px); }
.hm-cab h2 { margin: 0; }

/* ---------- Bento das seções ---------- */
.hm-bento {
  display: grid; gap: clamp(12px, 1.6vw, 18px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(180px, auto);
}
.hm-porta {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  padding: clamp(18px, 2vw, 24px);
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px);
  color: var(--text); text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hm-porta:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.hm-porta:hover .hm-porta-seta { transform: translateX(4px); color: var(--accent); }

.hm-porta-icone {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.5rem; background: var(--accent-soft); flex: none;
}
.hm-porta-corpo { display: flex; flex-direction: column; gap: 4px; }
.hm-porta-titulo { font-family: var(--font-display); font-size: 1.45rem; font-weight: 650; line-height: 1.1; }
.hm-porta-texto { color: var(--muted); font-size: .93rem; line-height: 1.45; }
.hm-porta-numero { margin-top: 6px; font-weight: 600; font-size: .88rem; color: var(--link); }
.hm-porta-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hm-porta-seta { position: absolute; top: clamp(18px, 2vw, 24px); right: clamp(18px, 2vw, 24px); font-size: 1.2rem; color: var(--muted); transition: transform .2s, color .2s; }

.hm-p-viagens { grid-column: span 2; grid-row: span 2; }
.hm-p-academico { grid-column: span 2; }
.hm-p-larga { grid-column: span 2; }
.hm-p-inteira { grid-column: 1 / -1; }

/* Card com foto de fundo (viagem mais recente) */
.hm-porta-foto { color: #fff; border-color: transparent; justify-content: flex-end; min-height: 380px; }
.hm-porta-foto:hover { color: #fff; }
.hm-porta-fundo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .6s ease;
}
.hm-porta-foto::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(12, 10, 8, .85) 0%, rgba(12, 10, 8, .35) 45%, rgba(12, 10, 8, .05) 75%);
}
.hm-porta-foto:hover .hm-porta-fundo { transform: scale(1.04); }
.hm-porta-foto .hm-porta-icone { position: absolute; top: clamp(18px, 2vw, 24px); left: clamp(18px, 2vw, 24px); background: rgba(255, 255, 255, .9); }
.hm-porta-foto .hm-porta-titulo { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.hm-porta-foto .hm-porta-texto { color: rgba(255, 255, 255, .85); font-size: 1rem; }
.hm-porta-foto .hm-porta-numero { color: #fff; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); padding: 4px 12px; border-radius: 999px; align-self: flex-start; }
.hm-porta-foto .hm-porta-seta { color: #fff; }
/* Sem foto: viagens ganha um gradiente com a cor de destaque */
.hm-p-viagens:not(.hm-porta-foto) {
  background: linear-gradient(150deg, var(--accent-soft), var(--surface) 70%);
  justify-content: flex-end;
}

.hm-p-academico { background: linear-gradient(120deg, var(--surface) 50%, var(--bg-alt)); }

/* Fotos: miniaturas empilhadas */
.hm-porta-minis { position: absolute; right: 18px; bottom: 18px; display: flex; }
.hm-porta-minis img {
  width: 54px; height: 54px; object-fit: cover; border-radius: 12px; border: 3px solid var(--surface);
  margin-left: -18px; box-shadow: var(--shadow);
}
.hm-porta-minis img:nth-child(1) { transform: rotate(-8deg); }
.hm-porta-minis img:nth-child(3) { transform: rotate(7deg); }
.hm-p-fotos .hm-porta-corpo { padding-right: 90px; }

/* Músicas: equalizador animado */
.hm-eq { position: absolute; right: 22px; bottom: 22px; display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.hm-eq i { width: 5px; border-radius: 3px; background: var(--accent); opacity: .75; animation: hm-eq 1.2s ease-in-out infinite; height: 40%; }
.hm-eq i:nth-child(2) { animation-delay: -.4s; }
.hm-eq i:nth-child(3) { animation-delay: -.8s; }
.hm-eq i:nth-child(4) { animation-delay: -.2s; }
@keyframes hm-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.hm-p-musicas .hm-porta-corpo { padding-right: 40px; }

/* ---------- Novidades ---------- */
.hm-linha {
  display: grid; gap: clamp(14px, 2vw, 22px);
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  margin-bottom: clamp(14px, 2vw, 22px);
}
.hm-linha > :only-child { grid-column: 1 / -1; }

.hm-selo {
  display: inline-block; align-self: flex-start;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-text);
}
.hm-selo-suave { background: var(--accent-soft); color: var(--link); }

.hm-mini-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.hm-mini-cab h3 { margin: 0; }
.hm-mini-cab a { font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Última viagem */
.hm-viagem { position: relative; min-height: 360px; border: 0; }
.hm-viagem-link { position: absolute; inset: 0; display: flex; color: #fff; text-decoration: none; isolation: isolate; }
.hm-viagem-link:hover { color: #fff; }
.hm-viagem-link > img, .hm-viagem-sem { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.hm-viagem-sem { display: grid; place-items: center; font-size: 4rem; }
.hm-viagem-link:hover > img { transform: scale(1.03); }
.hm-viagem-link::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(12, 10, 8, .88), rgba(12, 10, 8, .25) 55%, transparent 80%);
}
.hm-viagem-info { align-self: flex-end; display: flex; flex-direction: column; gap: 8px; padding: clamp(20px, 3vw, 32px); }
.hm-viagem-titulo { font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 650; line-height: 1.08; }
.hm-viagem-meta { font-size: .95rem; opacity: .9; }
.hm-viagem-resumo { max-width: 520px; opacity: .85; font-size: .97rem; line-height: 1.5; }
.hm-viagem-cta { font-weight: 600; margin-top: 4px; }

/* Fotos recentes */
.hm-fotos { display: flex; flex-direction: column; }
.hm-fotos-grade {
  list-style: none; margin: 0; padding: 0 20px 20px; flex: 1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.hm-fotos-grade a { display: block; height: 100%; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt); }
.hm-fotos-grade img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .35s ease, opacity .2s; }
.hm-fotos-grade a:hover img { transform: scale(1.06); }

/* Projetos em destaque */
.hm-projetos-lista { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 4px; }
.hm-projetos-lista a {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 8px; border-radius: var(--radius); color: var(--text); text-decoration: none;
  transition: background .15s;
}
.hm-projetos-lista a:hover { background: var(--bg-alt); color: var(--text); }
.hm-projetos-lista img, .hm-proj-sem { width: 120px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-sm); }
.hm-proj-sem { display: grid; place-items: center; font-size: 1.8rem; }
.hm-proj-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-proj-meta { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.hm-proj-titulo { font-family: var(--font-display); font-weight: 650; font-size: 1.12rem; line-height: 1.2; }
.hm-proj-resumo { color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* Filme e música */
.hm-coluna { display: grid; gap: clamp(14px, 2vw, 22px); align-content: start; }
.hm-filme a, .hm-musica a {
  display: flex; gap: 18px; align-items: center; padding: 16px; color: var(--text); text-decoration: none;
}
.hm-filme a:hover, .hm-musica a:hover { color: var(--text); background: var(--bg-alt); }
.hm-filme img, .hm-filme-sem { width: 86px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow); flex: none; }
.hm-filme-sem { display: grid; place-items: center; font-size: 2rem; }
.hm-filme-texto, .hm-musica-texto { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hm-filme-titulo, .hm-musica-titulo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; line-height: 1.15; }
.hm-filme-meta { color: var(--muted); font-size: .9rem; display: flex; gap: 10px; align-items: center; }
.hm-nota { color: var(--accent); font-weight: 700; }

.hm-disco {
  position: relative; width: 96px; height: 96px; flex: none; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 2rem; box-shadow: var(--shadow);
  animation: hm-gira 14s linear infinite; animation-play-state: paused;
}
.hm-disco img { width: 100%; height: 100%; object-fit: cover; }
.hm-disco::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--border); left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.hm-musica a:hover .hm-disco { animation-play-state: running; }
@keyframes hm-gira { to { transform: rotate(360deg); } }
.hm-musica-artista { color: var(--muted); }
.hm-musica-coment { font-family: var(--font-display); font-style: italic; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.hm-musica-cta { color: var(--link); font-weight: 600; font-size: .9rem; margin-top: 4px; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .hm-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-p-viagens { grid-row: span 1; }
  .hm-porta-foto { min-height: 320px; }
  .hm-linha { grid-template-columns: minmax(0, 1fr); }
  .hm-mosaico { width: 75vw; opacity: .35; }
}

@media (max-width: 640px) {
  .hm-hero-inner { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .hm-avatar { width: 112px; border-width: 4px; }
  .hm-mosaico { width: 110vw; right: -40vw; opacity: .22; }
  .hm-bento { grid-auto-rows: minmax(150px, auto); }
  .hm-porta { gap: 12px; }
  .hm-porta-titulo { font-size: 1.2rem; }
  .hm-porta-texto { font-size: .85rem; }
  .hm-porta-icone { width: 40px; height: 40px; font-size: 1.25rem; border-radius: 12px; }
  .hm-porta-seta { display: none; }
  .hm-porta-minis, .hm-eq { display: none; }
  .hm-p-fotos .hm-porta-corpo, .hm-p-musicas .hm-porta-corpo { padding-right: 0; }
  .hm-porta-foto .hm-porta-seta { display: block; }
  .hm-viagem { min-height: 320px; }
  .hm-projetos-lista a { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .hm-projetos-lista img, .hm-proj-sem { width: 84px; }
  .hm-proj-resumo { display: none; }
  .hm-disco { width: 76px; height: 76px; }
}

@media (max-width: 380px) {
  .hm-bento { grid-template-columns: minmax(0, 1fr); }
  .hm-p-viagens, .hm-p-academico, .hm-p-larga { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-forma, .hm-mosaico, .hm-aceno, .hm-eq i, .hm-disco { animation: none; }
}
