/* Wesker — BIO PRIME
   Conceito: a madrugada contada de trás pra frente.
   O visualizer de Madrugada é preto e branco; a única cor vem da brasa do anel de fogo da capa de Balão,
   e ela só aparece onde há ação. Uma família (Archivo), dois papéis pela largura. */

:root {
  /* cor */
  --breu: #000000;          /* fundo: o preto esmagado do visualizer */
  --grafite: #1A1A19;       /* superfícies, placeholders, estado pressionado */
  --lustre: #EEEBE4;        /* texto: o branco quente do lustre (18:1) */
  --cinza: #9A9791;         /* texto de apoio (7.2:1) */
  --brasa: #FF8A1E;         /* ação: anel de fogo de Balão (preto sobre ela 9.4:1) */
  --brasa-funda: #E0700A;   /* ação pressionada */
  --linha: rgb(238 235 228 / 0.13);

  /* tipo */
  --f: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --largo: 125%;            /* expanded: nome e títulos */
  --normal: 100%;

  /* motion */
  --m-instant: 80ms;
  --m-fast: 140ms;
  --m-standard: 220ms;
  --m-emphasis: 320ms;
  --m-scene: 480ms;
  --m-assinatura: 950ms;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-standard: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-abre: cubic-bezier(0.22, 1, 0.36, 1);   /* abre rápido e assenta, como a câmera que respira */
  --shift: 16px;
  --press-scale: 0.97;

  --gutter: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --shift: 0px;
    --press-scale: 1;
    --m-scene: 200ms;
  }
}

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--breu);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--breu);
  color: var(--lustre);
  font: 400 17px/1.5 var(--f);
  font-stretch: var(--normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video,
svg { display: block; max-width: 100%; }

h1, h2, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
}

a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--brasa);
  outline-offset: 3px;
  border-radius: 2px;
}

.pular {
  position: absolute;
  top: calc(8px + var(--safe-top));
  left: 8px;
  z-index: 50;
  padding: 12px 16px;
  background: var(--lustre);
  color: var(--breu);
  font-weight: 700;
  translate: 0 -200%;
}
.pular:focus-visible { translate: none; }

.marco-scroll {
  position: absolute;
  top: 160px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.pagina {
  max-width: 560px;
  margin: 0 auto;
  overflow-x: clip;
}

/* títulos de seção: Archivo expanded */
h2 {
  font-size: clamp(1.75rem, 7.6vw, 2.15rem);
  font-weight: 800;
  font-stretch: var(--largo);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cabeca {
  display: grid;
  gap: 10px;
  padding: 0 var(--gutter);
  margin-bottom: 28px;
}
.cabeca p {
  max-width: 34ch;
  color: var(--cinza);
}

/* ---------- CENA 1 · hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 88vh;
  min-height: 88svh;
  padding: calc(20px + var(--safe-top)) var(--gutter) 28px;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--grafite);
}

.hero-poster,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.hero-video {
  opacity: 0;
  transition: opacity var(--m-scene) var(--ease-standard);
}
.hero-video.is-playing { opacity: 1; }

/* scrim só onde há texto: embaixo e um pouco no topo */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(0 0 0 / 0.55) 0%, rgb(0 0 0 / 0) 18%),
    linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.86) 30%, rgb(0 0 0 / 0) 62%);
}

.nome {
  font-size: clamp(3.4rem, 17.4vw, 6.1rem);
  font-weight: 900;
  font-stretch: var(--largo);
  line-height: 0.86;
  letter-spacing: -0.035em;
  margin-left: -0.04em;
}

/* assinatura: o nome abre de condensado para expandido, uma vez */
@keyframes nome-abre {
  from { font-stretch: 68%; letter-spacing: 0.02em; }
  to   { font-stretch: var(--largo); letter-spacing: -0.035em; }
}
@media (prefers-reduced-motion: no-preference) {
  .nome { animation: nome-abre var(--m-assinatura) var(--ease-abre) 120ms both; }
}

.hero-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.ancora {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
  transition: opacity var(--m-fast) var(--ease-standard);
}
.ancora i { font-size: 14px; }
.ancora:active { opacity: 0.6; }

.video-pausa {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid rgb(238 235 228 / 0.35);
  border-radius: 50%;
  background: rgb(0 0 0 / 0.35);
  cursor: pointer;
  transition: transform var(--m-fast) var(--ease-standard), background-color var(--m-fast) var(--ease-standard);
}
.video-pausa[hidden] { display: none; }
.video-pausa:active { transform: scale(0.92); background: var(--grafite); }

