/**
 * Moaplus Unified Styles
 * Author: Moaplus Team
 * Version: 7.0 (Cleaned)
 */

/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
  --color-primary: #2563eb;
  --color-text: #000000;
  --color-white: #ffffff;
  --color-error: #ef4444;
  --font-family-primary: 'Pretendard', system-ui, sans-serif;
  /* Transition variables removed */
}

/* ============================================
   BASE & ACCESSIBILITY
   ============================================ */

/* Prevent horizontal scroll on mobile */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Ensure no element exceeds viewport width */
#root, main, section {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Prevent image selection and dragging */
img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: var(--font-family-primary);
}

html {
  font-family: var(--font-family-primary);
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion media query removed */

/* Animations removed - Tailwind CSS only */

/* ============================================
   MOBILE MENU (ANIMATIONS REMOVED)
   ============================================ */
#mobile-menu-overlay {
  visibility: hidden;
  opacity: 0;
  z-index: 9999 !important;
  transition:
    opacity 0.2s ease-out,
    visibility 0.2s ease-out;
}

#mobile-menu-overlay.is-open {
  visibility: visible !important;
  opacity: 1 !important;
}

#mobile-menu-overlay .bg-black\/85 {
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

#mobile-menu-overlay.is-open .bg-black\/85 {
  opacity: 1 !important;
}

#mobile-menu-overlay .transform {
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

#mobile-menu-overlay.is-open .transform {
  opacity: 1 !important;
}

#mobile-menu-overlay nav {
  opacity: 0 !important;
  transition: opacity 0.15s ease-out 0.05s;
}

#mobile-menu-overlay.is-open nav {
  opacity: 1 !important;
}

#mobile-menu-overlay nav div a {
  opacity: 0 !important;
  transform: translateY(10px) !important;
  transition:
    opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

#mobile-menu-overlay.is-open nav div a {
  opacity: 1 !important;
  transform: translateY(0px) !important;
}

/* 순차적 slide up 효과 - div 안의 첫 번째, 두 번째, 세 번째 a 태그 */
#mobile-menu-overlay.is-open nav div a:nth-of-type(1) {
  transition-delay: 0.1s;
}

#mobile-menu-overlay.is-open nav div a:nth-of-type(2) {
  transition-delay: 0.15s;
}

#mobile-menu-overlay.is-open nav div a:nth-of-type(3) {
  transition-delay: 0.2s;
}

.header__mobile-line {
  /* Static styles only */
}

#mobile-menu-button[aria-expanded='true'] .header__mobile-line--top {
  transform: rotate(45deg);
  top: 21px;
}

#mobile-menu-button[aria-expanded='true'] .header__mobile-line--middle {
  opacity: 0;
}

#mobile-menu-button[aria-expanded='true'] .header__mobile-line--bottom {
  transform: rotate(-45deg);
  bottom: 21px;
}

/* ============================================
   MODALS WITH ANIMATIONS
   ============================================ */

/* Modal keyframes */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes modalContentZoomIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalContentZoomOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.95) translateY(5px);
  }
}

/* Modal base styles */
.modal {
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.2s ease-out,
    visibility 0.2s ease-out;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
  animation: modalFadeIn 0.2s ease-out forwards;
}

.modal.is-closing {
  animation: modalFadeOut 0.15s ease-out forwards;
}

.modal-content {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out;
}

.modal.is-open .modal-content {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: modalContentZoomIn 0.25s ease-out forwards;
}

.modal.is-closing .modal-content {
  animation: modalContentZoomOut 0.15s ease-out forwards;
}

/* Money bag bounce animation */
@keyframes moneyBagBounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-4px) scale(1.1);
  }
  60% {
    transform: translateY(-2px) scale(1.05);
  }
}

/* 돈주머니 통통 튀기기 - AOS 애니메이션 완료 후 자동 실행 */
.money-bag-bounce.aos-animate {
  animation: moneyBagBounce 0.6s ease-out 1s; /* AOS 완료 1.0초 후 통통 튀기기 */
}

/* Modal animation enhancements */
.modal [data-aos] {
  will-change: transform, opacity;
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Prevent FOUC in modals */
.modal:not(.is-open) [data-aos] {
  visibility: hidden !important;
}

/* 기존 애니메이션 제거됨 */

/* 기존 text-fill 시스템 제거됨 */

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */
/* 소득공제 환급예시표보기 버튼 shimmer 효과 */
@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

#refund-button-38syaq3r3 {
  overflow: hidden;
}

