/* Reset and base typography */

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

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

body {
  margin: 0;
  background: var(--aj-bg);
  color: var(--aj-fg);
  font-family: var(--aj-font-body);
  font-size: var(--aj-fs-base);
  line-height: var(--aj-lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.aj-no-scroll {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--aj-4);
  font-family: var(--aj-font-display);
  font-weight: 700;
  line-height: var(--aj-lh-snug);
  letter-spacing: var(--aj-track-snug);
  color: var(--aj-ink);
  text-wrap: balance;
}

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

h2 {
  font-size: var(--aj-fs-3xl);
  line-height: 1.14;
  letter-spacing: var(--aj-track-tight);
}

h3 { font-size: var(--aj-fs-2xl); }
h4 { font-size: var(--aj-fs-xl); }
h5 { font-size: var(--aj-fs-lg); }
h6 { font-size: var(--aj-fs-base); }

p {
  margin: 0 0 var(--aj-4);
  text-wrap: pretty;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: var(--aj-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--aj-t-fast) var(--aj-ease);
}

a:hover {
  color: var(--aj-teal-300);
}

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

ul, ol {
  margin: 0 0 var(--aj-4);
  padding-left: 1.15em;
}

li + li {
  margin-top: var(--aj-2);
}

strong, b {
  font-weight: 700;
  color: var(--aj-ink);
}

small {
  font-size: var(--aj-fs-sm);
}

hr {
  border: 0;
  height: 1px;
  background: var(--aj-line);
  margin: var(--aj-7) 0;
}

blockquote {
  margin: var(--aj-6) 0;
  padding: var(--aj-5) var(--aj-6);
  background: var(--aj-surface);
  border-left: 3px solid var(--aj-aqua);
  border-radius: 0 var(--aj-r) var(--aj-r) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

button {
  cursor: pointer;
}

::selection {
  background: var(--aj-aqua);
  color: var(--aj-ink);
}

/* Focus, visible for keyboard users and never removed */
:focus-visible {
  outline: 3px solid var(--aj-teal-300);
  outline-offset: 3px;
  border-radius: var(--aj-r-sm);
}

.aj-skip {
  position: absolute;
  left: var(--aj-4);
  top: var(--aj-4);
  z-index: var(--aj-z-toast);
  padding: var(--aj-3) var(--aj-5);
  background: var(--aj-ink);
  color: #fff;
  border-radius: var(--aj-r-pill);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform var(--aj-t) var(--aj-ease);
}

.aj-skip:focus {
  transform: translateY(0);
  color: #fff;
}

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

/* Layout primitives */

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

.aj-wrap--narrow { max-width: var(--aj-maxw-narrow); }
.aj-wrap--wide { max-width: var(--aj-maxw-wide); }

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

.aj-section--tight {
  padding-block: calc(var(--aj-section-y) * 0.62);
}

.aj-section--dark {
  background: var(--aj-grad-deep);
  color: rgba(255, 255, 255, 0.86);
}

.aj-section--dark h1,
.aj-section--dark h2,
.aj-section--dark h3,
.aj-section--dark h4 {
  color: #fff;
}

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

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

@media (min-width: 700px) {
  .aj-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .aj-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .aj-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 700px) and (max-width: 899px) {
  .aj-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

.aj-stack > * + * {
  margin-top: var(--aj-4);
}

.aj-center {
  text-align: center;
}

.aj-flow-narrow {
  max-width: 62ch;
}

.aj-center .aj-flow-narrow {
  margin-inline: auto;
}

/* Section heading block */

.aj-head {
  margin-bottom: var(--aj-7);
}

.aj-head p {
  font-size: var(--aj-fs-lg);
  color: var(--aj-muted);
  max-width: 60ch;
}

.aj-section--dark .aj-head p {
  color: rgba(255, 255, 255, 0.74);
}

.aj-center .aj-head p {
  margin-inline: auto;
}

.aj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--aj-2);
  font-family: var(--aj-font-display);
  font-size: var(--aj-fs-xs);
  font-weight: 700;
  letter-spacing: var(--aj-track-wide);
  text-transform: uppercase;
  color: var(--aj-teal-300);
  margin-bottom: var(--aj-3);
}

.aj-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--aj-grad-aqua);
}

.aj-section--dark .aj-eyebrow {
  color: var(--aj-aqua);
}

.aj-center .aj-eyebrow::before {
  display: none;
}
