@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-900.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --blue: #061d42;
  --blue-raised: #092651;
  --blue-soft: #0d315f;
  --yellow: #ffd522;
  --yellow-hover: #ffe052;
  --paper: #f4f2eb;
  --muted: #93a7c4;
  --line: rgba(184, 204, 230, 0.2);
  --line-strong: rgba(184, 204, 230, 0.38);
  --ink: #06152f;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--blue);
}

body {
  min-width: 280px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(21, 70, 130, 0.38), transparent 30rem),
    var(--blue);
  color: var(--paper);
  font-family: "Manrope", sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.topbar {
  position: relative;
  z-index: 3;
  display: grid;
  width: min(100%, 100rem);
  min-height: 4.75rem;
  margin: 0 auto;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(1.25rem, 4vw, 4.5rem);
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.75rem;
  color: var(--paper);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.brand__mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.82rem;
}

.topbar__meta,
.live-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.live-label {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 0.55rem;
  color: var(--paper);
}

.live-label span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 0.28rem rgba(255, 213, 34, 0.12);
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 100rem);
  min-height: calc(100svh - 4.75rem);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.48fr) minmax(23rem, 0.82fr);
}

.hero {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.75rem, 6vw, 6.5rem) clamp(1.25rem, 5vw, 5.5rem) clamp(2rem, 4vw, 4rem);
}

