/* ==========================================================================
   Base — reset, type, layout primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--salt);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* dvh, never vh — the iOS toolbar collapse makes 100vh taller than the viewport. */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

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

/* --- Type ---------------------------------------------------------------- */

h1, h2, h3, h4 { margin: 0; text-wrap: balance; }

h1, .display-1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display-1);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--indigo);
}

h2, .display-2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display-2);
  line-height: 1.14;
  letter-spacing: var(--ls-display);
  color: var(--indigo);
}

h3 {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--indigo);
}

p { margin: 0 0 var(--s-4); max-width: var(--measure-sans); }

.lede {
  font-family: var(--font-serif);
  font-size: var(--t-lede);
  line-height: 1.58;
  max-width: var(--measure-serif);
  color: var(--ink);
}

.label {
  font-family: var(--font-sans);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--brass);
}

.label--on-dark { color: var(--brass-light); }

.small { font-size: var(--t-small); color: var(--ink-muted); }

.price {
  font-family: var(--font-display);
  font-size: var(--t-price);
  color: var(--indigo);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--brass); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

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

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

.section { padding-block: clamp(var(--s-7), 8vw, var(--s-9)); }

.section--indigo {
  background: var(--indigo);
  color: var(--on-indigo);
}
.section--indigo h1,
.section--indigo h2 { color: var(--salt); }
.section--indigo p  { color: var(--on-indigo-muted); }

.rule { height: 1px; background: var(--line); border: 0; margin-block: var(--s-6); }

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

.grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

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

.skip-link {
  position: absolute; left: var(--s-4); top: -100px;
  background: var(--indigo); color: var(--salt);
  padding: var(--s-3) var(--s-4); z-index: 100;
  font-weight: 700; letter-spacing: var(--ls-button); text-transform: uppercase;
  font-size: var(--t-small); text-decoration: none;
}
.skip-link:focus { top: calc(var(--safe-top) + var(--s-2)); color: var(--salt); }
