/* ==========================================================================
   HOME VF — hero, projetos e sobre (Figma › 05 Desktop "Home VF" e 06 Mobile "MOBILE VF")
   A moldura (cabeçalho, quadrados, cápsulas e footer) fica em vf.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero: grid de quadrados no fundo (canvas), nome com a bolinha e duas etiquetas.
   A altura é sempre um múltiplo do quadrado (o js/hero.js calcula),
   para o grid continuar certinho no separador logo abaixo.
   -------------------------------------------------------------------------- */
.hx {
  position: relative;
  isolation: isolate;
  min-height: var(--hx-h, calc(100svh - var(--hdr)));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(56px, 12.5svh, 128px);
  padding: 40px var(--page-margin);
  background: var(--color-white);
}
.hx canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }

.hx__stage { position: relative; font-size: min(15.28vw, 21.5svh, 220px); width: 4.626em; left: -0.018em; }
.hx__selo { display: none; }
.hx__n {
  position: relative;
  display: grid;
  gap: 0.036em;
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 700;
  line-height: 0.859;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--color-ink);
  -webkit-text-stroke: 6px var(--color-ink);
  paint-order: stroke fill;
}
.hx__n span { position: relative; width: max-content; }
.hx__n span + span { margin-left: 1.218em; }
.hx__bola {
  position: absolute;
  left: 3.1905em;
  top: 0.5595em;
  width: 0.2173em;
  height: 0.2173em;
  border-radius: 50%;
  background: var(--color-lime-200);
  border: 3px solid var(--color-lime-500);
}

/* Etiquetas com setinha (as mesmas do cursor dos cards) */
.etq { position: absolute; height: 84px; font-family: var(--font-sans); }
.etq span {
  position: absolute;
  top: 28px;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-radius: var(--radius-full);
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  white-space: nowrap;
}
.etq svg { position: absolute; top: 0; width: 32px; height: 32px; max-width: none; overflow: visible; }
.etq--lima { width: 302px; left: 2.641em; top: min(0.395em, calc(0.93em - 94px)); transform-origin: 4px 4px; }
.etq--lima span { left: 24px; background: var(--color-lime-200); border: 2.5px solid var(--color-lime-500); color: var(--color-lime-800); }
.etq--lima svg { left: 0; fill: var(--color-lime-200); stroke: var(--color-lime-500); stroke-width: 2.5; }
.etq--azul { width: 250px; right: calc(100% - 1.218em + 0.047em); top: 0.8955em; transform-origin: calc(100% - 4px) 4px; }
.etq--azul span { right: 22px; background: var(--color-blue-200); border: 3px solid var(--color-blue-500); color: var(--color-blue-800); }
.etq--azul svg { right: 0; transform: scaleX(-1); fill: var(--color-blue-200); stroke: var(--color-blue-500); stroke-width: 3; }
.hx__bola, .etq { will-change: translate; }

/* Abaixo de 1024: hero do celular (selo em cima, nome em bloco, botão no centro) */
@media (max-width: 1023.98px) {
  .hx { justify-content: flex-start; gap: var(--space-64); padding: 48px var(--page-margin) 12px; }
  .hx__stage { font-size: min((100vw - 2 * var(--page-margin)) / 3.5625, 160px); width: 3.5625em; left: 0; display: grid; justify-items: start; gap: 16px; }
  .hx__selo { display: inline-flex; height: 32px; padding: 0 12px; background: var(--color-blue-100); color: var(--color-blue-800); font-size: 14px; font-weight: 700; line-height: 20px; }
  .hx__n { gap: 0.031em; line-height: 0.865; -webkit-text-stroke-width: 3px; }
  .hx__n span + span { margin-left: 0.1458em; }
  .hx__bola { border-width: 2.5px; }
  .etq { display: none; }
  .hx .btn { --btn-h: var(--control-48); --btn-pad: var(--space-24); --btn-dot: 40px; --btn-font: 16px; }
}

/* --------------------------------------------------------------------------
   Projetos: dois cards lado a lado; no celular, um baralho
   -------------------------------------------------------------------------- */
