/* Shared by the offer page and the reward page. */

@font-face {
  font-family: "Mozilla Headline";
  src: url("/fonts/mozilla-headline.woff2") format("woff2");
  font-weight: 200 700;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mozilla Text";
  src: url("/fonts/mozilla-text-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mozilla Text";
  src: url("/fonts/mozilla-text-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mozilla Text";
  src: url("/fonts/mozilla-text-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1c0b3b;
  --gold-0: #ffd567;
  --gold-1: #ffa436;
  --card-0: #3d1a7a;
  --card-1: #24104b;
  --lilac: #e2d8f5;
  --gold-text: #ffd567;
  --line: rgba(255, 255, 255, 0.12);
  --dash: rgba(255, 255, 255, 0.45);
  --feature-line: #9ca3af;
}

body {
  margin: 0;
  background: var(--ink);
  color: #fff;
  font-family: "Mozilla Text", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

.site-header {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 40px;
}

.site-header img {
  height: 30px;
  width: auto;
}

.test-badge {
  margin-left: 12px;
  padding: 2px 8px;
  border: 1px solid var(--gold-0);
  border-radius: 6px;
  color: var(--gold-0);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.firefox-bar:not([hidden]) {
  display: flex;
}

.firefox-bar {
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 56px;
  padding: 8px 24px;
  background: linear-gradient(to bottom, var(--gold-0), var(--gold-1));
}

.firefox-bar button {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font:
    600 14px / 1.3 "Mozilla Text",
    sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow-x: clip;
  min-height: 520px;
  padding: 48px 24px 80px;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-art {
  position: absolute;
  width: 138%;
  height: 183%;
  left: -30%;
  top: -47%;
  max-width: none;
  object-fit: cover;
  opacity: 0.71;
  pointer-events: none;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(28, 11, 59, 0.2),
    rgba(28, 11, 59, 0.05) 35%,
    var(--ink)
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 0 20px;
}

.hero-logos .wot {
  height: 64px;
  width: auto;
}

.hero-logos .firefox {
  height: 44px;
  width: auto;
}

.hero-times {
  font-size: 22px;
}

.hero h1 {
  margin: 0;
  font-family: "Mozilla Headline", sans-serif;
  font-weight: 600;
  font-stretch: 75%;
  font-size: 60px;
  line-height: 63px;
  letter-spacing: -1.2px;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.hero-lead .line {
  display: block;
}

.hero h1 .line {
  display: block;
}

.hero-lead {
  max-width: 720px;
  margin: 18px auto 0;
  font-weight: 700;
  font-size: 18px;
  line-height: 27px;
}

.action {
  position: relative;
  margin-top: 28px;
}

/* Stays full size beside the button; a narrower window cuts the tail instead. */
.running-fox {
  position: absolute;
  top: -114px;
  left: calc(50% - 108px);
  width: 837px;
  height: 520px;
  max-width: none;
  pointer-events: none;
}

.action > :not(.running-fox) {
  position: relative;
  z-index: 1;
}

.download:not([hidden]) {
  display: inline-flex;
}

.download {
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 28px;
  background: linear-gradient(to bottom, var(--gold-0), var(--gold-1));
  box-shadow: 0 6px 12px rgba(255, 164, 54, 0.25);
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
}

.system-line {
  margin: 14px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

.text-button,
.systems a {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#other-systems::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.15s ease;
}

#other-systems[aria-expanded="true"]::after {
  transform: translateY(0) rotate(-135deg);
}

.systems:not([hidden]) {
  display: flex;
}

.systems {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

.note,
[data-state] {
  max-width: 640px;
  margin: 16px auto 0;
  font-size: 16px;
  line-height: 1.45;
}

/* Sits over the hero art, so it carries its own backdrop to stay readable. */
.callout {
  padding: 16px 20px;
  border: 1px solid var(--gold-0);
  border-radius: 16px;
  background: rgba(28, 11, 59, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.reward {
  padding: 8px 24px 24px;
}

.reward-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--card-0), var(--card-1));
}

.placeholder {
  display: grid;
  place-items: center;
  min-height: 232px;
  padding: 16px;
  border: 1px dashed var(--dash);
  border-radius: 14px;
  background: radial-gradient(
    circle at 80% 100%,
    rgba(140, 70, 230, 0.55),
    transparent 70%
  );
  color: rgba(255, 255, 255, 0.75);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.kicker {
  margin: 0;
  color: var(--gold-text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reward-card h2,
.features h2,
.features h3 {
  font-family: "Mozilla Headline", sans-serif;
  font-stretch: 75%;
  letter-spacing: -0.4px;
}

.reward-card h2 {
  margin: 8px 0 12px;
  font-size: 40px;
  font-weight: 700;
  line-height: 42px;
}

.reward-body {
  margin: 0;
  color: var(--lilac);
  font-size: 16px;
  line-height: 1.55;
}

.reward-hero {
  min-height: 0;
  padding: 56px 24px 40px;
}

.code-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--card-0), var(--card-1));
  text-align: center;
}

.code-card .kicker {
  margin-bottom: 16px;
}

.pending {
  margin: 0;
  color: var(--lilac);
}

.code:not([hidden]) {
  display: flex;
}

.code {
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 24px;
  border: 1px dashed var(--dash);
  border-radius: 16px;
  background: rgba(28, 11, 59, 0.6);
}

.game-code {
  flex: 1;
  min-width: 0;
  color: var(--gold-text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  overflow-wrap: anywhere;
  user-select: all;
}

.copy-button,
.retry-button {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(to bottom, var(--gold-0), var(--gold-1));
  color: var(--ink);
  font:
    600 16px / 1 "Mozilla Text",
    sans-serif;
  cursor: pointer;
}

.retry-button {
  margin-left: 8px;
}

.copied {
  margin: 12px 0 0;
  color: var(--lilac);
  font-size: 14px;
}

.code-card [data-state] {
  margin-top: 0;
}

.code-card .cf-turnstile {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.retry {
  margin: 16px 0 0;
}

.features {
  padding: 72px 24px 24px;
  background: radial-gradient(
    circle at 62% 100%,
    rgba(140, 70, 230, 0.35),
    transparent 42%
  );
  text-align: center;
}

.features h2 {
  margin: 0 0 36px;
  font-size: 40px;
  font-weight: 700;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}

.feature-shot {
  min-height: 200px;
  border: 1px solid var(--feature-line);
  border-radius: 12px;
  border-style: solid;
}

.features h3 {
  margin: 16px 0 8px;
  font-size: 24px;
  font-weight: 600;
}

.features-list p {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
}

.fox {
  display: block;
  width: min(260px, 70vw);
  height: auto;
  margin: 48px auto 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 1184px;
  margin: 48px auto 0;
  padding: 16px 48px 40px;
  border-top: 1px solid #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1.4;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
}

.footer-links a + a::before {
  content: " · ";
}

.trademark {
  margin: 0;
  text-align: right;
}

@media (max-width: 760px) {
  .site-header {
    padding: 0 20px;
  }

  .hero {
    min-height: 0;
    padding: 32px 20px 48px;
  }

  .hero-logos {
    flex-wrap: wrap;
  }

  .hero-logos .wot {
    height: 48px;
  }

  .hero h1 {
    font-size: 34px;
    line-height: 38px;
  }

  .hero-lead {
    font-size: 16px;
    line-height: 24px;
  }

  .download {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
  }

  /* The list of systems shares the fox's row, so opening it does not push the fox down. */
  .action:not([hidden]) {
    display: grid;
    grid-template-columns: 100%;
  }

  .download {
    grid-row: 1;
  }

  .system-line {
    grid-row: 2;
  }

  .note,
  [data-state] {
    grid-row: 3;
  }

  .systems,
  .running-fox {
    grid-row: 4;
    grid-column: 1;
    align-self: start;
  }

  /* Centres the running body (the artwork's first 250px), drops its empty top, and the tail below the feet. */
  .running-fox {
    position: static;
    display: block;
    margin: -190px 0 -200px calc(50% - 125px);
  }

  .reward {
    position: relative;
    z-index: 2;
  }

  .reward {
    padding-right: 20px;
    padding-left: 20px;
  }

  .reward-card,
  .features-list,
  .site-footer {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  .reward-card h2,
  .features h2 {
    font-size: 32px;
    line-height: 1.15;
  }

  .site-footer {
    margin-top: 32px;
    padding: 16px 20px 32px;
  }

  .reward-hero {
    padding: 32px 20px 24px;
  }

  .code-card {
    padding: 24px 20px;
  }

  .code {
    flex-direction: column;
    padding: 16px;
  }

  .game-code {
    font-size: 22px;
    text-align: center;
  }

  .copy-button {
    width: 100%;
  }

  .retry-button {
    display: block;
    margin: 12px auto 0;
  }

  .trademark {
    text-align: left;
  }
}
