/* モーションロゴ・アニメーション制作（仮）：WEBシステム開発のCSSを土台に、流れの縦並びパネルと作例グリッドを追加 */

/* ==========================================
   Web Development Division — ページ固有スタイル
   共通スタイルは /css/site.css を参照
   ========================================== */

/* ==========================================
   ヒーローセクション
   ========================================== */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem;
    padding-top: 80px;
}

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

.hero-logo {
    margin-bottom: 3rem;
}

/* ルビ風サービス説明 */
.hero-service-ruby {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 3rem;
    letter-spacing: 0.08em;
}

/* 組織名（nanomix.ltd） */
.hero-org {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.org-name-main {
    color: var(--text-primary);
}

/* 部門名 */
.division-name {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 0;
    line-height: 1.2;
}

.division-label {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-tagline {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.05rem, 2.2vw, 1.55rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.hero-sub-text {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1rem, 1.9vw, 1.2rem);
    color: rgba(255, 255, 255, 0.55);
    margin: 1rem 0;
    font-weight: 400;
}

.hero-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin-bottom: 8rem;

    & p {
        margin: 0.5rem 0;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.3s ease;

    &:hover {
        color: var(--secondary-color);
        transform: translateX(-50%) scale(1.1);
    }

    & span {
        text-transform: uppercase;
        font-family: 'Orbitron', sans-serif;
    }
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--secondary-color), transparent);
    position: relative;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 8px;
        height: 8px;
        background: var(--secondary-color);
        border-radius: 50%;
        box-shadow: 0 0 10px var(--secondary-color);
        animation: scrollDot 2s infinite;
    }
}

@keyframes scrollDot {
    0%, 100% {
        top: 0;
        opacity: 1;
    }
    50% {
        top: 50px;
        opacity: 0.3;
    }
}

/* セクション共通: site.css で定義済み */

/* ==========================================
   強みセクション
   ========================================== */
/* ==========================================
   Strength カード — per-card カラーオーバーライド
   ベース定義は site.css
   ========================================== */
.strength-section {
    padding: 5rem 2rem;
}

