@charset "UTF-8";
/*
Theme Name: LEGALUS
Author: LEGALUS
Author URI: https://legalus.jp/
Version: 1.0
Description: Animations, transitions, and motion-related UI
*/

/* +++++++++++++++++++++++++++++++++++++++++++++
Keyframes
+++++++++++++++++++++++++++++++++++++++++++++ */
@keyframes text-glitch {
  0% {
    text-shadow: 2px 0 var(--color-glitch-cyan), -2px 0 var(--color-glitch-red);
  }
  50% {
    text-shadow: -2px 0 var(--color-glitch-cyan), 2px 0 var(--color-glitch-red);
  }
  100% {
    text-shadow: 2px 0 var(--color-glitch-cyan), -2px 0 var(--color-glitch-red);
  }
}
@keyframes form-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
@keyframes chat-msg-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes chat-typing {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
@keyframes drawer-flap-in {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes drawer-flap-out {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}
@keyframes drawer-sub-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes about-typewriter-cursor {
  50% { opacity: 0; }
}

/* +++++++++++++++++++++++++++++++++++++++++++++
Form / Chat motion
+++++++++++++++++++++++++++++++++++++++++++++ */
.error-info.is-shake {
  animation: form-shake 0.4s ease;
}
.form-block input:not([type="submit"]):not([type="button"]):not([type="reset"]).error,
.form-block select.error,
.form-block textarea.error {
  animation: form-shake 0.4s ease;
}
.chat-msg {
  animation: chat-msg-in 0.35s ease;
}
.chat-typing-dot {
  animation: chat-typing 1.2s ease-in-out infinite;
}

/* +++++++++++++++++++++++++++++++++++++++++++++
Drawer stagger animation
+++++++++++++++++++++++++++++++++++++++++++++ */
.drawer-sub-pane .drawer-sub-header,
.drawer-sub-pane .drawer-sub-group-heading,
.drawer-sub-pane .drawer-sub-list li {
  opacity: 0;
  transform: translateY(10px);
}
.drawer-sub-pane.is-active .drawer-sub-header,
.drawer-sub-pane.is-active .drawer-sub-group-heading,
.drawer-sub-pane.is-active .drawer-sub-list li {
  animation: drawer-flap-in 0.5s cubic-bezier(0.2, 0.65, 0.3, 1) both;
}
.drawer-sub-pane.is-active .drawer-sub-header { animation-delay: 0.05s; }
.drawer-sub-pane.is-active .drawer-sub-group-heading { animation-delay: 0.11s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(1) { animation-delay: 0.15s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(2) { animation-delay: 0.18s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(3) { animation-delay: 0.21s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(4) { animation-delay: 0.24s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(5) { animation-delay: 0.27s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(6) { animation-delay: 0.30s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(7) { animation-delay: 0.33s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(8) { animation-delay: 0.36s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(9) { animation-delay: 0.39s; }
.drawer-sub-pane.is-active .drawer-sub-list li:nth-child(n+10) { animation-delay: 0.42s; }
.drawer-sub-pane.is-active .drawer-sub-group + .drawer-sub-group .drawer-sub-group-heading { animation-delay: 0.24s; }
.drawer-sub-pane.is-active .drawer-sub-group + .drawer-sub-group .drawer-sub-list li:nth-child(1) { animation-delay: 0.28s; }
.drawer-sub-pane.is-active .drawer-sub-group + .drawer-sub-group .drawer-sub-list li:nth-child(2) { animation-delay: 0.31s; }
.drawer-sub-pane.is-active .drawer-sub-group + .drawer-sub-group .drawer-sub-list li:nth-child(n+3) { animation-delay: 0.34s; }
.drawer-sub-pane.is-leaving {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}
.drawer-sub-pane.is-leaving .drawer-sub-header,
.drawer-sub-pane.is-leaving .drawer-sub-group-heading,
.drawer-sub-pane.is-leaving .drawer-sub-list li {
  opacity: 1;
  transform: translateY(0);
  animation: drawer-flap-out 0.28s cubic-bezier(0.4, 0, 0.85, 0.4) both;
}
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(1) { animation-delay: 0s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(2) { animation-delay: 0.025s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(3) { animation-delay: 0.05s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(4) { animation-delay: 0.075s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(5) { animation-delay: 0.10s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(6) { animation-delay: 0.125s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(7) { animation-delay: 0.15s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(8) { animation-delay: 0.175s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(9) { animation-delay: 0.20s; }
.drawer-sub-pane.is-leaving .drawer-sub-list li:nth-last-child(n+10) { animation-delay: 0.22s; }
.drawer-sub-pane.is-leaving .drawer-sub-group-heading { animation-delay: 0.22s; }
.drawer-sub-pane.is-leaving .drawer-sub-header { animation-delay: 0.26s; }

/* +++++++++++++++++++++++++++++++++++++++++++++
About page motion
+++++++++++++++++++++++++++++++++++++++++++++ */
.about-stage .about-section:last-child .about-section-inner {
  will-change: opacity, filter;
  opacity: var(--bridge-text-opacity, 1);
  filter: blur(var(--bridge-text-blur, 0px));
}
.about-toc {
  transition: opacity 0.35s ease, visibility 0.35s ease;
  will-change: opacity, filter;
}
.about-toc-list li::before {
  transition: opacity 0.35s ease;
}
.about-toc-item {
  transition: color 0.35s ease;
}
[data-typewriter],
[data-typewriter-speed] {
  display: inline-block;
  white-space: pre-wrap;
}
.about-section-en[data-typewriter],
.about-section-en[data-typewriter-speed],
.about-section-ja[data-typewriter],
.about-section-ja[data-typewriter-speed],
.about-section-body[data-typewriter],
.about-section-body[data-typewriter-speed],
.about-section-tag[data-typewriter],
.about-section-tag[data-typewriter-speed] {
  display: block;
  width: 100%;
  text-align: left;
}
.typewriter-init::after,
.typewriter-active::after {
  content: '';
  display: inline-block;
  width: 0.08em;
  height: 0.95em;
  margin-left: 0.08em;
  vertical-align: -0.1em;
  background-color: currentColor;
  opacity: 0.85;
  animation: about-typewriter-cursor 0.7s steps(2, end) infinite;
}
.typewriter-done::after {
  content: none;
}
.about-services-inner {
  will-change: opacity, filter;
}
.about-services-bg-rect {
  will-change: transform, opacity;
}

/* +++++++++++++++++++++++++++++++++++++++++++++
Reduced motion
+++++++++++++++++++++++++++++++++++++++++++++ */
@media (prefers-reduced-motion: reduce) {
  .drawer-menu,
  .drawer-menu.show,
  .drawer-pane-secondary,
  .drawer-pane-secondary.is-open,
  .drawer-sub-pane,
  .drawer-sub-pane.is-active {
    transition-duration: 0.01ms;
  }
  .drawer-sub-pane.is-active .drawer-sub-header,
  .drawer-sub-pane.is-active .drawer-sub-group-heading,
  .drawer-sub-pane.is-active .drawer-sub-list li,
  .drawer-sub-pane.is-leaving .drawer-sub-header,
  .drawer-sub-pane.is-leaving .drawer-sub-group-heading,
  .drawer-sub-pane.is-leaving .drawer-sub-list li {
    animation-duration: 0.01ms;
    animation-delay: 0s;
  }
  .chat-msg {
    animation: none;
  }
  .chat-typing-dot {
    animation: none;
    opacity: 0.7;
  }
  html:has(.about-page) {
    scroll-snap-type: none;
  }
  .about-toc-list li::before {
    transition: none;
  }
  .typewriter-init::after,
  .typewriter-active::after {
    animation: none;
  }
  .about-services-inner {
    opacity: 1;
    filter: none;
  }
  .about-services-bg-rect {
    display: none;
  }
}