#refund-button-38syaq3r3::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05) 30%,
    rgba(255, 255, 255, 0.15) 70%,
    rgba(255, 255, 255, 0.2)
  );
  animation: shimmer 2s infinite;
  z-index: 1;
  pointer-events: none;
}

#refund-button-38syaq3r3 > * {
  position: relative;
  z-index: 2;
}

/* ============================================
   FORMS & NOTIFICATIONS
   ============================================ */
.toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  color: var(--color-white);
  font-weight: 500;
  z-index: 10000;
}

.toast.error {
  background-color: var(--color-error);
}

.has-error {
  outline: 2px solid var(--color-error);
  border-radius: 0.25rem;
}

/* ============================================
   MOTION.DEV ANIMATION SETUP
   ============================================ */
/* Motion.dev 애니메이션 초기 상태 설정 */
[data-aos] {
  opacity: 0;
}

/* Ownership bars initial state for stagger animation */
.ownership-bar {
  opacity: 0;
  transform: translateY(80px) scale(0.8);
  will-change: transform, opacity;
}

.ownership-divider {
  opacity: 0;
  transform: scale(0.5);
  will-change: transform, opacity;
}

/* Mobile optimization for ownership bars */
@media (max-width: 768px) {
  .ownership-bar {
    transform: translateY(40px) scale(0.9);
  }

  .ownership-divider {
    transform: scale(0.8);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .ownership-bar {
    transform: translateY(20px) scale(0.95);
  }

  .ownership-divider {
    transform: scale(0.9);
  }
}

/* Resident and Investment bars animation */
.resident-bar {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform, opacity;
}

.investment-bar {
  opacity: 0;
  transform: translateY(30px) scale(0.8);
  will-change: transform, opacity;
}

.investment-divider {
  opacity: 0;
  transform: scaleY(0);
  will-change: transform, opacity;
}

/* Mobile optimization for investment bars */
@media (max-width: 768px) {
  .investment-bar {
    transform: translateY(20px) scale(0.9);
  }
}

/* Investment process steps animation */
.investment-step {
  opacity: 0;
  transform: translateX(-50px);
  will-change: transform, opacity;
}

/* Mobile optimization for investment steps */
@media (max-width: 768px) {
  .investment-step {
    transform: translateX(-30px);
  }
}

/* Split text animation styles */
.split-word {
  will-change: transform, opacity;
  display: inline-block;
}

/* Hide text elements until fonts load and split animation is ready */
h1[data-split='true'],
h2[data-split='true'],
.text-split {
  visibility: hidden;
}

/* Show text elements when ready */
h1[data-split='true'].ready,
h2[data-split='true'].ready,
.text-split.ready {
  visibility: visible;
}

[data-aos='fade-up'] {
  transform: translateY(40px);
}

[data-aos='fade-down'] {
  transform: translateY(-40px);
}

[data-aos='fade-left'] {
  transform: translateX(40px);
}

[data-aos='fade-right'] {
  transform: translateX(-40px);
}

[data-aos='zoom-in'] {
  transform: scale(0.8);
}

[data-aos='slide-up'] {
  transform: translateY(40px);
}

[data-aos='slide-down'] {
  transform: translateY(-40px);
}

/* ============================================
   SCROLL UTILITIES (ANIMATIONS REMOVED)
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background-color: var(--color-primary);
  width: 0%;
  z-index: 10001;
}

#scroll-to-top {
  display: none; /* Managed by JS */
}

