/* ==========================================================================
   base.css
   Reset and the few shared page styles used by the index and every animation
   page. Keep this small: the design must stay out of the way.
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

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

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Visible focus for keyboard users only. */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

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

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

/* --------------------------------------------------------------------------
   Hero building blocks
   Every animation page is a minimal hero: a small brand name, one headline,
   at most one supporting line. Use these classes and override what the
   animation needs in its own style.css.
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  /* Reserve room for the demo shell bar at the top. */
  padding: calc(var(--shell-height) + var(--space-6)) var(--page-gutter) var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.headline {
  font-size: var(--text-display);
  font-weight: 300;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  text-wrap: balance;
}

/* Eyebrow: small all caps line with generous letter spacing, above a headline. */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.support {
  font-size: var(--text-lg);
  font-weight: 400;
  max-width: 28ch;
  text-wrap: balance;
}

/* Reduced motion: kill every CSS transition and animation by default.
   Animations that want a calm static version handle the rest in JS. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
