/* Layered type and light; the original accessible, permanently visible title stays intact. */
.sp3d-title {
  --name-x: -5deg;
  --name-y: -10deg;
  --name-float: 0px;
  --name-light: 125%;
  font-size: clamp(3.4rem, 7.8vw, 6.8rem) !important;
  padding: 8px 14px 18px 0;
  margin-bottom: 20px !important;
  perspective: 1100px;
  filter: drop-shadow(0 15px 22px #0009);
}
.sp3d-title::before {
  content: "";
  position: absolute;
  inset: -16% -12% -8% -15%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 25%, #8ac9e91c, transparent 60%),
    radial-gradient(ellipse at 70% 80%, #e7bf7322, transparent 62%);
}
.sp3d-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(100%, 360px);
  height: 1px;
  background: linear-gradient(90deg, #b7d9ec88, #e9c88688 55%, transparent);
}
.sp3d-title .sp3d-line,
.motion-ready h1.sp3d-title .sp3d-line,
html.motion-active .sp3d-title [data-scroll-ink] {
  padding: 2px 12px 13px 0 !important;
  transform-origin: 35% 50%;
  transform: perspective(1100px) rotateX(var(--name-x)) rotateY(var(--name-y)) translate3d(0, var(--name-float), 0) !important;
  transition: none !important;
  transform-style: preserve-3d;
}
.sp3d-title .sp3d-line::after { display: none !important; }
.cc-hero .sp3d-subtitle { color: #183c47 !important; }
.sp3d-title .sp3d-letter,
.motion-ready h1.sp3d-title .sp3d-letter,
html.motion-active [data-scroll-ink] .sp3d-letter {
  text-shadow:
    1px 1px 0 #b0c9d8, 2px 2px 0 #779bb0,
    3px 3px 0 #52778e, 4px 4px 0 #3f617a,
    5px 5px 0 #304d64, 6px 6px 0 #253e54,
    7px 7px 0 #1d3245, 8px 8px 0 #172939,
    9px 9px 0 #11212f, 10px 10px 0 #0b1926,
    12px 16px 15px #000a;
  animation: sp-name-arrive 1s cubic-bezier(.2,.8,.2,1) both !important;
  animation-delay: calc(var(--i) * 38ms) !important;
}
.sp3d-title .sp3d-line:last-child .sp3d-letter {
  text-shadow:
    1px 1px 0 #eed59b, 2px 2px 0 #c2a36a,
    3px 3px 0 #a18551, 4px 4px 0 #80683f,
    5px 5px 0 #665332, 6px 6px 0 #544329,
    7px 7px 0 #443522, 8px 8px 0 #36291b,
    9px 9px 0 #2a2118, 10px 10px 0 #201a13,
    12px 16px 15px #000a;
}
.sp3d-title[data-sp3d-settled="true"] .sp3d-letter,
.motion-ready h1.sp3d-title[data-sp3d-settled="true"] .sp3d-letter,
html.motion-active [data-scroll-ink].sp3d-title[data-sp3d-settled="true"] .sp3d-letter {
  animation: none !important;
  transform: translateZ(0);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .sp3d-title .sp3d-letter::after {
    content: attr(data-letter);
    position: absolute;
    inset: 0;
    pointer-events: none;
    text-shadow: none;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    background: linear-gradient(112deg, transparent 32%, #fff0 40%, #fff9 49%, #fff0 58%, transparent 68%);
    background-size: 260% 100%;
    background-position: var(--name-light) 50%;
    background-clip: text;
    -webkit-background-clip: text;
  }
}
.sp3d-title[data-sp3d-active="true"] .sp3d-line { will-change: transform; }
@keyframes sp-name-arrive {
  from { transform: perspective(600px) rotateY(-55deg) translate3d(0, 12px, 12px); }
  65% { transform: perspective(600px) rotateY(7deg) translate3d(0, -2px, 0); }
  to { transform: perspective(600px) rotateY(0) translate3d(0, 0, 0); }
}
@media (hover: hover) and (pointer: fine) {
  .sp3d-title:hover .sp3d-letter { transform: translateY(-2px); }
  .sp3d-title:hover .sp3d-line:last-child .sp3d-letter { transform: translateY(-1px); }
}
@media (max-width: 820px) {
  .cc-mobile-polish .cc-hero h1.sp3d-title,
  .cc-mobile-polish.cc-personal-mobile .hero h1.sp3d-title,
  .hero h1.sp3d-title { font-size: clamp(3rem, 13.2vw, 5.1rem) !important; }
  .sp3d-title { padding-right: 10px; margin-bottom: 16px !important; }
}
@media (max-width: 365px) {
  .cc-mobile-polish .cc-hero h1.sp3d-title,
  .cc-mobile-polish.cc-personal-mobile .hero h1.sp3d-title { font-size: 12.6vw !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sp3d-title .sp3d-line,
  .motion-ready h1.sp3d-title .sp3d-line,
  html.motion-active .sp3d-title [data-scroll-ink],
  .sp3d-title .sp3d-letter,
  .motion-ready h1.sp3d-title .sp3d-letter {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    will-change: auto !important;
  }
  .sp3d-title .sp3d-letter::after { display: none; }
}
@media (forced-colors: active) {
  .sp3d-title::before, .sp3d-title::after,
  .sp3d-title .sp3d-letter::after { display: none; }
  .sp3d-title .sp3d-letter { text-shadow: none !important; }
}
