/* Hypertekt's landing page, in the dashboard's look: neon on near-black, the pixel face for the wordmark and headings,
   plain readable type for everything else. Nothing moves or flashes, and there's a light mode for anyone whose system
   asks for one. */

@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/silkscreen-latin.woff2") format("woff2");
}

:root {
  --bg: #0b0a12;
  --panel: #14121f;
  --panel-2: #1c1930;
  --line: #2d2846;
  --text: #ece9f7;
  --muted: #a39dbd;
  --magenta: #ff3ea5;
  --cyan: #22e4ff;
  --green: #39ff88;
  --amber: #ffcc33;
  --red: #ff5c7a;
  --on-accent: #0b0a12;
  --glow: 0 0 12px rgb(255 62 165 / 0.45);
  --glow-strong: 0 0 18px rgb(255 62 165 / 0.6), 0 0 42px rgb(255 62 165 / 0.25);
  --grid: rgb(34 228 255 / 0.14);
  --radius: 4px;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --width: 68rem;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4fc;
    --panel: #ffffff;
    --panel-2: #efebfa;
    --line: #d9d3ea;
    --text: #17142a;
    --muted: #5b5676;
    --magenta: #c2007a;
    --cyan: #00708c;
    --green: #0a7a3c;
    --amber: #8a6200;
    --red: #b8002e;
    --on-accent: #ffffff;
    --glow: none;
    --glow-strong: none;
    --grid: rgb(0 112 140 / 0.12);
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

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

code,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

:not(pre) > code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.05em 0.35em;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--panel);
  padding: 0.5rem 0.75rem;
}

/* The wordmark, in the pixel face with the glow. */