/* 3枚構成: タブレット2列、デスクトップ3列固定 */
@media (768px <= width <= 959px) {
    .strength-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (width >= 960px) {
    .strength-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.strength-card:nth-child(1) { --card-color: #60a5fa; } /* ブルー */
.strength-card:nth-child(2) { --card-color: #a78bfa; } /* パープル */
.strength-card:nth-child(3) { --card-color: #34d399; } /* グリーン */

/* ==========================================
   方針パネル
   ========================================== */
.policy-panel {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 3rem;
    margin-top: 2rem;
    text-align: center;
}

.policy-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.policy-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-weight: 400;
}

.policy-content {
    & p {
        font-size: clamp(1rem, 2vw, 1.1rem);
        color: rgba(255, 255, 255, 0.8);
        line-height: 2;
        margin: 1.5rem 0;
    }

    & strong {
        color: #ffffff;
        font-weight: 600;
    }
}

/* ハイライトテキスト - スクロールで下線が伸びる + バネ効果 + 一文字ずつ浮かび上がり */
.highlight-text {
    position: relative;
    display: inline;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    padding-bottom: 2px;
    transform-origin: center;
    will-change: transform;

    & .char {
        display: inline-block;
        transition: opacity 0.05s ease;
    }

    &::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0%;
        height: 2px;
        background: linear-gradient(90deg, #3e5e9b 0%, #6a9dff 50%, #ff20ca 100%);
        transition: width 1.8s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 8px rgba(100, 150, 255, 0.5);
    }

    &.active::after {
        width: 100%;
    }
}

/* ==========================================
   技術スタックセクション
   ========================================== */
.tech-section {
    background: transparent;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* タブレット: 2列維持 */
@media (768px <= width <= 1099px) {
    #tech .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 8枚構成: 4列×2行（tech-cardはコンパクトなので4列が最適） */
@media (width >= 1100px) {
    #tech .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 共通定義: /css/site.css のサービス部品 */

/* 共通定義: /css/site.css のサービス部品 */

/* 共通定義: /css/site.css のサービス部品 */

/* ==========================================
   サービスメニューセクション（tool-card）
   ========================================== */
.services-section {
    padding: 6rem 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* タブレット: 2列維持 */
@media (768px <= width <= 959px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 6枚構成: 3列×2行固定 */
@media (width >= 960px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tool-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: var(--motion-ui-transition);

    &:hover {
        background: rgba(255, 255, 255, 0.05);
        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);

        & .tool-icon {
            transform: scale(1.1);
        }
    }

    & h3 {
        font-family: 'Noto Sans JP', sans-serif;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
        font-weight: 700;
    }

    & p:not(.tool-label) {
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* 共通定義: /css/site.css のサービス部品 */

/* per-card アイコンカラー（6色ローテーション） */
#services {
    & .tool-card:nth-child(1) .tool-icon { color: #a78bfa; }
    & .tool-card:nth-child(2) .tool-icon { color: #22d3ee; }
    & .tool-card:nth-child(3) .tool-icon { color: #f472b6; }
    & .tool-card:nth-child(4) .tool-icon { color: #f59e0b; }
    & .tool-card:nth-child(5) .tool-icon { color: #34d399; }
    & .tool-card:nth-child(6) .tool-icon { color: #60a5fa; }

    /* per-card ラベルカラー連動 */
    & .tool-card:nth-child(1) .tool-label { background: linear-gradient(135deg, #a78bfa, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    & .tool-card:nth-child(2) .tool-label { background: linear-gradient(135deg, #22d3ee, #67e8f9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    & .tool-card:nth-child(3) .tool-label { background: linear-gradient(135deg, #f472b6, #f9a8d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    & .tool-card:nth-child(4) .tool-label { background: linear-gradient(135deg, #f59e0b, #fde68a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    & .tool-card:nth-child(5) .tool-label { background: linear-gradient(135deg, #34d399, #6ee7b7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    & .tool-card:nth-child(6) .tool-label { background: linear-gradient(135deg, #60a5fa, #93c5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
}

.tool-label {
    font-size: 0.85rem;
    background: linear-gradient(135deg, #5080c0 0%, #70a0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

/* ==========================================
   開発の流れセクション（flow-step）
   ========================================== */
.flow-section {
    background: transparent;
    padding: 5rem 2rem;
}

.flow-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* 共通定義: /css/site.css のサービス部品 */

/* 共通定義: /css/site.css のサービス部品 */

/* 共通定義: /css/site.css のサービス部品 */

/* ==========================================
   FAQ Section
   ========================================== */
.faq-section {
    background: transparent;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* 共通定義: /css/site.css のサービス部品 */

/* 共通定義: /css/site.css のサービス部品 */

/* 共通定義: /css/site.css のサービス部品 */

/* ==========================================
   CTA セクション
   ========================================== */
/* 共通レイアウト・ボタンは site.css。以下はページ固有の調整。 */

/* フッター・scroll-top-btn・View Transitions・scroll-padding: site.css で定義済み */

/* ==========================================
   アニメーション（ページ固有）
   fadeInUp / .fade-in-up は site.css で定義済み
   ========================================== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==========================================
   レスポンシブデザイン（ページ固有）
   ナビ・フッターMQは site.css / nav.css で定義済み
   ========================================== */
@media (width <= 767px) {
    .hero-org {
        font-size: clamp(0.95rem, 4.2vw, 1.4rem);
    }

    .hero-service-ruby {
        font-size: clamp(0.95rem, 4.2vw, 1.4rem);
        letter-spacing: 0.03em;
    }

    .division-name {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .faq-answer {
        padding-left: 0;
    }

    .flow-step {
        &:not(:last-child),
        &:last-child {
            margin-left: 22px;
            padding-left: 2rem;
        }
    }

    .flow-number {
        width: 46px;
        height: 46px;
        font-size: 0.9rem;
        left: -23px;
    }

    section {
        padding: 3rem 1rem;
    }

    .cta-section {
        padding: 5rem 1.5rem;
    }

    .cta-button {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }

    .cta-text br {
        display: none;
    }
}

@media (width <= 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .policy-panel {
        padding: 2rem 1.5rem;
    }
}

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

/* ==========================================
   何が作れる？：各パネルに実績の一文を追加
   現行の subgrid（4段）に実績行を1段足す
   ========================================== */
@supports (grid-template-rows: subgrid) {
    .service-page #services .tools-grid > .tool-card {
        grid-row: span 5;
    }
}

/* 現行の .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; }
}

/* ==========================================
   開発の流れ：PHPバージョンアップの「移行の流れ」と同じ縦並びパネル
   ========================================== */
.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; }
}

/* ==========================================
   移行の流れ：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; }
}

/* ==========================================
   モーションロゴ・アニメーション制作：固有の部品
   ========================================== */
/* 強みカードの色（映像らしく青・ピンク・紫） */
.service-page--motion .strength-card:nth-child(1) { --card-color: #3b82f6; }
.service-page--motion .strength-card:nth-child(2) { --card-color: #ec4899; }
.service-page--motion .strength-card:nth-child(3) { --card-color: #a78bfa; }

/* 作例：映像を先に見せるグリッド（1枚目は大きく） */
.showcase-section {
    padding: 5rem 2rem 3rem;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 3rem auto 0;
}

.showcase-card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: #111;
    color: #fff;
    text-decoration: none;
    transition: var(--motion-ui-transition);

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

    /* 文字が読めるよう下側を暗くする */
    &::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(transparent 45%, rgba(0, 0, 0, 0.75));
        pointer-events: none;
    }

    &:hover {
        border-color: rgba(255, 32, 202, 0.5);
        box-shadow: 0 16px 40px rgba(255, 32, 202, 0.2);
        transform: translateY(var(--motion-panel-lift));

        & img { transform: scale(1.05); }
        & .showcase-card__play { background: var(--accent-gradient); }
    }
}

.showcase-card--wide {
    grid-column: span 2;
    grid-row: span 2;
}

.showcase-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    translate: -50% -50%;
    font-size: 0.95rem;
    transition: var(--motion-ui-transition);

    & i { translate: 2px 0; }
}

.showcase-card--wide .showcase-card__play {
    width: 4.2rem;
    height: 4.2rem;
    font-size: 1.3rem;
}

.showcase-card__meta {
    position: absolute;
    right: 1rem;
    bottom: 0.8rem;
    left: 1rem;
    z-index: 1;

    & b { display: block; font-size: 0.92rem; }
    & small { display: block; margin-top: 0.15rem; color: #ff8be3; font-size: 0.78rem; font-weight: 700; }
}

.showcase-card--wide .showcase-card__meta b { font-size: 1.15rem; }

.showcase-more {
    margin-top: 1.5rem;
    text-align: right;

    & a {
        color: rgba(255, 255, 255, 0.85);
        font-weight: 700;
        text-decoration: none;

        & i { margin-left: 0.3rem; transition: translate 0.2s ease; }
        &:hover { color: #ff8be3; & i { translate: 4px 0; } }
    }
}

@media (width <= 767px) {
    .showcase-section { padding: 3.4rem 1rem 2rem; }
    .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
    .showcase-card--wide { grid-row: auto; }
    .showcase-card__meta b { font-size: 0.8rem; }
    .showcase-card:not(.showcase-card--wide) .showcase-card__play { top: 40%; width: 2.2rem; height: 2.2rem; font-size: 0.75rem; }
    .showcase-card__meta { right: 0.6rem; bottom: 0.5rem; left: 0.6rem; }
    .showcase-more { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .showcase-card:hover { transform: none; & img { transform: none; } }
}

/* 複数本ある作例の本数バッジ */
.showcase-card__count {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 1;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.showcase-card:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 3px;
}

/* ==========================================
   作例モーダル（一覧・再生）
   ========================================== */
.motion-modal-open { overflow: hidden; }

.motion-modal {
    /* サイト共通のリセットで中央寄せが外れるため、明示して画面中央に置く */
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(1100px, 94vw);
    height: fit-content;
    max-height: 92vh;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background: rgba(12, 14, 26, 0.96);
    color: #fff;
    overflow: auto;

    &::backdrop {
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(6px);
    }
}

.motion-modal__bar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 14, 26, 0.96);
}

.motion-modal__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 0.95rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.motion-modal__back,
.motion-modal__close,
.motion-modal__step {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    transition: var(--motion-ui-transition);

    &:hover { border-color: rgba(255, 32, 202, 0.6); background: rgba(255, 32, 202, 0.15); }
    &:focus-visible { outline: 2px solid var(--secondary-color); outline-offset: 2px; }
}

.motion-modal__back {
    flex-shrink: 0;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.motion-modal__close {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
}

/* 一覧 */
.motion-modal__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1.4rem;

    &[hidden] { display: none; }
    /* 2本だけの作例は大きく2列、縦長の作例は横一列に並べる */
    &[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    &[data-shape=tall] { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}

.motion-modal__thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: #000;
    cursor: pointer;
    transition: var(--motion-ui-transition);

    & img { width: 100%; height: 100%; object-fit: cover; }

    &::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.7));
    }

    &:hover, &:focus-visible {
        border-color: rgba(255, 32, 202, 0.6);
        outline: none;
        transform: translateY(-2px);

        & .motion-modal__thumb-play { background: var(--accent-gradient); }
    }
}

.motion-modal__thumb--square { aspect-ratio: 1; }
.motion-modal__thumb--portrait { aspect-ratio: 9 / 16; }
.motion-modal__thumb--tall { aspect-ratio: 3 / 4; }

.motion-modal__thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    translate: -50% -50%;
    font-size: 0.8rem;

    & i { translate: 1px 0; }
}

.motion-modal__thumb-label {
    position: absolute;
    right: 0.6rem;
    bottom: 0.45rem;
    left: 0.6rem;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 再生 */
.motion-modal__player {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 1.2rem;

    &[hidden] { display: none; }
}

.motion-modal__stage {
    display: grid;
    place-items: center;

    & video, & iframe {
        display: block;
        width: 100%;
        max-height: 76vh;
        border: 0;
        border-radius: 12px;
        background: #000;
    }

    & iframe { width: auto; height: 76vh; max-width: 100%; }
    &[data-shape=wide] iframe { width: 100%; height: auto; }
    &[data-shape=square] video,
    &[data-shape=portrait] video,
    &[data-shape=tall] video { width: auto; max-width: 100%; }
}

.motion-modal__step {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;

    &[hidden] { visibility: hidden; display: grid; }
}

@media (width <= 767px) {
    .motion-modal { width: 100vw; max-height: 100dvh; border-radius: 0; }
    .motion-modal__list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.6rem;
        padding: 0.8rem;

        &[data-count="2"] { grid-template-columns: minmax(0, 1fr); }
        &[data-shape=square], &[data-shape=tall] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    .motion-modal__player { grid-template-columns: minmax(0, 1fr); padding: 0.8rem; }
    .motion-modal__step { display: none; }
    .motion-modal__stage video, .motion-modal__stage iframe { max-height: 70dvh; }
    .motion-modal__stage iframe { height: 70dvh; }
    .motion-modal__back { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
}

/* ==========================================
   料金の目安
   ========================================== */
.price-section {
    padding: 5rem 2rem;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 3rem auto 0;
}

.price-card {
    padding: 2rem 1.5rem;
    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);
    text-align: center;
}

.price-card__icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #a78bfa);
    color: #fff;
    font-size: 1.2rem;
}

.price-card__name {
    margin-top: 1rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.price-card__spec {
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.price-card__price {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 700;

    & b {
        margin-right: 0.1em;
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        filter: brightness(1.4);
        font-family: 'Noto Sans JP', sans-serif;
        font-size: 2.8rem;
        font-weight: 900;
        line-height: 1;
    }
}

.price-notes {
    max-width: 1100px;
    margin: 1.25rem auto 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    line-height: 1.8;
    list-style: none;

    & li::before { content: '※'; }
}

@media (width <= 767px) {
    .price-section { padding: 3.4rem 1rem; }
    .price-grid { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
    .price-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.2rem 1rem;
        align-items: center;
        padding: 1.2rem;
        text-align: left;
    }
    .price-card__icon { grid-row: span 3; }
    .price-card__name { margin-top: 0; }
    .price-card__price { margin-top: 0.3rem; & b { font-size: 2.2rem; } }
}
