/*
  VERNIER PROTECTED COMPOSITION FOUNDATION

  This is geometry, not a house style. It supplies a firm responsive rhythm and
  six compositional primitives while deliberately choosing no colour, typeface,
  surface, border, radius, shadow, illustration language, or page topology.

  .v-frame   bounded inline field
  .v-field   responsive twelve/four-column spatial field
  .v-layer   overlap plane for subject-owned compositions
  .v-cluster wrapping proximity group
  .v-flow    deliberate vertical rhythm
  .v-bleed   viewport-edge escape from a bounded parent

  Authored HTML may use, combine, repeat, omit, and reorder these primitives.
*/

:root {
  --v-gutter: clamp(1rem, 0.5rem + 2.5vw, 3.5rem);
  --v-frame-max: 100rem;
  --v-space-1: clamp(0.5rem, 0.44rem + 0.3vw, 0.75rem);
  --v-space-2: clamp(1rem, 0.85rem + 0.75vw, 1.5rem);
  --v-space-3: clamp(1.5rem, 1.15rem + 1.75vw, 3rem);
  --v-space-4: clamp(2.5rem, 1.5rem + 4vw, 6rem);
  --v-space-5: clamp(4rem, 2rem + 8vw, 11rem);
  --v-measure: 68ch;
  --v-field-columns: 12;
}

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

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
}

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

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

button,
summary,
label,
a {
  touch-action: manipulation;
}

a,
button,
input,
textarea,
select,
summary {
  outline-offset: 0.25rem;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 0.1875rem solid currentColor;
}

[id] {
  scroll-margin-top: 6rem;
}

[hidden] {
  display: none !important;
}

.v-frame {
  inline-size: min(calc(100% - (2 * var(--v-gutter))), var(--v-frame-max));
  margin-inline: auto;
}

.v-field {
  display: grid;
  grid-template-columns: repeat(var(--v-field-columns), minmax(0, 1fr));
  align-items: start;
  gap: var(--v-space-3) var(--v-gutter);
  padding-block: var(--v-space-5);
  isolation: isolate;
}

.v-field > *,
.v-cluster > *,
.v-layer > * {
  min-inline-size: 0;
}

.v-layer {
  display: grid;
  isolation: isolate;
}

.v-layer > * {
  grid-area: 1 / 1;
}

.v-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--v-cluster-gap, var(--v-space-2));
}

.v-flow > * {
  margin-block: 0;
}

.v-flow > * + * {
  margin-block-start: var(--v-flow-space, var(--v-space-2));
}

.v-flow > :is(h1, h2, h3) + * {
  --v-flow-space: var(--v-space-1);
}

.v-bleed {
  inline-size: 100vw;
  max-inline-size: none;
  margin-inline: calc(50% - 50vw);
}

:where(p, li, figcaption) {
  max-inline-size: var(--v-measure);
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 43rem) {
  :root {
    --v-field-columns: 4;
  }

  .v-field {
    row-gap: var(--v-space-2);
  }
}

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

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