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

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

body {
    margin: 0;
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-variant-numeric: lining-nums;
    overflow-x: clip;
}

body.is-locked {
    overflow: hidden;
}

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

img {
    height: auto;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote {
    margin: 0;
}

h1, h2, h3, h4 {
    font-size: inherit;
    font-weight: 400;
}

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

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

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.surface-navy ::selection {
    background: var(--cream);
    color: var(--navy);
}

/* ---------------------------------------------------------------- Focus & skip */
:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
}

.surface-navy :focus-visible {
    outline-color: var(--cream);
}

.skip-link {
    position: absolute;
    left: var(--margin);
    top: -100px;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: var(--cream);
    color: var(--navy);
    font-size: var(--fs-label);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

.skip-link:focus {
    top: 12px;
}

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

/* ---------------------------------------------------------------- Typography */
.display,
.h-hero,
.h1,
.h2,
.h3,
.h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: var(--lh-heading);
    letter-spacing: -0.005em;
    font-variant-numeric: oldstyle-nums proportional-nums;
    text-wrap: balance;
}

.h-hero {
    font-size: var(--fs-hero);
    line-height: var(--lh-tight);
    text-transform: uppercase;
    letter-spacing: 0.015em;
}

.display {
    font-size: var(--fs-display);
    line-height: 1.08;
}

.h1 {
    font-size: var(--fs-display);
    line-height: 1.08;
}

.h2 {
    font-size: var(--fs-h2);
}

.h3 {
    font-size: var(--fs-h3);
    line-height: 1.2;
}

.h4 {
    font-size: var(--fs-h4);
    line-height: 1.3;
}

.lead {
    font-size: var(--fs-lead);
    line-height: 1.6;
    max-width: 38em;
}

.body-copy {
    max-width: 36em;
}

.body-copy > * + * {
    margin-top: 1.1em;
}

.small {
    font-size: var(--fs-small);
    line-height: 1.6;
}

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

.surface-navy .muted {
    color: var(--cream-muted);
}

.label {
    display: block;
    font-family: var(--font-sans);
    font-size: var(--fs-label);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

.label--muted {
    color: var(--navy-muted);
}

.surface-navy .label--muted {
    color: var(--cream-muted);
}

.figures {
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums lining-nums;
}

.rule {
    border: 0;
    border-top: var(--rule) solid var(--navy-line);
    margin: 0;
}

.surface-navy .rule {
    border-top-color: var(--cream-line);
}

/* ---------------------------------------------------------------- Surfaces */
.surface-white {
    background: var(--white);
    color: var(--navy);
}

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

.surface-navy .h-hero,
.surface-navy .display,
.surface-navy .h1,
.surface-navy .h2,
.surface-navy .h3,
.surface-navy .h4 {
    color: var(--cream);
}

.surface-cream {
    background: var(--cream);
    color: var(--navy);
}

.surface-mist {
    background: var(--mist);
    color: var(--navy);
}

/* ---------------------------------------------------------------- Media */
.media {
    position: relative;
    overflow: hidden;
    background: var(--navy);
}

.media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--3x2 { aspect-ratio: 3 / 2; }

/* ---------------------------------------------------------------- Motion */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity var(--reveal-duration) var(--ease),
        transform var(--reveal-duration) var(--ease);
}

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

.js .reveal .media img,
.js .media.reveal img {
    transform: scale(1.04);
    transition: transform 1600ms var(--ease);
}

.js .reveal.is-visible .media img,
.js .media.reveal.is-visible img {
    transform: none;
}

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

    .js .reveal,
    .js .reveal .media img,
    .js .media.reveal img {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
