/* Reuse the homepage hero background treatment on the Books and Contact
   hero sections. The gradient token changes with the active theme palette. */
.brand-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.brand-hero > :not(.brand-hero-bg) {
  position: relative;
  z-index: 1;
}

.brand-hero-bg {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: var(--ck-gradient-hero);
  pointer-events: none;
}

.brand-hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 243, 229, .10) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: .45;
}

.brand-hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: .6;
}

.brand-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  background: radial-gradient(circle, rgba(var(--ck-accent-rgb, 230, 115, 150), .16) 0%, transparent 70%);
  animation: brandHeroOrbDrift 18s ease-in-out infinite alternate;
}

.brand-hero-orb-one {
  top: -150px;
  left: -110px;
  width: min(500px, 70vw);
  aspect-ratio: 1;
}

.brand-hero-orb-two {
  right: 5%;
  bottom: -220px;
  width: min(440px, 62vw);
  aspect-ratio: 1;
  animation-duration: 16s;
  animation-direction: alternate-reverse;
}

@keyframes brandHeroOrbDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, 18px, 0) scale(1.06); }
}

html[data-theme="light"] .brand-hero-grid,
html[data-palette] .brand-hero-grid {
  background-image: radial-gradient(circle, rgba(78, 34, 71, .10) 1px, transparent 1px);
  opacity: .22;
}

html[data-theme="light"] .brand-hero-orb,
html[data-palette] .brand-hero-orb {
  background: radial-gradient(circle, var(--ck-accent-subtle, rgba(var(--ck-accent-rgb, 78, 34, 71), .08)) 0%, transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .brand-hero-orb { animation: none; }
}
