/* ==========================================
   AI組み込みシステム開発：WEBシステム開発ページと共通の部品
   土台は /ai-mix/css/style.css。WEBシステム開発ページで整理した部品
   （強み・数字の実績・相談例・実績行・比較・技術表・関連導線・開閉FAQ）を重ねる。
   下半分は /web-dev/css/style.css の追加部品をそのまま複製。
   ========================================== */

/* WEBシステム開発と同じ余白 */
.strength-section { padding: 5rem 2rem; }
.proof-section { padding: 5rem 2rem 3rem; }
.services-section { padding: 6rem 2rem; }
.tech-section { padding: 5rem 2rem; }

@media (768px <= width <= 959px) {
    .strength-section .strength-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (width >= 960px) {
    .strength-section .strength-grid { grid-template-columns: repeat(3, 1fr); }
}

.strength-section .strength-card:nth-child(1) { --card-color: #22d3ee; }
.strength-section .strength-card:nth-child(2) { --card-color: #a78bfa; }
.strength-section .strength-card:nth-child(3) { --card-color: #34d399; }

/* 何が作れる？：実績行をカードの下端にそろえる */
#services .tool-card {
    display: flex;
    flex-direction: column;
}
#services .tool-card p.tool-proof { margin-top: auto; }
#services .tool-card > p:not(.tool-label):not(.tool-proof) { margin-bottom: 1.1rem; }

/* 安心して使うための約束：比較カードの上にリード */
.guard-lead {
    max-width: 760px;
    margin: -1rem auto 0;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    line-height: 1.9;

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


/* ==========================================
   数字で見る実績（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); }
    }
}

/* ==========================================
   ご相談例（tool-card を左揃え・引用見出しで使う）
   ========================================== */
.scene-grid .tool-card {
    text-align: left;
}

/* アイコンだけは中央にそろえる */
.scene-grid .tool-card .tool-icon {
    text-align: center;
}

.scene-grid .tool-card:nth-child(1) .tool-icon { color: #34d399; }
.scene-grid .tool-card:nth-child(2) .tool-icon { color: #f59e0b; }
.scene-grid .tool-card:nth-child(3) .tool-icon { color: #f472b6; }

.scene-quote {
    display: block;
    margin-bottom: 0.9rem;
    color: #ffffff;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    font-weight: 700;
    line-height: 1.6;
    quotes: "「" "」";
    text-wrap: balance;
}

.scene-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.1rem;
    list-style: none;
    padding: 0;

    & li {
        padding: 0.15rem 0.7rem;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 999px;
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.78rem;
    }
}

/* ==========================================
   何が作れる？：各パネルに実績の一文を追加
   （AI組み込みは実績のあるカードだけに付ける）
   ========================================== */
/* 現行の .tool-card p:not(.tool-label) より後勝ちにするため同じ詳細度で指定 */
.tool-card p.tool-proof {
    display: block;
    text-align: center;
    text-wrap: balance;
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.6;

    & .tool-proof__label {
        display: inline-block;
        margin-right: 0.45rem;
        vertical-align: 0.08em;
        padding: 0.05rem 0.5rem;
        border: 1px solid rgba(255, 32, 202, 0.55);
        border-radius: 999px;
        color: #ff8be3;
        font-size: 0.7rem;
        letter-spacing: 0.08em;
    }

    & a {
        color: inherit;
        text-decoration: underline;
        text-underline-offset: 0.25em;
        text-decoration-color: rgba(255, 32, 202, 0.6);

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

/* ==========================================
   開発方針：よくある作り方との比較
   ========================================== */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.compare-card {
    padding: 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);

    & h3 {
        margin-bottom: 1.1rem;
        color: rgba(255, 255, 255, 0.6);
        font-size: 1.05rem;
        font-weight: 700;
    }

    & ul {
        display: grid;
        gap: 0.8rem;
        list-style: none;
        padding: 0;
    }

    & li {
        position: relative;
        padding-left: 1.7rem;
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.95rem;
        line-height: 1.7;

        &::before {
            content: '\00d7';
            position: absolute;
            left: 0;
            color: rgba(255, 255, 255, 0.35);
            font-weight: 700;
        }
    }
}

.compare-card--ours {
    border-color: rgba(255, 32, 202, 0.45);
    background: linear-gradient(135deg, rgba(255, 32, 202, 0.08), rgba(62, 94, 155, 0.08) 70%);
    box-shadow: 0 20px 50px rgba(255, 32, 202, 0.12);

    & h3 {
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        filter: brightness(1.6);
    }

    & li {
        color: rgba(255, 255, 255, 0.92);

        &::before {
            content: '\2713';
            color: var(--secondary-color);
        }
    }
}

/* ==========================================
   技術スタック：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; }
}

/* ==========================================
   関連ページへの導線
   ========================================== */
.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; }
    }
}

/* ==========================================
   FAQ：レガシーPHP対応ページと同じ開閉パネル
   ========================================== */
.service-page #faq .faq-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(450px, 100%), 1fr));
    align-items: start;
}
.service-page #faq details.faq-item { padding: 0; min-width: 0; cursor: pointer; }
.service-page #faq details.faq-item:hover { transform: none; }
.service-page #faq details[open] {
    border-color: #a78bfa;
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.25);
}
.service-page #faq summary.faq-question {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    margin: 0;
    padding: 1rem 1.25rem;
    list-style: none;
    cursor: pointer;
}
.service-page #faq summary::-webkit-details-marker { display: none; }
.service-page #faq summary:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 4px;
    border-radius: 15px;
}
.service-page #faq .faq-toggle {
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.22s ease;

    &::before {
        content: '';
        width: 0.5rem;
        height: 0.5rem;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-0.125rem) rotate(45deg);
    }
}
.service-page #faq details[open] .faq-toggle { transform: rotate(180deg); }
.service-page #faq .faq-answer { padding: 0 1.25rem 1rem; }
.service-page #faq .faq-answer p { margin: 0 0 1rem; }
.service-page #faq .faq-answer p:last-child { margin-bottom: 0; }

@supports (interpolate-size: allow-keywords) and selector(details::details-content) {
    .service-page #faq details.faq-item { interpolate-size: allow-keywords; }
    .service-page #faq details.faq-item::details-content {
        block-size: 0;
        opacity: 0;
        overflow: clip;
        transition: block-size 0.28s ease, opacity 0.2s ease, content-visibility 0.28s allow-discrete;
    }
    .service-page #faq details.faq-item[open]::details-content {
        block-size: auto;
        opacity: 1;
    }
}

@media (width <= 480px) {
    .service-page #faq summary.faq-question { padding: 0.75rem; gap: 0.6rem; }
    .service-page #faq .faq-answer { padding: 0 0.75rem 0.75rem; }
}

/* ==========================================
   スマホ：余白を詰めて本文の幅を確保
   ========================================== */
@media (width <= 767px) {
    .service-page main > section:not(.hero) {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .scene-quote br { display: none; }

    .proof-note { text-align: left; }
}

/* ==========================================
   追加パネルもスクロールで表示（共通の reveal と同じ動き）
   ========================================== */
@supports (animation-timeline: view()) {
    .proof-note,
    .compare-card,
    .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,
    .compare-card,
    .stack-panel,
    .bridge-card {
        animation: none;
    }

    .service-page #faq .faq-toggle,
    .service-page #faq details.faq-item::details-content { transition: none; }
}