.cs__l { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-24); }
.cc { display: grid; }
.cc__a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  padding: 8px 8px 32px;
  border-radius: var(--radius-24);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  color: var(--color-ink);
  transition: transform 400ms var(--ease-out);
}
.cc__a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2.5px solid var(--color-lime-500);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms;
}
.cc--azul .cc__a::after { border-color: var(--color-blue-500); }
a.cc__a:focus-visible { outline: 3px solid var(--color-ink); outline-offset: 4px; }
a.cc__a:focus-visible::after { opacity: 1; }
.cc__capa {
  position: relative;
  display: block;
  aspect-ratio: 548 / 356;
  overflow: hidden;
  border-radius: var(--radius-16);
  background: var(--color-blue-100);
  transition: background-color 400ms;
}
.cc__capa img {
  position: absolute;
  inset: 0;
  margin: auto;
  filter: drop-shadow(0 14px 16px rgb(32 33 31 / 0.18));
  transition: transform 500ms var(--ease-out);
}
.cc--lima img { width: 90.3%; height: auto; }
.cc--azul img { height: 90.8%; width: auto; }
.cc__txt { display: grid; padding: 0 24px; }
.cc__l { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.cc__sl {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  height: 32px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  background: var(--color-blue-100);
  color: var(--color-muted);
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
}
.cc__sl .radar { margin-inline: 3px; }
.cc__eye { margin-top: 24px; font-size: 16px; font-weight: 700; line-height: 24px; text-transform: uppercase; color: var(--color-muted); }
.cc__tit { margin-top: 8px; font-family: var(--font-display); font-size: clamp(24px, 2.22vw, 32px); font-weight: 700; line-height: 1.25; text-wrap: balance; }

@media (hover: hover) and (pointer: fine) {
  .cc:hover .cc__a { transform: translateY(-8px); }
  .cc:hover .cc__a::after { opacity: 1; }
  .cc:hover .cc__capa { background: var(--color-blue-300); }
  .cc:hover .cc__capa img { transform: scale(1.06); }
  .cz-on .cc, .cz-on .cc * { cursor: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cc__a, .cc__capa img { transition: none; }
  .cc:hover .cc__a, .cc:hover .cc__capa img { transform: none !important; }
}
@media (max-width: 1099.98px) { .cs__l { gap: var(--space-16); } }

/* Navegação do baralho (só no celular) */
.pj { display: grid; gap: var(--space-40); min-width: 0; }

@media (max-width: 767.98px) {
  .cs__l { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; touch-action: pan-y; }
  .cs__l * { touch-action: pan-y; }
  .cc { grid-area: 1 / 1; z-index: 1; transform-origin: 50% 0; transition: transform 460ms var(--ease-out), filter 460ms; }
  .cc[data-pos="1"] { z-index: 0; transform: translateY(-28px) scale(0.92); filter: brightness(0.97); }
  .cc[data-pos="1"] .cc__a { box-shadow: 0 1px 2px rgb(32 33 31 / 0.06); }
  .cc.arr { transition: none; }
  .cc.sai { z-index: 2; transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1); }
  .cc__a { height: 100%; gap: 20px; padding: 8px 8px 24px; -webkit-user-drag: none; user-select: none; }
  .cc__txt { padding: 0 8px; }
  .cc__sl { font-size: 14px; padding: 0 12px; }
  .cc__eye { margin-top: 16px; }
  .cc__tit { font-size: 20px; line-height: 28px; }

}
@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .cc, .cc.sai { transition-duration: 0s !important; }
}

/* --------------------------------------------------------------------------
   Sobre mim: foto com três quadrados no canto + texto
   -------------------------------------------------------------------------- */
