/*
 * The ground every page stands on: a reset, the type, and the backdrop.
 */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

img {
  height: auto;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

::selection {
  background: var(--selection);
}

[hidden] {
  display: none !important;
}

/* The backdrop. Glass over plain white looks like nothing at all; it needs
   something behind it to bend. Three soft gradients, moved by transform only
   so the compositor does the work and the page never repaints for it. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--canvas);
}

.aurora span {
  position: absolute;
  width: 62vmax;
  height: 62vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--tone), transparent);
  opacity: var(--aurora-opacity);
  animation: aurora-drift 40s var(--ease) infinite alternate;
  will-change: transform;
}

.aurora span:nth-child(1) {
  --tone: var(--aurora-sky);
  top: -24vmax;
  left: -14vmax;
}

.aurora span:nth-child(2) {
  --tone: var(--aurora-lilac);
  top: -8vmax;
  right: -22vmax;
  animation-duration: 48s;
  animation-delay: -14s;
}

.aurora span:nth-child(3) {
  --tone: var(--aurora-mint);
  bottom: -30vmax;
  left: 16vmax;
  animation-duration: 56s;
  animation-delay: -26s;
}

/* A faint grid over the light, strongest at the top and gone by the middle of
   the page: enough to read as an instrument panel, never enough to sit behind
   a sentence as a pattern. */
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}

@keyframes aurora-drift {
  to {
    transform: translate3d(7vmax, 5vmax, 0) scale(1.12);
  }
}

/* Type. Letter-spacing is applied to English only: in Chrome any spacing on
   Kannada or Devanagari switches off the ligatures that join a conjunct, and
   the word falls apart into its pieces. */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  text-wrap: balance;
}

:lang(en) .display {
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent-ink);
}

:lang(en) .eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lede {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--ink-2);
}

.muted {
  color: var(--ink-3);
}

.small {
  font-size: var(--text-sm);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.container {
  width: min(1160px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, var(--space-4));
}

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

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

/* Holds the icon symbols a page uses. Not display:none: a <symbol> inside a
   hidden subtree does not render through <use> in every browser. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--canvas);
}

.skip-link:focus {
  top: var(--space-4);
}

@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;
  }

  .aurora span {
    animation: none;
  }
}
