/* florxlabs.com — "Ledger". Single page, no build step, no runtime dependencies. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark light;

  --bg:     #0a0b0d;
  --text:   #e9ecf1;
  --muted:  #939caa;
  --faint:  #7b8798;
  --line:   rgba(255, 255, 255, 0.11);
  --card:   rgba(255, 255, 255, 0.035);
  --accent: #ffb545;

  --ring:   0 0 0 3px rgba(255, 181, 69, 0.32);

  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --max:    34rem;   /* 544px — prose measure, do not change */
  --rail:   170px;
  --gutter: 40px;
  --inset:  26px;
  --pad:    44px;

  /* The design was authored at a 1080px outer width, i.e. a 1028px frame.
     Past that the metadata rail is just 1fr of nothing, so the frame caps
     and centres instead of stretching to the viewport. */
  --frame:  1028px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:     #f6f6f4;
    --text:   #14161a;
    --muted:  #4d5765;
    --faint:  #616a78;
    --line:   rgba(10, 12, 20, 0.14);
    --card:   rgba(10, 12, 20, 0.035);
    --accent: #8a5512;
    --ring:   0 0 0 3px rgba(138, 85, 18, 0.28);
  }
}

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

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

body {
  margin: 0;
  padding: var(--inset);
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Frame ────────────────────────────────────────────────── */

.frame {
  position: relative;
  max-width: var(--frame);
  margin-inline: auto;
  border: 1px solid var(--line);
}

.tick {
  position: absolute;
  width: 14px;
  height: 14px;
}

.tick-tl { top: -1px;    left: -1px;  border-top: 2px solid var(--accent);    border-left: 2px solid var(--accent); }
.tick-tr { top: -1px;    right: -1px; border-top: 2px solid var(--accent);    border-right: 2px solid var(--accent); }
.tick-bl { bottom: -1px; left: -1px;  border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.tick-br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }

/* ── Bands ────────────────────────────────────────────────── */

.band {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--max)) 1fr;
  column-gap: var(--gutter);
  padding: 40px var(--pad);
  border-bottom: 1px solid var(--line);
}

.band-identity { padding: 64px var(--pad) 22px; }

.band-foot {
  padding: 20px var(--pad) 26px;
}

.band:last-child { border-bottom: 0; }

/* ── Rails ────────────────────────────────────────────────── */

.rail {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: normal;
  text-transform: uppercase;
  color: var(--faint);
}

.band-identity .rail { padding-top: 12px; }

.meta {
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 2;
  color: var(--faint);
  text-align: right;
}

.band-identity .meta { padding-top: 12px; }

/* ── Identity ─────────────────────────────────────────────── */

.wordmark {
  margin: 0;
  font-size: 60px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.wordmark span { color: var(--accent); }

.lede {
  margin: 22px 0 0;
  font-size: 19px;
  line-height: 1.5;
  text-wrap: pretty;
}

.lede strong { font-weight: 500; }

/* ── About ────────────────────────────────────────────────── */

.prose {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prose p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  text-wrap: pretty;
}

.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.15s ease;
}

.prose a:hover,
.prose a:focus-visible { border-bottom-color: var(--accent); }

/* ── Writing ──────────────────────────────────────────────── */

.post {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  padding: 14px 8px 14px 0;
  border-bottom: 1px solid var(--line);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.post:hover,
.post:focus-visible { background: var(--card); }

.post-index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  padding-top: 4px;
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.post-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.post-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.more {
  display: inline-block;
  margin-top: 16px;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

/* ── Elsewhere ────────────────────────────────────────────── */

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 8px 11px 0;
  border-bottom: 1px solid var(--line);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.row:hover,
.row:focus-visible {
  background: var(--card);
  color: var(--accent);
}

.row-name {
  font-size: 15px;
  font-weight: 500;
}

.row-handle {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  transition: color 0.15s ease;
  text-align: right;
}

.row:hover .row-handle,
.row:focus-visible .row-handle { color: var(--accent); }

/* ── Footer ───────────────────────────────────────────────── */

.disclaimer {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
}

/* ── Focus ────────────────────────────────────────────────── */

a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 4px;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 999px) {
  .band {
    grid-template-columns: minmax(0, var(--max));
  }

  .rail { margin-bottom: 12px; }

  .band-identity .rail,
  .band-identity .meta { padding-top: 0; }

  .meta {
    text-align: left;
    line-height: 1.8;
  }

  .meta:not(:empty) { margin-top: 24px; }

  /* The footer's rail cell is a spacer that only exists to hold the desktop
     grid column. Once stacked it has no job, and its margin would show. */
  .rail:empty { display: none; }
}

@media (max-width: 639px) {
  :root {
    --inset: 12px;
    --pad:   20px;
  }

  .band          { padding: 32px var(--pad); }
  .band-identity { padding: 40px var(--pad) 20px; }
  .band-foot     { padding: 20px var(--pad) 24px; }

  .wordmark { font-size: clamp(2.75rem, 11vw, 3.75rem); }
  .lede     { font-size: 17px; }

  .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .row-handle { text-align: left; }
}

/* ── Motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
