:root {
  --wine: #280000;
  --black: #000;
  --red: #a4483d;
  --gold: #ffe28f;
  --cream: #fef0c5;
  --surface: #3d0a07;
  --display: 'DM Serif Display', Georgia, serif;
  --body: 'League Spartan', system-ui, sans-serif;
  --m: clamp(16px, 2.2vw, 32px);
  --t-poster: clamp(44px, 8.6vw, 136px);
  --t-head: clamp(30px, 3.4vw, 44px);
  --t-lead: clamp(20px, 1.7vw, 26px);
  --t-body: 19px;
  --t-small: 16px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* usados pelo painel */
  --label: var(--body);
  --muted: rgba(254, 240, 197, 0.72);
  --hair: rgba(255, 226, 143, 0.24);
  --glow: var(--red);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--wine); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--wine);
  color: var(--cream);
  font-family: var(--body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, fieldset { margin: 0; padding: 0; border: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--gold); letter-spacing: -0.02em; }
ol, ul { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--wine); }
[id] { scroll-margin-top: var(--nav-h); }

/* ---------- barra ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--m);
  background: var(--wine);
}
.nav-brand { font-family: var(--display); font-size: var(--t-lead); color: var(--gold); text-decoration: none; white-space: nowrap; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav nav a { padding: 10px 0; font-size: var(--t-body); font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav nav a:hover, .nav nav a[aria-current='page'] { color: var(--gold); }
.nav nav .nav-vote { padding: 9px 16px 7px; background: var(--gold); color: var(--wine); transition: background 0.2s, transform 0.15s; }
.nav nav .nav-vote:hover, .nav nav .nav-vote[aria-current='page'] { background: var(--cream); color: var(--wine); }
.nav nav .nav-vote:active { transform: translateY(1px); }
@media (max-width: 560px) {
  .nav-brand { font-size: 0; }
  .nav-brand::before { content: 'BA'; font-size: 24px; letter-spacing: -0.05em; }
  .nav nav a { font-size: var(--t-small); }
}

/* ---------- botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 16px 28px 13px;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--wine);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s var(--ease);
}
.btn:hover { background: var(--cream); }
.btn:active { transform: translateY(2px); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-dark, .btn-line { background: var(--black); color: var(--cream); }
.btn-dark:hover, .btn-line:hover { background: var(--red); color: var(--cream); }
.btn-gold { background: var(--gold); color: var(--wine); }
.btn-text {
  padding: 6px 0;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.btn-text:hover { color: var(--cream); }

/* ---------- views ---------- */
.view[hidden] { display: none; }

/* ---------- capa ---------- */
.hero {
  position: relative;
  height: calc(100svh - var(--nav-h));
  min-height: 560px;
  overflow: hidden;
}
.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding: clamp(24px, 5vh, 64px) var(--m) 0;
}
.hero-pitch { max-width: 34ch; }
.hero-say { font-size: var(--t-lead); line-height: 1.3; }
.hero-pitch .btn { margin-top: 28px; }
.hero-when { text-align: right; }
.hero-date { font-family: var(--display); font-size: var(--t-head); line-height: 1.05; color: var(--gold); letter-spacing: -0.02em; white-space: nowrap; }
.hero-dress { margin-top: 6px; font-size: var(--t-lead); }
.hero-count { margin-top: 6px; font-size: var(--t-body); font-variant-numeric: tabular-nums; }
.monument {
  position: absolute;
  left: -5vw;
  bottom: -0.2em;
  font-size: clamp(260px, 33vw, 720px);
  line-height: 0.8;
  letter-spacing: -0.045em;
  white-space: nowrap;
  color: var(--gold);
  transform-origin: 0 100%;
  scale: calc(1 - var(--scroll, 0) * 0.07);
  animation: monument-in 1.1s var(--ease) both;
}
@keyframes monument-in { from { transform: translateY(12%); opacity: 0; } }
@media (max-width: 760px) {
  .hero { height: calc(100svh - var(--nav-h)); min-height: 600px; }
  .hero-top { display: block; width: 52%; padding-top: 28px; }
  .hero-say { font-size: 18px; }
  .hero-when { margin-top: 36px; text-align: left; }
  .hero-date { white-space: normal; font-size: 24px; }
  .hero-dress { font-size: 18px; }
  .hero-count { font-size: 16px; }
  .hero-pitch .btn { margin-top: 22px; padding-inline: 18px; }
  .monument {
    left: auto;
    right: -15vw;
    top: -0.06em;
    bottom: auto;
    writing-mode: vertical-rl;
    font-size: 53vw;
    line-height: 1;
    transform-origin: 100% 0;
  }
}

