@font-face {
  font-family: "Archivo Black";
  src: url("./fonts/archivo-black.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Plex Mono";
  src: url("./fonts/ibm-plex-mono-regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --purple: #b863fc;
  --raspberry: #e40243;
  --yellow: #f6e002;
  --arctic: #56f9ff;
  --green: #6be176;
  --blue: #0323f2;
  --orange: #eb7828;
  --pink: #fbb3b0;
  --red: #b70505;
  --black: #20201f;
  --white: #dbf0f0;
  --cream: var(--white);
  --line: rgba(219, 240, 240, .24);
  --screen: var(--white);
  --ink: var(--black);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--black); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(255,255,255,.04) 50%, transparent 50.1%),
    var(--black);
  font-family: "Plex Mono", monospace;
}

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

.advance-topbar {
  display: grid;
  grid-template-columns: 215px 1fr 238px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.advance-wordmark,
.archive-link {
  display: flex;
  align-items: center;
  padding: 0 26px;
}

.advance-wordmark {
  border-right: 1px solid var(--line);
  font-family: "Archivo Black", sans-serif;
  font-size: 25px;
  letter-spacing: -1.6px;
}

.advance-wordmark span:last-child,
.hero-copy h1 span,
.console-header strong span { color: var(--blue); }

.advance-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.advance-status i,
.console-header em i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.advance-status i {
  background: var(--raspberry);
}

.console-header em i {
  background: var(--red);
  box-shadow: 0 0 9px rgba(183, 5, 5, .8);
}

.archive-link {
  justify-content: space-between;
  border-left: 1px solid var(--line);
  background: var(--cream);
  color: var(--black);
  font-size: 10px;
  font-weight: 700;
}

.advance-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, .7fr) minmax(620px, 1.3fr);
  gap: 6vw;
  min-height: calc(100vh - 72px);
  padding: 7vw 7vw 6vw;
  overflow: hidden;
}

.advance-hero::before {
  content: "";
  position: absolute;
  inset: 32px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.hero-copy p {
  margin: 0 0 18px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.7px;
}

.hero-copy p::before { content: "●"; margin-right: 10px; color: var(--raspberry); }

.hero-copy h1 {
  margin: 0;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(48px, 6vw, 92px);
  line-height: .86;
  letter-spacing: -5px;
}

.hero-copy small {
  display: block;
  max-width: 390px;
  margin-top: 30px;
  color: rgba(219, 240, 240, .62);
  font-size: 10px;
  line-height: 1.7;
  text-transform: uppercase;
}

.console-library {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 42px 52px 34px;
  border: 1px solid #565656;
  border-radius: 36px 36px 104px 36px;
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .035), transparent 26%),
    #111;
  box-shadow: 0 36px 90px rgba(0, 0, 0, .65);
}

.console-library::before,
.console-library::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: inherit;
}

.console-library::before { inset: 9px; }
.console-library::after { inset: 18px; border-color: rgba(255, 255, 255, .07); }

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 15px;
}

.console-header strong {
  font-family: "Archivo Black", sans-serif;
  font-size: 16px;
}

.console-header em {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
}

.library-screen {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: solid #090909;
  border-width: 22px 34px 34px;
  border-radius: 16px 16px 55px 16px;
  background: var(--screen);
  box-shadow: 0 0 0 1px #464646;
  color: var(--ink);
}

.screen-lines {
  position: absolute;
  inset: 0;
  opacity: .12;
  background: repeating-linear-gradient(0deg, transparent 0 3px, var(--ink) 4px);
  pointer-events: none;
}

.screen-title {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.screen-title span,
.screen-help { font-size: 7px; font-weight: 700; }
.screen-title strong { font-size: 10px; }

.cartridge-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.cartridge {
  position: relative;
  display: grid;
  grid-template-rows: auto 125px 1fr auto;
  min-height: 360px;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: var(--white);
  transition: transform .16s ease, box-shadow .16s ease;
}

.cartridge:hover,
.cartridge:focus-visible {
  z-index: 2;
  outline: 0;
  transform: translateY(-5px);
  box-shadow: 7px 7px 0 var(--ink);
}

.cart-index {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 2px solid var(--ink);
  font-size: 7px;
  font-weight: 700;
}

.cart-index i { color: var(--raspberry); font-style: normal; }

.cart-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}

.battle-cart .cart-art { background: var(--blue); }
.expedition-cart .cart-art { background: var(--orange); }

