/* araresa.com/mano: a mão que mostra o que tem por baixo da pele.
   Duas fotos alinhadas (a mão e a mesma mão com artérias, veias e nervos) e
   um holofote que segue o cursor revelando a segunda. O holofote é uma
   mask-image com gradiente radial; o JS só move --x e --y. */

:root {
  --noite: #0a1e2e;
  --ouro: #c69c5e;
  --ouro-hover: #e3c792;
  --texto: #eef2f5;
  --texto-2: rgba(238, 242, 245, 0.8);
  --serifa: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --raio: 260px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--noite);
  color: var(--texto);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a:focus-visible {
  outline: 2px solid var(--ouro);
  outline-offset: 3px;
}

/* ---------- navegação ---------- */

.m-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

@media (min-width: 640px) {
  .m-nav {
    padding: 20px 24px;
  }
}

.m-logo img {
  display: block;
  height: 26px;
  width: auto;
}

.m-pilula {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.m-pilula a {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--texto-2);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.m-pilula a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.m-nav-cta {
  display: none;
  background: var(--texto);
  color: var(--noite);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.m-nav-cta:hover {
  background: #fff;
}

@media (min-width: 900px) {
  .m-pilula {
    display: flex;
  }
  .m-nav-cta {
    display: block;
  }
  .m-logo img {
    height: 30px;
  }
}

/* ---------- hero ---------- */

.m-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: var(--noite);
}

.m-camadas {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.m-base,
.m-revela {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  /* a palma fica um pouco à esquerda do centro da foto */
  background-position: 46% 62%;
}

.m-base {
  background-image: url("img/mao-base-1280.webp");
}

.m-revela {
  background-image: url("img/mao-reveal-1280.webp");
  pointer-events: none;
  --x: -999px;
  --y: -999px;
  -webkit-mask-image: radial-gradient(
    circle var(--raio) at var(--x) var(--y),
    #000 0,
    #000 40%,
    rgba(0, 0, 0, 0.75) 60%,
    rgba(0, 0, 0, 0.4) 75%,
    rgba(0, 0, 0, 0.12) 88%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle var(--raio) at var(--x) var(--y),
    #000 0,
    #000 40%,
    rgba(0, 0, 0, 0.75) 60%,
    rgba(0, 0, 0, 0.4) 75%,
    rgba(0, 0, 0, 0.12) 88%,
    transparent 100%
  );
}

@media (min-width: 1000px) {
  .m-base {
    background-image: url("img/mao-base-1920.webp");
  }
  .m-revela {
    background-image: url("img/mao-reveal-1920.webp");
  }
}

@media (max-width: 639px) {
  :root {
    --raio: 170px;
  }
  /* em pé a foto vira uma faixa estreita: 30% enquadra a mão inteira,
     da ponta dos dedos ao punho */
  .m-base,
  .m-revela {
    background-position: 30% 60%;
  }
}

/* o texto escurece o topo e o rodapé o bastante para ler sobre a foto */
.m-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10, 30, 46, 0.55), transparent 32%),
    linear-gradient(to top, rgba(10, 30, 46, 0.8), transparent 34%),
    /* o antebraço entra pela direita, atrás do texto da direita */
    radial-gradient(42% 46% at 92% 82%, rgba(10, 30, 46, 0.72), transparent 70%);
}

.m-esquerda p,
.m-direita p {
  text-shadow: 0 1px 14px rgba(10, 30, 46, 0.9);
}

.m-titulo {
  position: absolute;
  z-index: 50;
  top: 14%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 20px;
  text-align: center;
  color: #fff;
  line-height: 0.95;
  font-weight: 400;
  pointer-events: none;
}

.m-titulo span {
  display: block;
  font-family: var(--serifa);
  font-size: clamp(1.95rem, 7vw, 6rem);
  white-space: nowrap;
}

@media (max-width: 639px) {
  .m-titulo {
    top: 15%;
  }
  .m-titulo span {
    font-size: 9vw;
  }
}

.m-linha-1 {
  font-style: italic;
  letter-spacing: -0.04em;
  font-weight: 400;
}

.m-linha-2 {
  margin-top: 0.06em;
  letter-spacing: -0.045em;
  font-weight: 300;
}

.m-esquerda {
  display: none;
  position: absolute;
  z-index: 50;
  bottom: 56px;
  left: 40px;
  max-width: 270px;
}

.m-esquerda p,
.m-direita p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--texto-2);
}

