/* ==========================================================================
   Hero cinematográfica do MayFlow (página comercial)
   Camadas, de trás para a frente:
   fluidos de fundo → contraluz → anéis + M oficial → notebook → fluidos da frente.
   A luz vem de trás do M (alto, à direita) e desce para o piso.
   ========================================================================== */

.hc {
  --hc-verde: #2fd28a;
  --hc-turq: #19c7c1;
  --hc-ciano: #5ce1e6;
  --hc-azul: #2a7de1;
  --hc-suave: cubic-bezier(0.22, 0.8, 0.24, 1);
  /* cores usadas pelos botões compartilhados (mfu-btn) */
  --mfu-verde: #2fd28a; --mfu-turquesa: #19c7c1; --mfu-ciano: #5ce1e6; --mfu-azul: #2a7de1;
  --mfu-texto: #eaf4ff; --mfu-texto-2: #a9bdd4; --mfu-suave: cubic-bezier(0.22, 0.8, 0.24, 1);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(40px, 5vw, 72px) 0 clamp(80px, 9vw, 140px);
  color: #eaf4ff;
  background:
    radial-gradient(55% 60% at 74% 38%, rgba(16, 60, 110, 0.55), transparent 70%),
    linear-gradient(180deg, #02060e 0%, #030a16 55%, #02070f 100%);
}

/* piso: reflexo da luz da cena */
.hc::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: 34%;
  background:
    radial-gradient(45% 70% at 70% 0%, rgba(25, 199, 193, 0.18), transparent 70%),
    linear-gradient(180deg, transparent, rgba(2, 6, 14, 0.9));
}

.hc__fluidos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hc__fluidos--tras { z-index: -2; }
.hc__fluidos--frente { z-index: 3; }

/* contraluz grande atrás do M */
.hc__luz {
  position: absolute;
  z-index: -1;
  top: -10%;
  right: -6%;
  width: 70%;
  height: 100%;
  background: radial-gradient(closest-side at 55% 42%, rgba(25, 199, 193, 0.22), rgba(42, 125, 225, 0.1) 55%, transparent);
  pointer-events: none;
}

.hc__grade {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
}

/* ---------- texto ---------- */
.hc__texto {
  position: relative;
  z-index: 4;
  min-width: 0;
}

.hc__etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b8cbe0;
}

.hc__etiqueta::before {
  content: "";
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--hc-verde), var(--hc-turq));
}

.hc__titulo {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}

.hc__titulo span { display: block; }

.hc__grad {
  padding-bottom: 0.06em;
  background: linear-gradient(90deg, var(--hc-turq) 0%, var(--hc-verde) 38%, #b9e07a 62%, #e8c46a 82%, #f0cf7c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.hc__lead {
  max-width: 500px;
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  line-height: 1.6;
  color: #b8cbe0;
}

.hc__acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.hc .mfu-btn { font-family: var(--body); }

/* ---------- palco ---------- */
.hc__palco {
  position: relative;
  min-width: 0;
  aspect-ratio: 1 / 0.86;
  max-width: 100%;
  perspective: 1800px;
}

/* núcleo: M oficial grande + anéis concêntricos */
.hc__nucleo {
  position: absolute;
  z-index: 0;
  top: -4%;
  left: 50%;
  width: 82%;
  aspect-ratio: 1;
  translate: -50% 0;
  transform: translate3d(calc(var(--hx, 0px) * 0.35), calc(var(--hy, 0px) * 0.35), 0);
  transition: transform 1s var(--hc-suave);
}

.hc__contraluz {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(92, 225, 230, 0.55), rgba(25, 199, 193, 0.25) 45%, rgba(42, 125, 225, 0.08) 70%, transparent);
  filter: blur(26px);
}

.hc__aneis {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 8px rgba(92, 225, 230, 0.6));
}

.hc__anel {
  transform-origin: 200px 200px;
  transform-box: view-box;
}

