/* ==========================================================================
   index.css
   トップページ専用スタイル
   1. ファーストビュー (.fv)
   2. 導入セクション (.section-intro)
   3. 強みセクション (.section-strength)
   4. サービス概要セクション (.section-service-summary)
   5. 開発実績セクション (.section-works)
   6. 開発プロセスセクション (.section-process)
   7. 非公開実績セクション (.works-private-section)
   8. アニメーション設定
   ========================================================================== */

/* === 1. ファーストビュー (.fv) === */
.fv .container {
    max-width: 100%;
    padding: 0;
}

.fv {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-text-light);
    overflow: hidden;
    isolation: isolate;
}

.fv__slideshow {
    position: absolute;
    top: 0;
    right: 0;
    width: 87.3%;
    height: 100%;
    clip-path: polygon(20vw 0, 100% 0, 100% 100%, 0 100%);
    z-index: -1;
    background-color: #030327;
}

.fv__slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease, transform 7s ease;
    transform: scale(1);
}

.fv__slide-item.is-active {
    opacity: 1;
    transform: scale(1.05);
    z-index: 1;
}

.fv__slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fv__slide-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.fv__indicators {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.fv__indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s, transform 0.3s;
    cursor: pointer;
}

.fv__indicator-dot.is-active {
    background-color: #fff;
    transform: scale(1.3);
}

.fv__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.fv__content {
    padding: 20px 20px 20px 14vw;
    flex: 1;
    text-align: left;
}

.fv__cta-btn {
    display: none;
}

.fv__title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.fv__subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    display: inline-block;
    background: transparent;
    padding: 10px 20px;
    border-radius: 4px;
}

.fv__visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.fv__circle-image {
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fv__circle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fv::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(6, 16, 77, 0.8), rgba(0, 68, 136, 1));
    z-index: -2;
}

.fv__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
}

/* === 2. 導入セクション (.section-intro) === */
.section-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(50vw - 600px - 100px);
    width: 500px;
    height: 100%;
    background-color: #1a4aa3;
    transform: skewX(-25deg);
    z-index: -1;
    transition: width 2s ease-out, left 2s ease-out;
}

.section-intro.is-animating::before {
    width: 5000px;
    left: calc(50vw - 600px - 100px - 950px);
}

.solution-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.solution-layout__left {
    flex: 2;
    text-align: left;
}

.solution-layout__right {
    flex: 2;
    padding-top: 20px;
}

.solution-layout__pre-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text-light);
    opacity: 0.8;
}

.solution-layout__left .section-title {
    text-align: left;
    margin-bottom: 0;
    font-size: 4rem;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.section-intro__lead {
    margin-bottom: 24px;
    color: var(--color-text-light);
}
.section-intro__lead strong {
    font-weight: 700;
    color: var(--color-text-light);
    font-size: 2rem;
    line-height: 1.6;
}

.section-intro__lead .highlight-text {
    background-color: var(--color-text-light);
    color: var(--color-main);
}

.section-intro__body {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--color-text-light);
}

.section-intro .section-link {
    text-align: left;
}

/* === 3. 強みセクション (.section-strength) === */
.section-strength::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(50vw - 600px - 520px);
    width: 500px;
    height: 100%;
    background-color: #edf0f4;
    transform: skewX(-25deg);
    z-index: -1;
    transition: width 2s ease-out, left 2s ease-out;
}

.section-strength.is-animating::before {
    width: 5000px;
    left: calc(50vw - 600px - 520px - 950px);
}

.strength-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.strength-item {
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 260px;
    background-color: var(--color-text-light);
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.strength-item__image {
    flex: 0 0 300px;
    align-self: stretch;
}

.strength-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strength-item__content {
    padding: 30px;
}

.strength-item__title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-main);
}

/* === 4. サービス概要セクション (.section-service-summary) === */
.section-service-summary {
    background-color: var(--color-bg-light);
}

.service-alternating-list {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-top: 60px;
}

.service-alternating-item {
    display: block;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: #fff;
    border-radius: var(--radius);
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
}

