/* DEV4LIFE – site styles
   Brand: cobalt board, indigo ink, lavender paper, Byte butter, apple red.
   Everything is built from rounded cells; motion moves in steps like a game. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-latin-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --cobalt: #3440e0;
  --cobalt-deep: #2630b8;
  --cobalt-soft: #dcdcfa;
  --ink: #191a3d;
  --ink-soft: #55577a;
  --paper: #f1f0f8;
  --surface: #ffffff;
  --line: #d9d8ea;
  --apple: #ff5545;
  --butter: #ffd447;
  --butter-deep: #c9a21f;
  --leaf: #59c99a;
  --accent: var(--cobalt);
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-shadow: #000;

  --font: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;

  /* type scale, ratio 4:3 */
  --t-small: 0.92rem;
  --t-0: 1.0625rem;
  --t-1: 1.375rem;
  --t-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  --t-3: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  --t-4: clamp(2.6rem, 1.5rem + 4.8vw, 5rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --radius-board: 28px;
  --radius: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ecebfa;
    --ink-soft: #a9aacb;
    --paper: #12133a;
    --surface: #1c1e4d;
    --line: #2f3168;
    --cobalt-soft: #262a6e;
    --accent: var(--butter);
    --btn-bg: var(--butter);
    --btn-fg: #191a3d;
    --btn-shadow: #8a6d0c;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #ecebfa;
  --ink-soft: #a9aacb;
  --paper: #12133a;
  --surface: #1c1e4d;
  --line: #2f3168;
  --cobalt-soft: #262a6e;
  --accent: var(--butter);
  --btn-bg: var(--butter);
  --btn-fg: #191a3d;
  --btn-shadow: #8a6d0c;
  color-scheme: dark;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-0);
  line-height: 1.55;
  overflow-x: clip;
}

img,
svg,
canvas,
picture {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

/* links inside running text get a pixel underline that marches on hover */
.prose a,
.legal a,
.log-body a {
  text-decoration: none;
  background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 6px) 0 100% / 100% 2px no-repeat;
  padding-bottom: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .prose a:hover,
  .legal a:hover,
  .log-body a:hover {
    animation: march 0.6s steps(3) infinite;
  }
}

@keyframes march {
  to {
    background-position: 6px 100%;
  }
}

:focus-visible {
  outline: 3px solid var(--apple);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--butter);
  color: #191a3d;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
}

.skip:focus {
  left: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 0 5px 0 var(--btn-shadow);
  transition: transform 0.08s, box-shadow 0.08s;
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--btn-shadow);
}

.btn:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--btn-shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink), 0 5px 0 var(--line);
}

.btn-ghost:hover {
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink), 0 7px 0 var(--line);
}

.btn-ghost:active {
  box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 var(--line);
}

.btn-small {
  padding: 8px 16px;
  font-size: var(--t-small);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn:hover,
  .btn:active {
    transform: none;
    transition: none;
  }
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}

.site-head-inner {
  pointer-events: auto;
  position: relative;
  max-width: calc(var(--max) - var(--gutter) * 2 + 32px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 18px;
  transition: background-color 0.2s, box-shadow 0.2s;
}

/* no backdrop blur: it would be recomputed every frame over the animated board */
.site-head.is-scrolled .site-head-inner {
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px -18px rgb(25 26 61 / 0.45);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

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

.brand-mark svg {
  width: 40px;
  height: 40px;
}

/* the app icon is cobalt on light pages and ink on dark ones */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-bg {
    fill: #191a3d;
  }
}

:root[data-theme="dark"] .logo-bg {
  fill: #191a3d;
}

.brand-word svg {
  height: 19px;
  width: auto;
}


.site-nav {
  position: relative;
  display: flex;
  gap: clamp(16px, 2.6vw, 30px);
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
  padding-block: 8px 12px;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* a tiny Byte that crawls under the hovered link */
.nav-snake {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  gap: 2px;
  opacity: 0;
  transform: translateX(var(--x, 0));
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
  pointer-events: none;
}

.nav-snake i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--butter);
}

.nav-snake i:last-child {
  background: #ffc21a;
}

