/* WaggleHaus — landing page
 *
 * Palette and type borrow from two places: Scandinavian design (warm paper,
 * charcoal ink, one honest accent, lots of air) and systems-y engineering
 * sites (monospace metadata, thin rules, a faint dotted grid). The bee GIF is
 * rendered from the same palette in website/tools/make_bee_gif.py.
 */

:root {
  --paper: #f3efe6;
  --ink: #1e1c19;
  --muted: #7a7367;
  --line: #d9d2c3;
  --honey: #e0a526;
  --honey-dark: #b8801a;

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--paper);
  background-image: radial-gradient(var(--line) 1px, transparent 1.5px);
  background-size: 28px 28px;
  background-position: 14px 14px;
}

/* ---- top / bottom bars ---------------------------------------------------- */

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.bar a {
  color: inherit;
  text-decoration: none;
}

.bar a:hover,
.bar a:focus-visible {
  color: var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink) !important;
  font-weight: 500;
}

/* a single "pixel" of honey */
.px {
  width: 10px;
  height: 10px;
  background: var(--honey);
  box-shadow: inset -2px -2px 0 var(--honey-dark);
}

.status i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  background: var(--honey);
  vertical-align: baseline;
  animation: blink 1.6s steps(2, start) infinite;
}

@keyframes blink { to { visibility: hidden; } }

/* ---- main ----------------------------------------------------------------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 24px 24px 72px;
  text-align: center;
}

.fig {
  margin: 0;
  width: min(100%, 560px);
}

.fig-frame {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
}

/* corner ticks, as on a technical drawing */
.fig-frame .c {
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
}
.fig-frame .c.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.fig-frame .c.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.fig-frame .c.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.fig-frame .c.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.fig img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(30px, 5.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 .dots { color: var(--honey-dark); }

.lede {
  margin: 0;
  max-width: 46ch;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.lede a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

.lede a:hover { text-decoration-color: var(--ink); }

/* ---- small screens / motion ---------------------------------------------- */

@media (max-width: 480px) {
  .bar { padding: 14px 16px; font-size: 12px; }
  footer.bar { flex-direction: column; align-items: flex-start; gap: 6px; }
  main { padding: 16px 16px 56px; gap: 32px; }
  .fig-frame { padding: 14px; }
  figcaption { flex-direction: column; gap: 2px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .status i { animation: none; }
}
