@charset "UTF-8";

/* ============================================================
   プロジェクト一覧（page-project.php）
   ------------------------------------------------------------
   親カード（.project-hub）がまとまりの表紙。
   子の目次（.project-index）はその下にぶら下がる下層。
   色は tokens.css のみ。
   ============================================================ */

.project-group {
    width: 100%;
    margin-bottom: 44px;
}

.project-group:last-of-type {
    margin-bottom: 0;
}

/* 親: 写真左・本文右。featured ほど高くしない */
.project-hub {
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    transition: border-color var(--dur-fast) ease,
        background-color var(--dur-fast) ease,
        box-shadow var(--dur-base) var(--ease-out);
}

.project-hub .tp-tile-media {
    flex: 0 0 220px;
    width: 220px;
    min-height: 154px;
    border-radius: calc(var(--radius-md) - 1px) 0 0 calc(var(--radius-md) - 1px);
    overflow: hidden;
}

.project-hub .tp-tile-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-position: top center;
    transition: transform 0.6s var(--ease-out);
}

.project-hub:hover .tp-tile-media img {
    transform: scale(1.04);
}

.project-hub .tp-tile-body {
    justify-content: center;
    padding: 22px 26px;
}

.project-hub .tp-tile-title {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.project-hub .tp-tile-more {
    margin-top: auto;
    background-image: none !important;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--c-cobalt);
    transition: color var(--dur-fast) ease;
}

.project-hub .tp-tile-more::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--c-cobalt);
    border-bottom: 2px solid var(--c-cobalt);
    transform: rotate(-45deg);
    transition: transform var(--dur-fast) ease;
}

.project-hub:hover .tp-tile-more {
    color: var(--c-cobalt-deep);
}

.project-hub:hover .tp-tile-more::after {
    transform: translateX(3px) rotate(-45deg);
}

/* プロジェクト一覧内のすべてのタイルで「〇〇を見る」の下線アニメーションを無効化 */
.tp-page .tp-tile-more {
    background-image: none !important;
    padding-bottom: 0;
}

/* 子: 親の下に、コバルト縦線でぶら下げる下層リスト */
.project-index {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 6px;
    margin-left: 20px;
    padding-left: 18px;
    border-left: 3px solid var(--c-cobalt);
    position: relative;
}

.project-row {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 20px;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 4px;
    align-items: center;
    padding: 14px 14px 14px 12px;
    border-bottom: 1px solid var(--c-line);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--c-ink);
    text-decoration: none;
    background-color: transparent;
    transition: transform var(--dur-base) var(--ease-out),
        background-color var(--dur-fast) ease,
        border-color var(--dur-fast) ease;
    will-change: transform;
}

.project-row:last-child {
    border-bottom: 0;
}

.project-row:hover,
.project-row:focus-visible {
    background-color: rgba(37, 87, 245, 0.05);
    transform: translateX(6px);
    border-bottom-color: transparent;
}

.project-row:focus-visible {
    outline: 2px solid var(--c-cyan);
    outline-offset: 2px;
}

/* 個別プロダクトのミニアイキャッチ・アイコン */
.project-row-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--c-paper-deep);
    border: 1px solid rgba(32, 52, 88, 0.12);
    box-shadow: 0 4px 12px rgba(11, 16, 36, 0.08);
    transition: transform var(--dur-base) var(--ease-out),
        box-shadow var(--dur-fast) ease,
        border-color var(--dur-fast) ease;
}

.project-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease-out);
}

.project-row:hover .project-row-icon,
.project-row:focus-visible .project-row-icon {
    transform: scale(1.06);
    border-color: var(--c-cobalt);
    box-shadow: 0 6px 16px rgba(37, 87, 245, 0.22);
}

.project-row:hover .project-row-icon img,
.project-row:focus-visible .project-row-icon img {
    transform: scale(1.08);
}

.project-row-head {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    min-width: 0;
}

.project-row-title {
    font-family: var(--f-body);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: var(--c-ink);
    margin: 0;
    transition: color var(--dur-fast) ease;
}

.project-row:hover .project-row-title,
.project-row:focus-visible .project-row-title {
    color: var(--c-cobalt);
}

.project-row-tag {
    flex: none;
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.16em;
    color: var(--c-cobalt);
    margin: 0;
    padding: 4px 8px;
    border: 1px solid var(--c-sky);
    border-radius: var(--radius-sm);
    background-color: transparent;
    transition: background-color var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        color var(--dur-fast) ease;
}

.project-row:hover .project-row-tag,
.project-row:focus-visible .project-row-tag {
    background-color: var(--c-cobalt);
    border-color: var(--c-cobalt);
    color: #fff;
}

.project-row-text {
    grid-column: 2;
    grid-row: 2;
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: 0.02em;
    color: var(--c-ink-soft);
    margin: 0;
    max-width: 680px;
}

.project-row::after {
    content: "";
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: center;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--c-cobalt);
    border-bottom: 2px solid var(--c-cobalt);
    transform: rotate(-45deg);
    transition: transform var(--dur-base) var(--ease-out),
        border-color var(--dur-fast) ease;
}

.project-row:hover::after,
.project-row:focus-visible::after {
    transform: translateX(4px) rotate(-45deg);
}

.project-aside {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 14px;
    color: var(--c-ink-soft);
}

.page-content > .cta-section-inline {
    margin-top: 72px;
    margin-bottom: 0;
}

@media screen and (max-width: 768px) {
    .project-group {
        margin-bottom: 32px;
    }

    .project-hub {
        flex-direction: column;
    }

    .project-hub .tp-tile-media {
        flex: none;
        width: 100%;
        min-height: 0;
        height: 160px;
        border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0;
    }

    .project-hub .tp-tile-body {
        padding: 20px 20px 18px;
    }

    .project-index {
        margin-left: 8px;
        padding-left: 12px;
    }

    .project-row {
        grid-template-columns: 42px minmax(0, 1fr) 16px;
        column-gap: 12px;
        padding: 12px 6px;
    }

    .project-row-icon {
        width: 42px;
        height: 42px;
        border-radius: 8px;
    }

    .project-row:hover,
    .project-row:focus-visible {
        transform: translateX(4px);
    }

    .project-row-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .project-row-title {
        font-size: 16px;
    }

    .project-row-text {
        font-size: 13.5px;
        line-height: 1.6;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-hub .tp-tile-media img,
    .project-row,
    .project-row::after,
    .project-row-title,
    .project-row-tag,
    .project-row-icon,
    .project-row-icon img {
        transition: none !important;
        transform: none !important;
    }
}
