/* elfd.io — one page, no framework.
 *
 * The palette is the portrait's, not the app's: crimson on cream. The app keeps its single green
 * accent (plan D7); this is the site's own identity, taken from the artwork.
 */
:root {
  --paper: #f7f4f1;
  --ink: #2b2b2b;
  --muted: #9d9d9d;
  --crimson: #a8323a;
  --chip: #3b4657;
  --chip-ink: #f2f2f2;
  --button: #4a5a74;
  --button-hover: #3f4d64;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  padding: 48px 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.bust {
  width: 140px;
  height: auto;
  flex: none;
  image-rendering: auto;
}

/* The column is a fixed width on desktop: the version label grows by three characters when the
   channel changes, and without this the centred pair slides left every time you switch. */
.copy {
  flex: 0 0 560px;
  max-width: 100%;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* "d" as in daemon, not as in the last letter of a word: dimmer, and not part of the wordmark. */
.dim { color: #b4ada7; }

/* The version *is* the channel switch: a dashed underline says it is pressable without a second
   control taking up space. */
.version {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--crimson);
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: underline dashed rgba(168, 50, 58, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 120ms ease;
}

.version:hover { text-decoration-color: var(--crimson); }

.version .swap { align-self: center; opacity: 0.75; }

.tagline {
  margin: 14px 0 22px;
  font-size: 18px;
  color: #7c7772;
  line-height: 1.35;
}

.command {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--chip);
  color: var(--chip-ink);
  border-radius: 2px;
  padding: 11px 12px 11px 14px;
  font-family: var(--mono);
  font-size: 13px;
  width: 100%;
}

/* One line, always: a wrapped command reads as two commands, and it changes the chip's height
   between channels. The fade lives on the *container*, not the text — a growing `code` box would
   fade its own last characters even when they fit. */
.command-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%);
  mask-image: linear-gradient(to right, #000 90%, transparent 100%);
}

.command code {
  font: inherit;
  white-space: nowrap;
  display: block;
}

/* The button, not the column that holds it: `.copy` is the text block, and a second rule with the
   same name silently resized it to 26 px — which is why the whole hero laid itself out in a row. */
.copy-button {
  flex: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #4d5a6f;
  color: #dfe4ea;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.copy-button:hover { background: #586a84; color: #fff; }

/* The icon swaps to a tick and back; the button itself does not change colour — a green flash reads
   as a change of state when it is only an acknowledgement. */
.copy-button .icon {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 130ms ease, transform 130ms ease;
}

.copy-button .icon-check { opacity: 0; transform: scale(0.85); }
.copy-button.copied .icon-copy { opacity: 0; transform: scale(0.85); }
.copy-button.copied .icon-check { opacity: 1; transform: scale(1); }

.or {
  margin: 10px 0;
  font-size: 14px;
  color: var(--muted);
}

.download {
  display: inline-block;
  background: var(--button);
  color: #fff;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  padding: 12px 16px;
  border-radius: 2px;
  transition: background-color 120ms ease;
}

.download:hover { background: var(--button-hover); }
.download .meta { color: #c9d2de; }

.also {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.also a { color: var(--muted); text-decoration: none; border-bottom: 1px solid #ddd6cf; }
.also a:hover { color: var(--ink); }

/* Narrow: stack, centre, and let the command wrap instead of overflowing. */
@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 40px 24px 56px;
    text-align: left;
  }

  .bust { width: 96px; }
  h1 { font-size: 22px; }

  .tagline { font-size: 16px; margin: 12px 0 18px; }

  /* One notch smaller so the beta command fits at 390 px; nightly fades rather than wrapping. */
  .command { font-size: 12px; padding: 10px 10px 10px 12px; }

  .copy { flex: 1 1 auto; width: 100%; }

  .download { display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Without JS the version stays an ellipsis and the links still work: every default is beta. */
