/* ==========================================================================
   Base — element defaults and typography
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-body);
    font-weight: var(--weight-body);
    line-height: var(--leading-normal);
    color: var(--color-black);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-bold);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    text-wrap: balance;
}

h1 {
    font-size: var(--text-h1);
    line-height: var(--leading-tight);
}

h2 {
    font-size: var(--text-h2);
}

h3 {
    font-size: var(--text-h3);
}

h4 {
    font-size: 1.125rem;
}

p {
    text-wrap: pretty;
}

strong, b {
    font-weight: var(--weight-bold);
}

/* Links ------------------------------------------------------------------- */

a {
    color: var(--color-black);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
    transition: color var(--transition-fast);
}

/* Buttons are excluded: they own their text colour through .btn--* and a
   descendant selector like `.hero--dark a:hover` would otherwise outrank it,
   tinting a hovered button's label orange on top of its orange fill. */
a:not(.btn):hover {
    color: var(--color-orange-text);
}

/* On black the full-strength orange already clears AA, so use it there. */
.section--dark a:not(.btn):hover,
.hero--dark a:not(.btn):hover,
.cta-band a:not(.btn):hover,
.site-footer a:not(.btn):hover {
    color: var(--color-orange);
}

/* Focus ------------------------------------------------------------------- */

:focus-visible {
    outline: 3px solid var(--color-orange);
    outline-offset: 3px;
}

/* On dark surfaces the orange ring needs a light halo to stay visible. */
.section--dark :focus-visible,
.hero--dark :focus-visible,
.cta-band :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--color-orange);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.35);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    z-index: 200;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-orange);
    color: var(--color-black);
    font-weight: var(--weight-medium);
    text-decoration: none;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
    color: var(--color-black);
}

/* Selection --------------------------------------------------------------- */

::selection {
    background: var(--color-orange);
    color: var(--color-black);
}

/* Shared type utilities ---------------------------------------------------- */

.eyebrow {
    font-size: var(--text-eyebrow);
    font-weight: var(--weight-medium);
    line-height: 1.4;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--color-black);
    margin-bottom: var(--space-md);
}

.eyebrow--muted {
    color: var(--color-muted);
}

.section--dark .eyebrow,
.hero--dark .eyebrow,
.cta-band .eyebrow {
    color: var(--color-white);
}

.section--dark .eyebrow--muted,
.site-footer .eyebrow--muted {
    color: var(--color-muted-light);
}

/* The single orange rule that punctuates a heading block. */
.accent-rule {
    display: block;
    width: var(--accent-rule-width);
    height: var(--accent-rule-height);
    background: var(--color-orange);
    margin: var(--space-lg) 0;
}

.prose p + p {
    margin-top: var(--space-md);
}

.prose {
    color: var(--color-muted);
    font-size: var(--text-body-lg);
}

.section--dark .prose,
.cta-band .prose {
    color: #c8c8c8;
}

.text-lead {
    font-size: var(--text-body-lg);
    color: var(--color-muted);
}

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