.wordmark {
  font-family: var(--pixel);
  font-weight: 400;
  color: var(--magenta);
  text-shadow: var(--glow-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  font-size: clamp(2.75rem, 11vw, 6.5rem);
  line-height: 1;
}

.wordmark.small {
  font-size: 1.25rem;
  text-decoration: none;
  text-shadow: var(--glow);
}

/* The bar at the top, and the footer. */

.top,
.bottom {
  max-width: var(--width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.invite.small {
  font-family: var(--pixel);
  font-size: 0.85rem;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  padding: 0.35rem 0.7rem;
}

/* The footer: an arcade sign-off, with a pixel bar in the four colours along its top, a score line that's true of
   every Hypertekt page, the wordmark and links, and who made it, quietly. */

.bottom {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  gap: 1.5rem;
  margin-top: clamp(4rem, 10vw, 6rem);
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0 25%,
    var(--magenta) 25% 50%,
    var(--green) 50% 75%,
    var(--amber) 75%
  );
}

.bottom p {
  margin: 0;
}

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

.score {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-family: var(--pixel);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.score b {
  font-weight: 400;
  color: var(--green);
  margin-right: 0.35rem;
}

.foot-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.wordmark.foot {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  text-decoration: none;
  text-shadow: var(--glow);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.foot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.85rem;
}

.foot-meta a {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--pixel);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.3rem 0.6rem 0.3rem 0.4rem;
  background: var(--panel);
}

.badge svg {
  width: 16px;
  height: 16px;
  color: var(--magenta);
}

/* The hero: a horizon of grid lines going away into the distance, drawn with gradients, not moving. */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 68% -50% -40% -50%;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: top center;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(3.5rem, 11vw, 7.5rem) 1.25rem clamp(5rem, 14vw, 10rem);
}

.hero.short .hero-inner {
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.gloss {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

.gloss i {
  color: var(--text);
}

.tagline {
  font-family: var(--pixel);
  color: var(--cyan);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  text-transform: uppercase;
  margin: 1.25rem 0 0;
  line-height: 1.35;
}

.lede {
  max-width: 38rem;
  font-size: 1.15rem;
  color: var(--text);
  margin: 1.25rem 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.button {
  display: inline-block;
  font-family: var(--pixel);
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.95rem;
  background: var(--magenta);
  color: var(--on-accent);
  border: 1px solid var(--magenta);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  box-shadow: var(--glow);
}

.button:hover {
  filter: brightness(1.1);
}

.button.ghost {
  background: transparent;
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: none;
}

/* Each part of the page below the hero. */

.band {
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) 1.25rem 0;
}

h2,
h3 {
  font-family: var(--pixel);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.3;
}

h2 {
  color: var(--text);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  margin: 0 0 1.5rem;
}

h3 {
  font-size: 1rem;
  margin: 0 0 0.6rem;
}

.intro {
  max-width: 44rem;
  margin: 0 0 1.75rem;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

/* How it works: three steps, each with a big glowing pixel numeral, joined by arrows on a wide screen. Kept plain, so
   the cards after it stay the colourful part. */

.journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 52rem) {
  .journey {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3.5rem;
  }

  .journey li + li::before {
    content: "→";
    position: absolute;
    left: -2.6rem;
    top: 0.4rem;
    font-family: var(--pixel);
    font-size: 1.5rem;
    color: var(--muted);
  }
}

.journey li {
  position: relative;
  padding-left: 4.25rem;
}

.step-num {
  position: absolute;
  left: 0;
  top: -0.15rem;
  font-family: var(--pixel);
  font-size: 3rem;
  line-height: 1;
  color: var(--magenta);
  text-shadow: var(--glow);
}

.journey h3 {
  font-size: 1.15rem;
  margin: 0.1rem 0 0.4rem;
}

.journey p {
  margin: 0;
  color: var(--muted);
}

/* Each card is a power-up: its colour along a glowing top edge, a pixel icon, the power it gives, and its number in
   the top corner, level with the icon and clear of the text. */
.card {
  --c: var(--cyan);
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--c);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 -6px 18px -12px var(--c);
}

.cyan-card {
  --c: var(--cyan);
}

.magenta-card {
  --c: var(--magenta);
}

.green-card {
  --c: var(--green);
}

.amber-card {
  --c: var(--amber);
}

.num {
  position: absolute;
  right: 1.1rem;
  top: 1.35rem;
  font-family: var(--pixel);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--c);
  opacity: 0.35;
  pointer-events: none;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.icon {
  width: 32px;
  height: 32px;
  color: var(--c);
  filter: drop-shadow(0 0 6px var(--c));
}

.power {
  font-family: var(--pixel);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c);
  border: 1px solid var(--c);
  border-radius: var(--radius);
  padding: 0.1rem 0.45rem;
}

.card h3 {
  position: relative;
}

.cards p {
  position: relative;
  margin: 0;
  color: var(--muted);
}

/* Made for places like yours: a full-width band of its own, with faint scanlines, and a small mock of what each kind of
   business's site would show. The mocks are neutral, and only their buttons take the accent colours. */

.bleed {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-bottom: clamp(3rem, 8vw, 4.5rem);
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgb(255 255 255 / 0.018) 3px 4px), var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.bleed + .band {
  padding-top: clamp(3rem, 8vw, 5rem);
}

.places {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.75rem 1.25rem;
}

.place h3 {
  margin: 1rem 0 0.35rem;
}

.place p {
  margin: 0;
  color: var(--muted);
}

.mock {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.8rem;
  box-shadow: 0 12px 30px -18px rgb(0 0 0 / 0.6);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.mock-bar .dots::before {
  width: 6px;
  height: 6px;
  box-shadow:
    10px 0 0 var(--amber),
    20px 0 0 var(--green);
  margin-right: 20px;
}

.url {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
}

.mock-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 11.75rem;
  padding: 0.85rem;
}

.mock-name {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.rows li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
}

.rows span:last-child {
  color: var(--text);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.thumbs i {
  aspect-ratio: 3 / 2;
  border-radius: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.thumbs i:nth-child(3n + 1) {
  background: linear-gradient(135deg, var(--panel-2), var(--line));
}

.mock-cta {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--pixel);
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--cta);
  border-radius: 3px;
  padding: 0.3rem 0.55rem;
}

/* Each preview's button takes one of the accent colours, in a different order from the cards above. */
.amber-cta {
  --cta: var(--amber);
}

.cyan-cta {
  --cta: var(--cyan);
}

.magenta-cta {
  --cta: var(--magenta);
}

.green-cta {
  --cta: var(--green);
}

/* For developers: the points beside three steps, schema, template and terminal, joined by arrows. One column on a
   phone. */

.dev {
  display: grid;
  gap: 2rem;
}

@media (min-width: 62rem) {
  .dev {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: start;
  }

  .dev .points {
    grid-template-columns: 1fr;
    position: sticky;
    top: 1.5rem;
  }
}

.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 1.25rem 2rem;
}

