/* ============================================
   Nutrition Therapy Premium UI/UX Styles
   Version: 1.0.0
   最高品質のビジュアル体験を提供
   ============================================ */

/* ========== Hero Section Premium ========== */
.hero-premium {
    position: relative;
    overflow: hidden;
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        #0A3D3D 0%, 
        #1a4d4d 25%,
        #4A6B5B 50%,
        #1a4d4d 75%,
        #0A3D3D 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

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

.hero-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(201, 169, 97, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(74, 107, 91, 0.15) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title-main {
    animation: fadeInDown 1s ease-out;
}

.hero-title-sub {
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 浮遊アイコン */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 15%;
    left: 10%;
    font-size: 3rem;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 60%;
    left: 85%;
    font-size: 2.5rem;
    animation-delay: 2s;
}

.floating-icon:nth-child(3) {
    top: 35%;
    right: 15%;
    font-size: 2rem;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 0.2;
    }
}

/* ========== Wave Divider ========== */
.wave-divider {
    position: relative;
    height: 80px;
    overflow: hidden;
}

.wave-divider svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 80px;
}

.wave-divider.top {
    margin-top: -1px;
}

.wave-divider.bottom {
    margin-bottom: -1px;
    transform: rotate(180deg);
}

/* ========== Premium Cards ========== */
.premium-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transition: left 0.6s;
}

.premium-card:hover::before {
    left: 100%;
}

.premium-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(10, 61, 61, 0.15),
        0 0 0 1px rgba(10, 61, 61, 0.05),
        0 0 60px rgba(201, 169, 97, 0.1);
}

/* ========== Icon Animation ========== */
.icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ========== Button Premium Effects ========== */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-premium:hover::before {
    width: 300px;
    height: 300px;
}

.btn-premium:active {
    transform: scale(0.95);
}

/* ========== Timeline Premium ========== */
.timeline-premium {
    position: relative;
    padding-left: 3rem;
}

.timeline-premium::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, 
        #0A3D3D,
        #4A6B5B,
        #C9A961);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: white;
    border: 3px solid #0A3D3D;
    box-shadow: 0 0 0 4px rgba(10, 61, 61, 0.1);
    z-index: 1;
}

.timeline-item.visible::before {
    animation: timelinePulse 1.5s ease-out;
}

@keyframes timelinePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(10, 61, 61, 0.4);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(10, 61, 61, 0);
    }
}

/* ========== Counter Animation ========== */
.counter {
    font-size: 3rem;
    font-weight: 700;
    color: #0A3D3D;
    line-height: 1;
}

.counter-label {
    font-size: 1rem;
    color: #4A5568;
    margin-top: 0.5rem;
}

/* ========== Parallax Section ========== */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    bottom: -50px;
    background-size: cover;
    background-position: center;
    transform: translateZ(0);
    will-change: transform;
}

/* ========== Stats Grid ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========== Gradient Text ========== */
.gradient-text {
    background: linear-gradient(135deg, #0A3D3D 0%, #4A6B5B 50%, #C9A961 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientTextShift 3s ease infinite;
}

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

/* ========== Smooth Scroll Anchor ========== */
html {
    scroll-behavior: smooth;
}

.anchor-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.anchor-link:hover {
    color: #0A3D3D;
}

/* ========== Table of Contents ========== */
.toc-container {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 1rem;
}

.toc-list a {
    color: #4A5568;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.toc-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #0A3D3D;
    border-radius: 2px;
    transition: height 0.3s ease;
}

.toc-list a:hover,
.toc-list a.active {
    background: rgba(10, 61, 61, 0.05);
    color: #0A3D3D;
    padding-left: 1.5rem;
}

.toc-list a:hover::before,
.toc-list a.active::before {
    height: 100%;
}

/* ========== Progress Bar ========== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, #0A3D3D, #4A6B5B, #C9A961);
    z-index: 9999;
    transform-origin: left;
    transition: transform 0.2s ease;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .floating-icon {
        display: none;
    }
    
    .timeline-premium {
        padding-left: 2rem;
    }
    
    .timeline-premium::before {
        left: 0.5rem;
    }
    
    .timeline-item::before {
        left: -1.75rem;
        width: 1rem;
        height: 1rem;
    }
    
    .counter {
        font-size: 2rem;
    }
    
    .toc-container {
        position: static;
        margin-bottom: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .wave-divider {
        height: 40px;
    }
    
    .wave-divider svg {
        height: 40px;
    }
}

.sp-only {
    display: none;
}

@media (max-width: 768px) {
    .sp-only {
        display: inline;
    }
}

/* ========== Loading Animation ========== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
}