.hero-credito {
  margin-top: 14px;
  font-size: 13px;
  color: var(--cinza);
}

/* ---------- CENA 2 · discografia ---------- */

.discos { padding: 64px 0 8px; }

.faixas { border-top: 1px solid var(--linha); }

.faixa {
  display: grid;
  grid-template-columns: 3.1rem 56px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--linha);
  text-decoration: none;
  transition: background-color var(--m-fast) var(--ease-standard);
}
.faixa:active { background: var(--grafite); }
.faixa:active .faixa-capa { transform: scale(var(--press-scale)); }

.faixa-ano {
  font-size: 13px;
  font-weight: 700;
  font-stretch: var(--largo);
  color: var(--cinza);
  font-variant-numeric: tabular-nums;
}

.faixa-capa {
  width: 56px;
  height: 56px;
  background: var(--grafite);
  transition: transform var(--m-fast) var(--ease-standard);
}

.faixa-texto {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.faixa-nome {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.faixa-info {
  font-size: 14px;
  line-height: 1.35;
  color: var(--cinza);
}

.faixa-icone {
  font-size: 18px;
  color: var(--cinza);
}

/* ---------- CENA 3 · origem ---------- */

.origem {
  position: relative;
  padding: 40px var(--gutter) 72px;
}

.origem-ano {
  font-size: clamp(5rem, 30vw, 9.5rem);
  font-weight: 900;
  font-stretch: var(--largo);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: #3D3C38;
  margin-left: -0.05em;
  user-select: none;
}

.origem-corpo {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: start;
  margin-top: -0.9rem;
}

.origem-capa {
  width: 112px;
  height: 112px;
  background: var(--grafite);
  filter: grayscale(1) contrast(1.05);
  rotate: -3deg;   /* o mesmo tombo de câmera do visualizer */
  outline: 1px solid var(--linha);
}

.origem h2 {
  font-size: clamp(1.4rem, 6vw, 1.75rem);
  padding-top: 18px;
}

.origem-corpo p {
  margin-top: 10px;
  color: var(--cinza);
  max-width: 36ch;
}
.origem strong {
  color: var(--lustre);
  font-weight: 700;
}

.link-brasa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 8px;
  color: var(--brasa);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
  transition: opacity var(--m-fast) var(--ease-standard);
}
.link-brasa:active { opacity: 0.65; }

@media (max-width: 359px) {
  .origem-corpo { grid-template-columns: 1fr; }
  .origem-capa { width: 96px; height: 96px; }
  .origem h2 { padding-top: 0; }
}

/* ---------- CENA 4 · clipes ---------- */

.clipes { padding: 0 0 72px; }

.trilho {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 0 var(--gutter) 8px;
  scrollbar-width: none;
}
.trilho::-webkit-scrollbar { display: none; }

.trilho li {
  flex: 0 0 min(78%, 300px);
  scroll-snap-align: start;
}

.clipe {
  display: grid;
  gap: 4px;
  text-decoration: none;
}

.clipe-img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--grafite);
}
.clipe-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--m-standard) var(--ease-standard);
}
.clipe-img i {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.72);
  font-size: 13px;
  padding-left: 2px;
}
.clipe:active .clipe-img img { transform: scale(0.97); }

.clipe-nome {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}
.clipe-info {
  font-size: 14px;
  color: var(--cinza);
}

/* ---------- CENA 5 · arquivo ---------- */

.arquivo { padding: 0 0 72px; }

.arquivo-lista {
  margin: 0 var(--gutter);
  border-top: 1px solid var(--linha);
}

.arquivo-lista a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid var(--linha);
  text-decoration: none;
  transition: color var(--m-fast) var(--ease-standard), padding var(--m-fast) var(--ease-standard);
}
.arquivo-lista a:active { color: var(--cinza); }

.arquivo-ano {
  flex: none;
  font-size: 14px;
  color: var(--cinza);
  font-variant-numeric: tabular-nums;
}

.ficha {
  display: grid;
  gap: 14px;
  margin: 36px var(--gutter) 0;
  font-size: 15px;
}
.ficha dt { color: var(--cinza); }
.ficha dd { font-weight: 600; }

/* ---------- CENA 6 · fim ---------- */

.fim {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 680px;
  padding: 0 var(--gutter) 56px;
  isolation: isolate;
  overflow: hidden;
}

.fim-lustre {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  background: var(--grafite);
}
.fim::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, #000 0%, #000 34%, rgb(0 0 0 / 0.78) 58%, rgb(0 0 0 / 0.1) 100%);
}