.site-nav.has-snake .nav-snake {
  opacity: 1;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  box-shadow: inset 0 0 0 1.5px var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
}

.menu-toggle-cells {
  display: grid;
  gap: 3px;
}

.menu-toggle-cells i {
  display: block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease-out);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-cells i:nth-child(1) {
  transform: translateX(4px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-cells i:nth-child(3) {
  transform: translateX(-4px);
}

@media (max-width: 760px) {
  .js .menu-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -20px rgb(25 26 61 / 0.5);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s var(--ease-out), visibility 0s 0.2s;
  }

  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s, transform 0.2s var(--ease-out);
  }

  .js .site-nav a {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: var(--t-1);
  }

  .js .site-nav a:hover {
    background: var(--paper);
  }

  .nav-snake {
    display: none;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 6px 16px;
  }
}

@media (max-width: 400px) {
  .brand-word svg {
    height: 14px;
  }
}

/* ---------- reveal: opacity and transform only, so the GPU does the work ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: var(--delay, 0ms);
  }
}

/* ---------- Byte (inline SVG mascot) ---------- */

.byte {
  overflow: visible;
}

[data-byte] {
  display: block;
}

[data-byte] svg {
  width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .byte .byte-eyes {
    transform-box: fill-box;
    transform-origin: center;
    animation: blink 5.2s infinite;
  }

  .byte .byte-tongue {
    transform-box: fill-box;
    transform-origin: left center;
    animation: tongue 3.4s steps(2) infinite;
  }

  .byte .byte-z {
    animation: snooze 2.4s ease-in-out infinite;
  }

  .byte .byte-z + .byte-z {
    animation-delay: 1.2s;
  }

  .byte-hop:hover .byte-body,
  .byte-hop:focus-visible .byte-body {
    animation: hop 0.5s var(--ease-out);
  }
}

.byte .byte-z rect {
  fill: var(--ink-soft);
}

@keyframes blink {
  0%,
  94%,
  100% {
    transform: scaleY(1);
  }
  96% {
    transform: scaleY(0.1);
  }
}

@keyframes tongue {
  0%,
  70% {
    transform: scaleX(1);
  }
  80% {
    transform: scaleX(0);
  }
}

@keyframes snooze {
  0% {
    opacity: 0;
    transform: translate(0, 4px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-3px, -6px);
  }
}

@keyframes hop {
  50% {
    transform: translateY(-4px);
  }
}

/* ---------- hero board ---------- */

.hero {
  padding-top: 18px;
  padding-bottom: clamp(24px, 4vw, 48px);
}

.board {
  position: relative;
  background: var(--cobalt);
  border-radius: var(--radius-board);
  overflow: hidden;
  color: #fff;
}

.board canvas {
  width: 100%;
  height: clamp(340px, 58vh, 620px);
  cursor: crosshair;
  touch-action: pan-y;
}

.board.is-playing canvas {
  touch-action: none;
  cursor: none;
}

.board-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 14px clamp(16px, 2.4vw, 26px) 16px;
  background: var(--cobalt-deep);
  font-size: 0.98rem;
}

.board-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
}

.board-best {
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}

.board-hint {
  flex: 1 1 200px;
  opacity: 0.88;
}

.board-hint:empty {
  display: none;
}

.board-toggle {
  margin-left: auto;
  font: inherit;
  font-weight: 700;
  color: #191a3d;
  background: var(--butter);
  border: 0;
  border-radius: 12px;
  padding: 9px 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--butter-deep);
  transition: transform 0.08s, box-shadow 0.08s;
}

.board-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--butter-deep);
}

.board-toggle:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--butter-deep);
}

.board-toggle:focus-visible {
  outline-color: #fff;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px clamp(24px, 6vw, 80px);
  align-items: end;
  margin-top: clamp(36px, 6vw, 64px);
}

.hero-copy h1 {
  font-size: var(--t-4);
  max-width: 13ch;
}

.hero-copy p {
  font-size: var(--t-1);
  line-height: 1.45;
  max-width: 34ch;
  margin: 0;
  color: var(--ink-soft);
}

