/* pigface.io. One stylesheet, tokens first, both themes from the system
   setting. Type: Instrument Sans (variable, latin) and Fragment Mono, self
   hosted, because the site's CSP allows nothing from another origin. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/fragment-mono.woff2") format("woff2");
}
@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/silkscreen.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/jost-italic-700.woff2") format("woff2");
}

:root {
  --bg: #f4f7f5;
  --fg: #0f221d;
  --mute: #44544f;
  --line: #d5ddd9;
  --card: #ffffff;
  --petal: #a6209f;
  --halo: #f7d3f4;
  --centre: #ffc233;
  --accent: #a6209f;
  --accent-ink: #ffffff;
  --string: #c98a00;
  --sans: "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pixel: "Silkscreen", var(--mono);
  --box: "Jost", Futura, "Century Gothic", var(--sans);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f221d;
    --fg: #f4f7f5;
    --mute: #b9c7c1;
    --line: #2a3d37;
    --card: #15302a;
    --petal: #c843c1;
    --accent: #c843c1;
    --accent-ink: #0f221d;
    --string: #ffc233;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 0 72px;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
h1 {
  font-size: clamp(42px, 7.2vw, 88px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 16ch;
}
h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  max-width: 22ch;
}
h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
p {
  margin: 0;
}
.lede {
  font-size: 20px;
  line-height: 1.45;
  max-width: 58ch;
}
.muted {
  color: var(--mute);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.eyebrow.pixel {
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* the mark */
.flower {
  width: 1em;
  height: 1em;
  flex: none;
}
.petals {
  fill: var(--petal);
}
.halo {
  fill: var(--halo);
}
.centre {
  fill: var(--centre);
}
.lock {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  text-decoration: none;
  font-size: 26px;
  line-height: 1;
}
.lock .flower {
  font-size: 1.15em;
}
.lock .word {
  font-weight: 600;
  letter-spacing: -0.045em;
  padding-bottom: 0.08em;
}
.lock.small {
  font-size: 20px;
}

/* layout */
.nav,
main > section,
footer {
  max-width: 1180px;
  margin-inline: auto;
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}
.nav .links {
  display: flex;
  gap: 22px;
  font-size: 15px;
  font-weight: 500;
  color: var(--mute);
}
.nav .links a {
  text-decoration: none;
}
.nav .links a:hover {
  color: var(--fg);
}
.nav .btn {
  margin-left: auto;
}
@media (max-width: 720px) {
  .nav .links {
    display: none;
  }
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 15px/1 var(--sans);
  letter-spacing: -0.01em;
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn:hover {
  filter: brightness(1.08);
}

main > section {
  padding-block: 72px 0;
  display: grid;
  gap: 28px;
  align-content: start;
}
main > section > * {
  min-width: 0;
}
.hero {
  padding-top: 64px;
}
.hero .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.stats {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}
.stats > div {
  padding: 18px 20px 18px 0;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.stats > div + div {
  padding-left: 20px;
}
.stats > div:last-child {
  border-right: 0;
}
.stats dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.stats dd {
  margin: 6px 0 0;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero .foot {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  margin-top: -12px;
}
@media (max-width: 720px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .stats > div,
  .stats > div + div {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stats > div:last-child {
    border-bottom: 0;
  }
}

/* cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cards article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* how it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.steps li {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
  }
}
.code {
  margin: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  color: var(--fg);
}
.code .c {
  color: var(--mute);
}
.code .k {
  color: var(--accent);
}
.code .s {
  color: var(--string);
}

/* contact */
.mail {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mail code {
  font-family: var(--mono);
  font-size: clamp(20px, 3.4vw, 28px);
  letter-spacing: -0.01em;
  user-select: all;
  overflow-wrap: anywhere;
}
.copied {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  min-width: 6ch;
}

footer .readout {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--mute);
}
footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

/* the 404: the box logo, from the skate layer */
.lost {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  text-align: center;
}
.boxlogo {
  font-family: var(--box);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 1;
  letter-spacing: -0.01em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.12em 0.38em 0.2em;
  border-radius: 2px;
}
