/* * =============================================
 * Root Variables and Global Styles
 * =============================================
 */
:root {
    /* 金色を #ffd700 に変更 */
    --bws-gold: #ffd700;
    /* Bright gold for vibrancy */
    --bws-green: #006948;
    --bws-green-dark: #004d33;
    --bws-background: #fdfdfd;
    --bws-lighter-green: #f0f7f4;
    --bws-text-dark: #1a2a3a;
    --bws-text-medium: #3c4a5a;
    /* Journey Colors */
    --journey-c1: #F9C74F;
    --journey-c2: #F3722C;
    --journey-c3: #F94144;
    --journey-c4: #90BE6D;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bws-background);
    color: var(--bws-text-medium);
    overflow-x: hidden;
}

.font-yuji {
    font-family: 'Yuji Syuku', serif;
}

.font-wakuwaku {
    font-family: 'Yusei Magic', sans-serif;
}

.text-sm-custom {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* * =============================================
 * Animations and Interactive Elements
 * =============================================
 */
.animated-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animated-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-button {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 105, 72, 0.1);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 105, 72, 0.2);
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px;
    margin: auto;
}

.academy-bg {
    background-color: var(--bws-lighter-green);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23006948' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* * =============================================
 * Journey/Roadmap Section Styles (Updated)
 * =============================================
 */
.roadmap-line {
    position: absolute;
    left: 2.5rem;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 4px;
    background-color: #e2e8f0;
    z-index: 0;
}

.roadmap-dot {
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    /* Fully rounded */
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    transition: transform 0.3s ease;
}

.roadmap-step {
    position: relative;
    padding: 1.5rem;
    padding-left: 5rem;
    margin-bottom: 2.5rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    border-left-width: 6px;
    /* Add colored left border */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.roadmap-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.roadmap-step:hover .roadmap-dot {
    transform: scale(1.1);
}

.roadmap-step:last-child {
    margin-bottom: 0;
}

/* Color the numbered dots and card borders */
.step-1 .roadmap-dot {
    background-color: var(--journey-c1);
}

.step-1 {
    border-left-color: var(--journey-c1);
}

.step-2 .roadmap-dot {
    background-color: var(--journey-c2);
}

.step-2 {
    border-left-color: var(--journey-c2);
}

.step-3 .roadmap-dot {
    background-color: var(--journey-c3);
}

.step-3 {
    border-left-color: var(--journey-c3);
}

.step-4 .roadmap-dot {
    background-color: var(--journey-c4);
}

.step-4 {
    border-left-color: var(--journey-c4);
}


/* Downward pointing arrow between steps */
.roadmap-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 2.25rem;
    bottom: -1rem;
    width: 0;
    height: 0;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
    border-top: 0.5rem solid #a0aec0;
    z-index: 5;
}

/* * =============================================
 * Dashboard Simulator Styles
 * =============================================
 */
.sim-lumens-meter {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--bws-green) 0deg, #e2e8f0 0deg);
    transition: background 0.5s ease;
}

.sim-lumens-meter::before {
    content: "";
    position: absolute;
    height: 85%;
    width: 85%;
    background-color: white;
    border-radius: 50%;
}

.sim-lumens-value {
    position: relative;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bws-green-dark);
    z-index: 1;
}

.sim-hive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 200px;
    margin: 0 auto;
}

.sim-hexagon {
    position: relative;
    width: 50px;
    height: 58px;
    margin: 14px 2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.6rem;
    padding: 4px;
    border: 2px solid #e2e8f0;
    background-color: #f8f9fa;
}

.sim-hexagon:hover {
    transform: scale(1.1);
}

.sim-hexagon.user-bee {
    background-color: var(--bws-gold);
    border-color: var(--bws-green);
    color: var(--bws-green-dark);
    font-weight: bold;
    font-size: 1rem;
}

.sim-hexagon.unlocked-waku {
    background-color: rgba(0, 105, 72, 0.2);
    border-color: var(--bws-green);
}

.sim-hexagon.unlocked-doki {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: var(--bws-gold);
}

.sim-hexagon.locked {
    filter: grayscale(80%);
    opacity: 0.6;
}

.sim-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid #e2e8f0;
    background-color: white;
    transition: all 0.3s ease;
}

.sim-badge.unlocked {
    border-color: var(--bws-green);
    background-color: var(--bws-lighter-green);
}

.sim-badge.locked {
    filter: grayscale(100%);
    opacity: 0.3;
}

.sim-activity-item {
    padding: 8px;
    border-left: 3px solid var(--bws-green);
    background-color: white;
    border-radius: 4px;
    font-size: 0.85rem;
}

.sim-activity-item.doki {
    border-left-color: var(--bws-gold);
}

/* * =============================================
 * Back to Top Button Styles
 * =============================================
 */

/* スムーズスクロールの有効化 */
html {
    scroll-behavior: smooth;
}

/* Back to Top Button - CSS Only */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--bws-green);
    color: var(--bws-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 105, 72, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;

    /* CSS Scroll-driven Animations を使用（最新ブラウザ対応） */
    animation: fade-in linear;
    animation-timeline: scroll();
    animation-range: 0 500px;
}

/* フォールバック：古いブラウザでは常に表示 */
.back-to-top {
    opacity: 1;
}

/* モダンブラウザでのスクロール連動アニメーション */
@supports (animation-timeline: scroll()) {
    .back-to-top {
        opacity: 0;
        visibility: hidden;
        animation: show-on-scroll linear forwards;
        animation-timeline: scroll();
        animation-range: 300px 400px;
    }
}

@keyframes show-on-scroll {
    from {
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* ホバーエフェクト */
.back-to-top:hover {
    background-color: var(--bws-green-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 105, 72, 0.4);
}

/* パルスアニメーション */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 105, 72, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 105, 72, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 105, 72, 0);
    }
}

.back-to-top:not(:hover) {
    animation: pulse 2s infinite, show-on-scroll linear forwards;
    animation-timeline: auto, scroll();
    animation-range: normal, 300px 400px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}