.service-alternating-item:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 1;
}

.service-alternating-item--reverse {
    flex-direction: row-reverse;
}

.service-alternating-item__image {
    flex: 1 1 55%;
    align-self: stretch;
    overflow: hidden;
    border-radius: var(--radius) 0 0 var(--radius);
}

.service-alternating-item--reverse .service-alternating-item__image {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.service-alternating-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-alternating-item:hover .service-alternating-item__image img {
    transform: scale(1.03);
}

.service-alternating-item__content {
    flex: 1 1 45%;
    padding: 40px;
}

.service-alternating-item--reverse .service-alternating-item__content {
    padding: 40px 20px 40px 60px;
}

.service-alternating-item__number {
    display: block;
    font-family: var(--font-family-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-main);
    opacity: 0.6;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.service-alternating-item__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-main);
    margin-bottom: 20px;
}

.service-alternating-item__desc {
    font-size: 1rem;
    margin-bottom: 30px;
}

.service-alternating-item__link-text {
    display: inline-block;
    background-color: transparent;
    color: var(--color-main);
    border: 2px solid var(--color-main);
    padding: 10px 25px;
    border-radius: 100px;
    font-weight: 700;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.service-alternating-item__link-text::after {
    content: '→';
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.service-alternating-item:hover .service-alternating-item__link-text {
    background-color: var(--color-main);
    color: var(--color-text-light);
}
.service-alternating-item:hover .service-alternating-item__link-text::after {
    transform: translateX(3px);
}

/* === 5. 開発実績セクション (.section-works) === */
.section-works {
    background-color: #edf0f4;
}

/* トップページの実績セクション用にグリッド幅を制限して小さく表示 */
.section-works .works-grid {
    max-width: 840px;
    margin: 0 auto;
}

/* === 6. 開発プロセスセクション (.section-process) === */
.process-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    counter-reset: process-counter;
}

.process-item {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 30px;
    position: relative;
}

.process-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 0 8px;
    border-color: #ddd transparent transparent transparent;
}

.process-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.process-item__number-block {
    flex-shrink: 0;
    width: 90px;
    text-align: center;
    color: var(--color-main);
    font-weight: 700;
}

.process-item__number-block::before {
    content: "STEP";
    display: block;
    font-size: 1rem;
    line-height: 1;
}

.process-item__number-block::after {
    counter-increment: process-counter;
    content: "0" counter(process-counter);
    font-size: 1.5rem;
    line-height: 1;
}

.process-item__title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.process-item__desc {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.section-process .section-title {
    font-size: 2.5rem;
    line-height: 1.4;
}

.section-process .solution-layout__pre-title {
    color: var(--color-text-secondary);
}
.section-process .solution-layout__left .section-title {
    color: var(--color-main);
}

.section-process .solution-layout__left {
    flex: 1;
}
.section-process .solution-layout__right {
    flex: 2;
}

.section-process .solution-layout__left {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}
.section-process .solution-layout__image {
    margin-top: auto;
    max-width: 90%;
}

/* === 7. 非公開実績セクション (.works-private-section) === */
.works-private-section {
    display: flex;
    justify-content: center;
}
.works-private-card {
    max-width: 680px;
    width: 100%;
    padding: 4rem 2rem;
    background-color: #fff;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.works-private-card__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #999;
}
.works-private-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}
.works-private-card__text {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 2.5rem;
}

/* === 8. アニメーション設定 === */
.fv__title.js-scroll-trigger { transition-delay: 0.2s; }
.fv__subtitle.js-scroll-trigger { transition-delay: 0.4s; }
.fv__cta-btn.js-scroll-trigger { transition-delay: 0.7s; }
.solution-layout__right.js-scroll-trigger { transition-delay: 0.2s; }
.section-works .work-card.js-scroll-trigger:nth-of-type(2) { transition-delay: 0.1s; }
.section-cta .cta-btn.js-scroll-trigger { transition-delay: 0.1s; }

.js-reveal-text {
    position: relative;
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
}

