/* ============================================================
   Parabéns — Landing
   Fidelidade 1:1 ao Figma (desktop 1920x1080 / mobile 430x932)
   ============================================================ */

/* --- Fonte oficial FWC2026 --- */
@font-face {
  font-family: "FWC2026";
  src: url("fonts/FWC2026.woff2") format("woff2"),
       url("fonts/FWC2026.ttf")   format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #10be07;        /* verde da barra/título */
  --green-btn: #24f54e;    /* topo do gradiente do botão */
  --green-btn-2: #098722;  /* base do gradiente do botão */
  --font: "FWC2026", "Arial Black", "Archivo Black", Haettenschweiler, Helvetica, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background: #000;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Viewport ocupa a tela toda e centraliza o palco */
.viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  overflow: hidden;
}

/* Palco com as dimensões exatas do Figma; escalado via JS */
.stage {
  position: relative;
  width: 1920px;
  height: 1080px;
  background: #000;
  overflow: hidden;
  transform-origin: center center;
  transform: scale(var(--scale, 1));
}

.stage > img,
.stage > .foto-wrap,
.stage > .titulo,
.stage > .subtitulo,
.stage > .texto,
.stage > .cta-button { position: absolute; }

/* Faixa de aviso — largura total, fixa no topo da janela (desktop) */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(40px, 2.97vw, 74px);
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.aviso {
  font-size: clamp(15px, 1.344vw, 33px);
  line-height: 1;
  color: #000;
  white-space: nowrap;
}

/* 1. Grade de fundo (1920x1920, ancorada no topo do frame em -874.5px) */
.grid-fundo {
  left: 0;
  top: -874.5px;
  width: 1920px;
  height: 1920px;
}

/* 2. Foto (679x910 visual, com crop igual ao Figma) */
.foto-wrap {
  left: 723.39px;
  top: 471px;
  width: 448.733px;
  height: 518px;
  border-radius: 32.223px;
  overflow: hidden;
}
.foto {
  position: absolute;
  left: 0;
  top: -15.46%;
  width: 100%;
  height: 115.5%;
  object-fit: cover;
  object-position: center;
}

/* 4. Título */
.titulo {
  left: 656.35px;
  top: 103px;
  font-size: 103.36px;
  line-height: 0.602;
  color: var(--green);
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 400;
}

/* 5. Subtítulo */
.subtitulo {
  left: 677px;
  top: 208px;
  font-size: 33.504px;
  line-height: 0.602;
  color: #fff;
  white-space: nowrap;
  font-weight: 400;
}

/* 6. Texto de apoio */
.texto {
  left: 936.5px;
  top: 274px;
  transform: translateX(-50%);
  width: 661.125px;
  font-size: 19.964px;
  line-height: 1.09;
  letter-spacing: -0.1996px;
  text-align: center;
  color: #acacac;
  font-weight: 400;
}

/* 7. Botão CTA (rect visível: top 354+5.69, h 68.32) */
.cta-button {
  left: 765px;
  top: 359.69px;
  width: 365.187px;
  height: 68.32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.627px solid #009f20;
  border-radius: 16.267px;
  background: linear-gradient(180deg, var(--green-btn) 0%, var(--green-btn-2) 100%);
  box-shadow: 0 3.253px 48.719px 0 rgba(0, 255, 51, 0.3);
  text-decoration: none;
  color: #001805;
  overflow: hidden;
}
.cta-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 5.693px 17.812px 0 rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.cta-icon {
  width: 26.027px;
  height: 26.027px;
  flex-shrink: 0;
}
.cta-text {
  font-family: var(--font);
  font-size: 28.768px;
  line-height: 0.602;
  letter-spacing: -1.4384px;
  color: #001805;
  white-space: nowrap;
}

/* ============================================================
   VERSÃO MOBILE — palco 430x932
   ============================================================ */
.viewport-m { display: none; }

@media (max-aspect-ratio: 1/1) {
  .viewport { display: none; }
  .topbar { display: none; }

  /* No mobile a página rola para mostrar a foto inteira */
  html, body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .viewport-m {
    display: block;
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: #000;
    /* altura real definida via JS = base da foto * escala + 80px de respiro */
  }
}

.m-stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: 430px;
  height: 932px;
  background: #000;
  overflow: hidden;
  transform-origin: top center;
  transform: translateX(-50%) scale(var(--m-scale, 1));
}

