:root {
  --bg: #050505;
  --gold: #d9b26a;
  --gold-soft: rgba(217, 178, 106, 0.55);
  --text: #f2ece0;
  --muted: rgba(242, 236, 224, 0.6);
  --bar: clamp(28px, 9vh, 90px); /* faixas pretas estilo cinemascope */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  overflow: hidden;
}

/* ---------- Camadas de fundo ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(217, 178, 106, 0.14), transparent 60%),
    radial-gradient(ellipse at 20% 100%, rgba(40, 70, 120, 0.25), transparent 55%),
    radial-gradient(ellipse at 90% 0%, rgba(120, 50, 30, 0.2), transparent 50%),
    var(--bg);
  animation: breathe 10s ease-in-out infinite alternate;
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.beams {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.beams span {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 28vmax;
  height: 140%;
  background: linear-gradient(to bottom, rgba(217, 178, 106, 0.18), transparent 70%);
  filter: blur(30px);
  transform-origin: top center;
  opacity: 0.7;
}
.beams span:nth-child(1) { animation: sweep 14s ease-in-out infinite alternate; transform: translateX(-50%) rotate(-25deg); }
.beams span:nth-child(2) { animation: sweep 18s ease-in-out infinite alternate-reverse; transform: translateX(-50%) rotate(0deg); opacity: 0.45; }
.beams span:nth-child(3) { animation: sweep 16s ease-in-out infinite alternate; transform: translateX(-50%) rotate(25deg); }

.grain {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.8s steps(6) infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.85) 100%);
}

.bar {
  position: fixed;
  left: 0;
  width: 100%;
  height: var(--bar);
  background: #000;
  z-index: 5;
  animation: letterbox 2.2s cubic-bezier(0.7, 0, 0.2, 1) both;
}
.bar--top { top: 0; }
.bar--bottom { bottom: 0; }

/* ---------- Conteúdo ---------- */
.stage {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--bar) + 1rem) 1.25rem;
  gap: clamp(0.8rem, 2.5vh, 1.6rem);
  /* leve parallax controlado via JS */
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform 0.25s ease-out;
}

.kicker {
  font-weight: 300;
  font-size: clamp(0.65rem, 1.6vw, 0.9rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  animation: fadeUp 1.6s 1.4s ease forwards;
}

.title {
  font-family: "Cinzel", serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.line {
  position: relative;
  display: block;
  opacity: 0;
  background: linear-gradient(180deg, #fff6df 0%, var(--gold) 50%, #7a5a25 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(217, 178, 106, 0.25);
}

.line--small {
  font-weight: 400;
  font-size: clamp(1.4rem, 5vw, 3rem);
  letter-spacing: 0.6em;
  margin-right: -0.6em; /* compensa o letter-spacing final */
  text-transform: uppercase;
  animation: reveal 2s 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.line--big {
  font-weight: 900;
  font-size: clamp(2.4rem, 11.5vw, 9rem);
  letter-spacing: 0.12em;
  margin-right: -0.12em;
  text-transform: uppercase;
  animation: reveal 2.4s 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

/* brilho que atravessa o título */
.line--big::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.95) 50%, transparent 60%);
  background-size: 250% 100%;
  background-position: 150% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5s 4.8s ease-in-out infinite;
}

.divider {
  width: min(320px, 60vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
  position: relative;
  transform: scaleX(0);
  animation: grow 1.8s 3.4s ease forwards;
}
.divider i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 14px var(--gold);
}

.subtitle {
  font-weight: 200;
  font-size: clamp(0.9rem, 2.2vw, 1.25rem);
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 1.6s 3.8s ease forwards;
}

.progress {
  position: relative;
  width: min(360px, 78vw);
  margin-top: 0.4rem;
  opacity: 0;
  animation: fadeUp 1.4s 4.3s ease forwards;
}
.progress::before {
  content: "";
  display: block;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.progress__bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #7a5a25, var(--gold), #fff6df);
  box-shadow: 0 0 12px var(--gold);
}
.progress__label {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.credits {
  position: fixed;
  bottom: calc(var(--bar) / 2 - 0.45rem);
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 6;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

/* ---------- Animações ---------- */
@keyframes letterbox {
  from { height: 50vh; }
  to   { height: var(--bar); }
}
@keyframes reveal {
  from { opacity: 0; filter: blur(18px); transform: scale(1.12); letter-spacing: 0.9em; }
  to   { opacity: 1; filter: blur(0);    transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes grow {
  to { transform: scaleX(1); }
}
@keyframes shine {
  0%   { background-position: 150% 0; }
  45%, 100% { background-position: -50% 0; }
}
@keyframes sweep {
  from { rotate: -6deg; }
  to   { rotate: 6deg; }
}
@keyframes breathe {
  from { filter: brightness(0.85); }
  to   { filter: brightness(1.15); }
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Responsividade ---------- */
@media (max-width: 480px) {
  .kicker { letter-spacing: 0.3em; }
  .line--small { letter-spacing: 0.4em; margin-right: -0.4em; }
  .line--big { letter-spacing: 0.06em; margin-right: -0.06em; }
}

@media (max-height: 480px) and (orientation: landscape) {
  :root { --bar: 12px; }
  .subtitle br { display: none; }
  .credits { display: none; }
}

/* Acessibilidade: respeita preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .grain { display: none; }
}
