/* assets/css/style.css */

/* ============================================================
   Base
============================================================ */
html {
    scroll-behavior: smooth;
}

#contact, #hojokin, #flow, #faq, #product, #pricing, #service, #system, #blog, #download {
    scroll-margin-top: 80px;
}

/* ============================================================
   Scroll-Triggered Animations (Intersection Observer)
============================================================ */
[data-animate] {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

[data-animate].is-visible {
    opacity: 1;
    transform: none !important;
}

[data-animate="fade-up"]    { transform: translateY(50px); }
[data-animate="fade-down"]  { transform: translateY(-30px); }
[data-animate="fade-right"] { transform: translateX(-50px); }
[data-animate="fade-left"]  { transform: translateX(50px); }
[data-animate="scale-in"]   { transform: scale(0.85); }
[data-animate="fade-in"]    { transform: none; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ============================================================
   Hero: Animated Gradient Background
============================================================ */
.hero-gradient {
    background: linear-gradient(-45deg, #fdf2f8, #ede9fe, #dbeafe, #fce7f3);
    background-size: 400% 400%;
    animation: heroGradient 12s ease infinite;
}

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

/* ============================================================
   Gradient Text
============================================================ */
.text-gradient {
    background: linear-gradient(135deg, #db2777, #7c3aed, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   CTA Glow Effect
============================================================ */
.cta-glow {
    box-shadow: 0 0 20px rgba(219, 39, 119, 0.3),
                0 0 60px rgba(219, 39, 119, 0.1);
    animation: ctaGlow 2.5s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
    0%   { box-shadow: 0 0 20px rgba(219, 39, 119, 0.3), 0 0 60px rgba(219, 39, 119, 0.1); }
    100% { box-shadow: 0 0 30px rgba(219, 39, 119, 0.5), 0 0 80px rgba(219, 39, 119, 0.2); }
}

/* ============================================================
   Pricing "Most Popular" Shimmer Effect
============================================================ */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transform: rotate(25deg);
    animation: shimmerSlide 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmerSlide {
    0%, 100% { left: -60%; }
    50%      { left: 110%; }
}

/* ============================================================
   Float Animation (Trust Badges)
============================================================ */
.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 4s ease-in-out 1s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-6px); }
}

/* ============================================================
   Section Dividers (Diagonal)
============================================================ */
.section-divider-top {
    position: relative;
}

.section-divider-top::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: inherit;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 1;
}

/* ============================================================
   Numbers: Dot Pattern Background
============================================================ */
.dot-pattern {
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ============================================================
   Gallery: SP Tap Support
============================================================ */
@media (max-width: 767px) {
    [data-gallery-item] .gallery-overlay {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    [data-gallery-item].tapped .gallery-overlay {
        opacity: 1;
    }
    [data-gallery-item].tapped .gallery-text {
        transform: translateY(0);
        opacity: 1;
    }
    [data-gallery-item].tapped img {
        transform: scale(1.05);
    }
}

/* ============================================================
   FAQ: Smooth Open/Close
============================================================ */
details[open] > summary {
    background-color: #fdf2f8;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

details .faq-body {
    animation: faqExpand 0.3s ease-out;
}

@keyframes faqExpand {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SP Sticky CTA: Slide Up
============================================================ */
.sp-cta-hidden {
    transform: translateY(100%);
    opacity: 0;
}

.sp-cta-visible {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
}

/* ============================================================
   Tap Feedback (SP)
============================================================ */
.tap-feedback:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* ============================================================
   Glass Effect (utility)
============================================================ */
.glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================================
   Counter Animation (Numbers section)
============================================================ */
.counter-value {
    display: inline-block;
    min-width: 2ch;
}
