:root {
  --ink: #090b0a;
  --paper: #f2f0e8;
  --yellow: #f3d521;
  --green: #1b7f4d;
  --gold: #dcae46;
  --line: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  padding: 40px 24px;
  background:
    linear-gradient(rgba(8, 10, 9, 0.76), rgba(8, 10, 9, 0.94)),
    url("img/frio%20e%20calculista.png") center 26% / cover no-repeat;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.intro::before,
.intro::after {
  content: "";
  position: absolute;
  background: var(--yellow);
}

.intro::before {
  top: 0;
  left: 6vw;
  width: 2px;
  height: 100%;
  opacity: 0.5;
}

.intro::after {
  top: 8vh;
  left: 0;
  width: 100%;
  height: 2px;
  opacity: 0.3;
}

.intro.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.intro-noise {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  pointer-events: none;
}

.intro-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--yellow);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.intro h1,
.birthday-header h2,
.persona h3 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro h1 {
  font-size: clamp(3.7rem, 9vw, 8.2rem);
  line-height: 0.86;
}

.intro-copy {
  max-width: 550px;
  margin: 28px auto;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.reveal-button,
.party-button {
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.06em;
  transition: transform 180ms ease, background 180ms ease;
}

.reveal-button {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  min-height: 58px;
  padding: 0 10px 0 24px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 7px 7px 0 #fff;
}

.button-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--ink);
  color: #fff;
  font-size: 1.5rem;
}

.reveal-button:hover,
.party-button:hover {
  transform: translateY(-3px);
}

.reveal-button:focus-visible,
.party-button:focus-visible,
.persona-tab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.classified {
  margin: 32px 0 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.intro-stamp {
  position: absolute;
  right: 6vw;
  bottom: 7vh;
  padding: 12px 16px;
  border: 4px solid #e64936;
  color: #e64936;
  font-size: 1rem;
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  transform: rotate(-8deg);
}

.birthday {
  min-height: 100vh;
  overflow: hidden;
  background: #101311;
  opacity: 0;
}

.birthday.revealed {
  animation: reveal-page 700ms 300ms forwards;
}

.birthday-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 5vw 44px;
}

.birthday-header h2 {
  font-size: clamp(3.2rem, 7vw, 7.3rem);
  line-height: 0.86;
}

.birthday-header h2 span {
  color: var(--yellow);
}

.header-note {
  max-width: 350px;
  margin: 0 0 6px;
  color: #a9afa9;
  font-size: 1rem;
  line-height: 1.6;
}

.persona-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.persona-tab {
  min-height: 64px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #8e948f;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease;
}

.persona-tab:last-child {
  border-right: 0;
}

.persona-tab span {
  margin-right: 10px;
  color: #535954;
}

.persona-tab.active {
  background: var(--paper);
  color: var(--ink);
}

.personas {
  position: relative;
  max-width: 1400px;
  min-height: 760px;
  margin: 0 auto;
}

.persona {
  display: none;
  grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
  min-height: 760px;
}

.persona.active {
  display: grid;
  animation: persona-in 480ms ease both;
}

.persona-image-wrap {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.persona-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(16, 19, 17, 0.65) 100%);
  pointer-events: none;
}

.persona img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.rank {
  position: absolute;
  z-index: 2;
  right: 22px;
  top: 22px;
  padding: 10px 12px;
  border: 2px solid currentColor;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  transform: rotate(4deg);
}

.persona-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px clamp(34px, 7vw, 110px);
}

.persona-number {
  margin: 0 0 24px;
  color: #848b85;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.persona h3 {
  font-size: clamp(4rem, 8vw, 8.4rem);
  line-height: 0.82;
}

.tagline {
  margin: 32px 0;
  color: #d9ddd9;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats div {
  padding: 17px 18px 17px 0;
}

.stats div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.stats span,
.stats strong {
  display: block;
}

.stats span {
  margin-bottom: 5px;
  color: #777e78;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats strong {
  font-size: 0.9rem;
  text-transform: uppercase;
}

.birthday-line {
  max-width: 560px;
  margin: 0;
  color: #b3b9b4;
  font-size: 0.98rem;
  line-height: 1.65;
}

.persona-aura {
  background: #101b13;
}

.persona-aura h3,
.persona-aura .stats strong {
  color: #f2d91f;
}

.persona-agiota {
  background: #18150e;
}

.persona-agiota h3,
.persona-agiota .stats strong {
  color: var(--gold);
}

.persona-calculista {
  background: #111;
}

.persona-calculista h3 {
  color: #f1f1ed;
  text-shadow: 4px 4px 0 #464646;
}

.persona-calculista .stats strong {
  color: #b8c4cb;
}

.birthday-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 42px 5vw;
  background: var(--yellow);
  color: var(--ink);
}

.birthday-footer p {
  margin: 0;
  font-weight: 800;
}

.party-button {
  min-height: 48px;
  padding: 0 20px;
  background: var(--ink);
  color: #fff;
  white-space: nowrap;
}

#confetti {
  position: fixed;
  z-index: 50;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 30px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 16px 22px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 150%);
  transition: transform 300ms ease, opacity 300ms ease, visibility 300ms ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@keyframes reveal-page {
  to { opacity: 1; }
}

@keyframes persona-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .intro-stamp {
    right: 20px;
    bottom: 22px;
    font-size: 0.72rem;
  }

  .birthday-header {
    display: block;
    padding-top: 48px;
  }

  .header-note {
    margin-top: 24px;
  }

  .persona {
    grid-template-columns: 1fr;
  }

  .persona-image-wrap {
    min-height: 0;
    aspect-ratio: 4 / 4.3;
  }

  .persona-image-wrap::after {
    background: linear-gradient(0deg, rgba(16, 19, 17, 0.8), transparent 35%);
  }

  .persona-copy {
    padding: 48px 6vw 60px;
  }

  .persona h3 {
    font-size: clamp(4rem, 19vw, 7rem);
  }

  .birthday-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .party-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .intro {
    padding-inline: 18px;
  }

  .intro h1 {
    font-size: clamp(3.35rem, 17vw, 5rem);
  }

  .intro-copy {
    margin-block: 22px;
  }

  .reveal-button {
    width: calc(100% - 8px);
    justify-content: space-between;
    font-size: 0.86rem;
  }

  .classified {
    max-width: 240px;
    margin-inline: auto;
    line-height: 1.6;
  }

  .birthday-header h2 {
    font-size: clamp(3.2rem, 16vw, 5.3rem);
  }

  .persona-tab {
    min-height: 56px;
    font-size: 0.68rem;
  }

  .persona-tab span {
    display: none;
  }

  .persona-copy {
    padding-inline: 22px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stats div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
