/* Steadus LLC — shared styles. No third-party requests; fonts are self-hosted. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #edebe2;
  --ink: #2b2722;
  --muted: #655e53;
  --plumb: #2e5e62;
  --butter: #f1d98a;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --reading: "Newsreader", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --settle: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  /* faint paper grain, inline so nothing is fetched */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .17  0 0 0 0 .15  0 0 0 0 .13  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
}

main { flex: 1; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--plumb);
  outline-offset: 4px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.5rem var(--gutter);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.vial { width: 34px; height: 14px; flex: none; overflow: visible; }
.vial rect { fill: var(--butter); stroke: var(--ink); stroke-width: 1.5; }
.vial .tick { stroke: var(--ink); stroke-width: 1.5; }
.vial .bubble { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; animation: bubble-settle 1.9s 0.35s var(--settle) both; }

@keyframes bubble-settle {
  from { transform: translateX(9px); }
  to   { transform: translateX(0); }
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  background: linear-gradient(var(--butter), var(--butter)) 0 100% / 0 0.4em no-repeat;
  transition: background-size 0.25s ease;
}
.site-nav a:hover { background-size: 100% 0.4em; }
.site-nav a[aria-current="page"] { background-size: 100% 0.4em; }

/* ---------- Shared layout ---------- */

.wrap { padding-inline: var(--gutter); max-width: 88rem; margin-inline: auto; width: 100%; }

.page-title {
  font-weight: 560;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0;
}

/* ---------- Home ---------- */

.hero { padding-block: clamp(3rem, 11vh, 8rem) clamp(3.5rem, 10vh, 7rem); }

.headline {
  font-weight: 540;
  font-size: clamp(2.35rem, 6.4vw, 6rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0;
  max-width: 20.5em;
}

/* one orchestrated moment: each phrase arrives a little off level and settles */
.headline .phrase {
  display: inline-block;
  transform-origin: 0 100%;
  animation: settle 1.5s var(--settle) both;
  animation-delay: 100ms;
}
@keyframes settle {
  from { transform: translateY(0.18em) rotate(-2.6deg); opacity: 0; }
  35%  { opacity: 1; }
  to   { transform: none; opacity: 1; }
}

.products { padding-bottom: clamp(4rem, 12vh, 8rem); }

.products h2 {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.product-list { list-style: none; margin: 0; padding: 0; }

.product-list li + li { margin-top: clamp(1.25rem, 3vw, 2rem); }

.product {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 0.5rem clamp(1.5rem, 5vw, 5rem);
  align-items: start;
  text-decoration: none;
}

.product-name {
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  justify-self: start;
  text-decoration: underline;
  text-decoration-color: var(--butter);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.12em;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.product-line {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.1875rem;
  line-height: 1.5;
  padding-top: 0.55rem;
}

.product:hover .product-name,
.product:focus-visible .product-name { text-decoration-color: var(--plumb); color: var(--plumb); }

@media (max-width: 720px) {
  .product { grid-template-columns: 1fr; }
  .product-line { padding-top: 0; }
}

/* ---------- Values ---------- */

.values-head { padding-block: clamp(2.5rem, 8vh, 6rem) clamp(2rem, 6vh, 4rem); }

.values-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-bottom: clamp(4rem, 12vh, 8rem);
}

.intro {
  font-family: var(--reading);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1.5;
  max-width: 40rem;
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 0 calc(15rem + clamp(2rem, 6vw, 6rem));
}

/* the rail is a spirit level: the bubble rides to the value you're reading */
.rail {
  position: sticky;
  top: 2rem;
  align-self: start;
}
.rail-inner { --row: 3.25rem; position: relative; }
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2.5rem;
}
.rail li { height: var(--row); display: flex; align-items: center; }
.rail a {
  text-decoration: none;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.25;
  transition: color 0.2s ease;
}
.rail a[aria-current="true"] { color: var(--ink); font-weight: 620; }
.rail a:hover { color: var(--ink); }

.tube {
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1.15rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--butter);
}
.bubble-v {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  transform: translateY(calc(var(--step, 0) * var(--row) + (var(--row) / 2) - 0.35rem - 0.35rem));
  transition: transform 0.7s var(--settle);
}

.values-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }

.value { --indent: clamp(2.4rem, 5vw, 3.6rem); padding-bottom: clamp(3.5rem, 9vh, 6rem); scroll-margin-top: 2rem; }
.value:last-child { padding-bottom: clamp(2rem, 5vh, 3rem); }

.value h2 {
  display: flex;
  align-items: baseline;
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 1rem;
}
.value .num {
  flex: 0 0 var(--indent);
  color: var(--plumb);
  font-weight: 560;
}

.value .gist {
  font-family: var(--reading);
  font-style: italic;
  font-size: clamp(1.35rem, 2.3vw, 1.65rem);
  line-height: 1.35;
  margin: 0 0 1.25rem;
  padding-left: var(--indent);
  color: var(--plumb);
}

.value p.body {
  font-family: var(--reading);
  font-size: 1.3125rem;
  line-height: 1.65;
  max-width: 36rem;
  margin: 0;
  padding-left: var(--indent);
}

.version {
  margin: 0;
  padding-left: var(--indent);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .values-layout { grid-template-columns: 1fr; }
  .rail { display: none; }
  .intro { margin-left: 0; }
}
@media (max-width: 520px) {
  .value .gist, .value p.body { padding-left: 0; }
  .value h2 { flex-direction: column; gap: 0.25rem; }
  .value .num { flex: none; }
}

/* ---------- Plain pages (contact, about, legal) ---------- */

.plain { padding-block: clamp(3rem, 12vh, 9rem) clamp(4rem, 12vh, 8rem); }
.plain .lede { max-width: 34rem; margin: 1.75rem 0 0; font-size: 1.3125rem; line-height: 1.5; }
.plain .lede + .lede { margin-top: 1rem; }
.plain .note { color: var(--muted); font-size: 1rem; margin-top: 1.25rem; max-width: 34rem; }

.email {
  display: inline-block;
  margin-top: 1.75rem;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  text-decoration: underline;
  text-decoration-color: var(--butter);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: none;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
  overflow-wrap: anywhere;
}
.email:hover { color: var(--plumb); text-decoration-color: var(--plumb); }

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 2rem var(--gutter) 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer a { text-underline-offset: 0.2em; }
.site-footer a:hover { color: var(--ink); }
.site-footer .spacer { flex: 1 1 2rem; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .headline .phrase, .vial .bubble { animation: none; }
  .bubble-v, .site-nav a, .product-name, .email { transition: none; }
}

.headline .phrase:nth-child(2) { animation-delay: 240ms; }
.headline .phrase:nth-child(3) { animation-delay: 380ms; }
.headline .phrase:nth-child(4) { animation-delay: 520ms; }
.headline .phrase:nth-child(5) { animation-delay: 660ms; }
.headline .phrase:nth-child(6) { animation-delay: 800ms; }