.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* ============================================
   FAQ ACCORDION ANIMATIONS
   ============================================ */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-content.is-open {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-toggle[aria-expanded='true'] .faq-icon {
  transform: rotate(180deg);
}

.faq-toggle[aria-expanded='false'] .faq-icon {
  transform: rotate(0deg);
}

/* FAQ 콘텐츠 내부 패딩 애니메이션 */
.faq-content > div {
  transition:
    opacity 0.3s ease-out,
    transform 0.3s ease-out;
  opacity: 0;
  transform: translateY(-10px);
}

.faq-content.is-open > div {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

/* FAQ 항목 초기 스태거 애니메이션 */
.faq-item {
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
}

/* Motion-AI Spring Text Fill Animation */
.text-fill-animation {
  position: relative;
  /* 초기 상태는 회색 텍스트로 보이게 */
  color: #6b7280;
  -webkit-text-fill-color: #6b7280;
}

/* Motion-AI Spring Text Fill Animation */
.text-fill-animation.black {
  position: relative;
  /* 초기 상태는 회색 텍스트로 보이게 */
  color: #b0b2b3;
  -webkit-text-fill-color: #b0b2b3;
}

.text-fill-animation.aos-animate.green {
  background: linear-gradient(90deg, #ffffff 0%, #00d3b9 35%, #00d3b9 45%, #6b7280 55%, #6b7280 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-fill-animation.aos-animate.black {
  background: linear-gradient(90deg, #000000 0%, #000000 35%, #0f70ff 45%, #b0b2b3 55%, #b0b2b3 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* aos-animate 클래스가 추가되면 그라데이션 애니메이션 시작 */
.text-fill-animation.aos-animate {
  background: linear-gradient(90deg, #ffffff 0%, #94cefe 35%, #94cefe 45%, #6b7280 55%, #6b7280 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 애니메이션이 활성화될 때만 실행 */
.text-fill-animation.aos-animate {
  animation: fillFromLeft 5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fillFromLeft {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

/* 규제샌드박스 텍스트용 파란색 그라데이션 */
.text-fill-animation-blue {
  position: relative;
  font-weight: 700; /* 글자를 더 굵게 */
  /* 초기 상태: 회색 */
  color: #6b7280 !important;
  -webkit-text-fill-color: currentColor !important;
  transition: color 2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 채우기 애니메이션이 활성화될 때 */
.text-fill-animation-blue.aos-animate {
  color: #0084ff !important;
  -webkit-text-fill-color: currentColor !important;
}

/* 색상 보간 애니메이션 */
.text-fill-animation-blue.color-interpolate {
  transition: none !important;
  animation: colorPulse 2s linear infinite !important;
}

@keyframes colorPulse {
  0% {
    color: #0084ff;
  }
  50% {
    color: #43a8ff;
  }
  100% {
    color: #0084ff;
  }
}

/* 무한 위로 스크롤 애니메이션 */
@keyframes float-up {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(-100%);
  }
}

.animate-float-up {
  animation: float-up 10s linear infinite;
  transform-origin: center center;
}

.animation-delay-half1 {
  animation-delay: -2.9s;
}

.animation-delay-half2 {
  animation-delay: -5.8s;
}

.animation-delay-half3 {
  animation-delay: -8.7s;
}

.animation-delay-half1-mobile {
  animation-delay: -2s;
}

.animation-delay-half2-mobile {
  animation-delay: -4s;
}

.animation-delay-half3-mobile {
  animation-delay: -6s;
}

.animation-delay-half4-mobile {
  animation-delay: -8s;
}

/* Infinite bounce animation */
.bounce-infinite {
  animation: bounceInfinite 2s ease-in-out infinite;
}

@keyframes bounceInfinite {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

/* Infinite scroll right animation */
@keyframes scrollRight {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-scroll-right {
  animation: scrollRight 6s linear infinite;
}

.animate-scroll-right-delay-1 {
  animation-delay: -4s;
}

.animate-scroll-right-delay-2 {
  animation-delay: -8s;
}









/* pc 화면 */
@media (min-width: 768px) {
  #kakao-talk-channel-chat-button {
  position: fixed;
  z-index: 999;
  right: 32px;
  bottom: 32px;
  }
}
/* 모바일 화면 */
@media (max-width:767px) {
  #kakao-talk-channel-chat-button {
  position: fixed;
  z-index: 999;
  right: 16px;
  bottom: 16px;
  }
}
#kakao-talk-channel-chat-button.default > img {
  border-radius: 64px;
  box-shadow: 0px 8px 28px -6px rgba(24, 39, 75, 0.12), 0px 18px 88px -4px rgba(24, 39, 75, 0.14);
}
#kakao-talk-channel-chat-button:hover > img {
  filter: brightness(0.96);
}
#kakao-talk-channel-chat-button:focus > img {
  filter: brightness(0.92);
}