:root {
  --night: #0d0b1e;
  --night-lift: #1d1842;
  --panel: #161330;
  --panel-hi: #221d47;
  --line: #2c2756;
  --text: #f3f0fc;
  --soft: #c9c3e6;
  --muted: #8f88b8;
  --gold: #ffc94a;
  /* Beat It Froggy's own green, used only in its showcase */
  --mint: #63f2a2;
  --font: "Archivo", system-ui, sans-serif;
  --max: 72rem;
  --gutter: clamp(1rem, 5vw, 4rem);
  /* Cut corners echo the diagonals of the logo */
  --chamfer: polygon(16% 0, 100% 0, 100% 84%, 84% 100%, 0 100%, 0 16%);
}

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

html {
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.25em;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

h1,
h2,
h3 {
  font-stretch: 125%;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--gutter);
  border-bottom: 1px solid transparent;
  transition: transform 0.35s ease, padding 0.35s ease, background-color 0.35s ease, border-color 0.35s ease;
}

.site-header.is-floating {
  padding-block: 0.9rem;
  background-color: rgb(13 11 30 / 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(12px);
}

.site-header.is-hidden:not(:focus-within) {
  transform: translateY(-100%);
}

.home-link svg {
  display: block;
  width: 30px;
  fill: var(--text);
}

.site-header nav {
  display: flex;
  gap: 2rem;
}

.site-header nav a {
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--text);
}

/* Hero: the box floats like a loot drop over a floor of little boxes, and binks when clicked */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6rem var(--gutter) 4rem;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 50% 45%, var(--night-lift), transparent 75%);
}

.boxes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: arrive 1s ease both;
}

.hero-inner {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
}

.mark-button {
  display: grid;
  justify-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.mark-float {
  display: block;
  animation: bob 4.5s ease-in-out 1.6s infinite;
}

.mark {
  display: block;
  width: clamp(170px, 26vw, 280px);
  fill: var(--text);
  overflow: visible;
  filter: drop-shadow(0 0 2.5rem rgb(255 201 74 / 0.28));
  animation: flare 1.4s ease-out 1.1s both;
}

.mark-shadow {
  width: 70%;
  height: 20px;
  margin-top: 1.75rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 201 74 / 0.35), transparent);
  animation: shadow 4.5s ease-in-out 1.6s infinite;
}

.half-a {
  animation: close-a 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.half-b {
  animation: close-b 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.binked .half-a {
  animation: pop-a 0.5s ease-out;
}

.binked .half-b {
  animation: pop-b 0.5s ease-out;
}

@keyframes close-a {
  from { transform: translate(-60px, -40px); opacity: 0; }
}

@keyframes close-b {
  from { transform: translate(60px, 40px); opacity: 0; }
}

@keyframes pop-a {
  30% { transform: translate(-34px, -22px); }
}

@keyframes pop-b {
  30% { transform: translate(34px, 22px); }
}

@keyframes flare {
  from { filter: drop-shadow(0 0 0 rgb(255 201 74 / 0)); }
  25% { filter: drop-shadow(0 0 4rem rgb(255 201 74 / 0.7)); }
}

@keyframes bob {
  50% { transform: translateY(-14px); }
}

@keyframes shadow {
  50% { transform: scaleX(0.8); opacity: 0.55; }
}

@keyframes arrive {
  from { opacity: 0; }
}

.hero h1 {
  margin: 1.5rem 0 0;
}

.wordmark {
  width: clamp(240px, 36vw, 440px);
}

.tagline {
  margin: 1rem 0 0;
  font-stretch: 110%;
  font-weight: 500;
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: var(--muted);
  text-wrap: balance;
}

.hero h1,
.tagline {
  animation: arrive 0.9s ease 1.2s both;
}

/* Studio */

.studio {
  max-width: var(--max);
  margin: 0 auto;
  padding: 7rem var(--gutter);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem 5rem;
  align-items: end;
}

.studio h2 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: 0.95;
  text-wrap: balance;
}

.studio p {
  margin: 0;
  font-size: 1.1875rem;
  color: var(--soft);
  text-wrap: pretty;
}

.studio .now {
  margin-top: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.pulse {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  color: var(--gold);
  background: currentColor;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); }
  70%, to { box-shadow: 0 0 0 0.5rem transparent; }
}

/* Games */

.games {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem var(--gutter) 6rem;
}

.feature {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse 80% 55% at 50% 100%, rgb(99 242 162 / 0.1), transparent 70%),
    var(--panel);
  clip-path: polygon(2.5rem 0, 100% 0, 100% calc(100% - 2.5rem), calc(100% - 2.5rem) 100%, 0 100%, 0 2.5rem);
}

.feature-media {
  clip-path: polygon(1.25rem 0, 100% 0, 100% calc(100% - 1.25rem), calc(100% - 1.25rem) 100%, 0 100%, 0 1.25rem);
}

.feature-media img {
  width: 100%;
}

/* Tilts toward the pointer with a shine, like a game cartridge in your hand */
.tilt {
  position: relative;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--lift, 1));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgb(255 255 255 / 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.tilt.is-tilting {
  --lift: 1.04;
  transition-duration: 0.1s;
}

.tilt.is-tilting::after {
  opacity: 1;
}

.feature-info .kicker {
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--mint);
}

.feature h3 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1;
}

