/* Speedy Bloom Studio — the instrument-maker's bench.
   Calm, precise, craftsman. One signature element: the scale rule. */

/* ---------- Fonts (self-hosted, no third-party runtime dependency) ---------- */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f3f4f1;
  --ink: #16262b;
  --slate: #54646a;
  --mist: #d6dcd7;
  --fern: #2e6a4f;
  --fern-wash: #e7ede7;

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Menlo", "Consolas",
    monospace;

  --measure: 42rem; /* ~660px prose measure */
  --measure-wide: 60rem; /* ~960px for grids */
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--fern);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--ink);
}

/* Visible keyboard focus everywhere. */
:focus-visible {
  outline: 2px solid var(--fern);
  outline-offset: 2px;
  border-radius: 1px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 10;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* ---------- The scale rule — the signature element ---------- */
/* An engineer's ruler edge: a continuous baseline punctuated by minor ticks
   every 16px and major ticks every 80px, with a longer origin tick. */
.scale {
  height: 12px;
  width: 100%;
  border-bottom: 1px solid var(--fern);
  background-image:
    repeating-linear-gradient(
      to right,
      var(--fern) 0 1px,
      transparent 1px 80px
    ),
    repeating-linear-gradient(
      to right,
      var(--fern) 0 1px,
      transparent 1px 16px
    );
  background-size: 100% 11px, 100% 6px;
  background-position: bottom left, bottom left;
  background-repeat: repeat-x, repeat-x;
  position: relative;
}
.scale::before {
  /* origin tick — a little taller, anchoring the left edge */
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 12px;
  background: var(--fern);
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.measure {
  max-width: var(--measure);
}
.section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

/* ---------- Header ---------- */
.site-header {
  padding-block: 1.25rem;
}
.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.wordmark {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover {
  color: var(--ink);
}
.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--fern);
  text-underline-offset: 5px;
}
.site-nav a[aria-current="page"] {
  color: var(--fern);
}

/* ---------- Eyebrow (mono, the technical voice) ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fern);
  margin: 0 0 1rem;
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.18;
  text-wrap: balance;
  color: var(--ink);
}
.display {
  font-weight: 500;
  font-size: clamp(1.7rem, 1.2rem + 2.6vw, 2.6rem);
  letter-spacing: -0.01em;
  line-height: 1.16;
  margin: 0 0 1.25rem;
}
.display--sub {
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem);
}
.lede {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  color: var(--ink);
  margin: 0 0 1.25rem;
}
.subhead {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}
/* Inline monospace token (e.g. a permission name) */
.code {
  font-family: var(--mono);
  font-size: 0.875em;
  color: var(--ink);
  background: var(--fern-wash);
  padding: 0.05em 0.35em;
  border-radius: 2px;
}
p {
  margin: 0 0 1.1rem;
  text-wrap: pretty;
}
.muted {
  color: var(--slate);
}

/* ---------- Products ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}
.card {
  position: relative;
  border: 1px solid var(--mist);
  background: var(--paper);
  padding: 1.5rem 1.5rem 1.75rem;
}
/* corner registration ticks — the signature, echoed small */
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--fern);
}
.card::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}
.card::after {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}
.card__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.card__spec {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--slate);
  margin: 0 0 0.9rem;
}
.card__body {
  margin: 0 0 1.1rem;
}
.card__status {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--slate);
  margin: 0;
}

/* ---------- Definition lists / facts (support, legal) ---------- */
.facts {
  display: grid;
  gap: 0.85rem 1.5rem;
  margin: 0 0 1.25rem;
}
@media (min-width: 34rem) {
  .facts {
    grid-template-columns: max-content 1fr;
  }
}
.facts dt {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate);
  padding-top: 0.15rem;
}
.facts dd {
  margin: 0;
}

/* ---------- Legal / prose ---------- */
.prose h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.25rem;
}
.prose h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
}
.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose li::marker {
  color: var(--fern);
}
.updated {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--slate);
  margin: 0 0 2rem;
}
.toc {
  border-left: 2px solid var(--mist);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 0 0 2.5rem;
}
.toc p {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.5rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9375rem;
}
.toc li {
  margin-bottom: 0.3rem;
}

/* ---------- Footer ---------- */
.rule {
  border: 0;
  border-top: 1px solid var(--mist);
  margin: 0 0 2rem;
}
.site-footer {
  padding-block: 2.5rem 3rem;
  margin-top: 1rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  font-size: 0.875rem;
}
.site-footer__entity {
  max-width: 24rem;
}
.site-footer__entity .name {
  color: var(--ink);
  font-weight: 500;
}
.site-footer__entity address {
  font-style: normal;
  color: var(--slate);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a {
  color: var(--ink);
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
  text-decoration-color: var(--fern);
  text-underline-offset: 4px;
}
.footer-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--slate);
  margin-top: 1.5rem;
}

/* ---------- Motion ----------
   No entrance animation: content is always present, so print, PDF, and any
   screenshot show it immediately (no hidden-until-animated text). `.rise` is an
   inert hook kept for potential future use. The only motion is smooth in-page
   scrolling for the legal-page tables of contents, and it is gated behind
   reduced-motion so people who ask for less motion get instant jumps. */
.rise {
  /* intentionally no animation */
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- Small screens ---------- */
@media (max-width: 30rem) {
  .site-nav {
    gap: 1.1rem;
  }
}
