:root {
  --bg-0: #09090c;
  --bg-1: #121218;
  --bg-2: #1b1b24;
  --bg-3: #262632;
  --panel: rgba(24, 24, 32, 0.86);
  --ink: #f4f1ea;
  --muted: #9b9ba8;
  --line: rgba(255, 255, 255, 0.08);
  --orange: #ff7a18;
  --orange-2: #ffb347;
  --tri: #13c4a3;
  --cir: #e53935;
  --crs: #1e88e5;
  --sqr: #ec407a;
  --plat: #e8e6e1;
  --gold: #d4a017;
  --silver: #b8c0cc;
  --bronze: #c67b3c;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font-display: "Audiowide", system-ui, sans-serif;
  --font-body: "Rajdhani", "Segoe UI", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
  --radius: 14px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg-0);
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(19, 196, 163, 0.12), transparent 55%),
    radial-gradient(700px 420px at 110% 0%, rgba(236, 64, 122, 0.12), transparent 50%),
    radial-gradient(800px 500px at 50% 120%, rgba(30, 136, 229, 0.1), transparent 55%),
    repeating-linear-gradient(
      90deg,
      transparent 0 47px,
      rgba(255, 255, 255, 0.015) 47px 48px
    ),
    linear-gradient(180deg, #101018 0%, #09090c 40%, #0c0c12 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0 1px,
    transparent 1px 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.35;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

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

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.6rem 1rem;
  background: var(--orange);
  color: #111;
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

/* Boot */
.boot {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: #050506;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__inner {
  text-align: center;
  display: grid;
  gap: 1.25rem;
  justify-items: center;
}

.boot__shapes {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.boot__shapes span {
  width: 28px;
  height: 28px;
  display: block;
  animation: pulse 1.2s ease-in-out infinite;
}

.boot__shapes span:nth-child(1) {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background: var(--tri);
}

.boot__shapes span:nth-child(2) {
  border-radius: 50%;
  border: 4px solid var(--cir);
  animation-delay: 0.12s;
}

.boot__shapes span:nth-child(3) {
  background: transparent;
  position: relative;
  animation-delay: 0.24s;
}

.boot__shapes span:nth-child(3)::before,
.boot__shapes span:nth-child(3)::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 2px;
  width: 4px;
  height: 24px;
  background: var(--crs);
}

.boot__shapes span:nth-child(3)::before {
  transform: rotate(35deg);
}

.boot__shapes span:nth-child(3)::after {
  transform: rotate(-35deg);
}

.boot__shapes span:nth-child(4) {
  border: 4px solid var(--sqr);
  animation-delay: 0.36s;
}

.boot__kicker,
.boot__skip {
  font-family: var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.78rem;
}

.boot__bar {
  width: min(280px, 70vw);
  height: 8px;
  background: #222;
  border: 1px solid #444;
  overflow: hidden;
}

.boot__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--tri), var(--orange), var(--sqr));
  animation: load 1.6s ease forwards;
}

.boot__skip {
  background: none;
  border: 0;
  color: var(--orange);
  cursor: pointer;
}

@keyframes load {
  to {
    width: 100%;
  }
}

@keyframes pulse {
  50% {
    transform: translateY(-4px);
    filter: brightness(1.3);
  }
}

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

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 28px;
}

.brand__mark i {
  width: 12px;
  height: 12px;
  display: block;
}

.brand__mark i:nth-child(1) {
  clip-path: polygon(50% 8%, 8% 92%, 92% 92%);
  background: var(--tri);
}

.brand__mark i:nth-child(2) {
  border-radius: 50%;
  border: 2px solid var(--cir);
}

.brand__mark i:nth-child(3) {
  border: 2px solid var(--sqr);
}

.brand__mark i:nth-child(4) {
  background:
    linear-gradient(35deg, transparent 42%, var(--crs) 42% 58%, transparent 58%),
    linear-gradient(-35deg, transparent 42%, var(--crs) 42% 58%, transparent 58%);
}

.brand strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.brand__copy {
  display: flex;
  flex-direction: column;
}

.brand__copy small {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.18em;
}

.nav {
  display: flex;
  gap: 0.35rem;
}

.nav a {
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  border-color: var(--orange);
  background: rgba(255, 122, 24, 0.08);
}

.nav a b {
  margin-right: 0.35rem;
  font-weight: 700;
}

.nav a:nth-child(1) b { color: var(--tri); }
.nav a:nth-child(2) b { color: var(--cir); }
.nav a:nth-child(3) b { color: var(--crs); }
.nav a:nth-child(4) b { color: var(--sqr); }
.nav a:nth-child(5) b { color: var(--orange); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: auto;
  position: relative;
}

.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 2.5rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.kicker {
  font-family: var(--font-mono);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--orange);
  font-size: 0.75rem;
  margin: 0 0 0.8rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin: 0 0 0.6rem;
  line-height: 0.95;
}

.quote {
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 36ch;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: 1px solid var(--orange);
  color: #111;
  background: var(--orange);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 0.75rem 1.1rem;
  min-height: 44px;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(1.08);
}