.fim-conteudo {
  display: grid;
  gap: 14px;
}
.fim-conteudo p {
  max-width: 30ch;
  color: rgb(238 235 228 / 0.82);
}

.btn-brasa,
.cta-flutuante {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--brasa);
  color: var(--breu);
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  transition: transform var(--m-fast) var(--ease-standard), background-color var(--m-fast) var(--ease-standard);
}
.btn-brasa i,
.cta-flutuante i { font-size: 20px; }

.btn-brasa {
  width: 100%;
  margin-top: 10px;
}
.btn-brasa:active,
.cta-flutuante:active {
  transform: scale(var(--press-scale));
  background: var(--brasa-funda);
}
.btn-brasa:focus-visible,
.cta-flutuante:focus-visible { outline-color: var(--lustre); }

.redes {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.redes a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--linha);
  transition: opacity var(--m-fast) var(--ease-standard);
}
.redes a:active { opacity: 0.6; }
.redes i {
  width: 22px;
  font-size: 20px;
  text-align: center;
}

/* ---------- CTA flutuante (Regra do CTA) ---------- */

.cta-flutuante {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  z-index: 20;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.6);
  translate: -50% var(--shift);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--m-standard) var(--ease-exit),
    translate var(--m-standard) var(--ease-exit),
    transform var(--m-fast) var(--ease-standard),
    background-color var(--m-fast) var(--ease-standard),
    visibility 0s linear var(--m-standard);
}
.cta-flutuante.is-visivel {
  translate: -50% 0;
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--m-emphasis) var(--ease-enter),
    translate var(--m-emphasis) var(--ease-enter),
    transform var(--m-fast) var(--ease-standard),
    background-color var(--m-fast) var(--ease-standard),
    visibility 0s;
}

/* ---------- rodapé ---------- */

.rodape {
  padding: 32px var(--gutter) calc(32px + var(--safe-bottom));
  border-top: 1px solid var(--linha);
  text-align: center;
  font-size: 13px;
  color: var(--cinza);
}

.credito {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin: 18px auto 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  color: var(--lustre);
  text-decoration: none;
}
.credito-txt strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.selo-b2 {
  --seal-ink: currentColor;
  --seal-accent: var(--brasa);
  --seal-ring: 0;
  --seal-font: var(--f);
  flex: none;
  width: 72px;
  height: 72px;
  overflow: visible;
  transition: rotate 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.selo-borda,
.selo-anel { fill: none; stroke: var(--seal-ink); }
.selo-borda { stroke-width: 1; }
.selo-anel { stroke-width: 0.7; stroke-dasharray: var(--seal-ring); opacity: 0.75; }
.selo-texto {
  fill: var(--seal-ink);
  font-family: var(--seal-font);
  font-size: 6.3px;
  font-weight: 600;
  letter-spacing: 0.8px;
}
.selo-b { fill: var(--seal-ink); }
.selo-acento { fill: var(--seal-accent); }

.credito:active .selo-b2 { rotate: -10deg; }

.selo-giro {
  transform-box: view-box;
  transform-origin: 50px 50px;
}
@keyframes selo-gira { to { transform: rotate(360deg); } }
@keyframes selo-flutua {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}
@media (prefers-reduced-motion: no-preference) {
  .selo-giro { animation: selo-gira 24s linear infinite; }
  .selo-b2 { animation: selo-flutua 4.8s ease-in-out infinite; }
  .selo-b2.is-still,
  .selo-b2.is-still .selo-giro,
  .is-page-hidden .selo-b2,
  .is-page-hidden .selo-giro { animation-play-state: paused; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .cta-flutuante,
  .cta-flutuante.is-visivel { translate: -50% 0; }
  .credito:active .selo-b2 { rotate: none; }
  .faixa:active .faixa-capa,
  .clipe:active .clipe-img img { transform: none; }
}

/* ---------- desktop: a coluna vira um frame ---------- */

@media (min-width: 600px) {
  body { padding: 0 0 40px; }
  .pagina {
    border-left: 1px solid var(--linha);
    border-right: 1px solid var(--linha);
  }
}

@media (hover: hover) and (pointer: fine) {
  .faixa:hover,
  .arquivo-lista a:hover { background: var(--grafite); }
  .clipe:hover .clipe-img img { transform: scale(1.03); }
  .ancora:hover,
  .link-brasa:hover { text-decoration-thickness: 3px; }
}