.feature-info p {
  margin: 0;
  color: var(--soft);
  text-wrap: pretty;
}

.facts {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--soft);
}

.facts li {
  position: relative;
  padding-left: 1.25rem;
}

/* Arrow bullets, like the notes in the game */
.facts li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 0.5rem;
  height: 0.55rem;
  background: var(--mint);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.feature-info .status {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.status .pulse {
  color: var(--mint);
}

.cast {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-around;
  align-items: end;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.frog {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--soft);
  font: inherit;
  font-stretch: 110%;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
}

.frog img {
  width: auto;
  max-width: none;
  height: calc(var(--h) * clamp(56px, 12vw, 150px));
  transition: translate 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.frog:hover img {
  translate: 0 -10px;
}

.frog:hover {
  color: var(--text);
}

.frog.hop img {
  animation: hop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes hop {
  40% { transform: translateY(-24px) scale(1.05); }
}

/* Team: a character select screen */

.team {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem var(--gutter) 8rem;
}

.games h2,
.team h2 {
  margin: 0 0 2.25rem;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1;
}

.picks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.5vw, 1rem);
  max-width: 40rem;
}

.pick {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-stretch: 112%;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
}

.pick-frame {
  display: grid;
  place-items: end center;
  aspect-ratio: 1;
  background: var(--panel);
  clip-path: var(--chamfer);
  transition: background-color 0.2s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pick-frame svg {
  width: 92%;
}

.pick:hover .pick-frame {
  background-color: var(--panel-hi);
}

.pick:hover,
.pick[aria-selected="true"] {
  color: var(--text);
}

.pick[aria-selected="true"] .pick-frame {
  background: radial-gradient(circle at 50% 100%, rgb(255 201 74 / 0.32), var(--panel-hi) 70%);
}

.pick[aria-selected="true"]::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  translate: -50% 0;
  border: 7px solid transparent;
  border-top-color: var(--gold);
  border-bottom: 0;
  animation: nudge 0.8s ease-in-out infinite alternate;
}

@keyframes nudge {
  to { transform: translateY(4px); }
}

.stage {
  display: grid;
  grid-template-columns: minmax(14rem, 19rem) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin-top: 2.5rem;
}

.stage[hidden] {
  display: none;
}

.stage-frame {
  margin: 0;
  display: grid;
  place-items: end center;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(ellipse 70% 45% at 50% 92%, rgb(255 201 74 / 0.22), transparent 70%),
    var(--panel);
  clip-path: var(--chamfer);
}

.stage-frame svg {
  width: 92%;
  margin-bottom: 4%;
  animation: drop-in 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both, idle 3s ease-in-out 0.5s infinite;
}

@keyframes drop-in {
  from { transform: translateY(-24px); opacity: 0; }
}

@keyframes idle {
  50% { transform: translateY(-4px); }
}

.stage .class {
  margin: 0;
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gold);
}

.stage h3 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
}

.bio {
  margin: 0;
  max-width: 34em;
  font-size: 1.125rem;
  color: var(--soft);
  text-wrap: pretty;
}

.stats {
  display: grid;
  gap: 0.75rem;
  max-width: 30rem;
  margin: 2rem 0 0;
}

.stats div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  align-items: center;
  gap: 1rem;
}

.stats dt {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--soft);
}

.stats dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* Room for a stat that goes past 10 */
  padding-right: 2.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.value {
  width: 1.5rem;
  text-align: right;
}

.bar {
  position: relative;
  flex: 1;
  height: 0.75rem;
  background: repeating-linear-gradient(90deg, var(--line) 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
}

.bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 10%);
  background: linear-gradient(90deg, var(--gold) calc(100% - 3px), transparent 0) 0 0 / calc(100% / var(--v)) 100%;
  transform-origin: left;
  animation: fill 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

@keyframes fill {
  from { transform: scaleX(0); }
}

.special {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 2rem 0 0;
  padding: 0.6rem 1.1rem;
  background: var(--panel);
  clip-path: polygon(0.6rem 0, 100% 0, 100% calc(100% - 0.6rem), calc(100% - 0.6rem) 100%, 0 100%, 0 0.6rem);
  color: var(--muted);
  font-size: 0.9375rem;
}

.special strong {
  color: var(--gold);
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding: 2.5rem var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0 auto 0 0;
}

/* Stick figures */

.figure {
  fill: none;
  stroke: var(--text);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.sf-thin { stroke-width: 3.5; }
.sf-dot { fill: var(--text); stroke: none; }
.sf-ground { stroke: var(--line); stroke-width: 3; }
.sf-stick { stroke: var(--muted); stroke-width: 3.5; }
.sf-prop { stroke: var(--gold); }
.sf-tip { stroke-width: 8; }
.sf-fill { fill: var(--gold); stroke: none; }
.sf-drop { fill: var(--muted); stroke: none; }

@media (max-width: 48rem) {
  .studio,
  .feature,
  .stage {
    grid-template-columns: 1fr;
  }

  .stage-frame {
    width: min(18rem, 80%);
  }

  .stats div {
    grid-template-columns: 7.5rem 1fr;
  }

  .cast {
    flex-wrap: wrap;
    row-gap: 1.75rem;
  }

  .cast li {
    flex: 0 0 30%;
    display: grid;
    justify-items: center;
  }

  .frog {
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header {
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