.hero-copy p strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 760px) {
  .hero-copy {
    grid-template-columns: 1fr;
  }
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(64px, 10vw, 128px);
  scroll-margin-top: 72px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  font-size: var(--t-3);
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 46ch;
}

.px {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

/* ---------- haballes showcase ---------- */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

@media (max-width: 900px) {
  .showcase {
    grid-template-columns: 1fr;
  }
}

.showcase-name {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.showcase-name img {
  width: 56px;
  height: 56px;
}

.showcase-name h3 {
  font-size: var(--t-3);
  letter-spacing: -0.03em;
}

.showcase-lede {
  font-size: var(--t-1);
  line-height: 1.4;
  max-width: 30ch;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 34px;
  display: grid;
  gap: 12px;
}

.facts li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  max-width: 50ch;
}

.showcase-stage {
  position: relative;
  padding: 34px 0 48px 0;
  perspective: 1400px;
}

.stage-tilt {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s var(--ease-out);
}

.frame {
  margin: 0;
  background: var(--surface);
  overflow: hidden;
}

.frame img {
  width: 100%;
  height: auto;
}

.frame-browser {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgb(25 26 61 / 0.55);
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.frame-bar i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--line);
}

.frame-url {
  margin-left: 10px;
  flex: 1;
  max-width: 260px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--surface);
  border-radius: 6px;
  padding: 2px 10px;
}

.frame-phone {
  position: absolute;
  z-index: 2;
  width: 23%;
  right: -5%;
  bottom: -4%;
  border-radius: 22px;
  border: 5px solid #191a3d;
  box-shadow: 0 30px 50px -24px rgb(25 26 61 / 0.7);
  transform: translateZ(40px) translateY(var(--lift, 0px));
}

.stage-peek {
  position: absolute;
  right: 30%;
  top: 0;
  width: 24px;
  transform: translateY(var(--peek, 0%));
  transition: transform 0.5s var(--ease-out);
  z-index: 0;
}

.stage-peek svg {
  width: 100%;
  height: auto;
}

.showcase-stage.is-in .stage-peek {
  --peek: -34%;
}

.showcase-stage.is-shy .stage-peek {
  --peek: 0%;
}

@media (max-width: 900px) {
  .frame-phone {
    right: -2%;
    width: 28%;
  }

  .stage-peek {
    right: auto;
    left: 18%;
  }
}

/* glimpses: real sections of haballes, pinned like stickers */
.glimpses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
  margin-top: clamp(48px, 7vw, 88px);
}

@media (max-width: 860px) {
  .glimpses {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 360px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 12px var(--gutter) 24px;
    margin-inline: calc(var(--gutter) * -1);
    scrollbar-width: thin;
  }

  .glimpse {
    scroll-snap-align: center;
  }
}

.glimpse {
  margin: 0;
  rotate: var(--tilt, -1.5deg);
  transition: rotate 0.35s var(--ease-out), translate 0.35s var(--ease-out);
}

.glimpse:nth-child(2) {
  --tilt: 1.2deg;
}

.glimpse:nth-child(3) {
  --tilt: -0.8deg;
}

.glimpse:hover {
  rotate: 0deg;
  translate: 0 -6px;
}

.glimpse-img {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -26px rgb(25 26 61 / 0.6);
}

.glimpse-img picture {
  height: 100%;
}

/* phone-width crops are tall: show the top and let the rest fade out */
.glimpse-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}

.glimpse figcaption {
  margin-top: 12px;
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.glimpse figcaption strong {
  display: block;
  color: var(--ink);
  font-size: var(--t-0);
}

@media (prefers-reduced-motion: reduce) {
  .glimpse,
  .stage-tilt,
  .stage-peek {
    transition: none;
  }
}

/* the empty slot */
.slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px 28px;
  align-items: center;
  margin-top: clamp(48px, 7vw, 88px);
  padding: clamp(20px, 3vw, 32px);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

.slot-byte {
  width: clamp(70px, 10vw, 104px);
}

.slot h3 {
  font-size: var(--t-2);
  color: var(--ink);
  margin-bottom: 6px;
}

.slot p {
  margin: 0;
  max-width: 52ch;
}

/* ---------- open source ---------- */

.oss-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}

