/* ==========================================
   PHPバージョンアップ：追加セクション
   土台は /php-rescue/css/style.css。WEBシステム開発ページの部品（数字の実績・表パネル・関連導線）を複製して重ねる。
   ========================================== */

/* ==========================================
   数字で見る実績（strength-card を土台に数字を主役にする）
   ========================================== */
.proof-section {
    padding: 5rem 2rem 3rem;
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 3rem auto 0;
}

@media (width >= 1100px) {
    .proof-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.proof-card.strength-card {
    padding: 2rem 1.75rem;
}

.proof-card:nth-child(1) { --card-color: #60a5fa; }
.proof-card:nth-child(2) { --card-color: #a78bfa; }
.proof-card:nth-child(3) { --card-color: #f472b6; }
.proof-card:nth-child(4) { --card-color: #34d399; }

/* Orbitron の 0 は斜線入りで「2Ø」と読めるため、数字は和文と同じ書体にする */
.proof-number {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(2.8rem, 4.8vw, 3.6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #ffffff 10%, color-mix(in srgb, var(--card-color) 80%, white));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    & small {
        margin-left: 0.15em;
        font-size: 0.38em;
        font-weight: 700;
        letter-spacing: 0.02em;
    }
}

.proof-label {
    margin-top: 1rem;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}

.proof-desc {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.75;
}

.proof-note {
    max-width: 1200px;
    margin: 1.25rem auto 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    text-align: right;

    & a {
        color: rgba(255, 255, 255, 0.8);
        text-underline-offset: 0.2em;

        &:hover { color: var(--secondary-color); }
    }
}

/* 事例：移行元 → 移行先 を一目で */
.case-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 0.7rem;

    & i { color: var(--secondary-color); font-size: 0.85em; }
    & .case-path__to {
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        filter: brightness(1.5);
    }
}

.proof-section { padding: 5rem 2rem 3rem; }
#stack.tech-section { padding: 5rem 2rem; }

@media (width <= 767px) {
    .service-page main > section:not(.hero) { padding-left: 1rem; padding-right: 1rem; }
    .proof-note { text-align: left; }
}

@supports (animation-timeline: view()) {
    .proof-note, .stack-panel, .bridge-card {
        animation-name: revealY;
        animation-timing-function: linear;
        animation-fill-mode: both;
        animation-duration: 0.5s;
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
        --reveal-y: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .proof-note, .stack-panel, .bridge-card { animation: none; }
}
/* ==========================================
   関連ページへの導線
   ========================================== */
.bridge-section {
    padding: 2rem 2rem 0;
}

.bridge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.bridge-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.6rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ffffff;
    text-decoration: none;
    transition: var(--motion-ui-transition);

    & small {
        display: block;
        margin-bottom: 0.2rem;
        color: var(--secondary-color);
        font-size: 0.8rem;
        font-weight: 700;
    }

    & b { font-size: 1.15rem; }

    & i { color: rgba(255, 255, 255, 0.6); transition: var(--motion-ui-transition); }

    &:hover {
        transform: translateY(var(--motion-panel-lift));
        border-color: rgba(100, 150, 255, 0.3);
        box-shadow: 0 10px 30px rgba(100, 150, 255, 0.2);

        & i { color: var(--secondary-color); translate: 4px 0; }
    }
}

/* ==========================================
   技術スタック：8枚のカードを1枚の表パネルへ
   ========================================== */
/* 「○年○月現在」は見出しの下に中央寄せで、はっきり見せる */
.section-title .stack-asof {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

/* 正式リリース前の版：先行して検証していることを点線の枠で示す */
.stack-chip--preview {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.4);

    & small {
        margin-left: 0.4rem;
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.72rem;
    }
}

/* 上の開発方針パネルと同じ幅にそろえ、フレームワークの行を1行に収める */
.stack-panel {
    margin: 3rem auto 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;

    & dl {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        margin: 0;
    }

    & dt,
    & dd {
        margin: 0;
        padding: 1.1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    & dt {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        color: #ffffff;
        font-size: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.03);

        & i {
            width: 1.2em;
            text-align: center;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
    }

    & dd {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.45rem;
    }

    & dl > :nth-last-child(-n + 2) { border-bottom: 0; }
}

.stack-chip {
    padding: 0.2rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    white-space: nowrap;
}

.stack-note {
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.9;
    text-align: center;

    & a {
        color: #8fb8ff;
        text-decoration: underline;
        text-underline-offset: 3px;

        &:hover { color: #ff7ae0; }
    }
}

@media (width <= 640px) {
    .stack-panel dl { grid-template-columns: minmax(0, 1fr); }
    .stack-panel dt { border-bottom: 0; padding-bottom: 0.4rem; }
    .stack-panel dd { padding-top: 0.4rem; }
    .stack-panel dl > dt:nth-last-child(2) { border-bottom: 0; }
}



/* ==========================================
   柔軟な技術選定：移行先の考え方3つ＋長期運用ガイドへの目立つボタン
   ========================================== */
.selection-section {
    padding: 5rem 2rem;
}

.selection-lead {
    margin: -1rem auto 2.5rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.9;
    text-align: center;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.selection-card {
    padding: 2rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    & h3 { margin-top: 1rem; color: #fff; font-size: 1.15rem; font-weight: 700; }
    & p { margin-top: 0.6rem; color: rgba(255, 255, 255, 0.72); font-size: 0.92rem; line-height: 1.8; }
}

.selection-card__icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    /* 下の案内ボタン（ピンク）と色がかぶらないよう、青系にする */
    background: linear-gradient(135deg, #3e5e9b, #5f9cf6);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 8px 20px rgba(95, 156, 246, 0.3);
}

/* 案内パネル：ふだんは控えめな枠、ホバー時だけブランドのグラデーション枠と光 */
.selection-cta {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 1100px;
    margin: 2.5rem auto 0;
    padding: 2.25rem 2.5rem;
    border: 1.5px solid transparent;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(22, 26, 42, 0.92), rgba(30, 18, 40, 0.92)) padding-box,
        linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)) border-box;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    transition: var(--motion-ui-transition);

    /* 右上のやわらかい光（控えめ） */
    &::before {
        content: '';
        position: absolute;
        inset: -50% -15% auto auto;
        width: 50%;
        aspect-ratio: 1;
        background: radial-gradient(circle, rgba(255, 32, 202, 0.14), transparent 65%);
        pointer-events: none;
    }

    &:hover,
    &:focus-visible {
        background:
            linear-gradient(135deg, rgba(22, 26, 42, 0.95), rgba(30, 18, 40, 0.95)) padding-box,
            linear-gradient(135deg, #5f9cf6, #9b7ff0 45%, #ff20ca) border-box;
        box-shadow: 0 20px 50px rgba(255, 32, 202, 0.2);
        transform: translateY(var(--motion-panel-lift));

        & .selection-cta__button i { translate: 4px 0; }
    }
}

.selection-cta__label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #ff8be3;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.selection-cta__title {
    margin-top: 0.6rem;
    color: #fff;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    font-weight: 900;
    line-height: 1.4;
}

.selection-cta__text {
    margin-top: 0.6rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
    line-height: 1.85;
}

.selection-cta__button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.25rem;
    padding: 0.75rem 1.7rem;
    border-radius: 999px;
    background: var(--accent-gradient);
    box-shadow: 0 10px 26px rgba(255, 32, 202, 0.3);
    font-weight: 700;

    & i { transition: translate 0.2s ease; }
}

/* 長期運用ページのグラフを簡略化した飾り（控えめ） */
.selection-cta__chart {
    position: relative;
    display: grid;
    gap: 0.55rem;
    padding: 1.2rem 0;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: calc(100% / 6) 100%;
    opacity: 0.85;

    & span {
        margin-left: var(--s);
        width: calc(var(--e) - var(--s));
        padding: 0.2rem 0.6rem;
        border-radius: 6px;
        background: color-mix(in srgb, var(--c) 80%, transparent);
        color: #fff;
        font-size: 0.72rem;
        font-weight: 700;
        white-space: nowrap;
    }
}

.selection-cta__now {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 52%;
    width: 2px;
    background: rgba(255, 32, 202, 0.6);
}

@media (width <= 767px) {
    .selection-lead br { display: none; }
    .selection-lead { margin-top: 0; }
    .selection-cta { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.6rem 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    .selection-cta:hover { transform: none; }
}

/* ==========================================
   対応内容：8枚のカードを小さく（ページの縦長を抑える）
   ========================================== */
#services .tech-grid {
    gap: 1rem;
}

#services .tech-card {
    padding: 1.4rem 1.1rem;

    & h3 { margin-bottom: 0.2rem; font-size: 1.05rem; }
    & .tech-label { margin-bottom: 0.6rem; font-size: 0.68rem; }
    & p:not(.tech-label) { font-size: 0.85rem; line-height: 1.6; }
}

#services .tech-icon {
    margin-bottom: 0.7rem;
    font-size: 2rem;
}

/* スマホは2列に */
@media (width <= 767px) {
    #services .tech-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    #services .tech-card {
        padding: 1.1rem 0.8rem;

        & h3 { font-size: 0.95rem; }
        & .tech-label { font-size: 0.6rem; letter-spacing: 0.04em; }
        & p:not(.tech-label) { font-size: 0.78rem; }
        & p br { display: none; }
    }

    #services .tech-icon { font-size: 1.6rem; }
}

/* ==========================================
   移行の流れ：AI組み込みの「導入の流れ」と同じ枠の中に、文字量に合わせて縦に並べる
   ========================================== */
.rescue-flow {
    max-width: 1000px;
    margin: 2rem auto 0;
    padding: 2.5rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(10, 12, 25, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

.rescue-flow__step {
    position: relative;
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    padding: 1.25rem 0;

    & + & { border-top: 1px solid rgba(255, 255, 255, 0.08); }

    /* ステップどうしをつなぐ縦線 */
    &:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 5.2rem;
        bottom: -1.25rem;
        left: 2.25rem;
        width: 2px;
        background: linear-gradient(rgba(62, 94, 155, 0.6), rgba(255, 32, 202, 0.25));
    }
}

.rescue-flow__mark {
    position: relative;
    display: grid;
    place-items: center;
    padding-top: 0.4rem;
}

.rescue-flow__number {
    position: absolute;
    top: 0;
    left: 50%;
    translate: -50% -30%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
}

.rescue-flow__icon {
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: #8fb8ff;
    font-size: 1.35rem;
}

.rescue-flow__body {
    & h3 {
        color: #fff;
        font-size: 1.1rem;
        font-weight: 700;
        line-height: 1.5;
    }

    & p {
        margin-top: 0.4rem;
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.92rem;
        line-height: 1.8;
    }
}

@media (width <= 767px) {
    .rescue-flow { padding: 1.25rem 1.1rem; }
    .rescue-flow__step {
        grid-template-columns: 3.2rem minmax(0, 1fr);
        gap: 0.9rem;
        &:not(:last-child)::after { top: 4.2rem; left: 1.6rem; }
    }
    .rescue-flow__icon { width: 2.8rem; height: 2.8rem; font-size: 1.1rem; }
    .rescue-flow__body h3 { font-size: 1rem; }
    .rescue-flow__body p { font-size: 0.85rem; }
}
