/* =========================================================
   VARIÁVEIS
   ========================================================= */
:root {
  --bg: #000000;
  --fg: #ffffff;
  --fg-muted: rgba(255, 255, 255, 0.55);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* Espaçamento vertical entre os blocos */
  --gap: clamp(1.25rem, 2.5vh, 2rem);

  /* Margem lateral mínima do vídeo */
  --side: clamp(1rem, 4vw, 3rem);

  /* Altura estimada dos blocos fora do vídeo (título + ícones + gaps).
     Usada para calcular o tamanho máximo do vídeo no desktop. */
  --chrome: 14rem;

  --icon-size: 20px;
}

/* =========================================================
   RESET
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  line-height: 1;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  padding: var(--gap) var(--side);
  padding-top: max(var(--gap), env(safe-area-inset-top));
  padding-bottom: max(var(--gap), env(safe-area-inset-bottom));
}

/* Ordem: vídeo → rodapé (título + ícones) */
.video-wrapper { order: 1; }
.footer        { order: 2; }

/* =========================================================
   TÍTULO
   ========================================================= */
.title {
  font-family: "Poppins", var(--font);
  font-size: clamp(0.9rem, 0.6vw + 0.7rem, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--fg);
}

/* =========================================================
   VÍDEO
   ========================================================= */
.video-wrapper {
  width: 100%;
  flex: 1 1 auto;          /* ocupa o espaço restante e empurra o rodapé para baixo */
  display: flex;
  align-items: center;     /* vídeo centralizado verticalmente no espaço disponível */
  justify-content: center;
}

.video-frame {
  position: relative;
  /* Mobile: ocupa toda a largura disponível mantendo 16:9 */
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  overflow: hidden;
}

.video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg);
}

/* Overlay preto que faz o fade. A opacidade fica nele, nunca no <video>. */
.video-fade {
  position: absolute;
  inset: 0;
  background: #000000;
  opacity: 1;
  pointer-events: none;
}

/* =========================================================
   RODAPÉ (título + ícones)
   ========================================================= */
.footer {
  margin-top: auto;        /* garante que fique colado ao fim da página */
  display: flex;
  flex-direction: column;  /* ícones → título → copyright */
  align-items: center;
  gap: clamp(0.75rem, 1.5vh, 1rem);
  padding-bottom: clamp(0.5rem, 2vh, 1.5rem);
}

.copyright {
  font-family: "Poppins", var(--font);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--fg-muted);
}

/* =========================================================
   ÍCONES
   ========================================================= */
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1vw, 0.875rem);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--fg-muted);
  transition: color 0.25s ease;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--fg);
  outline: none;
}

.icon {
  width: var(--icon-size);
  height: var(--icon-size);
}

/* =========================================================
   DESKTOP / TABLET PAISAGEM
   Vídeo em grande escala, rodapé embaixo
   ========================================================= */
@media (min-width: 900px) and (orientation: landscape) {
  .video-frame {
    /* Maior 16:9 possível que caiba na tela, descontando título + ícones */
    width: min(
      100%,
      calc((100vh - var(--chrome)) * 16 / 9)
    );
    width: min(
      100%,
      calc((100dvh - var(--chrome)) * 16 / 9)
    );
  }
}

/* Telas muito largas: um pouco mais de respiro lateral */
@media (min-width: 1600px) {
  :root {
    --side: clamp(2rem, 5vw, 5rem);
  }
}

/* =========================================================
   ACESSIBILIDADE / PREFERÊNCIAS
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .social-link {
    transition: none;
  }
}