/* ---------- cortina ---------- */
.stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 56px);
  padding: 80px var(--m);
  overflow: hidden;
  background: var(--black);
}
.stage-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.1); } }
.stage-logo { position: relative; width: min(74vw, 520px); }
.stage-line {
  position: relative;
  max-width: 44ch;
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.15;
  text-align: center;
  color: var(--cream);
}

/* ---------- dinâmicas ---------- */
.lineup { background: var(--black); padding: clamp(96px, 14vw, 200px) var(--m) 0; }
.lineup-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.lineup-head h2 { font-size: var(--t-head); }
.lineup-head p { font-size: var(--t-lead); }
.poster { margin-top: clamp(32px, 5vw, 72px); }
.poster li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.poster h3 {
  font-size: var(--t-poster);
  line-height: 1.04;
  letter-spacing: -0.035em;
  white-space: nowrap;
  transition: color 0.2s;
}
.poster p { max-width: 26ch; font-size: var(--t-body); text-align: right; }
.poster li:hover h3 { color: var(--red); }
.lineup-photo { width: calc(100% + 2 * var(--m)); max-width: none; margin: clamp(64px, 9vw, 140px) calc(-1 * var(--m)) 0; aspect-ratio: 16 / 8; object-fit: cover; }
@media (max-width: 760px) {
  .poster { --t-poster: 10.2vw; }
  .poster li { display: block; }
  .poster p { max-width: none; margin: 6px 0 22px; font-size: 17px; text-align: left; }
  .lineup-photo { aspect-ratio: 4 / 3; }
}

/* ---------- informações ---------- */
.info {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(96px, 14vw, 200px) var(--m);
  background: var(--wine);
}
.info-title h2 { position: sticky; top: calc(var(--nav-h) + 32px); font-size: clamp(40px, 5.6vw, 92px); line-height: 0.98; letter-spacing: -0.035em; color: var(--gold); }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 48px); align-content: start; }
.info-list article { grid-column: 1 / -1; max-width: 34ch; }
.info-list h3 { font-size: var(--t-head); line-height: 1.05; color: var(--cream); }
.info-list p { margin-top: 10px; color: var(--cream); }
.info-list img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.08); }
.info-list img:nth-of-type(1) { grid-column: 2; }
.info-list img:nth-of-type(2) { grid-column: 1; }
@media (max-width: 860px) {
  .info { display: block; }
  .info-title h2 { position: static; font-size: 9.6vw; margin-bottom: 48px; }
  .info-list img { width: 72%; }
  .info-list img:nth-of-type(1) { grid-column: 1 / -1; justify-self: end; }
  .info-list img:nth-of-type(2) { grid-column: 1 / -1; }
}

/* ---------- fecho ---------- */
.close {
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
  padding: clamp(64px, 9vw, 140px) var(--m) 40px;
  background: var(--gold);
  color: var(--wine);
}
.close h2 { max-width: 12ch; font-size: clamp(52px, 10vw, 168px); line-height: 0.92; letter-spacing: -0.04em; color: var(--wine); }
.close-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.close-foot p { max-width: 30ch; font-size: var(--t-lead); line-height: 1.3; }
.close .btn-dark { background: var(--wine); color: var(--gold); }
.close .btn-dark:hover { background: var(--black); }
@media (max-width: 760px) {
  .close { min-height: 80svh; }
  .close h2 { font-size: 15vw; }
  .close-foot { display: block; }
  .close-foot .btn { width: 100%; margin-top: 24px; }
}

/* ---------- rodapé ---------- */
.foot { padding: clamp(64px, 8vw, 120px) var(--m) 32px; background: var(--black); overflow: hidden; }
.foot-name { font-family: var(--display); font-size: 13.6vw; line-height: 0.9; letter-spacing: -0.04em; white-space: nowrap; color: var(--gold); }
.foot-row { display: flex; justify-content: space-between; gap: 32px; margin-top: clamp(40px, 5vw, 72px); }
.foot-when { font-size: var(--t-lead); line-height: 1.3; }
.foot nav { display: grid; gap: 8px; justify-items: end; }
.foot nav a { font-size: var(--t-body); text-underline-offset: 4px; }
.foot nav a:hover { color: var(--gold); }
.foot-credits { margin-top: 72px; font-size: var(--t-small); max-width: 90ch; }
@media (max-width: 760px) {
  .foot-row { display: block; }
  .foot nav { justify-items: start; margin-top: 28px; }
}

/* ---------- votação ---------- */
.vote { width: min(100%, 860px); margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--m) 120px; min-height: 80svh; }
.vote-title { font-size: var(--t-poster); line-height: 0.96; letter-spacing: -0.035em; }
.vote-root { margin-top: clamp(24px, 4vw, 40px); scroll-margin-top: calc(var(--nav-h) + 8px); }