.battle-mark,
.route-mark {
  position: relative;
  z-index: 2;
  font-family: "Archivo Black", sans-serif;
  font-size: 58px;
  color: var(--cream);
  text-shadow: 5px 5px 0 var(--ink);
}

.pixel-burst {
  position: absolute;
  width: 170px;
  height: 170px;
  border: 18px dotted rgba(219, 240, 240, .68);
  transform: rotate(20deg);
}

.route-lines {
  position: absolute;
  inset: 0;
}

.route-lines i {
  position: absolute;
  width: 140%;
  height: 3px;
  left: -20%;
  top: 50%;
  background: var(--ink);
}

.route-lines i:first-child { transform: rotate(28deg); }
.route-lines i:nth-child(2) { transform: rotate(-22deg); }
.route-lines i:last-child { transform: rotate(74deg); }

.cart-copy { padding: 13px 12px; }
.cart-copy p { margin: 0 0 7px; font-size: 6px; font-weight: 700; }
.cart-copy h2 {
  margin: 0 0 9px;
  font-family: "Archivo Black", sans-serif;
  font-size: 25px;
  line-height: .9;
  letter-spacing: -1px;
}
.cart-copy > span { font-size: 6px; line-height: 1.5; font-weight: 700; }

.load-label {
  padding: 9px 12px;
  border-top: 2px solid var(--ink);
  color: var(--cream);
  background: var(--ink);
  font-size: 7px;
}

.screen-help { position: relative; margin: 15px 0 0; }

.console-base {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  min-height: 92px;
  padding: 18px 12px 0;
  color: var(--white);
}

.dpad {
  position: relative;
  width: 78px;
  height: 78px;
}

.dpad::before,
.dpad::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(219, 240, 240, .72);
  background: var(--black);
  border-radius: 5px;
}

.dpad::before { inset: 25px 0; }
.dpad::after { inset: 0 25px; }
.dpad i { position: absolute; inset: 28px; z-index: 1; background: var(--black); }

.system-slots { align-self: end; text-align: center; font-size: 6px; font-weight: 700; }
.system-slots i {
  display: inline-block;
  width: 40px;
  height: 8px;
  margin: 0 5px 7px;
  border-radius: 7px;
  border: 1px solid rgba(219, 240, 240, .52);
  background: transparent;
  transform: rotate(-8deg);
}
.system-slots span { display: block; }

.ab-buttons { display: flex; justify-content: flex-end; gap: 12px; transform: rotate(-10deg); }
.ab-buttons i {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, .25);
  background: var(--blue);
  box-shadow: inset 0 -7px 0 rgba(0,0,0,.25), 0 5px 0 #050505;
  font-family: "Archivo Black", sans-serif;
  font-size: 24px;
  font-style: normal;
}

.ab-buttons i:last-child {
  margin-top: 24px;
  background: var(--red);
}

@media (max-width: 1000px) {
  .advance-hero { grid-template-columns: 1fr; padding: 70px 5vw; }
  .hero-copy { width: min(760px, 100%); margin: auto; }
  .console-library { width: min(760px, 100%); margin: auto; }
}

@media (max-width: 650px) {
  .advance-topbar { grid-template-columns: 145px 1fr; min-height: 60px; }
  .advance-wordmark { padding: 0 16px; font-size: 20px; }
  .advance-status { display: none; }
  .archive-link { padding: 0 14px; font-size: 8px; }
  .advance-hero { min-height: calc(100vh - 60px); padding: 44px 10px; }
  .advance-hero::before { inset: 14px 10px; }
  .hero-copy { padding: 0 12px; }
  .hero-copy h1 { font-size: 47px; letter-spacing: -3px; }
  .console-library { padding: 27px 14px 23px; border-radius: 24px 24px 64px 24px; }
  .library-screen { padding: 14px 10px; border-width: 17px 11px 24px; border-radius: 12px 12px 38px 12px; }
  .screen-title { display: block; }
  .screen-title strong { display: block; margin-top: 5px; }
  .cartridge-grid { grid-template-columns: 1fr; }
  .cartridge { grid-template-rows: auto 90px 1fr auto; min-height: 285px; }
  .console-base { min-height: 68px; }
  .dpad { width: 55px; height: 55px; transform: scale(.78); transform-origin: left center; }
  .ab-buttons { gap: 5px; }
  .ab-buttons i { width: 39px; height: 39px; font-size: 11px; }
  .system-slots { display: none; }
}
