:root {
  --bg: #07060b;
  --bg-soft: #0e0b16;
  --panel: rgba(20, 16, 31, 0.72);
  --panel-strong: rgba(28, 22, 43, 0.9);
  --text: #f6f2ff;
  --muted: #b8aec8;
  --subtle: #7f758f;
  --purple: #9f4dff;
  --purple-2: #6e2dff;
  --violet: #c27cff;
  --line: rgba(194, 124, 255, 0.18);
  --shadow: 0 24px 80px rgba(96, 34, 184, 0.24);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 18%, rgba(159, 77, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 50% 76%, rgba(93, 45, 255, 0.16), transparent 38rem),
    linear-gradient(180deg, #000 0%, #050409 46%, #06040b 100%);
  min-height: 100vh;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

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

.site-shell {
  position: relative;
  overflow: hidden;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: 96px 20px;
  display: grid;
  place-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 34px;
  text-align: center;
}

.hero-content img {
  width: min(42vw, 390px);
  min-width: 220px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 70px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 42px rgba(159, 77, 255, 0.42));
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(4rem, 12vw, 10.5rem);
  line-height: 0.82;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 38px rgba(159, 77, 255, 0.28);
}

.hero-subtitle {
  margin: -18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(159, 77, 255, 0.22);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4.4vw, 4.3rem);
  line-height: 0.95;
  font-weight: 900;
}

h3 {
  font-size: 1.32rem;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.75;
}

.section {
  padding: 0 0 118px;
  position: relative;
}

.roster {
  overflow: hidden;
  padding-top: 76px;
}

.hero + .roster {
  margin-top: -14svh;
  padding-top: 20svh;
}

.roster .container {
  position: relative;
  z-index: 1;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 54px;
  text-align: center;
  margin-inline: auto;
}

.section-heading h2 {
  font-size: clamp(3.6rem, 8vw, 8rem);
  text-transform: uppercase;
  text-shadow: 0 0 34px rgba(159, 77, 255, 0.24);
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.player-card {
  position: relative;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  overflow: visible;
  cursor: pointer;
  transition: transform 240ms ease, filter 240ms ease;
}

.player-card:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 8px;
}

.player-card:hover {
  transform: translateY(-7px);
  filter: drop-shadow(0 18px 34px rgba(111, 45, 255, 0.22));
}

.player-visual {
  position: relative;
  z-index: 1;
  min-height: 300px;
  background: radial-gradient(circle at 50% 50%, rgba(194, 124, 255, 0.18), transparent 58%);
}

.player-photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(118%, 330px);
  height: 100%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: multiply;
  filter: saturate(1.14) contrast(1.12) drop-shadow(0 22px 34px rgba(0, 0, 0, 0.54));
}