@media (max-width: 760px) {
  .oss-intro {
    grid-template-columns: 1fr;
  }
}

.oss-intro .prose {
  font-size: var(--t-1);
  line-height: 1.5;
}

.oss-intro .prose p {
  max-width: 40ch;
}

.oss-byte {
  justify-self: center;
  width: min(260px, 70%);
}

/* contributions as a git graph whose line is Byte's trail */
.oss {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.oss::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(var(--butter) 0 10px, transparent 10px 13px);
  transform-origin: top;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .oss::before {
      animation: trail linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 60%;
    }
  }
}

@keyframes trail {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

.oss-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 24px;
  padding: 0 0 clamp(28px, 4vw, 40px) 52px;
}

.oss-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 4px var(--cobalt);
}

.oss-item[data-status="merged"]::before {
  background: var(--cobalt);
  box-shadow: inset 0 0 0 4px var(--cobalt), inset 0 0 0 7px var(--surface);
}

.oss-repo {
  font-weight: 700;
  font-size: var(--t-small);
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.oss-item h3 {
  font-size: var(--t-1);
  line-height: 1.25;
  grid-column: 1;
}

.oss-item p {
  grid-column: 1;
  margin: 2px 0 0;
  max-width: 62ch;
  color: var(--ink-soft);
}

.oss-meta {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: var(--t-small);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .oss-item {
    grid-template-columns: 1fr;
  }

  .oss-meta {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--cobalt-soft);
  color: var(--ink);
}

.status[data-status="open"] {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.oss-more {
  margin: 8px 0 0 52px;
}

/* ---------- log ---------- */

.log {
  list-style: none;
  margin: 0;
  padding: 0;
}

.log-entry {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 8px clamp(20px, 4vw, 56px);
  padding-block: clamp(22px, 3vw, 34px);
  border-top: 1px solid var(--line);
}

.log-entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.log-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.log-body h3 {
  font-size: var(--t-2);
  margin-bottom: 12px;
}

.log-body p,
.log-body ul {
  max-width: 62ch;
}

.log-body ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}

.log-body > :last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .log-entry {
    grid-template-columns: 1fr;
  }

  .log-meta {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  padding: 3px 10px 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--chip, var(--cobalt));
}

.chip[data-project="haballes"] {
  --chip: #b9873a;
}

.chip[data-project="dev4life"] {
  --chip: var(--cobalt);
}

.log-more {
  margin-top: 36px;
}

/* the full log page: Byte's trail runs down the timeline */
.log-page .log {
  position: relative;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(var(--butter) 0 10px, transparent 10px 13px);
  transform-origin: top;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .timeline::before {
      animation: trail linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 40%;
    }
  }
}

.timeline-end {
  position: relative;
  left: -40px;
  width: 64px;
  margin-top: 8px;
}

.page-head {
  padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 48px);
}

.page-head h1 {
  font-size: var(--t-4);
  margin-bottom: 16px;
}

.page-head p {
  font-size: var(--t-1);
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0;
}

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-head-byte {
  width: clamp(90px, 14vw, 170px);
  flex: none;
}

@media (max-width: 560px) {
  .page-head-byte {
    display: none;
  }
}

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.filter button {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: inset 0 0 0 1.5px var(--line);
  border-radius: 10px;
  padding: 6px 14px;
  cursor: pointer;
}

.filter button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.log-year {
  font-size: var(--t-3);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  margin: clamp(32px, 5vw, 56px) 0 clamp(16px, 2vw, 24px);
}

.log-year:first-of-type {
  margin-top: 0;
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
}

.about-text {
  font-size: var(--t-1);
  line-height: 1.5;
}

.about-text p {
  max-width: 34ch;
}

.meet {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 36px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--t-0);
}

.meet-byte {
  width: 104px;
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--cobalt);
}

.meet p {
  margin: 0 0 8px;
  max-width: 40ch;
}

.meet a {
  font-weight: 700;
}

/* principles as stickers */
.stickers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 480px) {
  .stickers {
    grid-template-columns: 1fr;
  }
}