.hero__main {
  width: min(100%, 47rem);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.counter-number {
  display: block;
  margin: clamp(2rem, 5vh, 4rem) 0 0;
  color: var(--yellow);
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(8.5rem, 17vw, 15.5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.66;
}

.counter-number.is-updated {
  animation: number-hit 260ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.counter-label {
  margin: clamp(1.4rem, 3vh, 2.25rem) 0 clamp(2.25rem, 5vh, 3.75rem);
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 0.95;
  text-transform: uppercase;
}

.chant-button {
  display: grid;
  width: min(100%, 43rem);
  min-height: clamp(5.25rem, 10vh, 7rem);
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  border: 1px solid var(--yellow);
  border-radius: 0;
  padding: 0 clamp(1.4rem, 3vw, 2.3rem);
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
  transition:
    background-color 130ms ease,
    color 130ms ease,
    transform 90ms ease;
}

.chant-button > span:first-child {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4.35rem);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 0.9;
  text-transform: uppercase;
  white-space: nowrap;
}

.chant-button__count {
  border-left: 1px solid rgba(6, 21, 47, 0.25);
  padding-left: clamp(1rem, 2vw, 1.75rem);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.chant-button:hover {
  background: var(--yellow-hover);
}

.chant-button:active,
.chant-button.is-hit {
  transform: translateY(0.25rem);
}

.chant-button:focus-visible,
.identity button:focus-visible,
.identity input:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 0.35rem;
}

.chant-button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.counter-status {
  min-height: 1.4em;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.supporter-copy {
  max-width: 34rem;
  margin: clamp(1.5rem, 3vh, 2.25rem) 0 0;
  color: #bdc9d9;
  font-size: clamp(0.8rem, 1vw, 0.92rem);
  line-height: 1.7;
}

.identity {
  width: min(100%, 47rem);
  margin-top: clamp(2.2rem, 5vh, 4rem);
  border-top: 1px solid var(--line-strong);
  padding-top: 1.2rem;
}

.identity__note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.55;
}

.identity__note strong {
  color: var(--paper);
  font-weight: 700;
}

.identity__fields {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(9rem, 1.25fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.identity label {
  display: grid;
  gap: 0.45rem;
}

.identity label span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.identity input {
  width: 100%;
  height: 2.9rem;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--paper);
  outline: none;
}

.identity input::placeholder {
  color: #637a9a;
}

.identity input:focus {
  border-color: var(--yellow);
}

.identity__save {
  height: 2.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 1.1rem;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity__save:hover {
  border-color: var(--paper);
}

.identity__feedback {
  display: flex;
  min-height: 1.6rem;
  margin-top: 0.65rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.identity__feedback p {
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
}

.identity__delete {
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.6rem;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.identity__delete:hover {
  color: var(--paper);
}

.ranking {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-left: 1px solid var(--line);
  padding: clamp(2.75rem, 5vw, 5rem) clamp(1.5rem, 3.5vw, 3.75rem) 2rem;
  background: rgba(4, 20, 46, 0.3);
}

.ranking__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1.5rem;
}

.ranking__header h2 {
  margin: 0.45rem 0 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.82;
  text-transform: uppercase;
}

.ranking__season,
.leader__header span,
.recent__header span {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leader {
  border-bottom: 1px solid var(--line-strong);
  padding: clamp(1.7rem, 4vh, 2.7rem) 0;
}

.leader__header,
.recent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.leader__header h3,
.recent__header h3 {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leader__header h3,
.leader__header span {
  color: var(--yellow);
}

.leader__content {
  display: grid;
  margin-top: clamp(1.5rem, 3vh, 2.4rem);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
}

.leader__identity {
  min-width: 0;
}

.leader__identity strong {
  display: block;
  overflow: hidden;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.9;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.leader__identity span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.leader__score {
  color: var(--yellow);
  text-align: right;
}

.leader__score strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(3.3rem, 6vw, 5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.7;
}

.leader__score span {
  display: block;
  margin-top: 0.65rem;
  color: var(--yellow);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.leader__empty,
.ranking-empty {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.recent {
  padding-top: clamp(1.7rem, 4vh, 2.7rem);
}

.recent__header {
  margin-bottom: 0.5rem;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wall-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
  animation: row-entry 220ms ease-out both;
}

.wall-item__rank {
  color: #6f86a6;
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.wall-item__copy {
  min-width: 0;
}

.wall-item__identity,
.wall-item__meta {
  margin: 0;
}

.wall-item__identity {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-item__identity strong {
  font-weight: 750;
}

.wall-item__identity span {
  color: var(--muted);
}

.wall-item__meta {
  margin-top: 0.2rem;
  color: #7188a7;
  font-size: 0.56rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wall-item__score {
  color: var(--paper);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.ranking__footer {
  margin-top: auto;
  padding-top: 1.5rem;
  color: #7188a7;
  font-size: 0.56rem;
  line-height: 1.6;
}

.burst-layer {
  position: fixed;
  z-index: 5;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.burst {
  position: absolute;
  left: var(--burst-x);
  top: var(--burst-y);
  border: 1px solid var(--yellow);
  padding: 0.55rem 0.75rem 0.4rem;
  background: var(--blue);
  color: var(--yellow);
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.85;
  opacity: 0;
  text-transform: uppercase;
  transform: translate(-50%, -20%) rotate(var(--burst-angle));
  animation: burst 650ms ease-out forwards;
  white-space: nowrap;
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) rotate(var(--burst-angle));
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -4.5rem) rotate(var(--burst-angle));
  }
}

@keyframes number-hit {
  50% {
    transform: translateY(-0.08em);
  }
}

@keyframes row-entry {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 100.01rem) {
  .topbar,
  .layout {
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar__meta {
    display: none;
  }

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

  .hero {
    min-height: calc(100svh - 4.75rem);
    border-bottom: 1px solid var(--line);
  }

  .ranking {
    border-left: 0;
    background: rgba(4, 20, 46, 0.46);
  }

  .ranking__footer {
    margin-top: 2rem;
  }
}

@media (max-width: 600px) {
  .topbar {
    min-height: 4.1rem;
    padding-inline: 1rem;
  }

  .brand {
    font-size: 1.15rem;
  }

  .brand__mark {
    width: 1.75rem;
    height: 1.75rem;
  }

  .live-label {
    font-size: 0.56rem;
  }

  .hero {
    min-height: calc(100svh - 4.1rem);
    justify-content: flex-start;
    padding-top: clamp(3rem, 8vh, 5rem);
  }

  .counter-number {
    margin-top: clamp(2.5rem, 8vh, 4.5rem);
    font-size: clamp(8.5rem, 43vw, 11rem);
  }

  .counter-label {
    margin-bottom: clamp(2.2rem, 6vh, 3.5rem);
    font-size: clamp(1.65rem, 8vw, 2.15rem);
  }

  .chant-button {
    min-height: 5.6rem;
    grid-template-columns: 1fr;
  }

  .chant-button > span:first-child {
    font-size: clamp(2rem, 9vw, 2.35rem);
  }

  .chant-button__count {
    display: none;
  }

  .supporter-copy {
    font-size: 0.76rem;
  }

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

  .identity__save {
    grid-column: 1 / -1;
  }

  .identity__feedback {
    min-height: 2.2rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
  }

  .ranking {
    padding: 3rem 1.25rem 2rem;
  }

  .ranking__header h2 {
    font-size: 3.4rem;
  }

  .leader__identity strong {
    font-size: 2.7rem;
  }
}

@media (max-height: 720px) and (min-width: 981px) {
  .hero,
  .ranking {
    justify-content: flex-start;
    padding-top: 2.75rem;
  }

  .counter-number {
    margin-top: 2rem;
    font-size: 9rem;
  }

  .counter-label {
    margin: 1.25rem 0 1.75rem;
  }

  .chant-button {
    min-height: 4.75rem;
  }

  .chant-button > span:first-child {
    font-size: 2.7rem;
  }

  .supporter-copy {
    margin-top: 1.2rem;
  }

  .identity {
    margin-top: 1.6rem;
  }
}

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