:root {
  --ink: #101018;
  --muted: #5b5b66;
  --paper: #f6f7fb;
  --line: #e4e6ee;
  --blue: #2200ff;
  --black: #000;
  --white: #fff;
  --brand-ink: #f4f6fb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Outfit, "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

a {
  color: var(--blue);
}

img {
  max-width: 100%;
  height: auto;
}

.brand-intro {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 40px;
  background: var(--black);
  color: var(--brand-ink);
  text-align: center;
}

.brand-stage {
  position: relative;
  width: min(180px, 42vw);
  height: min(180px, 42vw);
  margin: 0 auto;
}

.brand-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.brand-deer {
  object-fit: contain;
  transform-origin: 50% 55%;
}

.brand-frame {
  opacity: 0;
}

.brand-wordmark {
  margin: 28px 0 0;
  color: inherit;
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.brand-wordmark .cdn,
.site-wordmark .cdn {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-tagline {
  margin: 18px 0 0;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-intro.is-ready .brand-deer {
  animation: brand-deer-spin 1.1s cubic-bezier(0.45, 0.05, 0.25, 1) forwards;
}

.brand-intro.is-swapping .brand-deer {
  animation: brand-deer-out 0.55s ease forwards;
}

.brand-intro.is-swapping .brand-frame {
  animation: brand-frame-in 0.55s ease forwards;
}

.brand-intro.is-done .brand-deer {
  opacity: 0;
  visibility: hidden;
  animation: none;
}

.brand-intro.is-done .brand-frame {
  opacity: 1;
  animation: none;
}

.brand-intro.is-skip .brand-deer {
  display: none;
}

.brand-intro.is-skip .brand-frame {
  opacity: 1;
}

@keyframes brand-deer-spin {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
  70% {
    transform: rotate(360deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: rotate(400deg) scale(0.92);
    opacity: 1;
  }
}

@keyframes brand-deer-out {
  0% {
    transform: rotate(400deg) scale(0.92);
    opacity: 1;
  }
  100% {
    transform: rotate(430deg) scale(0.4);
    opacity: 0;
  }
}

@keyframes brand-frame-in {
  0% {
    transform: scale(0.4) rotate(-20deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: 18px 24px;
  background: var(--black);
  color: var(--brand-ink);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.site-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.site-wordmark {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.site-leagues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.site-league {
  color: var(--brand-ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.site-league:hover,
.site-league.is-current {
  opacity: 1;
  color: var(--blue);
}

.league-picker {
  padding: 48px 24px 24px;
}

.league-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.league-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 16px;
  color: inherit;
  text-decoration: none;
  border-radius: 0;
  transition: transform 160ms ease, color 160ms ease;
}

.league-card img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}

.league-card span {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.league-card:hover {
  color: var(--blue);
  transform: translateY(-2px);
}

.league-page {
  padding: 0 24px 48px;
}

.league-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 40px 0 28px;
  text-align: center;
}

.league-hero-mark {
  width: min(160px, 42vw);
  height: auto;
  object-fit: contain;
}

.league-hero-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.section-title {
  grid-column: 1 / -1;
  margin: 40px 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  padding: 28px 18px 22px;
  background: var(--white);
  border: 1px solid var(--line);
}

.team-logo {
  width: min(180px, 100%);
  height: 180px;
  object-fit: contain;
  margin-bottom: 16px;
}

.team-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.team-years {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.swatch {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.swatch::after {
  content: attr(data-hex);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--black);
  color: var(--brand-ink);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 2;
}

.swatch::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 2;
}

.swatch:hover::after,
.swatch:hover::before,
.swatch:focus-visible::after,
.swatch:focus-visible::before {
  opacity: 1;
}

.history {
  width: 100%;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.history summary {
  cursor: pointer;
  list-style: none;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.history summary::-webkit-details-marker {
  display: none;
}

.history-empty {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.history-list {
  display: grid;
  gap: 28px;
  margin-top: 20px;
  padding-top: 8px;
}

.history-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.history-item img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.known-as {
  display: block;
  margin-top: 4px;
  font-style: italic;
  font-weight: 500;
}

.missing {
  max-width: 1100px;
  margin: 48px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.missing-copy {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 42rem;
}

.missing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.missing-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.missing-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

.missing-item strong,
.missing-item span {
  display: block;
}

.missing-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 28px 24px 40px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer a {
  color: inherit;
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-logo {
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-intro.is-ready .brand-deer,
  .brand-intro.is-swapping .brand-deer,
  .brand-intro.is-swapping .brand-frame,
  .league-card {
    animation: none;
    transition: none;
  }

  .brand-intro .brand-deer {
    display: none;
  }

  .brand-intro .brand-frame {
    opacity: 1;
  }
}