.sticker {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 0 var(--line);
  rotate: var(--tilt, -1.2deg);
  transition: rotate 0.3s var(--ease-out), translate 0.3s var(--ease-out);
}

.sticker:nth-child(2) {
  --tilt: 1.4deg;
}

.sticker:nth-child(3) {
  --tilt: 0.8deg;
}

.sticker:nth-child(4) {
  --tilt: -1.6deg;
}

.sticker:hover {
  rotate: 0deg;
  translate: 0 -4px;
}

.sticker-icon {
  display: block;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: var(--cobalt);
}

.sticker:nth-child(2) .sticker-icon {
  color: var(--apple);
}

.sticker:nth-child(3) .sticker-icon {
  color: #b9873a;
}

.sticker:nth-child(4) .sticker-icon {
  color: var(--leaf);
}

.sticker-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (prefers-reduced-motion: no-preference) {
  .sticker:hover .sticker-icon {
    animation: hop 0.45s var(--ease-out);
  }
}

.sticker strong {
  display: block;
  font-size: var(--t-1);
  line-height: 1.2;
  margin-bottom: 6px;
}

.sticker span {
  color: var(--ink-soft);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sticker-icon {
    color: var(--butter);
  }
}

/* ---------- call to support ---------- */

.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px 32px;
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius-board);
  background-color: var(--cobalt);
  background-image: radial-gradient(rgb(255 255 255 / 0.13) 1.6px, transparent 1.9px);
  background-size: 28px 28px;
  color: #fff;
}

.callout h2 {
  font-size: var(--t-2);
  margin-bottom: 6px;
}

.callout p {
  margin: 0;
}

.callout-byte {
  width: clamp(84px, 11vw, 130px);
}

.callout .btn {
  --btn-bg: var(--butter);
  --btn-fg: #191a3d;
  --btn-shadow: var(--butter-deep);
}

@media (max-width: 700px) {
  .callout {
    grid-template-columns: 1fr;
  }
}

/* ---------- support page ---------- */

.topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

@media (max-width: 700px) {
  .topics {
    grid-template-columns: 1fr;
  }
}

.topic {
  display: grid;
  gap: 4px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: inset 0 0 0 1.5px var(--line), 0 5px 0 var(--line);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}

.topic strong {
  font-size: var(--t-1);
}

.topic span {
  color: var(--ink-soft);
  font-size: var(--t-small);
}

.topic[aria-pressed="true"] {
  box-shadow: inset 0 0 0 3px var(--cobalt), 0 5px 0 var(--cobalt);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topic[aria-pressed="true"] {
    box-shadow: inset 0 0 0 3px var(--butter), 0 5px 0 var(--butter-deep);
  }
}

.topic:active {
  transform: translateY(5px);
  box-shadow: inset 0 0 0 3px var(--cobalt), 0 0 0 var(--cobalt);
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  padding-bottom: clamp(64px, 9vw, 112px);
}

@media (max-width: 860px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}

.support-grid h2 {
  font-size: var(--t-2);
  margin-bottom: 18px;
}

.mail-preview {
  font-family: inherit;
  margin: 0 0 24px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--t-small);
  white-space: pre-wrap;
  color: var(--ink-soft);
}

.mail-preview strong {
  color: var(--ink);
}

.support-grid .btn + .prose {
  margin-top: 22px;
}

.tips {
  padding-left: 1.2em;
}

.tips li {
  margin-bottom: 0.6em;
}

.aside-card {
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  align-self: start;
}

.aside-card h2 {
  font-size: var(--t-1);
}

/* ---------- brand page ---------- */

.brand-section {
  padding-block: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--line);
}

.brand-section h2 {
  font-size: var(--t-3);
  margin-bottom: 12px;
}