.js-reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-main);
    transform: translateX(0);
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.section-intro__lead.is-visible .js-reveal-text::after {
    transform: translateX(101%);
    transition-delay: 0.3s;
}
.section-intro__lead.is-visible .js-reveal-text:nth-of-type(2)::after {
    transition-delay: 0.5s;
}






















/* === 9. レスポンシブ対応 (Mobile) === */
@media screen and (max-width: 768px) {
    /* === 1. ファーストビュー (.fv) === */
    .fv {
        height: 85vh;
        min-height: auto;
        align-items: flex-end;
        background-color: #050510;
    }

    /* グラデーションオーバーレイ */
    .fv::before {
        background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0) 80%
        );
        z-index: 1;
    }

    /* スライドショーコンテナ */
    .fv__slideshow {
        width: 100%;
        height: 100%;
        left: 0;
        clip-path: none;
        z-index: 0;
    }

    /* スライド画像の表示位置調整 (スマホ用) */
    .fv__slide-item:nth-child(1) img { object-position: 45% center; }
    .fv__slide-item:nth-child(2) img { object-position: 80% center; }
    .fv__slide-item:nth-child(3) img { object-position: 70% center; }
    .fv__slide-item:nth-child(4) img { object-position: 80% center; }

    /* コンテンツエリア */
    .fv__content {
        position: relative;
        z-index: 2;
        width: 100%;
        padding: 0 24px 80px; /* 左右の余白と下部の余白 */
    }

    /* タイトル */
    .fv__title {
        font-size: 1.7rem;
        line-height: 1.3;
        margin-bottom: 14px;
        text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }

    /* サブタイトル */
    .fv__subtitle {
        display: block;
        padding: 0;
        font-size: 0.9rem;
        font-weight: 100;
        line-height: 1.6;
        text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }

    /* CTAボタン (スマホのみ表示) */
    .fv__cta-btn {
        display: inline-block;
        margin-top: 20px;
        width: auto;
        padding: 8px 24px;
        font-size: 0.8rem;
    }

    /* インジケーター */
    .fv__indicators {
        display: flex;
        flex-direction: row;
        top: auto;
        bottom: 30px;
        right: 24px;
        transform: none;
        gap: 10px;
        z-index: 3;
    }

    .fv__indicator-dot {
        width: 30px;
        height: 4px;
        border: none;
        border-radius: 2px;
        background-color: rgba(255, 255, 255, 0.3);
    }

    .fv__indicator-dot.is-active {
        background-color: var(--color-text-light);
        transform: none;
    }

    /* 各セクションのボタンサイズを統一して小さくする */
    .section-link .cta-btn {
        width: auto;
        padding: 8px 24px;
        font-size: 0.85rem;
    }

    /* === 2. 導入セクション & 共通レイアウト (.solution-layout) === */
    .solution-layout {
        flex-direction: column;
        gap: 20px;
    }

    .solution-layout__left,
    .solution-layout__right {
        width: 100%;
        padding-top: 0;
    }

    .solution-layout__pre-title {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }

    .solution-layout__left .section-title {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .solution-layout__left .section-title .sp-hide {
        display: none;
    }

    .section-intro__lead strong {
        font-size: 1.3rem;
    }

    .section-intro__body {
        font-size: 0.9rem;
        margin-bottom: 30px;
        line-height: 1.6;
    }

    .section-intro .section-link {
        text-align: left;
        margin-top: 0;
    }

    /* === 3. 強みセクション (.section-strength) === */
    .strength-list {
        gap: 30px;
    }

    .strength-item {
        flex-direction: column;
        min-height: auto;
        align-items: flex-start;
        gap: 0px;
    }

    .strength-item__image {
        flex: none;
        width: 100%;
        height: 180px;
    }

    .strength-item__content {
        padding: 14px 20px;
        width: 100%;
    }

    .strength-item__title {
        font-size: 1.1rem;
        margin-bottom: 0;
        line-height: 1.4;
    }

    /* アジャイル開発のタイトル改行調整 */
    .strength-item__title--agile .strength-item__text-upper {
        display: block;
    }
    .strength-item__title--agile .strength-item__text-lower {
        display: block;
        text-align: right;
    }

    .strength-item__desc {
        display: none;
    }

    /* === 4. サービス概要セクション (.section-service-summary) === */
    .service-alternating-list {
        gap: 40px;
        margin: 0;
    }

    .service-alternating-item,
    .service-alternating-item--reverse {
        flex-direction: column;
        gap: 0;
    }

    .service-alternating-item__image,
    .service-alternating-item--reverse .service-alternating-item__image  {
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .service-alternating-item__content,
    .service-alternating-item--reverse .service-alternating-item__content {
        width: 100%;
        padding: 14px 20px;
        text-align: left;
        display: flex;
        flex-direction: column;
    }

    .service-alternating-item__title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .service-alternating-item__number {
        margin-bottom: 4px;
    }

    /* ホームページ制作(2番目)のみタイトル下の余白を調整 */
    .service-alternating-item:nth-of-type(2) .service-alternating-item__title {
        margin-bottom: 5px;
    }

    .service-alternating-item__desc {
        display: none;
    }

    .service-alternating-item__link-text {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 6px 16px;
        margin-top: 5px;
    }

    /* === 5. 開発実績セクション (.section-works) === */
    .works-private-card__text {
        font-size: 0.9rem;
    }

    .works-private-card .cta-btn {
        padding: 8px 24px;
        font-size: 0.8rem;
    }

    /* === 6. 開発プロセスセクション (.section-process) === */
    .section-process .solution-layout__left {
        display: block;
    }

    .section-process .solution-layout__image {
        display: none;
    }

    .process-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 20px;
    padding-bottom: 20px;
    }

    .process-item__number-block {
        width: auto;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .process-item__number-block::before {
        font-size: 0.9rem;
    }

    .process-item__number-block::after {
        font-size: 1.3rem;
    }

    .process-item__title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .process-item__desc {
        font-size: 0.85rem;
        line-height: 1.6;
    }
}

/* ==========================================================================
   10. PiP Window (Popup)
   ========================================================================== */
.pip-window {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 320px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    
    /* Animation Initial State */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pip-window.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pip-window.is-closed {
    transform: translateY(100px) scale(0.9);
    opacity: 0;
    pointer-events: none;
}

/* Header Controls */
.pip-header {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    gap: 8px;
    transition: opacity 0.3s;
}

.pip-control-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    color: #475569; /* slate-600 */
    padding: 0;
}

.pip-control-btn:hover {
    background-color: #fff;
    transform: scale(1.1);
}

.pip-close-btn:hover {
    background-color: #fef2f2; /* red-50 */
    color: #ef4444; /* red-500 */
}

/* Content Area */
.pip-content-area {
    transition: opacity 0.3s;
}

.pip-image-wrapper {
    position: relative;
    height: 176px; /* h-44 */
    overflow: hidden;
}

.pip-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pip-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #ffffff, transparent, transparent);
}

.pip-badge-wrapper {
    position: absolute;
    bottom: 12px;
    left: 12px;
}

.pip-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    background-color: #4f46e5; /* indigo-600 */
    color: #fff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: 0 10px 15px -3px rgba(199, 210, 254, 0.5); /* shadow-indigo-200 approx */
}

.pip-text-content {
    padding: 24px;
    padding-top: 18px;
}

.pip-title {
    font-size: 1.5rem; /* 2xl */
    font-weight: 900; /* black */
    color: #0f172a; /* slate-900 */
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
    display: flex;
    flex-direction: column;
}

.pip-title-line-1 {
    align-self: flex-start;
}

.pip-title-line-2 {
    align-self: flex-end;
}

.pip-accent-text {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pip-description {
    font-size: 0.875rem; /* text-sm */
    color: #64748b; /* slate-500 */
    line-height: 1.625;
    font-weight: 500;
    margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pip-window {
        right: 20px;
        bottom: 20px;
        width: 280px;
    }
    .pip-title {
        font-size: 1.25rem;
    }
}
