/* ==========================================================================
   Universo MayFlow — componente visual compartilhado
   (prévia no Studio Magry, página do MayFlow e página de vendas).
   Identidade do produto: azul-marinho quase preto, verde, turquesa e azul.
   Sem bibliotecas. O notebook mostra uma captura REAL do aplicativo.
   ========================================================================== */

.mfu {
  --mfu-fundo: #030a14;
  --mfu-verde: #2fd28a;
  --mfu-turquesa: #19c7c1;
  --mfu-ciano: #5ce1e6;
  --mfu-azul: #2a7de1;
  --mfu-texto: #eaf4ff;
  --mfu-texto-2: #a9bdd4;
  --mfu-vidro: rgba(9, 24, 44, 0.55);
  --mfu-borda: rgba(92, 225, 230, 0.22);
  --mfu-suave: cubic-bezier(0.22, 0.8, 0.24, 1);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--mfu-texto);
  background:
    radial-gradient(60% 55% at 78% 34%, rgba(42, 125, 225, 0.22), transparent 70%),
    radial-gradient(45% 50% at 12% 92%, rgba(47, 210, 138, 0.16), transparent 70%),
    radial-gradient(40% 45% at 96% 96%, rgba(25, 199, 193, 0.16), transparent 70%),
    var(--mfu-fundo);
}

/* grade de fundo muito discreta */
.mfu::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 60% 40%, #000 10%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 60% 40%, #000 10%, transparent 75%);
}

.mfu__feixes {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mfu__grade {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

/* ---------- texto ---------- */
.mfu__texto {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.mfu__etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mfu-texto-2);
}

.mfu__etiqueta::before {
  content: "";
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, var(--mfu-verde), var(--mfu-turquesa));
}

.mfu__titulo {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #fff;
}

.mfu__titulo span {
  display: block;
}

.mfu__gradiente {
  background: linear-gradient(90deg, var(--mfu-turquesa) 0%, var(--mfu-verde) 38%, #b9e07a 62%, #e8c46a 82%, #f0cf7c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.06em;
}

.mfu__lead {
  max-width: 520px;
  margin: 22px 0 0;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.6;
  color: var(--mfu-texto-2);
}

.mfu__selo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 7px 14px;
  border: 1px solid var(--mfu-borda);
  border-radius: 999px;
  background: rgba(9, 24, 44, 0.5);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--mfu-texto);
}

.mfu__selo i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mfu-verde);
  box-shadow: 0 0 0 4px rgba(47, 210, 138, 0.18);
}

.mfu__acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* ---------- botões com microinteração ---------- */
.mfu-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--mfu-suave), box-shadow 0.3s var(--mfu-suave), background 0.3s ease, border-color 0.3s ease;
}

.mfu-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 0.3s var(--mfu-suave);
}

.mfu-btn--primario {
  background: linear-gradient(90deg, var(--mfu-verde), var(--mfu-turquesa) 60%, var(--mfu-ciano));
  color: #03172a;
  box-shadow: 0 14px 34px -14px rgba(25, 199, 193, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.mfu-btn--primario::after {             /* reflexo que atravessa o botão */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-130%);
}

.mfu-btn--contorno {
  border-color: rgba(92, 225, 230, 0.45);
  background: rgba(9, 24, 44, 0.45);
  color: var(--mfu-texto);
}

@media (hover: hover) {
  .mfu-btn--primario:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -14px rgba(25, 199, 193, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }

  .mfu-btn--primario:hover::after {
    transition: transform 0.8s var(--mfu-suave);
    transform: translateX(130%);
  }

  .mfu-btn--contorno:hover {
    transform: translateY(-2px);
    border-color: var(--mfu-ciano);
    background: rgba(25, 199, 193, 0.12);
  }

  .mfu-btn:hover svg {
    transform: translateX(4px);
  }
}

.mfu-btn:focus-visible {
  outline: 2px solid var(--mfu-ciano);
  outline-offset: 4px;
}

.mfu-btn:active {
  transform: translateY(0);
}

/* ---------- palco: emblema, notebook e cards ---------- */
.mfu__palco {
  position: relative;
  min-width: 0;
  padding: 8% 0 6%;
  perspective: 1800px;
}

/* núcleo: M oficial + anéis de energia (os anéis são decoração; o M é o arquivo original) */
.mfu__nucleo {
  position: absolute;
  z-index: 0;
  top: -20%;
  left: 54%;
  width: 56%;
  max-width: 500px;
  aspect-ratio: 1;
  transform: translate3d(calc(var(--mfu-px, 0px) * 0.4), calc(var(--mfu-py, 0px) * 0.4), 0);
  transition: transform 0.8s var(--mfu-suave);
  pointer-events: none;
}

.mfu__aneis {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  filter: drop-shadow(0 0 6px rgba(92, 225, 230, 0.55));
}

.mfu__anel {
  transform-origin: 200px 200px;
  transform-box: view-box;
}

.mfu__halo {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(25, 199, 193, 0.45), rgba(42, 125, 225, 0.18) 55%, transparent);
  filter: blur(18px);
}