.notice, .card { padding: clamp(24px, 4vw, 44px); background: var(--surface); }
.notice h3, .card h3 { font-size: var(--t-head); line-height: 1.05; text-wrap: balance; }
.notice > p { max-width: 44ch; margin-top: 12px; }
.notice > .btn, .notice > div { margin-top: 28px; }
.notice > div p { margin-top: 18px; }

.code-form { display: flex; gap: 10px; margin-top: 24px; max-width: 460px; }
.code-form input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 4px 16px 0;
  border: 0;
  border-radius: 0;
  background: var(--black);
  color: var(--gold);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.code-form input::placeholder { color: rgba(255, 226, 143, 0.35); }
.code-form input:focus { outline: 3px solid var(--gold); outline-offset: 0; }
.form-hint { margin-top: 14px; font-size: 17px; }
.form-error { margin-top: 14px; padding: 10px 14px 8px; background: var(--cream); color: var(--wine); font-weight: 500; }

.progress { position: sticky; top: var(--nav-h); z-index: 5; padding: 12px 0; background: var(--wine); }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: var(--t-small); font-weight: 500; }
.progress-top b { color: var(--gold); font-weight: 600; }
.bar { height: 8px; margin-top: 8px; background: var(--black); }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.4s var(--ease); }

.pips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 16px; }
.pip {
  width: 30px; height: 30px; padding: 2px 0 0;
  border: 0;
  background: var(--black);
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.15s;
}
.pip:hover { background: var(--red); }
.pip.done { background: var(--gold); color: var(--wine); }
.pip.current { background: var(--red); color: var(--cream); }

.card { animation: rise 0.45s var(--ease) both; }
.card-n { font-size: 17px; font-weight: 500; color: var(--cream); }
.card h3 { margin-top: 6px; font-size: clamp(34px, 6vw, 60px); line-height: 1; letter-spacing: -0.03em; }
.card-desc { margin-top: 10px; font-size: var(--t-lead); line-height: 1.3; }

.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin-top: 28px; min-width: 0; }
.options.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 520px) {
  .options { grid-template-columns: 1fr 1fr; }
  .options.wide { grid-template-columns: 1fr; }
}
.opt { position: relative; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 58px;
  padding: 12px 14px 9px;
  background: var(--black);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
  transition: background 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.opt input:hover + span { background: var(--red); }
.opt input:active + span { transform: scale(0.98); }
.opt input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt input:checked + span { background: var(--gold); color: var(--wine); }
.opt input:disabled { cursor: not-allowed; }
.opt input:disabled + span { background: var(--wine); color: rgba(254, 240, 197, 0.55); }
.opt small { font-size: 14px; font-weight: 400; }

.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.step-nav .btn { flex: 1; max-width: 260px; }
.step-nav .btn:last-child { margin-left: auto; }

.review { margin-top: 24px; display: grid; gap: 4px; }
.review li { display: grid; grid-template-columns: 1fr auto; gap: 0 16px; align-items: center; padding: 14px 16px 10px; background: var(--black); }
.review .r-cat { font-size: 16px; }
.review .r-pick { grid-column: 1; font-family: var(--display); font-size: 26px; line-height: 1.1; color: var(--gold); }
.review .r-pick.missing { color: var(--cream); }
.review .btn-text { grid-column: 2; grid-row: 1 / span 2; }
.finish { margin-top: 20px; }
.finish .btn { width: 100%; min-height: 68px; font-size: 22px; }
.finish p { margin-top: 14px; font-size: 17px; }

/* ---------- diálogo ---------- */
.dialog { width: min(100% - 32px, 460px); padding: 32px 28px 28px; border: 0; background: var(--cream); color: var(--wine); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.82); }
.dialog h3 { font-size: var(--t-head); color: var(--wine); }
.dialog p { margin-top: 10px; }
.dialog .form-error { background: var(--wine); color: var(--cream); }
.dialog-actions { display: flex; gap: 10px; margin-top: 24px; }
.dialog-actions .btn { flex: 1; padding-inline: 10px; }
.dialog-actions .btn:last-child { background: var(--wine); color: var(--gold); }
.dialog-actions .btn:last-child:hover { background: var(--black); }

/* ---------- painel (classes compartilhadas) ---------- */
.admin-kicker { font-size: var(--t-body); font-weight: 500; }
.muted { color: var(--muted); }

/* ---------- movimento ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-rise].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-rise] { opacity: 1; transform: none; }
  .monument { scale: 1; }
}
