/* Zap Bricks website — shared styles.
   Colours, type and the chamfered corners come from the game itself (Art/Palette.swift, UI/Theme). */

@font-face {
  font-family: "Tektur";
  src: url("../fonts/Tektur-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tektur";
  src: url("../fonts/Tektur-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The game's palette. */
  --outer: #2a2f52;
  --bg-top: #0b0e14;
  --bg-bottom: #080a0f;
  --field: #0e121a;
  --grid: #1e243b;
  --wall: #3b4270;
  --text0: #eef1f6;
  --text1: #9aa4b5;
  --text2: #5b6578;
  --panel: #121722;
  --panel-stroke: #2a3345;
  --accent: #ffb547;
  --on-accent: #1a1206;
  --laser: #ff3d8b;
  --rush: #ff5ce1;
  --mint: #6ef0a8;

  /* Brick heat ramp, weakest to toughest. */
  --t0: #6d2ea3;
  --t1: #296ec3;
  --t2: #30bed9;
  --t3: #00ae67;
  --t4: #f7dd5a;
  --t5: #fc9b3f;
  --t6: #c2272a;

  --display: "Tektur", "Arial Black", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --cut: 14px;
  --radius-phone: 34px;
  --gutter: 16px;
  --max: 1120px;
}

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

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

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

body {
  margin: 0;
  background: var(--bg-bottom);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-size: 56px 56px, 56px 56px, 100% 100%;
  background-position: -1px -1px, -1px -1px, 0 0;
  background-attachment: fixed;
  color: var(--text0);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #ffd08a;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  font-family: var(--display);
  font-weight: 700;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
}

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

/* ---------- Chamfer: the game's signature corner (top-left and bottom-right cut at 45°). ---------- */

.chamfer {
  position: relative;
  isolation: isolate;
  --edge: var(--panel-stroke);
  --fill: var(--panel);
}

.chamfer::before,
.chamfer::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.chamfer::before {
  inset: 0;
  background: var(--edge);
}

.chamfer::after {
  inset: 1.5px;
  background: var(--fill);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 10, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-stroke);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text0);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.brand:hover {
  color: var(--text0);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--text1);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 10px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text0);
}

.nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

@media (max-width: 560px) {
  .nav .nav-optional {
    display: none;
  }
  .brand span {
    font-size: 17px;
  }
}

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

.btn {
  --edge: var(--accent);
  --fill: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--on-accent);
  border: 0;
  cursor: pointer;
  background: transparent;
}

.btn:hover {
  color: var(--on-accent);
  --fill: #ffc56e;
  --edge: #ffc56e;
}

.btn-ghost {
  --edge: var(--accent);
  --fill: var(--panel);
  color: var(--accent);
}

.btn-ghost:hover {
  --fill: #1a1f2c;
  --edge: #ffc56e;
  color: #ffc56e;
}

.btn[aria-disabled="true"] {
  cursor: default;
}

@media (max-width: 440px) {
  .btn {
    font-size: 15px;
    letter-spacing: 0.03em;
    padding: 12px 18px;
  }
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

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

.hero {
  padding: 56px 0 40px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 36px;
  }
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
}

.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text1);
  margin: 0 0 18px;
}

.eyebrow .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 10px 2px;
  background: var(--laser);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--laser);
}

/* The ZAP / BRICKS wordmark, as in the game: white faces over a slate base, one justified block. */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  line-height: 0.86;
  text-transform: uppercase;
  color: #f4f6fb;
  text-shadow: 0 0.06em 0 var(--wall);
}

.wordmark .w-top {
  font-size: clamp(76px, 15vw, 150px);
  letter-spacing: 0.01em;
}

.wordmark .w-bottom {
  font-size: clamp(39px, 7.6vw, 76px);
  letter-spacing: 0.035em;
  margin-top: 0.12em;
}

.hero .subtitle {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 22px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 22px 0 6px;
}

.hero .lead {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text1);
  max-width: 34em;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.fineprint {
  font-size: 14px;
  color: var(--text2);
  margin: 16px 0 0;
}

/* The board in the hero: the game's field in its chamfered frame, a canvas drawn by main.js. */
.board-frame {
  --edge: var(--wall);
  --fill: var(--field);
  --cut: 22px;
  padding: 10px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.board-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 9;
}

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

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 36px;
}