.flag {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 8px;
  min-width: 36px;
  padding: 6px 7px;
  border: 1px solid rgba(194, 124, 255, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(7, 6, 11, 0.42);
  backdrop-filter: blur(10px);
  font-size: clamp(0.58rem, 0.72vw, 0.72rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.player-silhouette {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 68%;
  height: 82%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 21%, rgba(246, 242, 255, 0.92) 0 22%, transparent 23%),
    linear-gradient(to bottom, transparent 0 31%, rgba(246, 242, 255, 0.82) 32% 100%);
  clip-path: polygon(32% 30%, 68% 30%, 84% 58%, 78% 100%, 22% 100%, 16% 58%);
  opacity: 0.2;
}

.player-info {
  position: relative;
  z-index: 1;
  padding: 18px 8px 0;
  text-align: center;
  background: transparent;
}

.role {
  color: var(--violet);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.player-info h3 {
  margin-bottom: 6px;
  font-size: 1.48rem;
  font-weight: 900;
}

.player-info p:last-child {
  margin-bottom: 0;
  color: var(--subtle);
  font-size: 0.9rem;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.profile-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 2, 7, 0.78);
  backdrop-filter: blur(14px);
}

.profile-panel {
  position: relative;
  width: max-content;
  min-width: min(860px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(220px, 340px) max-content;
  gap: 30px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(14, 11, 22, 0.96), rgba(28, 22, 43, 0.94));
  box-shadow: var(--shadow);
  transform: translateY(16px) scale(0.98);
  transition: transform 220ms ease;
}

.profile-modal.is-open .profile-panel {
  transform: translateY(0) scale(1);
}

.profile-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(194, 124, 255, 0.25);
  border-radius: 50%;
  color: var(--text);
  background: rgba(7, 6, 11, 0.52);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.profile-art {
  min-height: 340px;
  display: grid;
  place-items: end center;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 50%, rgba(194, 124, 255, 0.2), transparent 62%);
  overflow: hidden;
}

.profile-art img {
  width: min(118%, 380px);
  max-height: 360px;
  object-fit: contain;
  object-position: center bottom;
  filter: saturate(1.14) contrast(1.12) drop-shadow(0 28px 38px rgba(0, 0, 0, 0.6));
}

.profile-empty {
  align-self: center;
  color: var(--subtle);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-details {
  min-width: max-content;
}

.profile-team,
.profile-role {
  color: var(--violet);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}

.profile-flag {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(194, 124, 255, 0.22);
  border-radius: 50%;
  background: rgba(7, 6, 11, 0.42);
  font-size: 1.12rem;
  line-height: 1;
}

.profile-details h2 {
  margin-bottom: 20px;
  font-size: clamp(2.8rem, 7vw, 6rem);
  text-shadow: 0 0 34px rgba(159, 77, 255, 0.24);
}

.profile-clan,
.profile-player-name {
  display: block;
  white-space: nowrap;
}

.profile-player-name {
  font-size: clamp(1.7rem, 5.2vw, 4.4rem);
  text-transform: none;
}

body.profile-open {
  overflow: hidden;
}

body.reveal-ready .section-reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

body.reveal-ready .section-reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

body.reveal-ready .section-reveal .section-heading {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(8px);
  transition: opacity 850ms ease, transform 850ms cubic-bezier(0.16, 1, 0.3, 1), filter 850ms ease;
}

body.reveal-ready .section-reveal.is-visible .section-heading {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

body.reveal-ready .section-reveal .player-card {
  opacity: 0;
  transform: translateY(64px);
  filter: blur(8px);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1), filter 900ms ease;
}

body.reveal-ready .section-reveal.is-visible .player-card {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

body.reveal-ready .section-reveal.is-visible .player-card:nth-child(2) {
  transition-delay: 90ms;
}

body.reveal-ready .section-reveal.is-visible .player-card:nth-child(3) {
  transition-delay: 180ms;
}

body.reveal-ready .section-reveal.is-visible .player-card:nth-child(4) {
  transition-delay: 270ms;
}

body.reveal-ready .section-reveal.is-visible .player-card:nth-child(5) {
  transition-delay: 360ms;
}

body.reveal-ready .section-reveal.is-visible .player-card:nth-child(6) {
  transition-delay: 450ms;
}

body.reveal-ready .section-reveal.is-visible .player-card:nth-child(7) {
  transition-delay: 540ms;
}

body.reveal-ready .section-reveal.is-visible .player-card:hover {
  transform: translateY(-7px);
  transition-delay: 0ms;
  filter: drop-shadow(0 18px 34px rgba(111, 45, 255, 0.22));
}

body.reveal-ready .intro-reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(10px);
  animation: introFade 1150ms cubic-bezier(0.16, 1, 0.3, 1) 160ms forwards;
}

@keyframes introFade {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

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

@media (max-width: 1040px) {
  .roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .hero {
    min-height: 100svh;
  }

  .hero-content img {
    width: min(62vw, 330px);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .hero {
    min-height: 100svh;
    padding: 72px 14px;
  }

  .hero-content {
    gap: 26px;
  }

  .hero-content img {
    width: min(74vw, 280px);
    min-width: 190px;
  }

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

  .section {
    padding: 74px 0;
  }

  .player-visual {
    min-height: 360px;
  }

  .player-photo {
    width: min(104%, 380px);
  }

  .profile-panel {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 54px 18px 22px;
  }

  .profile-details {
    min-width: 0;
  }

  .profile-art {
    min-height: 300px;
  }

  .profile-details h2 {
    font-size: clamp(2.4rem, 16vw, 4.6rem);
  }

  .profile-player-name {
    font-size: clamp(1.45rem, 10vw, 3.1rem);
  }
}
