/* ========================================
   AITOLIE - Value Section
   Dark Luxury Theme
   ======================================== */

/* Gold color palette */
.value {
    --gold-light: #E8D5A3;
    --gold: #C9A962;
    --gold-dark: #A68B3D;
}

.value {
    padding: 120px 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(15, 15, 15, 0.9) 50%, rgba(10, 10, 10, 0.95) 100%),
        url('../pictur/value_bg.png') center/cover no-repeat;
    position: relative;
    overflow: visible;
    /* Allow 3D to show */
    z-index: 0;
    /* Behind 3D canvas (z-index: 1) */
}

/* Animated Background Text */
.value__bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(5deg);
    /* Serviceとは逆の角度 */
    width: 200%;
    display: flex;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    user-select: none;
}

.value__bg-text-row {
    display: flex;
    white-space: nowrap;
    animation: valueTextScroll 30s linear infinite;
}

.value__bg-text span {
    font-size: 20vw;
    font-weight: 900;
    line-height: 1;
    font-family: 'Inter', sans-serif;
    color: transparent;
    -webkit-text-stroke: 2px var(--gold);
    padding-right: 4vw;
}

@keyframes valueTextScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Subtle background pattern */
.value::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(201, 169, 98, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 169, 98, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.value__header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 5;
    /* Above 3D canvas */
}

.value__label {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
    padding: 8px 20px;
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 20px;
}

.value__title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.value__title-accent {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.value__lead {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Cards Grid */
.value__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
    z-index: 5;
    /* Above 3D canvas */
}

@media (max-width: 1024px) {
    .value__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* スマホでは3Dキャンバスのはみ出しより横スクロール防止を優先 */
    .value {
        overflow: hidden;
    }

    .value__cards {
        grid-template-columns: 1fr;
        padding: 0 20px;
        /* 余白追加 */
    }

    /* 背景文字のスマホ調整 */
    .value__bg-text {
        width: 400%;
        transform: translate(-50%, -50%) rotate(10deg);
    }

    .value__bg-text span {
        font-size: 25vw;
        -webkit-text-stroke: 1px var(--gold);
        padding-right: 8vw;
    }
}

/* Glass Card Style */
.value__card {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 169, 98, 0.15);
    border-radius: 16px;
    padding: 40px 32px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    color: #FFFFFF;
}

.value__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.value__card:hover {
    transform: translateY(-8px);
    border-color: rgba(201, 169, 98, 0.4);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(201, 169, 98, 0.1);
}

.value__card:hover::before {
    opacity: 1;
}

/* Card Icon */
.value__card-icon {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.value__card-icon svg {
    width: 48px;
    height: 48px;
    color: var(--gold);
    position: relative;
    z-index: 2;
}

.value__card-icon-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

/* Card Number */
.value__card-number {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 12px;
    opacity: 0.8;
}

/* Card Title */
.value__card-title {
    font-size: 28px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

/* Card Subtitle */
.value__card-subtitle {
    font-size: 14px;
    color: var(--gold-light);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

/* Card Description */
.value__card-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: 24px;
}

.value__card-desc strong {
    color: var(--gold);
    font-weight: 500;
}

/* Card Points List */
.value__card-points {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    list-style: none;
    padding: 0;
    margin: 0;
}

.value__card-points li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.6;
}

.value__card-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 12px;
}

/* Reveal Animation States - Meteor Impact */
/* Cards start invisible */
.value__card {
    opacity: 0;
    transform: scale(0.3) translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* After meteor hits, card expands and becomes visible */
.value__card.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Staggered delays for each card */
.value__card:nth-child(1).is-visible {
    transition-delay: 0s;
}

.value__card:nth-child(2).is-visible {
    transition-delay: 0.2s;
}

.value__card:nth-child(3).is-visible {
    transition-delay: 0.4s;
}

/* Meteor hit glow pulse */
.value__card.meteor-hit {
    animation: meteorGlow 0.8s ease-out;
}

@keyframes meteorGlow {
    0% {
        box-shadow: 0 0 0 rgba(201, 169, 98, 0), 0 0 0 rgba(201, 169, 98, 0);
    }

    50% {
        box-shadow: 0 0 60px rgba(201, 169, 98, 0.6), 0 0 100px rgba(201, 169, 98, 0.3);
    }

    100% {
        box-shadow: 0 0 20px rgba(201, 169, 98, 0.1), 0 0 40px rgba(201, 169, 98, 0.05);
    }
}

/* Enhanced hover effects */
.value__card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(201, 169, 98, 0.6);
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(201, 169, 98, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.value__card:hover::before {
    opacity: 1;
}

.value__card:hover .value__card-icon svg {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 10px var(--gold));
}

.value__card-icon svg {
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Hide incorrectly nested service item */
.value .service__item {
    display: none;
}