.hc__m {
  position: absolute;
  inset: 21%;
  width: 58%;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(25, 199, 193, 0.7)) drop-shadow(0 0 70px rgba(42, 125, 225, 0.35));
}

/* notebook: objeto físico, escuro, inclinado */
.hc__notebook {
  position: absolute;
  z-index: 2;
  left: 9%;
  bottom: 2%;
  width: 72%;
  margin: 0;
  transform-style: preserve-3d;
  transform: translate3d(var(--hx, 0px), var(--hy, 0px), 0) rotateX(9deg) rotateY(-20deg) rotateZ(1.5deg);
  transition: transform 1s var(--hc-suave);
}

.hc__tampa {
  position: relative;
  padding: 1.8% 1.8% 2.2%;
  border-radius: 14px 14px 5px 5px;
  background: linear-gradient(160deg, #1d2836 0%, #0a0f17 45%, #05080d 100%);
  box-shadow:
    inset 0 0 0 1px rgba(170, 246, 255, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 50px -10px rgba(25, 199, 193, 0.55),
    0 60px 80px -40px rgba(0, 0, 0, 0.95);
}

/* luz neon que percorre a moldura */
.hc__tampa::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 2;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--hc-ang, 0deg), transparent 0 72%, rgba(47, 210, 138, 0.9) 80%, rgba(170, 246, 255, 1) 86%, rgba(42, 125, 225, 0.8) 92%, transparent 98%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hc__tela {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 880 / 550;
  background: #0b1320;
}

.hc__tela img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* tela de um monitor num ambiente escuro: brilho levemente reduzido, sem alterar a interface */
  filter: brightness(0.8) contrast(1.05);
}

/* reflexos de luz no vidro: brilho turquesa vindo do M e uma faixa que passa */
.hc__tela::before,
.hc__tela::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hc__tela::before {
  background:
    linear-gradient(180deg, rgba(25, 199, 193, 0.14), transparent 30%),
    radial-gradient(80% 60% at 100% 0%, rgba(92, 225, 230, 0.18), transparent 60%),
    linear-gradient(0deg, rgba(2, 6, 14, 0.35), transparent 40%);
}

.hc__tela::after {
  background: linear-gradient(112deg, transparent 32%, rgba(255, 255, 255, 0.16) 44%, rgba(160, 255, 245, 0.06) 50%, transparent 58%);
  background-size: 280% 100%;
  background-position: 130% 0;
}

.hc__base {
  position: relative;
  height: clamp(10px, 1.4vw, 18px);
  margin: 0 -8%;
  border-radius: 0 0 22px 22px / 0 0 14px 14px;
  background: linear-gradient(180deg, #4a5a6c 0%, #1a2330 45%, #090d14 100%);
  box-shadow: inset 0 1px 0 rgba(170, 246, 255, 0.4), 0 2px 18px rgba(25, 199, 193, 0.35);
}

/* sombra e reflexo do notebook no piso */
.hc__base::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 100%;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent),
              radial-gradient(closest-side, rgba(25, 199, 193, 0.35), transparent);
  filter: blur(10px);
}

.hc__notebook figcaption {
  position: absolute;
  left: 0;
  top: calc(100% + 42px);
  font-size: 0.72rem;
  color: #8fa6c2;
  white-space: nowrap;
}

/* MAY: único elemento secundário */
.hc__may {
  position: absolute;
  z-index: 3;
  right: -3%;
  bottom: 30%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(92, 225, 230, 0.28);
  border-radius: 999px;
  background: rgba(6, 18, 34, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
  font-size: 0.74rem;
  line-height: 1.2;
  color: #a9bdd4;
}

.hc__may img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(92, 225, 230, 0.5), 0 0 18px rgba(25, 199, 193, 0.6);
}

.hc__may b {
  display: block;
  font-size: 0.86rem;
  color: #fff;
}

/* ---------- movimento ---------- */
@property --hc-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