.mfu__emblema {
  position: absolute;
  inset: 22%;
  width: 56%;
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 24px rgba(25, 199, 193, 0.55));
}

.mfu__notebook {
  position: relative;
  z-index: 1;
  margin: 0;
  transform-style: preserve-3d;
  transform: translate3d(var(--mfu-px, 0px), var(--mfu-py, 0px), 0) rotateX(7deg) rotateY(-13deg) rotateZ(1deg);
  transition: transform 0.8s var(--mfu-suave);
}

.mfu__tampa {
  position: relative;
  padding: 2% 2% 2.4%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
  border-radius: 18px 18px 6px 6px;
  background: linear-gradient(180deg, #121a26, #070c14);
  box-shadow:
    0 0 0 1px rgba(92, 225, 230, 0.18),
    0 0 46px -6px rgba(25, 199, 193, 0.45),
    0 50px 90px -40px rgba(0, 0, 0, 0.95);
}

.mfu__tampa::before {         /* luz que corre pela borda */
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 3;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--mfu-borda-ang, 0deg), transparent 0 78%, rgba(170, 246, 255, 0.95) 86%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.mfu__tela {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 1280 / 798;
  background: #0b1320;
}

.mfu__tela > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mfu__tela .mfu__may-tela {
  position: absolute;
  z-index: 1;
  right: 1.3%;
  bottom: 1.6%;
  width: 8.2%;
  height: auto;
}

/* reflexo que passa pela tela de tempos em tempos */
.mfu__tela::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(112deg, transparent 32%, rgba(255, 255, 255, 0.14) 44%, rgba(160, 255, 245, 0.06) 50%, transparent 58%);
  background-size: 280% 100%;
  background-position: 130% 0;
  pointer-events: none;
}

.mfu__base {
  height: clamp(10px, 1.5vw, 18px);
  margin: 0 -7%;
  border-radius: 0 0 22px 22px / 0 0 14px 14px;
  background: linear-gradient(180deg, #3a4656 0%, #18202c 55%, #0b1018 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 30px 40px -22px rgba(0, 0, 0, 0.95);
}

.mfu__chao {           /* reflexo de luz no "piso" */
  height: 34px;
  margin: 4px 2% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(25, 199, 193, 0.4), transparent);
  filter: blur(8px);
}

.mfu__legenda {
  position: relative;
  z-index: 2;
  margin: 10px 0 0 4%;
  font-size: 0.72rem;
  color: var(--mfu-texto-2);
  text-align: left;
}

/* cards de vidro flutuantes */
.mfu__card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--mfu-borda);
  border-radius: 14px;
  background: var(--mfu-vidro);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  line-height: 1.25;
  color: var(--mfu-texto);
  white-space: nowrap;
  pointer-events: none;
}

.mfu__card svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--mfu-verde);
}

.mfu__card small {
  display: block;
  font-size: 0.72rem;
  color: var(--mfu-texto-2);
}

.mfu__card img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.mfu__card--relatorios { top: 10%; left: -6%; }
.mfu__card--seguranca { bottom: 16%; left: -9%; }
.mfu__card--automacao { top: 2%; right: 4%; }
.mfu__card--may { bottom: 17%; right: -3%; }