.brand-section > .wrap > p {
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 32px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.tile {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tile-art {
  display: grid;
  place-items: center;
  height: 200px;
  padding: 28px;
}

.tile-art svg,
.tile-art img {
  max-height: 144px;
  width: auto;
  height: auto;
  max-width: 100%;
}

.tile-art.on-paper {
  background: #f1f0f8;
  color: #191a3d;
}

.tile-art.on-ink {
  background: #191a3d;
  color: #f1f0f8;
}

.tile-art.on-cobalt {
  background: var(--cobalt);
  color: #fff;
}

.tile-art.on-butter {
  background: var(--butter);
  color: #191a3d;
}

.tile figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 12px 16px 14px;
  font-size: var(--t-small);
}

.tile figcaption strong {
  font-size: var(--t-0);
}

.downloads {
  display: flex;
  gap: 12px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.swatch {
  display: grid;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: copy;
}

.swatch-color {
  height: 96px;
  background: var(--swatch);
}

.swatch-cobalt {
  --swatch: #3440e0;
}

.swatch-ink {
  --swatch: #191a3d;
}

.swatch-paper {
  --swatch: #f1f0f8;
  box-shadow: inset 0 -1px 0 var(--line);
}

.swatch-butter {
  --swatch: #ffd447;
}

.swatch-apple {
  --swatch: #ff5545;
}

.swatch-leaf {
  --swatch: #59c99a;
}

.swatch-text {
  display: grid;
  padding: 12px 14px;
  font-size: var(--t-small);
}

.swatch-text strong {
  font-size: var(--t-0);
}

.swatch-text span[data-copied] {
  color: var(--accent);
  font-weight: 700;
}

.type-specimen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

@media (max-width: 760px) {
  .type-specimen {
    grid-template-columns: 1fr;
  }
}

.specimen {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.specimen-big {
  font-size: clamp(3rem, 2rem + 4vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.specimen-pixel svg {
  width: 100%;
  height: auto;
  color: var(--cobalt);
  margin-bottom: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .specimen-pixel svg {
    color: var(--butter);
  }
}

.icons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.icons-row span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--cobalt);
}

.icons-row svg {
  width: 36px;
  height: 36px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icons-row span {
    color: var(--butter);
  }
}

.rules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.rules li {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.rules strong {
  display: block;
  margin-bottom: 4px;
}

/* ---------- legal pages ---------- */

.legal {
  max-width: 72ch;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.legal h2 {
  font-size: var(--t-2);
  margin: 2.2em 0 0.6em;
}

.legal h3 {
  font-size: var(--t-1);
  margin: 1.6em 0 0.4em;
}

.legal address {
  font-style: normal;
}

.legal ul {
  padding-left: 1.2em;
}

.legal li {
  margin-bottom: 0.4em;
}

.legal .stand {
  color: var(--ink-soft);
  margin-top: 3em;
}

/* ---------- 404 ---------- */

.lost {
  display: grid;
  justify-items: start;
  gap: 24px;
  padding-block: clamp(48px, 10vw, 120px);
}

.lost-byte {
  width: clamp(140px, 22vw, 240px);
}

.lost h1 {
  font-size: var(--t-4);
}

.lost p {
  font-size: var(--t-1);
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- footer ---------- */

.site-foot {
  margin-top: clamp(40px, 6vw, 80px);
  background: var(--ink);
  color: var(--paper);
  padding-top: clamp(48px, 7vw, 88px);
  overflow: hidden;
}

.site-foot a {
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--butter);
}

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

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

  .foot-brand {
    grid-column: 1 / -1;
  }
}

.foot-claim {
  font-size: var(--t-1);
  line-height: 1.4;
  max-width: 26ch;
  margin-bottom: 22px;
}

.site-foot .btn {
  --btn-bg: var(--butter);
  --btn-fg: #191a3d;
  --btn-shadow: #8a6d0c;
}

.site-foot .btn:hover {
  color: #191a3d;
}

.foot-col h2 {
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.6;
  margin-bottom: 12px;
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.foot-mark {
  position: relative;
  margin-top: clamp(40px, 6vw, 72px);
  padding-inline: var(--gutter);
  color: #3a3d8f;
}

.foot-mark svg {
  width: 100%;
  height: auto;
}

.foot-mark canvas {
  width: 100%;
  touch-action: pan-y;
}

.foot-mark.is-live svg {
  display: none;
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px 26px;
  font-size: var(--t-small);
  opacity: 0.75;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-foot {
    background: #0b0c28;
    color: #ecebfa;
  }
}
