/*
 * Hatrix Labs
 *
 * Company pages are neutral: white paper, navy ink, and the logo's red used sparingly.
 * Atkinson Hyperlegible Next sets all text; Big Shoulders Display is kept for the
 * wordmark and for product names, where a product has a voice of its own.
 * Product pages may add their own accent (SixthSkater uses the rink lines).
 * Both fonts are self-hosted under the SIL Open Font License (see /fonts).
 */

@font-face {
  font-family: 'Big Shoulders Display';
  src: url('/fonts/big-shoulders-display.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/atkinson-hyperlegible-next.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --surface: #f2f5f8;
  --line: #d8e0e7;
  --cell: #dde4ea;
  --ink: #15263a;
  --slate: #4c5f71;
  --red: #c8102e;
  --blue: #0b4da2;
  --on-ink: #ffffff;

  --font-brand: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --font-body: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --page: 72rem;
  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-space: clamp(4rem, 9vw, 7rem);
  --radius: 6px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1a25;
    --surface: #142332;
    --line: #26394c;
    --cell: #22364a;
    --ink: #e7eef3;
    --slate: #a5b6c5;
    --red: #ff5a6e;
    --blue: #79a6ff;
    --on-ink: #0f1a25;
  }
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration-color: var(--red);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--red);
}

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

::selection {
  background: var(--red);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 1;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
  transform: translateY(-200%);
}

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

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  width: 1.625rem;
  height: 1.625rem;
  flex: none;
}

.brand__name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.mark .cell {
  fill: var(--cell);
}

.hero__mark .cell {
  fill: none;
  stroke: var(--line);
  stroke-width: 0.35;
}

.hero__mark .cell--on {
  fill: var(--red);
  stroke: var(--red);
}

.mark .cell--on {
  fill: var(--red);
}

.site-nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.site-nav a {
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover {
  background: var(--red);
  color: #fff;
}

/* Home hero */

.hero {
  display: grid;
  align-items: center;
  gap: 3rem;
  padding-block: clamp(4rem, 10vw, 8rem);
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.hero__title {
  max-width: 15ch;
  font-size: clamp(2.75rem, 6.2vw, 4.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero__lede {
  max-width: var(--measure);
  margin-top: 1.75rem;
  color: var(--slate);
  font-size: clamp(1.125rem, 1.7vw, 1.3125rem);
}

.hero__actions {
  margin-top: 2.25rem;
}

.hero__mark {
  display: none;
  width: min(100%, 17rem);
  justify-self: end;
  overflow: visible;
}

@media (min-width: 56rem) {
  .hero__mark {
    display: block;
  }
}

/* The one moment of motion: the hat trick lights up, bottom-left to top-right. */
.hero__mark .cell--on {
  animation: cell-on 0.45s ease-out both;
}

.hero__mark .cell--2 {
  animation-delay: 0.25s;
}

.hero__mark .cell--3 {
  animation-delay: 0.5s;
}

@keyframes cell-on {
  from {
    fill: transparent;
    stroke: var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__mark .cell--on {
    animation: none;
  }
}

/* Sections */

.section {
  padding-block: var(--section-space);
}

.section--surface {
  background: var(--surface);
}

.section--rule {
  border-top: 1px solid var(--line);
}

.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__title {
  font-size: clamp(1.75rem, 3.2vw, 2.375rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section__link {
  font-size: 1rem;
  font-weight: 600;
}

.principles {
  display: grid;
  gap: 2.5rem 3rem;
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.principle h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.principle p {
  color: var(--slate);
}

/* Product list (home and /products/) */

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

.product-row {
  display: grid;
  gap: 0.75rem 2.5rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 56rem) {
  .product-row {
    grid-template-columns: 13rem minmax(0, 1fr) auto;
    align-items: start;
  }
}

.product-row__name {
  font-family: var(--font-brand);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

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

.product-row__summary {
  max-width: var(--measure);
}

.product-row__summary p + p {
  margin-top: 0.75rem;
  color: var(--slate);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.facts dt {
  color: var(--slate);
}

.facts dd {
  font-weight: 700;
}

.product-row__link {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Inner page header */

.page-header {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 5vw, 3.5rem);
}

.page-header__title {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.page-header__lede {
  max-width: var(--measure);
  margin-top: 1.25rem;
  color: var(--slate);
  font-size: clamp(1.125rem, 1.7vw, 1.25rem);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  color: var(--slate);
  font-size: 0.9375rem;
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: 0.5rem;
  color: var(--slate);
}

/* Contact */

.contact__text {
  max-width: var(--measure);
  margin-top: 1rem;
  color: var(--slate);
}

.contact__email {
  margin-top: 1rem;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.contact__email a {
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.14em;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem;
  color: var(--slate);
  font-size: 0.9375rem;
}

.site-footer__inner {
  display: grid;
  gap: 1.75rem 3rem;
}

@media (min-width: 48rem) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.site-footer__name {
  color: var(--ink);
  font-weight: 700;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.site-footer__nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.site-footer__nav a:hover {
  color: var(--red);
}

.site-footer__legal {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* 404 */

.not-found {
  padding-block: clamp(4rem, 12vw, 9rem);
}

.not-found .page-header__lede {
  margin-bottom: 2rem;
}

/* SixthSkater: the product's own voice. Rink lines, Big Shoulders, rink blue. */

.rink-line {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
}

.rink-line--center {
  height: 12px;
  background-color: var(--red);
  background-image: linear-gradient(90deg, var(--paper) 0 50%, transparent 50%);
  background-size: 28px 4px;
  background-position: 0 50%;
  background-repeat: repeat-x;
}

.rink-line--blue {
  height: 12px;
  background: var(--blue);
}

.product-hero {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(3.5rem, 8vw, 6rem);
}

.product-hero__name {
  font-family: var(--font-brand);
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  font-weight: 800;
  line-height: 0.88;
  text-transform: uppercase;
}

.product-hero__tagline {
  max-width: 22ch;
  margin-top: 1.5rem;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--slate);
  font-size: 0.9375rem;
  font-weight: 700;
}

.status::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--blue);
}

.product-hero__actions {
  margin-top: 2rem;
}

.split {
  display: grid;
  gap: 1.5rem 4rem;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

.split__body > p {
  max-width: var(--measure);
}

.features {
  display: grid;
  gap: 2rem 3rem;
  margin-top: 2.5rem;
}

@media (min-width: 40rem) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.features dt {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.features dd {
  color: var(--slate);
}

.steps {
  display: grid;
  gap: 2.5rem 3rem;
  list-style: none;
  padding: 0;
  counter-reset: step;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.75rem;
  color: var(--red);
  font-family: var(--font-brand);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.steps h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.steps p {
  color: var(--slate);
}

.cta-band__text {
  max-width: var(--measure);
  margin-top: 1rem;
  color: var(--slate);
}

.cta-band__actions {
  margin-top: 2rem;
}
