/* n85.dev root page, direction A.
   Front door rather than full story: who, the two products, and the form.
   The long version lives on /about/.

   Inter is loaded from the about release rather than duplicating a 345kB font
   file. That coupling is deliberate and noted in the README. */

@font-face {
  font-family: "Inter Variable";
  src: url("/about/assets/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/about/assets/fonts/JetBrainsMono-Variable.ttf")
    format("truetype-variations");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bone: #f4f1ea;
  --bone-deep: #e9e4d9;
  --ink: #14110f;
  --ink-soft: #56504a;
  --rule: #d4cec1;

  --shell: 1100px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino,
    "Book Antiqua", Georgia, serif;
  --font-sans: "Inter Variable", -apple-system, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Focus rings are coloured against the page, not the control: a currentColor
   ring on an ink-filled button would be bone, and invisible on bone. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.footer :focus-visible {
  outline-color: var(--bone);
}

.shell {
  width: min(calc(100% - (2 * var(--gutter))), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--bone);
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.display {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.4vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1;
  text-wrap: balance;
}

.display--mid {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.05;
}

.eyebrow,
.rubric,
.product__index,
.masthead__meta {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Masthead */
.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark__mark {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--ink);
}

.masthead__nav {
  display: flex;
  gap: clamp(0.9rem, 2.2vw, 1.9rem);
  margin-right: auto;
  font-size: 0.85rem;
}

.masthead__nav a {
  padding-block: 0.2rem;
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: border-color 200ms var(--ease);
}

.masthead__nav a:hover {
  border-bottom-color: var(--ink);
}

/* Opening */
.opening {
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem);
}

.opening h1 {
  margin-top: 1rem;
}

.opening__lede {
  max-width: 46ch;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 0.75rem 1.2rem;
  background: var(--ink);
  color: var(--bone);
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 220ms var(--ease);
}

.cta span {
  transition: transform 220ms var(--ease);
}

.cta:hover span {
  transform: translateX(0.25rem);
}

/* Products: a hairline ledger, not cards. */
.products {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.product-list {
  margin-top: 1.25rem;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.product-list li {
  display: grid;
  grid-template-columns: 4rem minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(0.75rem, 3vw, 2.5rem);
  align-items: baseline;
  padding-block: clamp(1.25rem, 2.6vw, 1.9rem);
  border-bottom: 1px solid var(--rule);
}

.product-list h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 400;
  line-height: 1.1;
}

.product-list h3 a {
  text-decoration: none;
}

.product-list h3 a:hover {
  text-decoration: underline;
}

.product-list li > p:last-child {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Contact */
.contact {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background: var(--bone-deep);
  border-top: 1px solid var(--rule);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact__intro > * + * {
  margin-top: 1rem;
}

.contact__intro > p:last-child {
  max-width: 34ch;
  color: var(--ink-soft);
}

.form {
  display: grid;
  gap: 1.4rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  padding: 0.55rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: inherit;
  font: inherit;
  transition: border-color 200ms var(--ease);
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-bottom-width: 2px;
  outline: none;
}

/* Reserve the managed widget's height so the button does not jump. */
.turnstile {
  min-height: 65px;
}

.submit {
  justify-self: start;
  padding: 0.8rem 1.5rem;
  background: var(--ink);
  border: 0;
  color: var(--bone);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  transition: opacity 200ms var(--ease);
}

.submit:hover {
  opacity: 0.85;
}

.submit:disabled {
  cursor: progress;
  opacity: 0.6;
}

/* A live region must not be display:none when empty or the announcement is
   lost, so it collapses by margin instead. */
.form-status {
  font-size: 0.88rem;
  font-weight: 650;
}

.form-status:empty {
  margin: 0;
}

.form-status[data-state="success"] {
  color: #1f5130;
}

.form-status[data-state="error"] {
  color: #8c2018;
}

.form-legal {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.5;
}

.form-legal a:hover {
  color: var(--ink);
}

/* Footer */
.footer {
  padding-block: 2rem;
  background: var(--ink);
  color: var(--bone);
  font-size: 0.85rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer__mark {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--bone);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-list li {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .product-list li > p:last-child {
    grid-column: 2;
  }

  .masthead__meta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
