/* Blitzmate / Ninja Lizard site styles.
   Colours follow the game's Theme.cs: navy ground, cyan for the player, magenta for the Rival,
   gold for "your move". Fonts are the game's own (Chakra Petch for display, Rubik for body),
   subset to Latin and self-hosted so the site makes no third-party requests. */

@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakrapetch-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #0b1026;
  --deep: #070b1e;
  --panel: #141a3f;
  --plate-top: #1b2456;
  --plate-bottom: #11173a;
  --plate-line: #2d3873;
  --well: #0c1230;
  --border: rgba(255, 255, 255, 0.08);

  --text: #ffffff;
  --body: #e6eaf7;
  --muted: #a3aad1;
  --dim: #8c93b8;

  --player: #22d3ee;
  --player-soft: #7fe7f5;
  --player-tint: rgba(34, 211, 238, 0.18);
  --rival: #f43f7a;
  --rival-soft: #fda4c0;
  --rival-back: #3a1040;
  --gold: #ffb020;
  --gold-ink: #1a1200;
  --gold-tint: rgba(255, 176, 32, 0.22);
  --action: #8b5cf6;
  --action-ink: #6d28d9;
  --action-label: #c3b0ff;
  --defense: #64748b;
  --defense-ink: #334155;
  --defense-label: #cbd5e1;

  --card-face: #f6f7fb;
  --card-ink: #1c2451;
  --card-rule: #4b5578;

  --display: "Chakra Petch", "Rubik", system-ui, sans-serif;
  --sans: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --chamfer: 12px;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ground);
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, rgba(244, 63, 122, 0.14), transparent 60%),
    radial-gradient(60rem 40rem at 0% 30%, rgba(34, 211, 238, 0.1), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 28px);
  color: var(--body);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
}

main {
  flex: 1;
}

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

a {
  color: var(--player-soft);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--text);
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.icon-sprite {
  display: none;
}

/* ---------- Buttons (the game's chamfered buttons) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 0;
  font: 700 0.95rem/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(
    var(--chamfer) 0,
    100% 0,
    100% calc(100% - var(--chamfer)),
    calc(100% - var(--chamfer)) 100%,
    0 100%,
    0 var(--chamfer)
  );
  transition: filter 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-gold {
  background: var(--gold);
  color: var(--gold-ink);
}
.btn-gold:hover {
  color: var(--gold-ink);
  filter: brightness(1.08);
}
.btn-edge {
  background: var(--plate-top);
  color: var(--text);
  box-shadow: inset 0 0 0 2px var(--plate-line);
}
.btn-edge:hover {
  color: var(--text);
  background: #232d66;
}
.btn-small {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.8rem;
  --chamfer: 9px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 30, 0.6);
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  color: var(--text);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--gold);
  color: var(--gold-ink);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.brand-mark svg {
  width: 17px;
  height: 20px;
  fill: currentColor;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font: 700 1.3rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand-by {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
}
.site-nav a:not(.btn) {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.site-nav a:not(.btn):hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .site-nav a:not(.btn) {
    display: none;
  }
}

/* ---------- Section scaffolding ---------- */

.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}
.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
}
.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
}
.section-head-sub {
  margin-top: clamp(3rem, 7vw, 4.5rem);
}
.section-head-sub h3 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
}
.eyebrow {
  margin: 0 0 0.75rem;
  font: 700 0.8rem/1 var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--player);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3.5rem, 9vw, 6.5rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}
.hero-copy {
  container-type: inline-size;
}
.hero-title {
  margin: 0;
  /* Sized to the column so the whole name fits on one line at every width. */
  font-size: clamp(2.5rem, 12vw, 5rem);
  font-size: clamp(2.5rem, 16.5cqi, 5.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  background: linear-gradient(180deg, #ffffff 30%, #a6ecfa 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-tag {
  margin: 0.6rem 0 1.4rem;
  font: 700 clamp(1.15rem, 2.6vw, 1.5rem)/1.2 var(--display);
  letter-spacing: 0.06em;
  color: var(--gold);
}
.lede {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--body);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.75rem 0 1.5rem;
}
.platforms {
  max-width: 34rem;
  color: var(--dim);
  font-size: 0.95rem;
}
.platforms strong {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
  }
}

/* The hero's table: the Rival's three lanes above yours. */

.table {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  padding: clamp(1rem, 3.5vw, 1.6rem);
  background: linear-gradient(180deg, var(--plate-top), var(--plate-bottom));
  box-shadow: inset 0 0 0 1px var(--plate-line), 0 30px 80px rgba(0, 0, 0, 0.5);
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}
.lane-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.6rem, 2.5vw, 1rem);
}
.lane-label {
  margin: 0 0 0.6rem;
  font: 700 0.7rem/1 var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.lane-label-rival {
  color: var(--rival-soft);
}
.lane-label-you {
  margin: 0.6rem 0 0;
  color: var(--player-soft);
}
.table-mid {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block: clamp(0.8rem, 3vw, 1.2rem);
  color: var(--dim);
  font: 700 0.75rem/1 var(--display);
  letter-spacing: 0.25em;
}
.table-mid::before,
.table-mid::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--plate-line), transparent);
}

/* ---------- Cards ---------- */

