/*
 * Twentysix Labs: the company site. A separate company's brand, so none of
 * Rails' tokens; one typeface, two tones and one accent.
 *
 * Instrument Sans (SIL Open Font License, fonts/OFL.txt), the Latin subset of
 * @fontsource-variable/instrument-sans 5.3.0, weight axis 400 to 700. The
 * version is in the file name so it can be cached as immutable.
 */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-wght-5.3.0.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Dark first; light follows the reader's system setting. */
:root {
  color-scheme: dark light;
  --bg: #0d0d0c;
  --ink: #eeece7;
  --muted: #9b988f;
  --line: #2b2a27;
  --accent: #ff6a3d;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 84rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f3ee;
    --ink: #171614;
    --muted: #5f5c55;
    --line: #dcd8cf;
    --accent: #c4401b;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
address {
  margin: 0;
  font-style: normal;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--line);
  transition: text-decoration-color 160ms ease, color 160ms ease;
}

a:hover {
  text-decoration-color: var(--accent);
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 1;
  padding: 0.5rem 0.875rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.mark-tile {
  fill: var(--ink);
}

.mark-glyph {
  fill: var(--bg);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

/* Home */

.hero {
  padding-block: clamp(5rem, 16vh, 11rem) clamp(4.5rem, 12vh, 8rem);
}

.display {
  max-width: 13ch;
  font-size: clamp(2.875rem, 8.4vw, 7.25rem);
  line-height: 0.98;
  font-weight: 550;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.dot {
  color: var(--accent);
}

.lead {
  max-width: 34ch;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--muted);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 1.25rem;
}

.row-inner {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 1.25rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.label {
  grid-column: 1 / span 3;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
}

.row-body {
  grid-column: 4 / -1;
}

.product {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 2rem;
  row-gap: 0.875rem;
}

.product-name {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.08;
  font-weight: 550;
  letter-spacing: -0.03em;
}

.product-name a {
  text-decoration: none;
}

/* The whole block is the link's target; the name stays the accessible name. */
.product-name a::after {
  content: "";
  position: absolute;
  inset: -1rem;
}

.product-name a:focus-visible {
  outline: none;
}

.product:has(a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 1rem;
  border-radius: 2px;
}

.product-copy {
  grid-column: 1;
  max-width: 38ch;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.product-host {
  grid-column: 1;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink);
}

.arrow {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  width: clamp(1.75rem, 3vw, 2.5rem);
  height: clamp(1.75rem, 3vw, 2.5rem);
  margin-top: 0.25rem;
  color: var(--muted);
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), color 160ms ease;
}

.product:hover .arrow {
  color: var(--accent);
  transform: translate(0.2rem, -0.2rem);
}

.email {
  display: inline-block;
  font-size: clamp(1.625rem, 4.2vw, 3.25rem);
  line-height: 1.1;
  font-weight: 550;
  letter-spacing: -0.03em;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.contact-note {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
}

/* Prose pages: privacy, 404 */

.page {
  padding-block: clamp(4rem, 12vh, 8rem) clamp(4rem, 10vh, 7rem);
}

.page-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  font-weight: 550;
  letter-spacing: -0.04em;
}

.page-meta {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.policy {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.policy-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}

.policy-row h2 {
  grid-column: 1 / span 3;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.policy-row p {
  grid-column: 4 / span 7;
  max-width: 40rem;
  color: var(--muted);
}

.policy-row a {
  color: var(--ink);
}

.page-lead {
  max-width: 34ch;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.45;
}

.page-action {
  margin-top: 2.5rem;
}

/* Footer */

main {
  flex: 1;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 1.5rem;
  padding-block: 2.5rem 3rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.site-footer > .rule {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--ink);
}

.footer-legal {
  grid-column: 1 / span 3;
  color: var(--ink);
}

.footer-address {
  grid-column: 4 / span 4;
}

.footer-links {
  grid-column: 8 / span 3;
  display: flex;
  flex-direction: column;
}

.footer-copy {
  grid-column: 11 / -1;
  text-align: right;
}

/* Small screens */

@media (max-width: 48rem) {
  .label,
  .row-body,
  .policy-row h2,
  .policy-row p {
    grid-column: 1 / -1;
  }

  .site-footer {
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }

  .footer-legal,
  .footer-address,
  .footer-links,
  .footer-copy {
    grid-column: 1;
    text-align: left;
  }
}

/* Motion: one quiet entrance, none when the reader asks for less. */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .rise-2 {
    animation-delay: 90ms;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.75rem);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  a,
  .arrow {
    transition: none;
  }
}
