:root {
  --ink: #0b0907;
  --char: #14110e;
  --coal: #1c1814;
  --bark: #2a221b;
  --cream: #f3e6d0;
  --cream-soft: #e8d7bc;
  --sand: #c9b089;
  --gold: #e4b23a;
  --gold-bright: #f2c85a;
  --amber: #d9a21a;
  --orange: #f07018;
  --orange-deep: #c4530d;
  --white: #fffaf3;
  --muted: #b8a890;
  --line: rgba(228, 178, 58, 0.28);
  --patroas-brown: #2b1c14;
  --patroas-pink: #f4a6c4;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-west: "Rye", "Cinzel", serif;
  --font-sans: "Outfit", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-sans);
  background: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(11, 9, 7, 0.78);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand span {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav {
  display: flex;
  gap: 22px;
  font-size: 0.92rem;
  color: var(--cream-soft);
}

.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-cta:hover {
  filter: brightness(1.06);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 28px;
  min-height: 100svh;
  padding: 96px 28px 32px;
  box-sizing: border-box;
  background: #080604;
}

.hero-copy-col {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 0;
}

.hero-cast {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-cast img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: min(78svh, 720px);
  object-fit: contain;
  object-position: center center;
  margin: 0;
}

.hero-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 75% at 78% 58%, rgba(240, 112, 24, 0.2), transparent 60%),
    radial-gradient(ellipse 40% 50% at 16% 42%, rgba(228, 178, 58, 0.06), transparent 55%),
    #080604;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: none;
}

@media (min-width: 861px) {
  .site-header .wrap {
    width: auto;
    max-width: none;
    margin-inline: 0;
    padding-inline: clamp(40px, 9vw, 200px) clamp(24px, 3.2vw, 80px);
  }

  .hero {
    --gutter: clamp(40px, 9vw, 200px);
    --gutter-right: clamp(24px, 3.2vw, 80px);
    display: grid;
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
    align-items: end;
    column-gap: 24px;
    min-height: 0;
    overflow: visible;
    padding: 32px var(--gutter-right) 0 var(--gutter);
  }

  .hero::after {
    z-index: 4;
  }

  .court {
    position: relative;
    z-index: 3;
  }

  .hero-copy-col {
    position: relative;
    z-index: 2;
    align-self: stretch;
    width: auto;
    min-height: 0;
    display: flex;
    align-items: center;
    padding: 48px 0;
  }

  .hero-copy {
    max-width: 34rem;
  }

  .hero-cast {
    position: relative;
    inset: auto;
    z-index: 1;
    align-self: end;
    display: block;
    width: 100%;
    margin: 0;
    line-height: 0;
  }

  .hero-cast img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100svh - 230px);
    object-fit: contain;
    margin: 0 0 -3px auto;
    -webkit-mask-image:
      linear-gradient(90deg, transparent 0%, rgba(0,0,0,.4) 10%, #000 30%, #000 100%),
      linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(90deg, transparent 0%, rgba(0,0,0,.4) 10%, #000 30%, #000 100%),
      linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
    mask-composite: intersect;
  }
}

.kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.hero h1 em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  color: var(--orange);
}

.lede {
  max-width: 46ch;
  margin: 0 0 28px;
  color: var(--cream-soft);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--amber));
  color: var(--ink);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--cream);
}

.hero .btn-ghost {
  background: rgba(11, 9, 7, 0.35);
  backdrop-filter: blur(8px);
}

/* Sections */