.so__g { display: grid; grid-template-columns: minmax(0, 456fr) minmax(0, 632fr); align-items: center; gap: var(--space-64); }
.so__foto { position: relative; }
.so__c { display: block; overflow: hidden; aspect-ratio: 456 / 570; border-radius: var(--radius-16); }
.so__c img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 600ms var(--ease-out); }
.so__q { position: absolute; right: -20px; bottom: -20px; width: 160px; height: 160px; pointer-events: none; }
.so__q i { position: absolute; width: 40px; height: 40px; }
.so__q i:nth-child(1) { right: 0; bottom: 0; background: var(--color-lime-500); }
.so__q i:nth-child(2) { right: 40px; bottom: 0; background: var(--color-lime-200); }
.so__q i:nth-child(3) { right: 0; bottom: 40px; background: var(--color-blue-200); }
/* escadinha que aparece no hover */
.so__q i.x { transform: scale(0); transition: transform 320ms var(--ease-out); }
.so__q i.x:nth-child(4) { right: 40px; bottom: 40px; background: var(--color-lime-500); }
.so__q i.x:nth-child(5) { right: 0; bottom: 80px; background: var(--color-blue-500); }
.so__q i.x:nth-child(6) { right: 80px; bottom: 0; background: var(--color-blue-500); }
.so__q i.x:nth-child(7) { right: 120px; bottom: 0; background: var(--color-lime-200); }
.so__q i.x:nth-child(8) { right: 0; bottom: 120px; background: var(--color-blue-200); }
@media (hover: hover) and (pointer: fine) {
  .so__foto:hover img { transform: scale(1.05); }
  .so__foto:hover .so__q i.x { transform: none; }
  .so__foto:hover .so__q i.x:nth-child(5) { transition-delay: 50ms; }
  .so__foto:hover .so__q i.x:nth-child(6) { transition-delay: 100ms; }
  .so__foto:hover .so__q i.x:nth-child(7) { transition-delay: 150ms; }
  .so__foto:hover .so__q i.x:nth-child(8) { transition-delay: 200ms; }
}
/* Telas de toque (sem hover): a escadinha sobe sozinha quando a foto aparece (js/sobre.js) */
.so__foto.on .so__q i.x { transform: none; }
.so__foto.on .so__q i.x:nth-child(5) { transition-delay: 80ms; }
.so__foto.on .so__q i.x:nth-child(6) { transition-delay: 160ms; }
.so__foto.on .so__q i.x:nth-child(7) { transition-delay: 240ms; }
.so__foto.on .so__q i.x:nth-child(8) { transition-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  .so__c img, .so__q i.x { transition: none; }
  .so__foto:hover img { transform: none; }
}

.so__txt { display: grid; justify-items: start; gap: var(--space-32); }
.so__frase { font-family: var(--font-display); font-size: clamp(24px, 2.22vw, 32px); font-weight: 700; line-height: 1.25; text-wrap: balance; }
.so__ps { display: grid; gap: var(--space-16); margin-top: calc(var(--space-24) - var(--space-32)); }
.so__ps p { font-size: 18px; line-height: 28px; color: var(--color-muted); text-wrap: pretty; }
.so__ps strong { color: var(--color-ink); }
.so .grifo { background-size: var(--grifo-size, 100%) 0.444em; background-position: 0 92%; }
.js .so .grifo.is-visible { background-size: 100% 0.444em; }
.so__mais { display: none; }

@media (max-width: 1023.98px) { .so__g { gap: var(--space-40); align-items: start; } }

/* Celular: foto em cima, texto recolhido com "Ler mais" */
@media (max-width: 767.98px) {
  .so__g { grid-template-columns: minmax(0, 1fr); gap: var(--space-32); }
  .so__foto { width: min(290px, 100% - 20px); justify-self: center; }
  .so__c { box-shadow: var(--shadow-card); }
  .so__txt { gap: var(--space-32); }
  .so__frase { font-size: 24px; line-height: 32px; }
  .so__ps { margin-top: -16px; }
  .so__ps p { font-size: 16px; line-height: 24px; }
  .js .so__ler:not(.is-expanded) .so__ps { position: relative; max-height: 120px; overflow: hidden; }
  .js .so__ler:not(.is-expanded) .so__ps::after { content: ""; position: absolute; inset: auto 0 0; height: 72px; background: linear-gradient(rgb(255 255 255 / 0), var(--color-white)); }
  .js .so__mais { display: inline-flex; --btn-h: var(--control-48); --btn-dot: 32px; --btn-font: 16px; margin-top: -16px; }
  .so__mais .btn__dot .icon { width: 16px; height: 16px; transition: transform 260ms var(--ease-out); }
  .so__ler.is-expanded .so__mais .icon { transform: rotate(180deg); }
  .so__ler .so__mais [data-mais-menos] { display: none; }
  .so__ler.is-expanded .so__mais [data-mais-menos] { display: inline; }
  .so__ler.is-expanded .so__mais [data-mais-mais] { display: none; }
}
