/* Palette from the Yuanxu home page, limited to the landing hero and its controls. */
@scope (header, section:has(> .motion-shader), .fixed:has(> button[aria-label="联系小助理"])) {
  :scope {
    --home-blue: #2c3e7b;
    --home-tint: #e4e9fa;
    --home-ink: #202637;

    --color-purple-50: #f2f5fd;
    --color-purple-100: var(--home-tint);
    --color-purple-200: #c6cee2;
    --color-purple-400: #8397c9;
    --color-purple-500: #4e65a3;
    --color-purple-600: var(--home-blue);
    --color-purple-700: #25366c;
    --color-purple-800: #1c2953;
  }

  .motion-shader, :scope.bg-\[\#efefef\] { background-color: #f0f3fa; }
  .motion-shader-fallback {
    background: radial-gradient(circle at 24% 18%, #5872b52e, transparent 32%),
      radial-gradient(circle at 78% 34%, #2c3e7b24, transparent 28%),
      linear-gradient(135deg, white, #eaf0fc 48%, #f0f3fa);
  }
  .motion-shader > [class*="bg-[linear-gradient"] {
    background-image: linear-gradient(180deg, rgb(240 243 250 / 20%) 0%, rgb(240 243 250 / 88%) 72%, #f0f3fa 100%);
  }
  .motion-shader > [class*="bg-[radial-gradient"] {
    background-image: radial-gradient(circle at 18% 20%, rgb(88 114 181 / 18%), transparent 30%),
      radial-gradient(circle at 72% 38%, rgb(44 62 123 / 14%), transparent 28%);
  }

  [class~="bg-[#efe8ff]"], [class~="bg-[#f6c94c]"] { background-color: var(--home-tint); }
  [class~="bg-[#22c55e]"] { background-color: #607ab7; }
  [class~="bg-[#120f1d]"] { background-color: var(--home-ink); }
  [class~="text-[#120f1d]"], [class~="text-[#383044]"] { color: var(--home-ink); }
  [class~="text-[#4f485f]"] { color: #46516b; }
  h1.hero-title { color: #120f1d; }
  p.hero-fade-up-delay { color: #4f485f; }
  @media (min-width: 64rem) {
    h1.hero-title, .hero-title + p { position: relative; top: -3svh; }
    h1.hero-title { font-size: clamp(3.25rem, 15vw - 6rem, 6.5rem); }
    .hero-title + p { font-size: clamp(1.5rem, 2.5vw, 2.5rem); line-height: 1.5; }
    .hero-title + p span { display: block; }
  }
  [class~="ring-[#22c55e]/70"] { --tw-ring-color: rgb(96 122 183 / 70%); }
  [class*="rgba(124,58,237"] { --tw-shadow-color: rgb(44 62 123 / 22%); }
  [class*="drop-shadow-"] { --tw-drop-shadow-color: rgb(44 62 123 / 18%); }
  [class~="border-[#ece6f5]"], [class~="border-[#efeaf6]"] { border-color: #c6cee2; }

  @media (hover: hover) {
    [class~="hover:bg-[#f2bd2a]"]:hover { background-color: #cbd6f4; }
    [class~="hover:bg-[#2a2140]"]:hover { background-color: var(--home-blue); }
    [class~="hover:bg-[#120f1d]"]:hover { background-color: var(--home-ink); }
    [class~="hover:bg-purple-700"]:hover { background-color: var(--color-purple-700); }
    [class~="hover:ring-[#22c55e]"]:hover { --tw-ring-color: #607ab7; }
  }
}

/* The four homepage shortcuts use their own palette inside the blue hero. */
@scope (#hero-intents-title + ul) {
  :scope {
    --color-purple-500: oklch(62.7% .265 303.9);
    --color-purple-600: oklch(55.8% .288 302.321);
    --color-purple-700: oklch(49.6% .265 301.924);
    --color-purple-800: oklch(43.8% .218 303.724);
  }

  a { --tw-shadow-color: rgb(38 29 55 / 10%); }
  [class~="bg-[#120f1d]"] { background-color: #120f1d; }
  [class~="text-[#120f1d]"] { color: #120f1d; }
  [class~="bg-[#f6c94c]"] { background-color: #f6c94c; }

  @media (hover: hover) {
    a:hover { --tw-shadow-color: rgb(38 29 55 / 18%); }
    [class~="hover:bg-[#2a2140]"]:hover { background-color: #2a2140; }
    [class~="hover:bg-[#f2bd2a]"]:hover { background-color: #f2bd2a; }
  }
}