.m-stage > img,
.m-stage > .m-topbar,
.m-stage > .m-aviso,
.m-stage > .m-foto-wrap,
.m-stage > .m-titulo,
.m-stage > .m-subtitulo,
.m-stage > .m-texto,
.m-stage > .m-cta-btn { position: absolute; }

/* 1. Grade de fundo (não existe no design mobile; mantida sutil p/ consistência) */
.m-grid {
  left: -335px;
  top: -120px;
  width: 1100px;
  height: 1100px;
}

/* 2. Barra superior */
.m-topbar {
  left: 0;
  top: 0;
  width: 430px;
  height: 41px;
  background: var(--green);
}
.m-aviso {
  left: 0;
  top: 0;
  width: 430px;
  height: 41px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15.484px;
  line-height: 1;
  color: #000;
  white-space: nowrap;
}

/* 3. Foto (crop igual ao Figma) */
.m-foto-wrap {
  left: 12px;
  top: 406px;
  width: 406.285px;
  height: 469px;
  border-radius: 29.175px;
  overflow: hidden;
}
.m-foto {
  position: absolute;
  left: 0;
  top: -15.46%;
  width: 100%;
  height: 115.5%;
  object-fit: cover;
  object-position: center;
}

/* 4. Título */
.m-titulo {
  left: 40.49px;
  top: 130px;
  font-size: 64.566px;
  line-height: 0.602;
  color: var(--green);
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 400;
}

/* 4. Subtítulo */
.m-subtitulo {
  left: 53.39px;
  top: 195.59px;
  font-size: 20.928px;
  line-height: 0.602;
  color: #fff;
  white-space: nowrap;
  font-weight: 400;
}

/* 5. Texto de apoio */
.m-texto {
  left: 215.49px;
  top: 236.82px;
  transform: translateX(-50%);
  width: 412.982px;
  font-size: 12.471px;
  line-height: 1.09;
  letter-spacing: -0.1247px;
  text-align: center;
  color: #acacac;
  font-weight: 400;
}

/* 6. Botão CTA (rect visível: top 286+5, h 60.037) */
.m-cta-btn {
  left: 61.96px;
  top: 291px;
  width: 320.912px;
  height: 60.037px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.429px solid #009f20;
  border-radius: 14.295px;
  background: linear-gradient(180deg, var(--green-btn) 0%, var(--green-btn-2) 100%);
  box-shadow: 0 2.859px 42.812px 0 rgba(0, 255, 51, 0.3);
  text-decoration: none;
  color: #001805;
  overflow: hidden;
}
.m-cta-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 5.003px 15.653px 0 rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.m-cta-icon { width: 22.871px; height: 22.871px; flex-shrink: 0; }
.m-cta-text {
  font-family: var(--font);
  font-size: 25.28px;
  line-height: 0.602;
  letter-spacing: -1.264px;
  color: #001805;
  white-space: nowrap;
}

/* ============================================================
   PARTÍCULAS — canvas suave atrás do conteúdo
   ============================================================ */
.particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ============================================================
   ANIMAÇÕES — entrada escalonada + pulse do botão
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUpX {
  from { opacity: 0; transform: translateX(-50%) translateY(32px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes glowIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes btnPulseD {
  0%, 100% { box-shadow: 0 3.253px 48.719px 0 rgba(0, 255, 51, 0.3); }
  50%      { box-shadow: 0 3.253px 70px 8px rgba(0, 255, 51, 0.6); }
}
@keyframes btnPulseM {
  0%, 100% { box-shadow: 0 2.859px 42.812px 0 rgba(0, 255, 51, 0.3); }
  50%      { box-shadow: 0 2.859px 58px 5px rgba(0, 255, 51, 0.6); }
}

@media (prefers-reduced-motion: no-preference) {
  .grid-fundo, .m-grid { animation: fadeIn 1.1s ease-out both; }
  .particles { animation: fadeIn 1.6s ease-out 0.4s both; }

  .topbar, .aviso, .m-topbar, .m-aviso { animation: fadeIn 0.9s ease-out 0.1s both; }

  .titulo, .m-titulo { animation: fadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both; }
  .subtitulo, .m-subtitulo { animation: fadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both; }
  .texto, .m-texto { animation: fadeUpX 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both; }

  .foto-wrap { animation: glowIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both; }

  /* entrada do botão + pulse depois */
  .cta-button { animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both,
                           btnPulseD 2.6s ease-in-out 1.8s infinite; }
  .m-cta-btn  { animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both,
                           btnPulseM 2.6s ease-in-out 1.8s infinite; }
}