.card {
  --accent: var(--player);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  aspect-ratio: 5 / 7;
  width: 100%;
  padding: 9% 10% 10%;
  border-radius: 10px;
  background: var(--card-face);
  color: var(--card-ink);
  box-shadow: 0 0 0 2px var(--accent), 0 14px 30px rgba(0, 0, 0, 0.45);
}
.card-strength {
  min-height: 1em;
  font: 700 clamp(1rem, 2.6vw, 1.45rem)/1 var(--display);
}
.card-piece {
  width: 60%;
  height: 100%;
  max-height: 72px;
  justify-self: center;
  align-self: center;
  fill: currentColor;
}
.card-name {
  font: 700 clamp(0.55rem, 1.3vw, 0.72rem)/1.2 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--card-rule);
}
.card.is-selected {
  --accent: var(--gold);
  transform: translateY(-10px);
  box-shadow: 0 0 0 3px var(--gold), 0 0 28px rgba(255, 176, 32, 0.45), 0 18px 34px rgba(0, 0, 0, 0.5);
}
.card-back {
  --accent: var(--rival);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(253, 164, 192, 0.25), transparent 45%),
    repeating-linear-gradient(45deg, rgba(244, 63, 122, 0.22) 0 2px, transparent 2px 10px),
    repeating-linear-gradient(-45deg, rgba(244, 63, 122, 0.22) 0 2px, transparent 2px 10px),
    var(--rival-back);
}
.card-back::after {
  content: "";
  width: 38%;
  aspect-ratio: 1;
  background: var(--rival);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  opacity: 0.9;
}

@media (prefers-reduced-motion: no-preference) {
  .card.is-selected {
    animation: hover-card 3.2s ease-in-out infinite;
  }
  @keyframes hover-card {
    0%,
    100% {
      transform: translateY(-10px);
    }
    50% {
      transform: translateY(-15px);
    }
  }
}

/* ---------- The pieces ---------- */

.pieces {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.9rem, 2.4vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.piece {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.piece-reach {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted);
}
.piece-reach strong {
  display: block;
  margin-bottom: 0.15rem;
  font: 700 0.72rem/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--player-soft);
}

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

.callout {
  max-width: 44rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 1.4rem 1.5rem;
  background: var(--well);
  border-left: 3px solid var(--gold);
}
.callout h3 {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.callout p {
  margin: 0;
  color: var(--muted);
}

/* The nine cards that aren't warriors: a small card beside what it does. Action cards are violet and defense
   cards slate, as in the game. */

.abilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ability {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ability .card {
  flex: none;
  width: 92px;
  /* Fixed: a percentage would follow the row's width, not the card's. */
  padding: 8px 9px 9px;
}
.ability .card-strength {
  font-size: 1rem;
}
.ability .card-name {
  font-size: 0.58rem;
}
.ability.is-action .card {
  --accent: var(--action);
  color: var(--action-ink);
}
.ability.is-action .piece-reach strong {
  color: var(--action-label);
}
.ability.is-defense .card {
  --accent: var(--defense);
  color: var(--defense-ink);
}
.ability.is-defense .piece-reach strong {
  color: var(--defense-label);
}

/* Swap hands and Swap decks carry a second, smaller icon: the swap arrows. */
.card-art {
  position: relative;
  display: grid;
  min-height: 0;
}
.card-mark {
  position: absolute;
  right: 6%;
  bottom: 12%;
  width: 34%;
  height: 34%;
  fill: var(--action);
}

@media (max-width: 960px) {
  .abilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .abilities {
    grid-template-columns: 1fr;
  }
}

/* ---------- How to play ---------- */

.rules-band {
  background: linear-gradient(180deg, rgba(7, 11, 30, 0.7), rgba(7, 11, 30, 0.2));
  border-block: 1px solid var(--border);
}
.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.rule {
  padding: 1.6rem 1.5rem 1.5rem;
  background: linear-gradient(180deg, rgba(27, 36, 86, 0.75), rgba(17, 23, 58, 0.75));
  box-shadow: inset 0 0 0 1px var(--plate-line);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.rule h3 {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.rule p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}
.hex {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  background: var(--player-tint);
  color: var(--player);
  font: 700 1.25rem/1 var(--display);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.hex-gold {
  background: var(--gold-tint);
  color: var(--gold);
}

@media (max-width: 720px) {
  .rules {
    grid-template-columns: 1fr;
  }
}

/* ---------- Mailing list ---------- */

.signup-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  padding: clamp(1.75rem, 5vw, 3rem);
  background:
    radial-gradient(30rem 20rem at 100% 0%, rgba(255, 176, 32, 0.14), transparent 60%),
    linear-gradient(180deg, var(--plate-top), var(--plate-bottom));
  box-shadow: inset 0 0 0 1px var(--plate-line);
  clip-path: polygon(24px 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%, 0 24px);
}
.signup-panel h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
}
.signup-panel p {
  color: var(--muted);
}
.signup-panel .signup-copy p:last-child {
  margin-bottom: 0;
}

.signup-address {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.signup-action .btn {
  min-height: 52px;
}
.signup-action .fine {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--dim);
}

@media (max-width: 760px) {
  .signup-panel {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 440px) {
  .signup-action .btn {
    width: 100%;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 30, 0.6);
  font-size: 0.9rem;
  color: var(--dim);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer p {
  margin: 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text);
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 46rem;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.legal h1 {
  font-size: clamp(2.1rem, 6vw, 3rem);
}
.legal .updated {
  margin-bottom: 2rem;
  color: var(--dim);
  font-size: 0.95rem;
}
.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}
.legal h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}
.legal ul {
  padding-left: 1.25rem;
}
.legal li {
  margin-bottom: 0.4rem;
}
.legal .summary {
  padding: 1.25rem 1.4rem;
  background: var(--well);
  border-left: 3px solid var(--player);
}
.legal .summary p:last-child,
.legal .summary ul:last-child {
  margin-bottom: 0;
}
.legal .caps {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

/* ---------- 404 ---------- */

.not-found {
  padding-block: clamp(4rem, 12vw, 8rem);
  text-align: center;
}
.not-found h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}
.not-found p {
  color: var(--muted);
  margin-bottom: 2rem;
}