.points li {
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.points li:nth-child(1) {
  border-color: var(--cyan);
}

.points li:nth-child(2) {
  border-color: var(--magenta);
}

.points li:nth-child(3) {
  border-color: var(--green);
}

.points li:nth-child(4) {
  border-color: var(--amber);
}

.points strong {
  color: var(--text);
}

figure {
  margin: 0;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

figcaption {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
}

figure pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.55;
}

.steps {
  display: grid;
  gap: 2.25rem;
}

.step {
  position: relative;
  border-left-width: 3px;
}

.cyan-edge {
  border-left-color: var(--cyan);
}

.magenta-edge {
  border-left-color: var(--magenta);
}

.green-edge {
  border-left-color: var(--green);
}

/* The arrow down to the next step, in the next step's colour. */
.step + .step::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: -2.25rem;
  width: 2px;
  height: 1.6rem;
  background: currentColor;
  color: var(--magenta);
  box-shadow: var(--glow);
}

.step + .step::after {
  content: "";
  position: absolute;
  left: calc(1.5rem - 5px);
  top: -0.75rem;
  border: 6px solid transparent;
  border-top-color: var(--magenta);
  border-bottom: 0;
}

.step.green-edge::before {
  color: var(--green);
}

.step.green-edge::after {
  border-top-color: var(--green);
}

.step figcaption {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--panel-2);
}

.dots {
  display: inline-flex;
  gap: 5px;
}

.dots::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow:
    13px 0 0 var(--amber),
    26px 0 0 var(--green);
  margin-right: 26px;
  opacity: 0.8;
}

.label {
  font-family: var(--pixel);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text);
}

.cyan-edge .label {
  color: var(--cyan);
}

.magenta-edge .label {
  color: var(--magenta);
}

.green-edge .label {
  color: var(--green);
}

/* A terminal is dark in either mode, so it keeps the neon colours. */
.terminal pre {
  --magenta: #ff3ea5;
  --muted: #a39dbd;
  --red: #ff5c7a;
  background: #05040a;
  color: #ece9f7;
  border-radius: 0 0 var(--radius) 0;
}

.flag {
  display: block;
  margin: 0.25rem -1rem;
  padding: 0.25rem 1rem 0.25rem calc(1rem - 3px);
  border-left: 3px solid var(--red);
  background: rgb(255 92 122 / 0.1);
}

/* Syntax colours: keys, strings, template tags and HTML tags. */
.k {
  color: var(--cyan);
}

.s {
  color: var(--amber);
}

.t {
  color: var(--magenta);
}

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

.typo {
  text-decoration: underline wavy var(--red);
  text-underline-offset: 4px;
  text-decoration-skip-ink: none;
}

.err {
  color: var(--red);
}

.prompt {
  color: var(--magenta);
}

/* On the way: a track of what's coming, in order, like a quest log. Down the left on a phone, across on a wide
   screen. Each stop's dot and tag say how near it is: next, soon or later. */

.track {
  --dot: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  position: relative;
}

/* The line the stops sit on. */
.track::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 1px);
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(var(--green), var(--cyan) 45%, var(--line) 70%);
}

.track li {
  position: relative;
  padding-left: calc(var(--dot) + 1rem);
}

.track li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: var(--dot);
  height: var(--dot);
  background: var(--bg);
  border: 2px solid var(--line);
}

.track .next::before {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 12px rgb(57 255 136 / 0.6);
}

.track .soon::before {
  border-color: var(--cyan);
}

.track h3 {
  margin: 0.35rem 0 0.25rem;
}

.track p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.next .tag {
  color: var(--on-accent);
  background: var(--green);
  border-color: var(--green);
}

.soon .tag {
  color: var(--cyan);
  border-color: var(--cyan);
}

.later h3 {
  color: var(--muted);
}

@media (min-width: 62rem) {
  .track {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .track::before {
    left: 0;
    right: 0;
    top: calc(var(--dot) / 2 - 1px);
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--green), var(--cyan) 40%, var(--line) 65%);
  }

  .track li {
    padding-left: 0;
    padding-top: calc(var(--dot) + 0.9rem);
  }

  .track li::before {
    top: 0;
  }
}

/* Who does what: the developer builds it, the owner holds the keys. */

.roles {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (min-width: 52rem) {
  .roles {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.role {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  background: var(--panel);
}

.dev-role {
  border-top: 2px solid var(--cyan);
}

.owner-role {
  border-top: 2px solid var(--magenta);
}

.role h3 {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.role-tag {
  color: var(--text);
}

.dev-role .role-tag {
  color: var(--cyan);
}

.owner-role .role-tag {
  color: var(--magenta);
}

.role ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.role li {
  color: var(--text);
}

.soon-tag {
  display: inline-block;
  margin-right: 0.5rem;
  font-family: var(--pixel);
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  padding: 0 0.35rem;
  vertical-align: 0.1em;
}