.m-direita {
  position: absolute;
  z-index: 50;
  bottom: 40px;
  left: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.m-direita p {
  font-size: 0.8125rem;
}

/* o mesmo botão de ouro do resto da página */
.m-cta {
  display: inline-block;
  padding: 13px 32px;
  border-radius: 999px;
  background: linear-gradient(123deg, #7a5a2e 7%, #b88c50 37%, #dcbd85 72%, #9c7440 100%);
  box-shadow:
    0 4px 4px rgba(198, 156, 94, 0.25),
    inset 4px 4px 12px rgba(242, 222, 180, 0.55);
  outline: 2px solid rgba(242, 245, 247, 0.85);
  outline-offset: -3px;
  color: var(--noite);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    filter 0.2s;
}

.m-cta:hover {
  filter: brightness(1.06);
  transform: scale(1.03);
  box-shadow:
    0 10px 28px -8px rgba(198, 156, 94, 0.5),
    inset 4px 4px 12px rgba(242, 222, 180, 0.55);
}

.m-cta:focus-visible {
  outline-color: #fff;
  outline-offset: 2px;
}

.m-cta:active {
  transform: scale(0.96);
}

@media (min-width: 640px) {
  .m-esquerda {
    display: block;
  }
  .m-direita {
    left: auto;
    right: 40px;
    bottom: 96px;
    max-width: 270px;
    gap: 20px;
  }
  .m-direita p {
    font-size: 0.875rem;
  }
}

@media (min-width: 900px) {
  .m-esquerda {
    left: 56px;
  }
  .m-direita {
    right: 56px;
  }
}

/* dica de interação: some na primeira vez que a pessoa mexe */
.m-dica {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.8rem;
  color: rgba(238, 242, 245, 0.6);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.6s;
}

.m-dica-toque {
  display: none;
}

@media (hover: none) {
  .m-dica-mouse {
    display: none;
  }
  .m-dica-toque {
    display: inline;
  }
}

/* no celular a dica vira uma pílula logo abaixo do título, fora da mão */
@media (max-width: 639px) {
  .m-dica {
    top: calc(15% + 23vw);
    bottom: auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(10, 30, 46, 0.55);
    box-shadow: 0 0 0 1px rgba(223, 231, 238, 0.16) inset;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: rgba(238, 242, 245, 0.78);
  }
  /* texto e botão centrados, como o título */
  .m-direita {
    align-items: center;
    text-align: center;
    bottom: 36px;
    left: 28px;
    right: 28px;
  }
}

.m-dica.m-usada {
  opacity: 0 !important;
}

/* ---------- abertura ---------- */

@keyframes m-sobe {
  0% {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes m-aparece {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes m-zoom {
  0% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.m-anim {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.m-sobe {
  animation-name: m-sobe;
  animation-duration: 1.1s;
}

.m-aparece {
  animation-name: m-aparece;
  animation-duration: 1s;
}

.m-zoom {
  animation: m-zoom 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* .m-dica tem translateX próprio: a animação dela mexe só na opacidade */
.m-dica.m-aparece {
  animation-name: m-dica;
}

@keyframes m-dica {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-anim,
  .m-zoom {
    animation: none;
    opacity: 1;
  }
}

/* ---------- luz do fundo do hero ----------
   Camadas em mix-blend-mode: screen por cima das duas fotos. Screen só clareia:
   no azul-noite do fundo a luz aparece; na pele, que já é clara, quase não
   muda. Fica acima da revelação para o círculo do holofote receber a mesma
   luz que o resto (sem disco de fundo liso dentro dele). */

.m-luz {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}

.m-luz > span {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}

/* halo frio atrás da palma, respirando devagar */
.m-luz-palma {
  background:
    radial-gradient(34% 40% at 44% 60%, rgba(46, 104, 156, 0.34), transparent 72%),
    radial-gradient(18% 22% at 60% 60%, rgba(198, 156, 94, 0.14), transparent 70%);
  animation: m-respira 9s ease-in-out infinite;
}

/* aurora: um cone de luz que gira muito devagar, borrado */
.m-luz-aurora {
  inset: -30% !important;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    rgba(70, 120, 170, 0.16) 40deg,
    transparent 95deg,
    transparent 190deg,
    rgba(198, 156, 94, 0.09) 230deg,
    transparent 290deg
  );
  filter: blur(60px);
  animation: m-gira 48s linear infinite;
}

/* luz de cima, por trás do título, como a régua dourada dos documentos */
.m-luz-topo {
  background:
    radial-gradient(50% 30% at 50% -6%, rgba(198, 156, 94, 0.2), transparent 70%),
    radial-gradient(70% 60% at 50% 120%, rgba(30, 70, 110, 0.35), transparent 70%);
}

/* grão fino: tira o degrau do gradiente e dá textura de papel fotográfico */
.m-grao {
  mix-blend-mode: overlay !important;
  opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}

@keyframes m-respira {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes m-gira {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-luz-palma,
  .m-luz-aurora {
    animation: none;
  }
}

/* a página agora continua abaixo do hero */
.m-nav {
  transition: background-color 0.3s, backdrop-filter 0.3s;
}

.m-nav.m-rolou {
  background: rgba(10, 30, 46, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
