@font-face {
  font-family: "Lexend";
  src: url("/assets/fonts/lexend.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* taken from the Lomi artwork */
  --ink: #0c0f14;
  --panel: #131720;
  --track: #23262f;
  --line: #2a2e3a;
  --text: #e8ebf3;
  --muted: #9aa3b8;
  --mood: #6fe8ab;
  --sans: "Lexend", ui-rounded, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --page: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}
body[data-mood="normal"]  { --mood: #82b5fc; }
body[data-mood="working"] { --mood: #ab8afc; }
body[data-mood="heavy"]   { --mood: #fdc36c; }
body[data-mood="tired"]   { --mood: #fd8b4c; }
body[data-mood="almost"]  { --mood: #fd6e6e; }
body[data-mood="out"]     { --mood: #8f8ba3; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 300 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--mood); text-underline-offset: 0.2em; }
a:hover { color: var(--mood); }
:focus-visible { outline: 2px solid var(--mood); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -0.02em; max-width: 22ch; }
h3 { font-size: 1.15rem; line-height: 1.3; }
p { margin: 0; }
b { font-weight: 500; }
code { font-family: var(--mono); font-size: 0.9em; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--mood); color: var(--ink); padding: 0.4rem 0.8rem; border-radius: 6px; z-index: 20; }
.skip:focus { left: 0.5rem; }

/* The page's navigation is a macOS menu bar: the place Lomi lives. */
.menubar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 2.75rem; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem; font-weight: 400;
}
.menubar a { text-decoration: none; }
.menubar-name { font-weight: 700; color: var(--mood); transition: color 0.4s; }
.menubar nav { display: flex; gap: 1.25rem; margin-right: auto; }
.menubar-status {
  display: flex; align-items: center; gap: 0.4rem;
  font: 500 0.875rem var(--mono); color: var(--mood); transition: color 0.4s;
  min-width: 4.4rem; justify-content: flex-end;
}
.menubar-status img { width: 30px; height: 30px; }

.built {
  display: inline-flex; align-items: center; gap: 0.45em;
  padding: 0.45rem 0.95rem; border: 1px solid var(--line); border-radius: 999px;
  font: 500 0.875rem var(--mono); text-decoration: none; white-space: nowrap;
}
.built:hover { border-color: var(--mood); }
.built-bar { padding: 0.2rem 0.7rem; font-size: 0.8125rem; }

.hero {
  max-width: var(--page); margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.lead { margin-top: 1.5rem; font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 34rem; }
.hero .cmd { margin-top: 2rem; max-width: 34rem; }
.hero-links { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.fine { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }

.button {
  display: inline-block; padding: 0.7rem 1.25rem; border-radius: 999px;
  background: var(--mood); color: var(--ink); font-weight: 600; text-decoration: none;
  transition: background 0.4s;
}
.button:hover { color: var(--ink); filter: brightness(1.1); }
.button-quiet { background: none; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.button-quiet:hover { color: var(--mood); box-shadow: inset 0 0 0 1px var(--mood); filter: none; }

.cmd {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.55rem 0.55rem 0.55rem 1rem;
}
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 0.3rem 0; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd code::before { content: "$ "; color: var(--muted); }
.copy {
  flex: none; min-width: 4.6rem; padding: 0.4rem 0.7rem;
  font: 500 0.8125rem var(--sans); color: var(--text);
  background: var(--track); border: 0; border-radius: 8px; cursor: pointer;
}
.copy:hover { background: var(--line); }
.copy.done { background: var(--mood); color: var(--ink); }

/* The gauge: a live ring drawn by the page, with the traced Lomi inside it. */
.gauge { text-align: center; }
.gauge-ring { position: relative; max-width: 24rem; margin: 0 auto; aspect-ratio: 1; }
.gauge-ring svg, .gauge-lomi { position: absolute; inset: 0; width: 100%; height: 100%; }
.gauge-ring svg { transform: rotate(-90deg); }
.ring-track, .ring-arc { fill: none; stroke-width: 23; }
.ring-track { stroke: var(--track); }
.ring-arc { stroke: var(--mood); stroke-linecap: round; transition: stroke 0.4s, stroke-dasharray 0.25s ease-out; }
.gauge-read { margin-top: 0.25rem; font-size: 1.25rem; color: var(--muted); }
.gauge-read strong { font: 700 2.25rem var(--sans); letter-spacing: -0.02em; color: var(--mood); margin-right: 0.4rem; transition: color 0.4s; font-variant-numeric: tabular-nums; }
.gauge-slider { display: block; max-width: 20rem; margin: 1.1rem auto 0; font-size: 0.9rem; color: var(--muted); }
.gauge-slider input { display: block; width: 100%; margin-top: 0.6rem; accent-color: var(--mood); cursor: grab; }

.band { max-width: var(--page); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter); border-top: 1px solid var(--line); }
.intro { margin-top: 1rem; color: var(--muted); max-width: 40rem; }
.intro a { color: var(--text); }

.shot { margin-top: 2.5rem; width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px #000; }
.gets { margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 2.5rem; }
.gets dt { font-weight: 600; }
.gets dd { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.975rem; }

/* four above, three centred below: the layout of the original artwork */
.moods { list-style: none; margin: 2.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 0; }
.moods li { text-align: center; flex: 0 0 25%; padding: 0 0.5rem; }
.moods img { width: 100%; max-width: 13rem; margin: 0 auto; }
.moods strong { display: block; margin-top: 0.4rem; font-size: 1.3rem; font-weight: 700; color: var(--c); }
.moods span { color: var(--muted); }

.steps { margin: 2.5rem 0 0; padding: 0; list-style: none; counter-reset: step; max-width: 44rem; }
.steps li { counter-increment: step; position: relative; padding: 0 0 2.25rem 3.25rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.2rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 0.95rem var(--mono); color: var(--mood); box-shadow: inset 0 0 0 2px var(--track);
}
.steps p { margin-top: 0.6rem; color: var(--muted); }
.steps p b { color: var(--text); }
.steps .cmd { margin-top: 0.6rem; }
.after { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem 2.5rem; padding-top: 2.25rem; border-top: 1px solid var(--line); }
.after > div { min-width: 0; }
.after .cmd { margin-top: 0.75rem; }
.more { margin-top: 2.25rem; color: var(--muted); }
.more a { color: var(--text); }

.qa { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3.5rem; }
.qa p { margin-top: 0.5rem; color: var(--muted); font-size: 0.975rem; }
.qa p b, .qa p a { color: var(--text); }

.foot {
  max-width: var(--page); margin: 0 auto; padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  font-size: 0.925rem; color: var(--muted);
}
.heart { color: #fd6e6e; }

@media (max-width: 66rem) {
  .built-bar { display: none; }
}
@media (max-width: 50rem) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .gauge { order: -1; }
  .gauge-ring { max-width: 17rem; }
  .moods li { flex-basis: 50%; }
  .qa { grid-template-columns: minmax(0, 1fr); }
  .gets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 34rem) {
  .gets { grid-template-columns: 1fr; }
  .menubar { gap: 1rem; }
  .menubar nav { gap: 0.9rem; }
  .menubar nav a:first-child, .menubar nav a:nth-child(4), .menubar nav a:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* At 100% the artwork's ring goes dark: there is nothing left to show. */
body[data-mood="out"] .ring-arc { stroke: #3a3d4b; }
