/* eightbitcollector.co.uk
   One bold element: the Spectrum-style rainbow stripe across the top-right
   corner. Everything else is black type on white paper. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #55555f;
  --link: #0000d7;       /* Spectrum bright blue */
  --red: #d8201f;        /* the app's stripe colours */
  --yellow: #f2d21b;
  --green: #1fa83c;
  --cyan: #19b5d8;
  --measure: 38rem;
  --wide: 64rem;
}

* { box-sizing: border-box; }

html {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 106.25%; /* 17px */
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; overflow-x: hidden; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

/* ---- the stripe ---------------------------------------------------------- */

.stripe {
  position: absolute;
  top: 0;
  right: 0;
  width: min(40vw, 30rem);
  aspect-ratio: 1;
  pointer-events: none;
  background: linear-gradient(
    225deg,
    transparent 0 16%,
    var(--red) 16% 22%,
    var(--yellow) 22% 28%,
    var(--green) 28% 34%,
    var(--cyan) 34% 40%,
    transparent 40%
  );
  clip-path: inset(0 0 0 0);
  animation: load 900ms cubic-bezier(.2,.7,.2,1) both;
}
.stripe.small { width: min(36vw, 18rem); }
header, main, footer { position: relative; z-index: 1; }

/* Drawn in once, from the corner, like a tape border finishing loading. */
@keyframes load {
  from { clip-path: inset(0 0 100% 100%); }
  to   { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .stripe { animation: none; }
}

/* ---- layout -------------------------------------------------------------- */

.wrap {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.masthead {
  padding-top: 1.6rem;
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.masthead a { color: inherit; text-decoration: none; }

.hero {
  padding-top: clamp(4rem, 12vw, 8.5rem);
  padding-bottom: 3rem;
}
.hero h1 { max-width: 12ch; }

h1, h2, h3 { line-height: 1.05; margin: 0; }

.hero h1 {
  font-stretch: 125%;
  font-weight: 850;
  font-size: clamp(2.6rem, 7.4vw, 5.2rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.lede {
  margin: 1.6rem 0 0;
  max-width: var(--measure);
  font-size: 1.18rem;
  line-height: 1.5;
}

.buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  margin-top: 2.2rem;
}
.button {
  display: inline-block;
  padding: 0.85rem 1.5rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-stretch: 112%;
  text-decoration: none;
  border-radius: 2px;
  box-shadow: 5px 5px 0 var(--cyan);
  transition: box-shadow 120ms, transform 120ms;
}
.button:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--cyan); }
.button:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--cyan); }
.soon { font-weight: 700; font-stretch: 112%; }
.platforms { color: var(--muted); font-size: 0.95rem; }

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 4rem;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d4d4dc;
}
.shots figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }

/* ---- features: headed paragraphs, two columns, no boxes ------------------ */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2.6rem 3.5rem;
  padding-top: 3rem;
  padding-bottom: 4.5rem;
}
.features h2 {
  font-stretch: 118%;
  font-weight: 780;
  font-size: 1.32rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}
.features p { margin: 0; max-width: var(--measure); }

.machines {
  padding-top: 2.6rem;
  padding-bottom: 2.6rem;
}
.machines::before {
  content: "";
  display: block;
  max-width: 48rem;
  border-top: 3px solid var(--ink);
  margin-bottom: 2.6rem;
}
.machines h2 {
  font-stretch: 118%;
  font-weight: 780;
  font-size: 1.32rem;
  margin-bottom: 0.8rem;
}
.machines p { margin: 0 0 0.8rem; max-width: var(--measure); }

footer {
  margin-top: 3rem;
  padding: 1.6rem 0 2.5rem;
  border-top: 1px solid #d4d4dc;
  color: var(--muted);
  font-size: 0.92rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }

/* ---- the privacy page ---------------------------------------------------- */

.doc {
  max-width: var(--measure);
  padding-top: clamp(3rem, 9vw, 5.5rem);
  padding-bottom: 2rem;
}
.doc h1 {
  font-stretch: 125%;
  font-weight: 850;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}
.doc h2 {
  font-stretch: 115%;
  font-weight: 760;
  font-size: 1.25rem;
  margin: 2.4rem 0 0.7rem;
}
.doc p, .doc li { max-width: var(--measure); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 0.3rem 0; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid #d4d4dc;
}
.doc th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.doc code { font-size: 0.92em; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }

@media (max-width: 40rem) {
  html { font-size: 100%; }
  .stripe { width: 58vw; }
  .hero { padding-top: 5.5rem; }
}
