/* Block Tanks marketing page. Mobile first: the base rules are for 320 to 599 px,
   then 600 px (tablets) and 1024 px (desktops). No inline style, no third-party
   request: fonts are our own files. Colours are the hub's light tokens, with a
   navy band (the game's look) for the hero, the free-to-start block and the footer. */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Nunito-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Nunito-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/Nunito-Black.ttf') format('truetype');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/LilitaOne-Regular.ttf') format('truetype');
}

:root {
  --bg: #f4f6fb;
  --fg: #141a2e;
  --card: #ffffff;
  --muted: #4a5470;
  --border: #d5dae8;
  --secondary: #e6eaf3;
  --primary: #b8ff3c;
  --accent: #3da9fc;
  --link: #0b62b5;
  --navy: #141a2e;
  --panel: #1f2742;
  --outline: #3a4668;
  --on-navy: #f4f6fb;
  --on-navy-muted: #a9b4d0;
  --error: #b3163a;
  --focus: #0b62b5;

  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Lilita One', 'Nunito', system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 0.875rem;
  --section-space: clamp(3rem, 2rem + 5vw, 6rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
}

h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
}

p {
  margin: 0;
}

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

.on-navy :focus-visible,
.band-navy :focus-visible {
  outline-color: var(--accent);
}

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

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

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

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1rem;
  background: var(--primary);
  color: var(--navy);
  font-weight: 700;
  border-radius: 0.5rem;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  min-width: 3rem;
  padding: 0.5rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--navy);
}

.btn-primary:hover {
  background: #caff66;
}

.btn-secondary {
  background: transparent;
  border-color: var(--on-navy);
  color: var(--on-navy);
}

.btn-secondary:hover {
  background: rgba(244, 246, 251, 0.12);
}

.btn-dark {
  background: var(--navy);
  color: var(--on-navy);
}

.btn-dark:hover {
  background: var(--panel);
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-row .btn {
  width: 100%;
}

/* ---- Header and wordmark ---------------------------------------------- */

.band-navy {
  background: var(--navy);
  color: var(--on-navy);
}

.site-header {
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  min-height: 3rem;
  padding-top: 0.5rem;
  align-self: center;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem);
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark .wm-block {
  color: var(--primary);
  white-space: pre;
}

.wordmark .wm-tank {
  width: 0.62em;
  height: 0.5em;
  margin-inline: 0.03em;
  color: var(--accent);
  align-self: baseline;
}


.tank-sprite .wheel {
  fill: var(--navy);
}

.site-nav {
  display: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.875rem;
  color: var(--on-navy);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.5rem;
}

.site-nav a:hover {
  background: rgba(244, 246, 251, 0.12);
}

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

.hero {
  padding-block: clamp(1.5rem, 1rem + 3vw, 3.5rem) var(--section-space);
}

.hero-grid {
  display: grid;
  gap: clamp(1.75rem, 1rem + 3vw, 3rem);
}

.hero h1 {
  font-size: clamp(2.4rem, 1.4rem + 4.2vw, 4rem);
  color: var(--on-navy);
}

.hero h1 .accent {
  color: var(--primary);
  display: block;
}

.hero-lead {
  margin-top: 1rem;
  max-width: 36rem;
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3rem);
  color: var(--on-navy-muted);
}

.hero .btn-row {
  margin-top: 1.5rem;
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--on-navy-muted);
}

.hero-art {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

.hero-panel {
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  padding: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-panel + .hero-panel {
  /* Stacked on phones, the tall arena would dominate: keep it narrower. */
  width: 100%;
  max-width: 19rem;
  justify-self: center;
}

.hero-panel svg {
  display: block;
  width: 100%;
  height: auto;
  flex: 1 1 auto;
}

.hero-art text {
  /* The editor's block text: JetBrains Mono 16 px, semi-bold, white. */
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 16px;
  fill: #fff;
  /* The browser's own bold is lighter than the game's: thicken the strokes a touch. */
  stroke: #fff;
  stroke-width: 0.22px;
}

.hero-art text.fld {
  fill: #2b3350;
  stroke: none;
}

.hero-art .lens {
  fill: #c9d3ea;
}

.hero-art .lens.lit {
  fill: #b8ff3c;
}

.hero-art .beam {
  fill: url(#beamIdle);
}

.hero-art .beam.lit {
  fill: url(#beamLit);
}

/* ---- Sections --------------------------------------------------------- */

.section {
  padding-block: var(--section-space);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.section-head p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
}

.card p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.steps,
.features {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-art {
  display: block;
  width: 6rem;
  height: auto;
  margin-bottom: 1rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.1rem;
  vertical-align: 0.1em;
}

.curriculum {
  display: grid;
  gap: 1rem;
}

.curriculum h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.75rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

/* Goals: a still picture of the game's goals card beside the points. */

.goals-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.goals-points {
  margin-top: 0;
}

.goals-mock {
  max-width: 24rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--outline);
  color: var(--on-navy);
}

.goals-mock p {
  margin: 0;
}

.goals-mock-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.goals-mock-title::before {
  content: '';
  display: inline-block;
  width: 0.75rem;
  height: 1rem;
  margin-right: 0.5rem;
  border-radius: 0.15rem;
  background: #ffc93c;
}

.goals-mock p.goals-mock-rank {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  font-weight: 900;
  color: var(--primary);
}

.goals-mock-count {
  font-weight: 400;
  color: var(--on-navy-muted);
}

.goals-mock-bar {
  height: 0.4rem;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: #0b0f1c;
  overflow: hidden;
}

.goals-mock-bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--primary);
}

.goals-mock ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.goals-mock li {
  position: relative;
  padding-left: 1.75rem;
}

.goals-mock li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid var(--on-navy-muted);
}

.goals-mock li.done::before {
  border-color: #3ddc84;
  background: #3ddc84;
}

.goals-mock li.done strong {
  color: var(--on-navy-muted);
}

.goals-mock li span {
  display: block;
  font-size: 0.875rem;
  color: var(--on-navy-muted);
}

.goals-mock p.goals-mock-next {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--on-navy-muted);
}

