/* ==========================================================================
   소통 탭 전환 스플래시 (ttm- 네임스페이스 — tab transition master)
   v2 Sunrise: preview_sotong_splash_option4.html (준하 CD, PM 7회 검수)
   사용처: index.html (출발 페이지), preview_community_integrated_01.html (도착 페이지)

   PM 보고 2026-05-08: 다크 네이비 → Sunrise 5단 일출 그라데이션. VOLT D 로고 +
   3겹 발광 + 일출 spotlight + 부유 모션 + 1s 후 로딩 스택.
   ★ JS 가 splash 등장과 동시에 bukbuidNavigate 호출 — splash 가 iframe 로딩
   시간을 시각적으로 마스킹.
   ========================================================================== */

.ttm-splash {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: linear-gradient(180deg,
        #0a1929 0%,
        #1a3556 30%,
        #ff7c6e 65%,
        #ffd277 90%,
        #fff5d4 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 100px;
    transform: translateY(100%);
    transition: transform 350ms cubic-bezier(0.32, 0.72, 0, 1);
    pointer-events: none;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.ttm-splash.slide-in {
    transform: translateY(0);
    pointer-events: auto;
}

.ttm-splash.fade-out {
    opacity: 0;
    transition: opacity 450ms ease-in;
}

/* 전환 없이 즉시 상태 표시 (도착 페이지에서 완전 상태로 시작할 때) */
.ttm-splash.instant,
.ttm-splash.instant * {
    transition: none !important;
}

/* === 일출 spotlight (배경 광채, 로고 위치 중심) ===
   PM 보고 2026-05-08: 박스형 글로우 끝선이 직사각으로 비치던 문제 — circle 320px
   로 한정해 fade-out 일찍 끝내고 박스 가장자리 안에 fully transparent 영역 확보. */
.ttm-splash::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 320px at 50% 38%,
        rgba(255, 245, 210, 0.55) 0%,
        rgba(255, 215, 145, 0.38) 18%,
        rgba(255, 180, 120, 0.20) 36%,
        rgba(255, 165, 100, 0.10) 52%,
        rgba(255, 165, 100, 0.04) 65%,
        transparent 78%);
    pointer-events: none;
    animation: ttm-sunrise-glow 4s ease-in-out infinite;
}
@keyframes ttm-sunrise-glow {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

/* === 콘텐츠 정렬 === */
.ttm-splash__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* === VOLT D = 태양 (로고가 빛의 원천) === */
.ttm-splash__mark {
    width: 100px;
    height: 100px;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 500ms ease-out,
                transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ttm-splash__mark.show {
    opacity: 1;
    transform: scale(1);
    animation: ttm-sunrise-rise 2.8s cubic-bezier(0.22, 1, 0.36, 1) 600ms infinite;
}
.ttm-splash__mark svg {
    width: 100%;
    height: 100%;
    display: block;
    /* 3겹 drop-shadow — 로고가 발산하는 빛 */
    filter:
        drop-shadow(0 0 18px rgba(255, 240, 195, 0.85))
        drop-shadow(0 0 48px rgba(255, 200, 130, 0.55))
        drop-shadow(0 0 96px rgba(255, 165, 100, 0.32))
        drop-shadow(0 6px 18px rgba(0, 29, 61, 0.45));
}
@keyframes ttm-sunrise-rise {
    0%, 100% { transform: translateY(5px); }
    50%      { transform: translateY(-4px); }
}

/* === 라벨 "대추에너지" === */
.ttm-splash__name {
    font-family: 'Pretendard', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0, 29, 61, 0.55);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 500ms ease-out,
                transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 2;
}
.ttm-splash__name.show { opacity: 1; transform: translateY(0); }

/* === 로딩 스택 (1s 딜레이 후 등장) === */
.ttm-splash__loading {
    position: absolute;
    bottom: 64px;
    left: 50%;
    transform: translate(-50%, 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    z-index: 3;
    transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
                transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ttm-splash__loading.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.ttm-splash__dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.ttm-splash__dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    transform-origin: center;
}
.ttm-splash__loading.show .ttm-splash__dots span {
    animation: ttm-dot-bounce 1.2s ease-in-out infinite;
}
.ttm-splash__loading.show .ttm-splash__dots span:nth-child(2) { animation-delay: 0.15s; }
.ttm-splash__loading.show .ttm-splash__dots span:nth-child(3) { animation-delay: 0.30s; }
@keyframes ttm-dot-bounce {
    0%, 60%, 100% { background: rgba(255, 255, 255, 0.75); transform: scale(1); }
    30%           { background: #ffffff; transform: scale(1.4); }
}
.ttm-splash__loading-text {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-shadow: 0 1px 6px rgba(0, 29, 61, 0.6),
                 0 0 12px rgba(0, 29, 61, 0.35);
}
