/* Refinement pass: display typography, active rail states, responsive rhythm, and accessible controls. */

:root {
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

h1,
h2,
h3,
.hero-role,
.product-pill-list li,
.site-name {
  font-stretch: normal;
  font-kerning: normal;
  text-wrap: balance;
}

h1 {
  max-width: 9ch;
  font-size: clamp(4.75rem, 10vw, 9rem);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 0.84;
  overflow-wrap: normal;
  word-break: normal;
}

.hero-role {
  max-width: 34ch;
  font-size: clamp(1.55rem, 2.55vw, 2.65rem);
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.section-heading h2 {
  font-size: clamp(2.9rem, 6.2vw, 5.8rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 0.96;
  overflow-wrap: normal;
  word-break: normal;
}

.about-grid .section-heading h2 {
  font-size: clamp(2.55rem, 4.5vw, 4.35rem);
}

.focus-card h3 {
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.product-panel h3 {
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1;
}

.contact-card h2 {
  margin-bottom: clamp(1.25rem, 2vw, 1.75rem);
  font-size: clamp(3.35rem, 7vw, 6.8rem);
  font-weight: 780;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.contact-card h2 + p {
  margin-top: 0;
}

/* Cream text on the original signal red missed WCAG AA for small button text. */
.button-primary {
  border-color: var(--signal-dark);
  background: var(--signal-dark);
}

.site-nav li a::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 0.85rem);
  top: 50%;
  width: max-content;
  transform: translateY(-50%) translateX(-0.25rem);
  padding: 0.28rem 0.42rem;
  border: 1px solid var(--rule-dark);
  background: var(--ink-raised);
  color: var(--light);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.site-nav li a:hover::after,
.site-nav li a:focus-visible::after,
.site-nav li a.is-current::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.site-nav li a.is-current,
.site-nav li a[aria-current="location"] {
  border-color: var(--signal);
  background: var(--signal);
  transform: scale(1.25);
}

.site-nav li a.is-current::before,
.site-nav li a[aria-current="location"]::before {
  content: "";
  position: absolute;
  inset: -0.35rem;
  border: 1px solid color-mix(in srgb, var(--signal) 52%, transparent);
}

@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: clamp(3rem, 10vw, 5rem);
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(4rem, 21vw, 6.8rem);
    line-height: 0.86;
  }

  .hero-role {
    font-size: clamp(1.45rem, 6vw, 2.05rem);
    line-height: 1.1;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
  }

  .about-grid .section-heading {
    max-width: 32rem;
  }

  .about-grid .section-heading h2,
  .section-heading h2 {
    font-size: clamp(2.65rem, 10vw, 4.2rem);
    line-height: 0.98;
  }

  .prose {
    max-width: 42rem;
    font-size: clamp(1.05rem, 4vw, 1.2rem);
  }

  .site-nav li a::after {
    display: none;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: clamp(3.7rem, 20vw, 5.6rem);
    letter-spacing: -0.045em;
  }

  .section-heading h2,
  .about-grid .section-heading h2,
  .contact-card h2 {
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: balance;
  }

  .section-heading h2,
  .about-grid .section-heading h2 {
    font-size: clamp(2.45rem, 11vw, 3.55rem);
  }

  .contact-card h2 {
    font-size: clamp(2.75rem, 12vw, 3.9rem);
    line-height: 0.98;
  }
}