.section {
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-head h2 {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: 0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.ornament {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.ornament::before,
.ornament::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

/* Court */

.court {
  background:
    linear-gradient(180deg, rgba(240, 112, 24, 0.05), transparent 30%),
    var(--char);
  border-block: 1px solid var(--line);
}

.court-grid {
  display: grid;
  gap: 28px;
}

.court-copy {
  margin-bottom: 0;
}

.court-frame {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0d0b09;
}

.court-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

/* Desktop: foto à esquerda, texto à direita. No mobile o título vem primeiro,
   por isso a ordem do HTML é texto → foto e as colunas são invertidas aqui. */
@media (min-width: 880px) {
  .court-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
  }

  .court-frame {
    grid-column: 1;
    grid-row: 1;
  }

  .court-copy {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
  }
}

/* Carousel */

.carousel-shell {
  position: relative;
}

.carousel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px 18px;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.carousel-btn {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(11, 9, 7, 0.72);
  border: 1px solid var(--line);
  color: var(--gold);
  backdrop-filter: blur(8px);
}

.carousel-btn:hover {
  background: rgba(228, 178, 58, 0.16);
}

.carousel-btn.prev { left: -8px; }
.carousel-btn.next { right: -8px; }

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(228, 178, 58, 0.28);
}

.dots button.is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--gold);
}

/* Attractions */

.attractions {
  background: var(--ink);
}

.attraction-card {
  flex: 0 0 min(78vw, 344px);
  scroll-snap-align: start;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--coal);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.attraction-card:hover {
  transform: translateY(-6px);
  border-color: rgba(228, 178, 58, 0.5);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}

.attraction-card img {
  display: block;
  width: 100%;
  aspect-ratio: 875 / 1024;
  object-fit: cover;
}

/* Vote */

.vote {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(228, 178, 58, 0.08), transparent 42%),
    var(--char);
  border-top: 1px solid var(--line);
}

.candidate-card {
  flex: 0 0 min(72vw, 280px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--coal);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.candidate-card.is-flash {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow);
}

.candidate-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
}

.candidate-body {
  padding: 16px 16px 18px;
}

.candidate-body h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.vote-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.vote-btn:hover {
  background: linear-gradient(180deg, var(--gold-bright), var(--amber));
  color: var(--ink);
  border-color: transparent;
}

.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;
}

.candidate-search {
  display: block;
  max-width: 420px;
  margin: 0 0 22px;
}

.candidate-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px 0 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23E4B23A' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M13 13l4 4'/%3E%3C/svg%3E") 16px 50% / 16px no-repeat,
    rgba(8, 6, 4, 0.45);
  color: var(--cream);
  font: inherit;
  letter-spacing: 0.01em;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.candidate-search input::placeholder {
  color: #9a8774;
}

.candidate-search input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(228, 178, 58, 0.18);
}

.search-empty {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.candidate-card.is-hidden {
  display: none;
}

/* Footer */

.site-footer {
  padding: 56px 0 28px;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(244, 166, 196, 0.08), transparent 55%),
    var(--patroas-brown);
  border-top: 1px solid rgba(244, 166, 196, 0.18);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.patroas-shot {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(244, 166, 196, 0.22);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  background: #140d0a;
}

.patroas-shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
}

.footer-brand {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.sponsor-label {
  margin: 0;
  color: var(--patroas-pink);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.sponsor-logo {
  width: min(240px, 100%);
  height: auto;
  background: transparent;
}

.footer-copy h3 {
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.footer-copy p {
  margin: 0;
  color: #d8c4b0;
}

.legal {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  color: #a8907c;
  font-size: 0.82rem;
}

.legal a {
  color: var(--gold);
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 120;
  transform: translate(-50%, 20px);
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: 0.28s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 860px) {
  .nav { display: none; }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    overflow: visible;
    padding: 48px 0 0;
  }
  .hero::after {
    z-index: 4;
  }
  .court {
    position: relative;
    z-index: 3;
  }
  .hero-copy-col {
    padding: 4px 20px 16px;
  }
  .hero-copy {
    max-width: 36rem;
  }
  .hero-cast {
    line-height: 0;
  }
  .hero-cast img {
    width: 100%;
    height: auto;
    max-height: 58vh;
    margin: 0 auto -3px;
  }
  .court-frame img { aspect-ratio: 4 / 3; object-position: center 22%; }
  .section { padding: 64px 0; }
  .carousel-btn { display: none; }
}