.section-kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--laser);
  margin: 0 0 10px;
}

h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.section-head p {
  color: var(--text1);
  margin: 0;
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

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

.feature {
  padding: 26px 24px 24px;
}

.feature .chip {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 3px;
  position: relative;
  background: var(--chip, var(--t1));
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.28),
    inset -3px -3px 0 rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 18px;
  color: #fff;
}

.feature .chip.dark-digit {
  color: #000;
}

.feature h3 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.feature p {
  color: var(--text1);
  margin: 0;
  font-size: 16px;
}

.feature strong {
  color: var(--text0);
  font-weight: 600;
}

/* Screens */

.screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--wall) transparent;
}

.screens figure {
  margin: 0;
  scroll-snap-align: start;
}

.screens img {
  width: 100%;
  height: auto;
  aspect-ratio: 1320 / 2868;
  object-fit: cover;
  border-radius: var(--radius-phone);
  border: 1px solid var(--panel-stroke);
  background: var(--field);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.screens figcaption {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text1);
  margin-top: 14px;
  text-align: center;
}

/* How to play */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.steps li {
  padding: 24px;
}

.steps li::marker {
  content: none;
}

.steps .num {
  font-family: var(--display);
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.steps h3 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.steps p {
  color: var(--text1);
  margin: 0;
  font-size: 16px;
}

/* Closing call to action */

.closing {
  text-align: center;
  padding: 48px 24px;
  --fill: #141a27;
  --edge: var(--wall);
  --cut: 22px;
}

.closing img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.closing p {
  color: var(--text1);
  margin: 0 auto 24px;
  max-width: 30em;
}

/* ---------- Document pages (privacy, support) ---------- */

.doc {
  padding: 48px 0 72px;
}

.doc .wrap {
  max-width: 820px;
}

.doc-head {
  margin-bottom: 32px;
}

.doc-head h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.04;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.doc-head p {
  color: var(--text1);
  margin: 0;
}

.doc-body {
  padding: 32px clamp(20px, 4vw, 40px) 36px;
}

.doc-body h2 {
  font-size: clamp(21px, 3vw, 25px);
  letter-spacing: 0.04em;
  margin: 34px 0 10px;
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  margin: 22px 0 6px;
  color: var(--text0);
}

.doc-body p,
.doc-body li {
  color: #c9cfdb;
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.3em;
}

.doc-body li + li {
  margin-top: 6px;
}

.doc-body strong {
  color: var(--text0);
}

.summary {
  --fill: #171d2b;
  --edge: var(--wall);
  padding: 20px 24px;
  margin: 0 0 8px;
}

.summary ul {
  margin: 8px 0 0;
}

.toc {
  columns: 2 220px;
  column-gap: 32px;
  margin: 12px 0 0;
}

.toc li {
  break-inside: avoid;
}

.muted {
  color: var(--text1);
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-stroke);
  color: #c9cfdb;
}

th {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text1);
}

/* Support */

.contact-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 26px 28px;
  margin-bottom: 28px;
  --fill: #171d2b;
  --edge: var(--accent);
}

@media (max-width: 560px) {
  .contact-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

.contact-card .mail {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(20px, 4vw, 26px);
  letter-spacing: 0.02em;
  word-break: break-all;
}

.contact-card p {
  margin: 4px 0 0;
  color: var(--text1);
}

.contact-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.contact-icon svg {
  width: 28px;
  height: 28px;
}

.faq {
  margin: 0;
}

.faq details {
  border-bottom: 1px solid var(--panel-stroke);
  padding: 4px 0;
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--text0);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.18s ease;
}

.faq details[open] summary::after {
  transform: rotate(225deg) translate(-3px, -3px);
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after {
    transition: none;
  }
}

.faq .answer {
  padding: 0 0 16px;
}

.faq .answer p {
  margin: 0 0 10px;
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

kbd,
.ui {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9em;
  letter-spacing: 0.04em;
  color: var(--text0);
  background: #1b2232;
  border: 1px solid var(--panel-stroke);
  padding: 1px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

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

.site-footer {
  border-top: 1px solid var(--panel-stroke);
  background: rgba(8, 10, 15, 0.9);
  padding: 32px 0 40px;
  margin-top: 24px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
  color: var(--text2);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text1);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--text0);
}