.goals-mock p.goals-mock-toast {
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--primary);
  border-radius: 0.75rem;
  font-family: var(--font-display);
  color: var(--primary);
}

.goals-mock-toast span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--on-navy);
}

.mapping {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.mapping li {
  padding-left: 1.5rem;
  position: relative;
}

.mapping li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.2rem;
  background: var(--primary);
  border: 2px solid var(--navy);
}

.mapping strong {
  display: block;
  color: var(--fg);
}

.mapping span {
  color: var(--muted);
}

.fine-print {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.feature h3 {
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
}

.feature-dot {
  display: block;
  width: 2.5rem;
  height: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 999px;
}

.dot-events {
  background: #766e00;
}
.dot-motion {
  background: #1f6fb8;
}
.dot-combat {
  background: #ce3414;
}
.dot-sensing {
  background: #0b7d7a;
}
.dot-control {
  background: #a66400;
}
.dot-variables {
  background: #7b4dc8;
}

/* Free to start */

.free {
  padding-block: var(--section-space);
}

.free h2 {
  color: var(--on-navy);
}

.free-grid {
  display: grid;
  gap: 1rem;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.free-card {
  padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  background: var(--panel);
}

.free-card h3 {
  color: var(--primary);
}

.free-card p {
  margin-top: 0.5rem;
  color: var(--on-navy-muted);
}

.free .btn-row {
  margin-top: 1.75rem;
}

/* ---- Contact form ------------------------------------------------------ */

.contact-card {
  max-width: 44rem;
}

.form-grid {
  display: grid;
  gap: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 900;
}

.field .optional {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 2px solid #8b94ad;
  border-radius: 0.625rem;
  background: #fff;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
}

.field [aria-invalid='true'] {
  border-color: var(--error);
}

.field-error {
  margin-top: 0.375rem;
  color: var(--error);
  font-weight: 700;
  font-size: 0.9375rem;
}

.field-error[hidden] {
  display: none;
}

.field-hint {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* The honeypot: out of sight and out of the tab order, not display: none, so a
   bot still sees a normal field. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.5rem;
  font-weight: 700;
}

.form-status.is-error {
  color: var(--error);
}

.form-status.is-ok {
  color: #0b5a2a;
}

.contact-card .btn {
  width: 100%;
  border: 0;
}

.noscript-note {
  margin-top: 1rem;
  font-weight: 700;
}

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

.site-footer {
  padding-block: 2rem 2.5rem;
}

.footer-grid {
  display: grid;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.75rem;
  color: var(--on-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  border-radius: 0.5rem;
}

.footer-links a:hover {
  background: rgba(244, 246, 251, 0.12);
}

.copyright {
  color: var(--on-navy-muted);
  font-size: 0.9375rem;
}

/* ---- Small phones: buttons full width, two stacked art panels ---------- */

@media (min-width: 480px) {
  .btn-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .btn-row .btn {
    width: auto;
  }
}

/* ---- Tablets: 600 to 1023 px ------------------------------------------ */

@media (min-width: 600px) {
  .site-nav {
    display: flex;
    gap: 0.25rem;
  }

  /* The two art panels sit side by side under the text. */
  .hero-art {
    /* Proportional to the two drawings' aspect ratios (396 x 365 and 330 x 385)
       so both panels come out the same height and each drawing fills its panel. */
    grid-template-columns: minmax(0, 1.266fr) minmax(0, 1fr);
    align-items: stretch;
    max-width: none;
  }

  .hero-panel + .hero-panel {
    max-width: none;
    justify-self: stretch;
  }

  .hero-text {
    max-width: 42rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    display: grid;
    grid-template-columns: 6rem 1fr;
    column-gap: 1.5rem;
    align-items: center;
  }

  .step .step-art {
    margin-bottom: 0;
    grid-row: 1 / span 2;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .free-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-card .btn {
    width: auto;
    min-width: 12rem;
  }

  .form-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    display: block;
  }

  .step .step-art {
    margin-bottom: 1rem;
  }

  .curriculum {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .goals-grid {
    grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
    gap: 2.5rem;
  }
}

/* ---- Desktops: 1024 px and up ----------------------------------------- */

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
  }

  .hero-art {
    gap: 1.25rem;
  }

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

  .free-grid {
    max-width: 52rem;
  }
}

@media (min-width: 1440px) {
  .container {
    max-width: 76rem;
  }
}

/* ---- Motion ----------------------------------------------------------- */

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

  .btn {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* A section that follows another with the same background: the previous one
   already left the space. */
.section-flush {
  padding-top: 0;
}

.free .eyebrow {
  color: var(--primary);
}

/* A section that follows another with the same background: the previous one
   already left the space. */
.section-flush {
  padding-top: 0;
}

.free .eyebrow {
  color: var(--primary);
}
