/* One light, misty look: fog and sage around ivory tusks. The page is single-theme by
   choice, so it sets every colour itself. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/pixelify-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --fog: #f2f5f4;
  --mist: #dee6e4;
  --ink: #2f3a34;
  --sage-ink: #55645c;
  --ivory: #fffcf3;
  --on-forest: #edf2ee;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter-left: max(16px, env(safe-area-inset-left, 0px));
  --gutter-right: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fog); color: var(--ink); font-family: var(--mono); font-size: 16px; line-height: 1.55; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(18px, env(safe-area-inset-top, 0px));
  padding-left: max(24px, var(--gutter-left));
  padding-right: max(24px, var(--gutter-right));
}
.wordmark { font-family: var(--pixel); font-weight: 700; font-size: 28px; line-height: 1; text-decoration: none; }
.top-link { font-size: 14px; text-decoration: none; padding: 10px 4px; }
.top-link:hover, .wordmark:hover { color: var(--sage-ink); }

.hero {
  --inner: min(30svh, 34vw);
  position: relative;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background: var(--fog);
}
.hero canvas { position: absolute; left: 0; top: 0; image-rendering: pixelated; }
.hero svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero text { fill: var(--sage-ink); font-family: var(--mono); font-weight: 500; }
.hero g { transform-box: view-box; animation: turn 240s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

.hero-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: var(--gutter-left);
  padding-right: var(--gutter-right);
  text-align: center;
}
.hero-copy > div {
  display: grid;
  justify-items: center;
  gap: calc(var(--inner) * 0.08);
  max-width: calc(var(--inner) * 1.5);
}
h1 {
  margin: 0;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: calc(var(--inner) * 0.2);
  line-height: 0.98;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.lede {
  margin: 0;
  max-width: calc(var(--inner) * 1.2);
  font-size: clamp(13px, calc(var(--inner) * 0.052), 17px);
  color: var(--ink);
  text-wrap: pretty;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  font-size: 14px;
  text-decoration: none;
}

/* Once the ring is drawn the copy sits on the dark middle of the forest. */
.hero.is-drawn h1, .hero.is-drawn .soon { color: var(--ivory); }
.hero.is-drawn .lede { color: var(--on-forest); }
.hero.is-drawn .soon { border-color: var(--ivory); }
.hero.is-drawn .soon:hover { background: var(--ivory); color: var(--ink); }
.hero.is-drawn :focus-visible { outline-color: var(--ivory); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
  padding-left: max(24px, var(--gutter-left));
  padding-right: max(24px, var(--gutter-right));
  border-top: 2px solid var(--mist);
  font-size: 13px;
  color: var(--sage-ink);
}
.foot p { margin: 0; }

/* The install page: a system switch and the command box inside the ring, then the steps. */
.hero-copy > .install { display: grid; justify-items: center; gap: calc(var(--inner) * 0.06); max-width: calc(var(--inner) * 1.6); }
.install h1 { font-size: calc(var(--inner) * 0.17); }
.systems { display: none; flex-wrap: wrap; justify-content: center; gap: 6px; }
.install.is-ready .systems { display: flex; }
.systems [role="tab"] {
  min-height: 40px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 500 13px var(--mono);
  cursor: pointer;
}
.systems [aria-selected="true"] { background: var(--ink); color: var(--ivory); }
.hero.is-drawn .systems [role="tab"] { border-color: var(--ivory); color: var(--ivory); }
.hero.is-drawn .systems [aria-selected="true"] { background: var(--ivory); color: var(--ink); }
.command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(400px, calc(var(--inner) * 1.45));
  padding: 14px 16px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 15px;
  text-align: left;
}
.command code { font: inherit; overflow-wrap: anywhere; }
.command .prompt { color: #a9bab2; }
.copy { min-height: 32px; border: 0; background: none; color: #a9bab2; font: 12px var(--mono); cursor: pointer; }
.app { margin: 0; font-size: 14px; color: var(--ink); }
.hero.is-drawn .app { color: var(--on-forest); }

.steps {
  padding-top: 64px;
  padding-bottom: 72px;
  padding-left: max(24px, var(--gutter-left));
  padding-right: max(24px, var(--gutter-right));
}
.steps ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.steps li { display: grid; gap: 10px; align-content: start; }
.steps .n { font: 700 40px/1 var(--pixel); color: #7e9488; }
.steps h3 { margin: 0; font: 700 26px/1.1 var(--pixel); }
.steps p { margin: 0; max-width: 34ch; font-size: 15px; color: #3e4a44; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .systems [role="tab"] { min-height: 40px; padding: 6px 10px; font-size: 12px; }
}
@media (max-width: 380px) {
  .hero-copy > .install { gap: 6px; }
  .install h1 { font-size: 22px; }
  .systems { gap: 4px; }
  .systems [role="tab"] { padding: 4px 7px; font-size: 11px; }
  .command { padding: 8px 10px; font-size: 12px; }
  .app { font-size: 11px; }
}

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