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

html {
  min-inline-size: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  line-height: 1.65;
  background: var(--color-canvas);
  color: var(--color-text);
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  isolation: isolate;
  min-block-size: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgb(30 66 70 / 0.2), transparent 34rem),
    linear-gradient(160deg, var(--color-canvas) 0%, var(--color-canvas-deep) 100%);
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}

body::before {
  inset: -10rem -8rem auto auto;
  inline-size: min(32rem, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(216 171 98 / 0.12), rgb(216 171 98 / 0.025) 42%, transparent 68%);
  filter: blur(0.3rem);
  animation: ambient-glow 9s ease-in-out infinite alternate;
}

body::after {
  inset: 0;
  background-image:
    linear-gradient(rgb(240 211 161 / 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgb(240 211 161 / 0.014) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.7), transparent 72%);
}

h1,
h2,
p {
  margin-block-start: 0;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  text-wrap: balance;
}

h1 {
  max-inline-size: 21ch;
  margin-block-end: var(--space-3);
  font-size: clamp(2rem, 6vw, 3.35rem);
  line-height: 1.13;
  letter-spacing: -0.025em;
}

button,
input,
textarea {
  font: inherit;
}

button,
input,
textarea,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

@keyframes ambient-glow {
  from {
    opacity: 0.7;
    transform: translate3d(0, 0, 0) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translate3d(-1.5rem, 1rem, 0) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
