/* ==========================================================================
   Powerline — reset, typography, layout primitives
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-5));
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: var(--navy);
  text-decoration-color: color-mix(in srgb, var(--navy) 30%, transparent);
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

/* --- Headings ------------------------------------------------------------ */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  color: var(--navy);
  text-transform: uppercase;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-3xl);
  line-height: 1.02;
}

h3 {
  font-size: var(--fs-xl);
}

h4 {
  font-size: var(--fs-lg);
}

p {
  text-wrap: pretty;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

::selection {
  background: var(--navy);
  color: var(--white);
}

/* --- Layout primitives --------------------------------------------------- */

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

.wrap--narrow {
  max-width: 960px;
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

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

.section--navy {
  background: var(--navy-900);
  color: var(--on-navy-dim);
}

.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--white);
}

.section--tight {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}

.grid {
  display: grid;
  gap: var(--sp-5);
}

.lede {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--slate);
  max-width: var(--maxw-prose);
}

.prose > * + * {
  margin-top: var(--sp-4);
}

/* --- Section headers ----------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--red-ink);
  margin-bottom: var(--sp-4);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--red);
  flex: none;
}

.section--navy .eyebrow {
  /* Brand red is too dim on navy; lift it rather than darken it. */
  color: #ff6b70;
}

.section-head {
  max-width: var(--maxw-prose);
  margin-bottom: var(--sp-8);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head p {
  margin-top: var(--sp-4);
  font-size: var(--fs-lg);
  line-height: 1.6;
}

/* --- Utilities ----------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--navy);
  color: var(--white);
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 0;
  color: var(--white);
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.text-red {
  color: var(--red-ink);
}

.section--navy .text-red {
  color: #ff6b70;
}

/* --- Scroll reveal ------------------------------------------------------- */

/* Only hide revealables when JavaScript is present to bring them back. The
   flag is set inline in <head> so there is no flash of visible content. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
