:root {
  --bg-dark: #0d0b08;
  --text-primary: #f5f2eb;
  --text-muted: rgba(245, 242, 235, 0.68);
  --accent-ocre: #ebd179;
  --accent-ocre-hover: #f3df95;
  --focus-ring: #ebd179;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-text: 0 1px 4px rgba(0, 0, 0, 0.75), 0 2px 14px rgba(0, 0, 0, 0.65);
  --shadow-action: 0 2px 8px rgba(0, 0, 0, 0.85), 0 0 20px rgba(235, 209, 121, 0.3);
}

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

html {
  height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Acessibilidade: Skip link */
.skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  background: var(--accent-ocre);
  color: #110f0a;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  border-radius: 4px;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

/* Indicador de foco acessível e visível */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 3px;
}

/* Fundo atmosférico em vídeo */
.video-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background-color: var(--bg-dark);
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
}

/* Fallback estático para prefers-reduced-motion e navegadores sem suporte */
.bg-poster {
  display: none;
  position: absolute;
  inset: 0;
  background: url("./assets/visual/background-poster.jpg") center/cover no-repeat;
}

/* Overlay sutil para garantir contraste contínuo sobre o brilho do vídeo */
.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(13, 11, 8, 0.12) 0%, rgba(13, 11, 8, 0.5) 100%),
    rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

/* Palco central único em tela cheia (full viewport) */
.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  padding: clamp(2rem, 5vh, 4rem) 1.5rem;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Cabeçalho e logotipo manuscrito central */
.brand-header {
  margin-bottom: clamp(2.5rem, 8vh, 5.5rem);
}

.brand-title {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo {
  display: block;
  width: clamp(210px, 32vw, 290px);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
}

/* Navegação minimalista de canais — todos os itens na mesma dimensão tipográfica */
.channel-nav {
  margin-bottom: clamp(1.5rem, 4.5vh, 3rem);
  width: 100%;
}

.channel-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.4rem, 1.6vw, 1.1rem);
}

.channel-item {
  display: inline-flex;
}

.channel-link,
.download-action,
.site-signature {
  font-family: inherit;
  font-weight: 380;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  text-shadow: var(--shadow-text);
  text-decoration: none;
}

.channel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
  transition: color 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.channel-icon {
  width: clamp(15px, 2vw, 18px);
  height: clamp(15px, 2vw, 18px);
  display: block;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.75)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
}

.channel-link:hover {
  color: var(--accent-ocre-hover);
  transform: translateY(-1px);
}

.channel-link:hover .channel-icon {
  filter: drop-shadow(0 0 10px rgba(243, 223, 149, 0.55)) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.75));
}

/* Bloco central do gesto DOWNLOAD — mesma dimensão dos canais, sem destaque desproporcional */
.download-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.cover-link {
  display: block;
  border-radius: 6px;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.cover-art {
  display: block;
  width: clamp(120px, 16vw, 168px);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.55));
}

.cover-link:hover {
  transform: translateY(-2px);
}

.cover-link:hover .cover-art {
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 14px rgba(243, 223, 149, 0.35));
}

.download-action {
  background: transparent;
  border: none;
  padding: 0.35rem 0.4rem;
  min-height: 44px;
  color: var(--text-primary);
  font-size: clamp(0.72rem, 1.3vw, 0.82rem);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
}

.download-action:not(.is-disabled):hover {
  color: var(--accent-ocre-hover);
  text-shadow: 0 0 14px rgba(243, 223, 149, 0.6), var(--shadow-text);
  transform: translateY(-1px);
}

.download-action.is-disabled {
  cursor: not-allowed;
  opacity: 1;
}

.download-status {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  max-width: 480px;
  line-height: 1.4;
  margin: 0;
}

/* Assinatura — link pessoal sobre o próprio vídeo, sem barra ou fundo */
.site-signature {
  position: fixed;
  left: 50%;
  bottom: clamp(1.1rem, 4vh, 2rem);
  transform: translateX(-50%);
  z-index: 1;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  opacity: 0.8;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.site-signature:hover {
  color: var(--accent-ocre-hover);
  opacity: 1;
}

/* Utilitário para leitores de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsividade móvel e telas compactas — ainda mais minimalista */
@media (max-width: 600px) {
  .stage {
    padding: 2.25rem 1rem;
  }

  .channel-list {
    gap: 0.3rem 0.85rem;
  }

  .download-action {
    font-size: 0.7rem;
    padding: 0.3rem 0.3rem;
  }

  .channel-icon {
    width: 15px;
    height: 15px;
  }

  .brand-header {
    margin-bottom: 2.25rem;
  }

  .channel-nav {
    margin-bottom: 1.75rem;
  }

  .site-signature {
    bottom: 1rem;
    font-size: 0.65rem;
  }
}

/* Adaptação para viewport com altura reduzida (ex: mobile horizontal) */
@media (max-height: 540px) {
  body {
    justify-content: flex-start;
  }

  .stage {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin: 0 auto;
  }

  .brand-header {
    margin-bottom: 1.5rem;
  }

  .channel-nav {
    margin-bottom: 1.25rem;
  }

  .site-signature {
    position: static;
    transform: none;
    margin-top: 1rem;
  }
}

/* Respeito estrito a prefers-reduced-motion: pausa vídeo e exibe poster */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .bg-video {
    display: none !important;
  }

  .bg-poster {
    display: block !important;
  }
}
