:root {
  --background: #F4F1EA;
  --text: #2A1D14;
  --muted: rgba(60, 40, 30, 0.55);
  --accent: #C8552B;
  --rule: rgba(42, 29, 20, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
}

a {
  color: inherit;
  text-decoration-color: rgba(200, 85, 43, 0.45);
  text-underline-offset: 0.18em;
}

/* ---------- Home page ----------
   Two animated elements:
   (1) A large blurred terracotta region in the background that drifts
       slowly across the canvas — atmospheric, not a contained blob.
   (2) A subtle light-pass ripple across the wordmark, traversing
       left-to-right and right-to-left as the animation alternates.
       Like a soft warm ray briefly catching the letters.
   Everything else stays still. */

.home {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  background: var(--background);
}

.home::after {
  position: fixed;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  /* Soft corner vignette — gives the canvas weight at the edges. */
  background: radial-gradient(
    ellipse 95% 80% at center,
    rgba(42, 29, 20, 0) 60%,
    rgba(42, 29, 20, 0.07) 100%
  );
}

/* Single drifting terracotta region — large, heavily blurred,
   slow-moving. Reads as a moving warm presence behind the wordmark
   rather than a discrete shape. */
.aurora {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Two regions: a cream wash anchored upper-left and a terracotta pool
   anchored lower-right. Each has irregular border-radius + heavy blur
   so the edges don't read as obvious circles. Different drift timings
   so they don't move in lockstep. */
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  filter: blur(280px);
  will-change: transform;
}

.aurora::before {
  /* Cream — upper-left anchor */
  top: -22vh;
  left: -20vw;
  width: clamp(720px, 78vw, 1500px);
  height: clamp(720px, 78vw, 1500px);
  border-radius: 48% 52% 60% 40% / 52% 44% 56% 48%;
  background: radial-gradient(
    ellipse 58% 56% at 46% 50%,
    rgba(229, 201, 168, 0.62) 0 24%,
    rgba(229, 201, 168, 0.32) 48%,
    rgba(229, 201, 168, 0) 74%
  );
  animation: aurora-drift-warm 110s ease-in-out infinite alternate;
}

.aurora::after {
  /* Terracotta — lower-right anchor */
  bottom: -20vh;
  right: -16vw;
  width: clamp(620px, 68vw, 1300px);
  height: clamp(620px, 68vw, 1300px);
  border-radius: 56% 44% 49% 51% / 46% 58% 42% 54%;
  background: radial-gradient(
    ellipse 56% 54% at 50% 50%,
    rgba(200, 85, 43, 0.30) 0 24%,
    rgba(200, 85, 43, 0.14) 48%,
    rgba(200, 85, 43, 0) 74%
  );
  animation: aurora-drift-accent 92s ease-in-out infinite alternate-reverse;
}

.mark {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: clamp(20px, 2.4vw, 32px);
  padding: 24px;
  text-align: center;
  transform: translateY(-2vh);
}

/* Wordmark with light-pass ripple. The text fill is a horizontal
   gradient where the middle stop is a *very slightly* lighter, warmer
   brown — the difference between base and highlight is small enough
   that the effect reads as a soft tonal shift, not a contrast band.
   Animating background-position slides that band across the letters.
   The animation alternates direction so the ripple sweeps both ways.
   90deg (pure horizontal) — no diagonal so no vertical variance
   across the italic letterforms. */
.wordmark {
  margin: 0;
  font-size: clamp(72px, 14vw, 160px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.15;
  background: linear-gradient(
    90deg,
    var(--text) 0%,
    var(--text) 30%,
    #3E2A1A 50%,
    var(--text) 70%,
    var(--text) 100%
  );
  background-size: 240% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation:
    fade-up 900ms ease-out 200ms both,
    wordmark-ripple 8s ease-in-out 1.4s infinite alternate;
}

.tagline {
  margin: clamp(6px, 0.8em, 18px) 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 22px);
  font-style: italic;
  letter-spacing: 0.04em;
  animation: fade-up 900ms ease-out 900ms both;
}

.page {
  min-height: 100vh;
  padding: 44px 20px 72px;
}

.doc {
  width: min(720px, 100%);
  margin: 0 auto;
}

.doc-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.doc-wordmark {
  font-size: 34px;
  font-style: italic;
  line-height: 1;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

.doc h1 {
  margin: 34px 0 8px;
  font-size: clamp(36px, 8vw, 64px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.95;
}

.doc h2 {
  margin: 34px 0 10px;
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.doc p,
.doc li {
  color: rgba(42, 29, 20, 0.82);
  font-size: 17px;
  line-height: 1.65;
}

.doc p {
  margin: 12px 0;
}

.doc ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.effective {
  color: var(--muted);
  font-size: 16px;
  font-style: italic;
}

.callout {
  margin: 28px 0;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Aurora drift — slow modest movement, anchored to each blob's
   corner so they stay roughly in their own quadrant. Different
   timings + alternate-reverse on the accent so the two regions
   never move in lockstep. */
@keyframes aurora-drift-warm {
  0% {
    transform: translate3d(-3vw, -2vh, 0) rotate(-2deg);
  }

  50% {
    transform: translate3d(4vw, 4vh, 0) rotate(1deg);
  }

  100% {
    transform: translate3d(-1vw, 6vh, 0) rotate(3deg);
  }
}

@keyframes aurora-drift-accent {
  0% {
    transform: translate3d(2vw, 2vh, 0) rotate(2deg);
  }

  50% {
    transform: translate3d(-4vw, -3vh, 0) rotate(-1deg);
  }

  100% {
    transform: translate3d(1vw, -5vh, 0) rotate(-3deg);
  }
}

/* Wordmark light-pass — slides the gradient under the text-mask so
   the slightly-lighter middle stop traverses the letters. Alternate
   direction makes the ripple sweep both ways. */
@keyframes wordmark-ripple {
  from {
    background-position: 0% 0;
  }

  to {
    background-position: 100% 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

  /* Stop both blobs' drift. */
  .aurora::before,
  .aurora::after {
    animation: none !important;
    transform: none !important;
  }

  /* Stop the ripple; pin the gradient to the resting (no-highlight)
     position so the wordmark renders as solid base color. */
  .wordmark {
    animation-name: fade-in;
    background-position: 0% 0 !important;
  }

  .tagline {
    animation-name: fade-in;
    transform: none !important;
  }
}

@media (max-width: 560px) {
  .doc-header {
    display: grid;
  }

  .doc-nav {
    gap: 10px;
  }
}
