/* ============================================================================
   Steeplejack Robotics — reset and base elements
   Everything here is element-level. Component styles live in main.css.
   ============================================================================ */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  /* Anchor links land below any sticky chrome rather than under it. */
  scroll-padding-top: var(--space-xl);
}

/* Smooth scrolling is opt-in per prefers-reduced-motion, set in main.css. */

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  /* The hero is sized in dvh; stop iOS rubber-banding from revealing gaps. */
  overflow-x: hidden;
}

main,
section {
  min-width: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--navy);
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--orange-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* A single, unmistakable focus ring everywhere. Never remove it. */
:focus-visible {
  outline: 3px solid var(--orange-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  padding-inline-start: 1.25em;
}

strong,
b {
  font-weight: 700;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
}

/* Visually hidden but available to screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Keyboard users get a skip link before anything else. */
.skip-link {
  position: absolute;
  top: var(--space-2xs);
  left: var(--space-2xs);
  z-index: 100;
  padding: var(--space-2xs) var(--space-s);
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  border-radius: var(--radius-s);
  text-decoration: none;
  transform: translateY(-200%);
}

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