.level-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
}

.level-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--tri), var(--crs), var(--sqr), var(--cir));
}

.level-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.level-ring {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--orange) 0 95.28%, #2a2a33 95.28% 100%);
  position: relative;
}

.level-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #15151c;
}

.level-ring > div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.level-ring strong,
.level-ring small {
  position: relative;
  z-index: 1;
}

.level-ring strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  display: block;
  line-height: 1;
}

.level-ring small {
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.12em;
}

.level-copy p {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.level-copy h2 {
  margin: 0;
  font-size: 1.05rem;
}

.trophy-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.trophy-pill {
  background: #101016;
  border: 1px solid var(--line);
  padding: 0.65rem 0.4rem;
  text-align: center;
}

.trophy-pill b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.trophy-pill span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.trophy-pill--plat b { color: var(--plat); }
.trophy-pill--gold b { color: var(--gold); }
.trophy-pill--silver b { color: var(--silver); }
.trophy-pill--bronze b { color: var(--bronze); }

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 3.2rem 0;
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section__head p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 48ch;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem;
}

.stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.45rem;
  color: var(--orange-2);
}

.stat span {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.network-grid,
.cabinet-grid,
.game-grid,
.video-grid {
  display: grid;
  gap: 1rem;
}

.network-grid {
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
}

.card--psn {
  background:
    linear-gradient(165deg, rgba(19, 196, 163, 0.12), transparent 40%),
    var(--panel);
}

.card__label {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
}

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

.card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.avatar {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.card footer {
  margin-top: auto;
}

.rarity {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.rarity-bar {
  display: grid;
  gap: 0.55rem;
}

.rarity-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.9rem;
}

.rarity-row i {
  height: 8px;
  background: #222;
  display: block;
  position: relative;
  overflow: hidden;
}

.rarity-row i b {
  display: block;
  height: 100%;
}

.rarity-row--ultra i b { width: 18%; background: #f3e5ab; }
.rarity-row--very i b { width: 31%; background: #c9a227; }
.rarity-row--rare i b { width: 56%; background: #5c9ead; }
.rarity-row--uncommon i b { width: 95%; background: #3d8bfd; }
.rarity-row--common i b { width: 56%; background: #7a7a86; }

.cabinet-grid {
  grid-template-columns: repeat(5, 1fr);
}

.trophy-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0.95rem;
  min-height: 160px;
}

.trophy-card small {
  display: block;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  font-size: 0.68rem;
  margin-bottom: 0.5rem;
}

.trophy-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.trophy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.filter.is-on,
.filter:hover,
.filter:focus-visible {
  color: #111;
  background: var(--orange);
  border-color: var(--orange);
}

.game-grid {
  grid-template-columns: repeat(3, 1fr);
}

.game {
  display: grid;
  grid-template-columns: 10px 1fr;
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 132px;
}

.game__spine {
  background: var(--tri);
}

.game:nth-child(4n + 2) .game__spine { background: var(--cir); }
.game:nth-child(4n + 3) .game__spine { background: var(--crs); }
.game:nth-child(4n) .game__spine { background: var(--sqr); }

.game__body {
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.game__body h3 {
  margin: 0;
  font-size: 1rem;
}

.game__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin-top: auto;
}

.badge {
  align-self: start;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.4rem;
  border: 1px solid var(--line);
  color: var(--ink);
}

.badge--complete { color: var(--tri); border-color: rgba(19, 196, 163, 0.4); }
.badge--platinum { color: var(--plat); border-color: rgba(232, 230, 225, 0.4); }
.badge--hunting { color: var(--orange); border-color: rgba(255, 122, 24, 0.4); }

.recent {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(255, 122, 24, 0.4);
  background: rgba(255, 122, 24, 0.06);
}

.recent strong {
  font-family: var(--font-display);
}

.video-grid {
  grid-template-columns: repeat(2, 1fr);
}

.video {
  background: var(--panel);
  border: 1px solid var(--line);
}

.video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

.video figcaption {
  padding: 0.8rem 1rem 1rem;
}

.video h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

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

.empty-tape {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  padding: 2rem 1.2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.empty-tape code {
  font-family: var(--font-mono);
  color: var(--orange-2);
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

code {
  font-family: var(--font-mono);
  color: var(--orange-2);
}

@media (max-width: 960px) {
  .hero__grid,
  .network-grid,
  .rarity,
  .cabinet-grid,
  .game-grid,
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cabinet-grid,
  .video-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .menu-btn {
    display: grid;
    place-items: center;
  }

  .nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 64px;
    flex-direction: column;
    background: #121218;
    border: 1px solid var(--line);
    min-width: 200px;
    padding: 0.5rem;
  }

  .nav.is-open {
    display: flex;
  }

  .hero__grid,
  .network-grid,
  .rarity,
  .cabinet-grid,
  .game-grid,
  .stat-grid,
  .trophy-row,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2rem;
  }

  .section__head {
    flex-direction: column;
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boot,
  .boot__bar i,
  .boot__shapes span {
    animation: none !important;
    transition: none !important;
  }
}