@keyframes hc-gira { to { transform: rotate(360deg); } }
@keyframes hc-gira-inv { to { transform: rotate(-360deg); } }
@keyframes hc-pulsa { 0%, 100% { opacity: 0.65; scale: 0.96; } 50% { opacity: 1; scale: 1.05; } }
@keyframes hc-boia { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes hc-borda { to { --hc-ang: 360deg; } }
@keyframes hc-vidro { 0%, 68% { background-position: 130% 0; } 100% { background-position: -40% 0; } }
@keyframes hc-sobe { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hc-surge { from { opacity: 0; } to { opacity: 1; } }
@keyframes hc-anel-entra { from { opacity: 0; scale: 0.8; } to { opacity: 1; scale: 1; } }
@keyframes hc-acende { from { opacity: 0; filter: brightness(0.2); } to { opacity: 1; filter: drop-shadow(0 0 30px rgba(25, 199, 193, 0.7)) drop-shadow(0 0 70px rgba(42, 125, 225, 0.35)); } }
@keyframes hc-notebook { from { opacity: 0; transform: translate3d(40px, 90px, 0) rotateX(30deg) rotateY(-32deg) rotateZ(3deg) scale(0.92); } }

@media (prefers-reduced-motion: no-preference) {
  .hc__anel--a { animation: hc-gira 60s linear infinite; }
  .hc__anel--b { animation: hc-gira-inv 34s linear infinite; }
  .hc__anel--c { animation: hc-gira 20s linear infinite; }
  .hc__anel--d { animation: hc-gira-inv 48s linear infinite; }
  .hc__contraluz { animation: hc-pulsa 6s ease-in-out infinite; }
  .hc__tampa::before { animation: hc-borda 8s linear infinite; }
  .hc__tela::after { animation: hc-vidro 9s ease-in-out 4s infinite; }

  /* entrada: fundo → anéis → M → notebook → texto → MAY */
  .hc.hc--js .hc__fluidos,
  .hc.hc--js .hc__luz { animation: hc-surge 1.6s ease both; }
  .hc.hc--js .hc__aneis { animation: hc-anel-entra 1.8s var(--hc-suave) 0.3s both; }
  .hc.hc--js .hc__contraluz { animation: hc-surge 1.4s ease 0.4s both, hc-pulsa 6s ease-in-out 1.8s infinite; }
  .hc.hc--js .hc__m { animation: hc-acende 1.6s ease 0.7s both; }
  .hc.hc--js .hc__notebook { animation: hc-notebook 1.6s var(--hc-suave) 1s both; }
  .hc.hc--js .hc__tampa,
  .hc.hc--js .hc__base { animation: hc-boia 8s ease-in-out 2.6s infinite; }
  .hc.hc--js .hc__texto > * { animation: hc-sobe 1s var(--hc-suave) both; }
  .hc.hc--js .hc__texto > :nth-child(1) { animation-delay: 1.5s; }
  .hc.hc--js .hc__texto > :nth-child(2) { animation-delay: 1.65s; }
  .hc.hc--js .hc__texto > :nth-child(3) { animation-delay: 1.85s; }
  .hc.hc--js .hc__texto > :nth-child(4) { animation-delay: 2.05s; }
  .hc.hc--js .hc__may { animation: hc-sobe 0.9s var(--hc-suave) 2.5s both, hc-boia 7s ease-in-out 3.4s infinite; }
  .hc.hc--js:not(.hc--vivo) * { animation-play-state: paused !important; }
}

/* ---------- responsivo ---------- */
@media (max-width: 940px) {
  .hc { padding-bottom: 72px; }

  .hc__grade { grid-template-columns: minmax(0, 1fr); gap: 8px; }

  .hc__palco { aspect-ratio: 1 / 1.05; margin-top: 8px; }

  .hc__nucleo { width: 74%; top: -4%; }

  .hc__notebook { bottom: 6%; }

  .hc__notebook { left: 6%; width: 80%; transform: rotateX(8deg) rotateY(-14deg) rotateZ(1deg); }

  .hc__may { right: 0; bottom: auto; top: 6%; }

  .hc__notebook figcaption { top: calc(100% + 30px); white-space: normal; }
}

@media (max-width: 560px) {
  .hc__acoes { gap: 10px; }
  .hc__acoes .mfu-btn--primario { width: 100%; }
  .hc__acoes .mfu-btn--video { margin: 0 auto; }
  .hc__may span { display: none; }
  .hc__may { padding: 6px; }
}

/* ==========================================================================
   v9 — composição reconstruída: M dominante acima, notebook 3D real abaixo
   ========================================================================== */
.hc { padding-bottom: clamp(40px, 5vw, 80px); }
.hc__grade { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }
@media (min-width: 941px) { .hc__etiqueta { white-space: nowrap; letter-spacing: 0.18em; } }
.hc__palco { aspect-ratio: 1 / 0.92; perspective: none; margin-top: 8%; }

/* M: grande, atrás e acima */
.hc__nucleo { top: -24%; left: 58%; width: 74%; }
.hc__m { inset: 19%; width: 62%; }
.hc__contraluz { inset: -6%; background: radial-gradient(closest-side, rgba(170, 250, 245, 0.55), rgba(25, 199, 193, 0.35) 35%, rgba(42, 125, 225, 0.16) 62%, transparent); filter: blur(30px); }

/* órbitas inclinadas: dão profundidade real aos anéis */
.hc__orbita {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(170, 246, 255, 0.85);
  border-right-color: rgba(47, 210, 138, 0.55);
  filter: drop-shadow(0 0 8px rgba(92, 225, 230, 0.8));
  transform: rotateX(72deg) rotateZ(var(--o, 0deg));
}
.hc__orbita--2 { inset: 4%; border-top-color: rgba(42, 125, 225, 0.85); border-left-color: rgba(92, 225, 230, 0.5); transform: rotateX(70deg) rotateY(-18deg) rotateZ(var(--o, 0deg)); }
.hc__nucleo { transform-style: preserve-3d; perspective: 900px; }

/* ---------- notebook 3D ---------- */
.lap {
  position: absolute;
  z-index: 2;
  left: 4%;
  bottom: 8%;
  width: 72%;
  margin: 0;
  perspective: 1500px;
  perspective-origin: 70% -40%;
}

.lap__obj {
  position: relative;
  transform-style: preserve-3d;
  transform: translate3d(var(--hx, 0px), var(--hy, 0px), 0) rotateX(14deg) rotateY(-26deg) rotateZ(2deg);
  transition: transform 1s var(--hc-suave);
}

.lap__tampa {
  position: relative;
  transform-origin: 50% 100%;
  transform: rotateX(-8deg);
  transform-style: preserve-3d;
}

.lap__moldura {
  position: relative;
  padding: 2.2% 2.2% 3%;
  border-radius: 18px 18px 4px 4px;
  background: linear-gradient(150deg, #2a3443 0%, #0d121a 30%, #05070b 100%);
  box-shadow:
    inset 0 0 0 1px rgba(170, 246, 255, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    0 0 60px -10px rgba(25, 199, 193, 0.6);
}

/* neon que corre pela moldura */
.lap__moldura::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--hc-ang, 0deg), transparent 0 70%, rgba(47, 210, 138, 0.95) 78%, rgba(230, 255, 250, 1) 85%, rgba(42, 125, 225, 0.9) 92%, transparent 98%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.lap__tela {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 880 / 550;
  background: #0b1320;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.lap__tela img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.82) contrast(1.06) saturate(1.05); }

/* vidro: reflexo da luz do M + faixa que atravessa */
.lap__tela::before,
.lap__tela::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.lap__tela::before {
  background:
    radial-gradient(70% 60% at 85% -10%, rgba(120, 255, 235, 0.3), transparent 60%),
    linear-gradient(180deg, rgba(25, 199, 193, 0.12), transparent 35%),
    linear-gradient(0deg, rgba(2, 6, 14, 0.45), transparent 45%);
}
.lap__tela::after {
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.2) 42%, rgba(160, 255, 245, 0.08) 48%, transparent 56%);
  background-size: 300% 100%;
  background-position: 130% 0;
}

.lap__dobra {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: -6px;
  height: 8px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #1b222c, #07090d);
}

/* base: plano horizontal saindo da dobra em direção ao observador */
.lap__base {
  position: absolute;
  left: -7%;
  right: -7%;
  top: 100%;
  height: 0;
  padding-bottom: 46%;
  transform-origin: 50% 0;
  transform: rotateX(68deg);
  border-radius: 6px 6px 20px 20px;
  background:
    radial-gradient(60% 50% at 70% 0%, rgba(92, 225, 230, 0.22), transparent 70%),
    linear-gradient(180deg, #2c3644 0%, #151b24 35%, #0b0f15 100%);
  box-shadow:
    inset 0 2px 0 rgba(170, 246, 255, 0.35),
    inset 0 -3px 0 rgba(92, 225, 230, 0.6),
    0 0 40px rgba(25, 199, 193, 0.35);
}

.lap__teclado {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 9%;
  height: 46%;
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 calc(6.66% - 1.5px), rgba(0, 0, 0, 0.6) calc(6.66% - 2px) 6.66%),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 calc(16.6% - 1.5px), rgba(0, 0, 0, 0.6) calc(16.6% - 2px) 16.6%),
    linear-gradient(180deg, #232c37, #161c24);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7), 0 0 18px rgba(25, 199, 193, 0.18);
}

.lap__touch {
  position: absolute;
  left: 36%;
  right: 36%;
  top: 62%;
  height: 28%;
  border-radius: 8px;
  background: linear-gradient(180deg, #1d2530, #121820);
  box-shadow: inset 0 0 0 1px rgba(170, 246, 255, 0.12);
}

.lap__sombra {
  position: absolute;
  left: 0;
  right: -6%;
  bottom: -14%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.85), transparent), radial-gradient(closest-side, rgba(25, 199, 193, 0.35), transparent 80%);
  filter: blur(14px);
  z-index: -1;
}

.hc__legenda { position: absolute; left: 4%; bottom: -10%; z-index: 4; margin: 0; font-size: 0.72rem; color: #8fa6c2; }
.hc__may { right: -3%; bottom: 36%; }

@keyframes hc-orbita { to { --o: 360deg; } }
@property --o { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes hc-lap-entra { from { opacity: 0; transform: translate3d(60px, 120px, 0) rotateX(34deg) rotateY(-40deg) rotateZ(4deg) scale(0.9); } }
@keyframes hc-lap-boia { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

@media (prefers-reduced-motion: no-preference) {
  .hc__orbita--1 { animation: hc-orbita 14s linear infinite; }
  .hc__orbita--2 { animation: hc-orbita 22s linear infinite reverse; }
  .lap__moldura::before { animation: hc-borda 8s linear infinite; }
  .lap__tela::after { animation: hc-vidro 9s ease-in-out 4s infinite; }
  .hc.hc--js .lap__obj { animation: hc-lap-entra 1.8s var(--hc-suave) 1s both; }
  .hc.hc--js .lap { animation: hc-lap-boia 9s ease-in-out 3s infinite; }
}

@media (max-width: 940px) {
  .hc__grade { grid-template-columns: minmax(0, 1fr); }
  .hc__palco { aspect-ratio: 1 / 1; margin-top: 12px; }
  .hc__nucleo { top: -6%; left: 50%; width: 82%; }
  .lap { left: 4%; width: 92%; bottom: 10%; }
  .lap__obj { transform: rotateX(12deg) rotateY(-18deg) rotateZ(1.5deg); }
  .hc__may { right: 0; top: 2%; bottom: auto; }
  .hc__legenda { bottom: -4%; }
}