.mfu__card--seguranca svg { color: var(--mfu-ciano); }
.mfu__card--automacao svg { color: #c8f07a; }

/* ---------- movimento (só quando permitido) ---------- */
@keyframes mfu-flutua {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@keyframes mfu-reflexo {
  0%, 70% { background-position: 130% 0; }
  100% { background-position: -40% 0; }
}

@keyframes mfu-entra-texto {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .mfu.mfu--js .mfu__notebook {
    opacity: 0;
    transform: translate3d(0, 70px, 0) rotateX(26deg) rotateY(-20deg) scale(0.94);
    transition: none;
  }

  .mfu.mfu--js.mfu--ativo .mfu__notebook {
    opacity: 1;
    transition: transform 1.6s var(--mfu-suave), opacity 1.1s ease;
    transform: translate3d(var(--mfu-px, 0px), var(--mfu-py, 0px), 0) rotateX(7deg) rotateY(-13deg) rotateZ(1deg);
  }

  .mfu.mfu--js.mfu--pronto .mfu__notebook {
    transition: transform 0.8s var(--mfu-suave);
  }

  .mfu.mfu--js:not(.mfu--ativo) .mfu__nucleo { opacity: 0; }
  .mfu.mfu--js .mfu__nucleo { transition: opacity 1.6s ease 0.3s, transform 0.8s var(--mfu-suave); }

  .mfu.mfu--js .mfu__card {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    transition: none;
  }

  .mfu.mfu--js.mfu--ativo .mfu__card {
    opacity: 1;
    transition: opacity 0.8s ease, transform 0.8s var(--mfu-suave);
    transform: none;
    animation: mfu-flutua 6s ease-in-out infinite;
  }

  .mfu.mfu--js.mfu--ativo .mfu__card--relatorios { transition-delay: 0.9s; animation-delay: 1.6s; }
  .mfu.mfu--js.mfu--ativo .mfu__card--seguranca { transition-delay: 1.1s; animation-delay: 2.6s; animation-duration: 7s; }
  .mfu.mfu--js.mfu--ativo .mfu__card--automacao { transition-delay: 1.3s; animation-delay: 3.2s; animation-duration: 6.5s; }
  .mfu.mfu--js.mfu--ativo .mfu__card--may { transition-delay: 1.5s; animation-delay: 1.9s; animation-duration: 7.5s; }

  .mfu.mfu--ativo .mfu__tela::after {
    animation: mfu-reflexo 8s ease-in-out 2.4s infinite;
  }

  .mfu.mfu--js .mfu__texto > * {
    animation: mfu-entra-texto 0.9s var(--mfu-suave) both;
    animation-play-state: paused;
  }

  .mfu.mfu--js.mfu--ativo .mfu__texto > * { animation-play-state: running; }
  .mfu.mfu--js .mfu__texto > :nth-child(2) { animation-delay: 0.1s; }
  .mfu.mfu--js .mfu__texto > :nth-child(3) { animation-delay: 0.2s; }
  .mfu.mfu--js .mfu__texto > :nth-child(4) { animation-delay: 0.3s; }
  .mfu.mfu--js .mfu__texto > :nth-child(5) { animation-delay: 0.4s; }
  .mfu.mfu--js .mfu__texto > :nth-child(6) { animation-delay: 0.5s; }
}

/* ---------- universo vivo: anéis, halo, flutuação, entrada ---------- */
@property --mfu-borda-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

@keyframes mfu-gira { to { transform: rotate(360deg); } }
@keyframes mfu-gira-inv { to { transform: rotate(-360deg); } }
@keyframes mfu-pulsa { 0%, 100% { opacity: 0.55; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes mfu-boia { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes mfu-borda { to { --mfu-borda-ang: 360deg; } }
@keyframes mfu-surge { from { opacity: 0; } to { opacity: 1; } }
@keyframes mfu-anel-entra { from { opacity: 0; scale: 0.82; } to { opacity: 1; scale: 1; } }
@keyframes mfu-acende { from { opacity: 0; filter: drop-shadow(0 0 0 rgba(25, 199, 193, 0)) brightness(0.4); } to { opacity: 0.9; filter: drop-shadow(0 0 24px rgba(25, 199, 193, 0.55)) brightness(1); } }

@media (prefers-reduced-motion: no-preference) {
  .mfu.mfu--ativo .mfu__anel--1 { animation: mfu-gira 46s linear infinite; }
  .mfu.mfu--ativo .mfu__anel--2 { animation: mfu-gira-inv 30s linear infinite; }
  .mfu.mfu--ativo .mfu__anel--3 { animation: mfu-gira 18s linear infinite; }
  .mfu.mfu--ativo .mfu__halo { animation: mfu-pulsa 5.5s ease-in-out infinite; }
  .mfu.mfu--pronto .mfu__tampa,
  .mfu.mfu--pronto .mfu__base { animation: mfu-boia 8s ease-in-out infinite; }
  .mfu.mfu--pronto .mfu__tampa::before { animation: mfu-borda 7s linear infinite; }

  /* entrada da hero completa: fundo → anéis → M → notebook → texto */
  .mfu--cinema.mfu--js::before { animation: mfu-surge 1.4s ease both; }
  .mfu--cinema.mfu--js .mfu__feixes { animation: mfu-surge 2s ease 0.4s both; }
  .mfu--cinema.mfu--js .mfu__aneis { animation: mfu-anel-entra 1.8s var(--mfu-suave) 0.5s both; }
  .mfu--cinema.mfu--js .mfu__emblema { animation: mfu-acende 1.8s ease 0.8s both; }
  .mfu--cinema.mfu--js:not(.mfu--ativo) .mfu__aneis,
  .mfu--cinema.mfu--js:not(.mfu--ativo) .mfu__emblema,
  .mfu--cinema.mfu--js:not(.mfu--ativo) .mfu__feixes { animation-play-state: paused; }
  .mfu--cinema.mfu--js.mfu--ativo:not(.mfu--pronto) .mfu__notebook { transition-delay: 0.5s; }
  .mfu--cinema.mfu--js .mfu__nucleo { transition-delay: 0s; }
  .mfu--cinema.mfu--js .mfu__texto > * { animation-delay: 1.4s; }
  .mfu--cinema.mfu--js .mfu__texto > :nth-child(2) { animation-delay: 1.55s; }
  .mfu--cinema.mfu--js .mfu__texto > :nth-child(3) { animation-delay: 1.7s; }
  .mfu--cinema.mfu--js .mfu__texto > :nth-child(4) { animation-delay: 1.85s; }
  .mfu--cinema.mfu--js .mfu__texto > :nth-child(5) { animation-delay: 2s; }
  .mfu--cinema.mfu--js .mfu__texto > :nth-child(6) { animation-delay: 2.15s; }
  .mfu--cinema.mfu--js.mfu--ativo .mfu__card--relatorios { transition-delay: 1.60s; }
  .mfu--cinema.mfu--js.mfu--ativo .mfu__card--seguranca { transition-delay: 1.80s; }
  .mfu--cinema.mfu--js.mfu--ativo .mfu__card--automacao { transition-delay: 2.00s; }
  .mfu--cinema.mfu--js.mfu--ativo .mfu__card--may { transition-delay: 2.20s; }
}

/* prévia compacta (Studio): anéis menores e mais discretos */
.mfu--previa .mfu__nucleo { width: 46%; top: -14%; left: 58%; opacity: 0.8; }

/* botão "Ver demonstração" */
.mfu-btn--video {
  padding-left: 8px;
  background: transparent;
  color: var(--mfu-texto);
}

.mfu-play {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(92, 225, 230, 0.55);
  border-radius: 50%;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--mfu-suave);
}

.mfu-play svg { width: 16px; height: 16px; transform: none !important; }

@media (hover: hover) {
  .mfu-btn--video:hover .mfu-play { border-color: var(--mfu-ciano); background: rgba(25, 199, 193, 0.16); transform: scale(1.08); }
}

/* ---------- responsivo ---------- */
@media (max-width: 940px) {
  .mfu__grade {
    grid-template-columns: minmax(0, 1fr);
  }

  .mfu__palco {
    padding: 14% 4% 4%;
  }

  .mfu__card--seguranca,
  .mfu__card--automacao {
    display: none;
  }

  .mfu__nucleo { top: -6%; left: 50%; width: 60%; }

  .mfu__card--relatorios { top: 6%; left: 0; }
  .mfu__card--may { top: 2%; bottom: auto; right: 0; }
}

@media (max-width: 560px) {
  .mfu__acoes .mfu-btn {
    width: 100%;
  }

  .mfu__card {
    padding: 9px 12px;
    font-size: 0.78rem;
  }

  .mfu__card img {
    width: 28px;
    height: 28px;
  }

  .mfu__notebook {
    transform: rotateX(6deg) rotateY(-8deg);
  }

  .mfu.mfu--js.mfu--ativo .mfu__notebook {
    transform: rotateX(6deg) rotateY(-8deg);
  }

  .mfu__legenda {
    text-align: left;
  }
}

/* hero completa: o M oficial aparece grande acima do notebook, como na referência */
.mfu--cinema .mfu__palco { padding-top: 30%; }
.mfu--cinema .mfu__nucleo { top: -2%; left: 48%; width: 60%; max-width: 540px; }
.mfu-play svg { width: 18px; height: 18px; }

@media (max-width: 940px) {
  .mfu--cinema .mfu__palco { padding-top: 34%; }
  .mfu--cinema .mfu__nucleo { top: 0; left: 50%; width: 58%; }
}
