@charset "utf-8";

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #fafafa;
    color: #333;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Helvetica Neue",
        "Yu Gothic",
        sans-serif;
}


/* =========================
   ヘッダー
========================= */

.site-header {
    text-align: center;
    padding: 90px 20px 50px;
}

.site-header h1 {
    margin: 8px 0 15px;
    font-size: 42px;
    letter-spacing: 0.12em;
}

.sub-title {
    margin: 0;
    color: #777;
    font-size: 15px;
    letter-spacing: 0.08em;
}

.aa {
    display: inline-block;
    margin: 15px auto 0;
    text-align: left;
    font-family:
        "MS PGothic",
        "ＭＳ Ｐゴシック",
        monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}


/* =========================
   作品一覧
========================= */

.works {
    display: flex;
    justify-content: center;
    gap: 70px;

    width: min(1000px, 90%);
    margin: 20px auto 120px;
}


/* =========================
   カード
========================= */

.work-card {
    position: relative;
    width: 330px;
    padding-bottom: 35px;
}


/* 檻本体 */

.cage {
    position: relative;
    height: 300px;

    border: 1px solid #bbb;
    border-radius: 15px;

    overflow: hidden;
    background-color: #fff;
}


/* 中身 */

.work-content {
    position: relative;
    z-index: 1;

    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;

    padding: 40px;
}

.work-content h2 {
    margin: 0 0 25px;
    font-size: 25px;
}

.work-content p {
    margin: 0;
    line-height: 1.8;
}

.work-number {
    position: absolute;

    top: 18px;
    left: 22px;

    font-size: 12px;
    color: #999;
    letter-spacing: 0.15em;
}


/* =========================
   檻の縦棒
========================= */

.bars {
    position: absolute;

    inset: 0;

    z-index: 2;

    pointer-events: none;

    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 52px,
            rgba(70, 70, 70, 0.22) 53px,
            rgba(70, 70, 70, 0.22) 55px
        );

    transition: opacity 0.3s;
}


/* 上下にも檻っぽい線 */

.cage::before,
.cage::after {
    content: "";

    position: absolute;
    z-index: 3;

    left: 0;

    width: 100%;
    height: 3px;

    background-color: rgba(70, 70, 70, 0.35);
}

.cage::before {
    top: 25px;
}

.cage::after {
    bottom: 25px;
}


/* =========================
   鍵
========================= */

.key-link {
    position: absolute;

    z-index: 5;

    left: 50%;
    bottom: 0;

    transform: translateX(-50%);

    width: 55px;
    height: 55px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 50%;

    background-color: #fafafa;

    transition:
        transform 0.25s,
        background-color 0.25s;
}

.key {
    width: 32px;
    height: 32px;

    transition: transform 0.25s;
}


/* 鍵に触った時 */

.key-link:hover {
    transform:
        translateX(-50%)
        rotate(-8deg);
}

.key-link:hover .key {
    transform: scale(1.12);
}


/* 鍵に触ると檻が少し薄くなる */

.work-card:has(.key-link:hover) .bars {
    opacity: 0.35;
}


/* =========================
   フッター
========================= */

footer {
    text-align: center;
    padding-bottom: 80px;

    color: #777;
    font-size: 13px;
}

.footer-aa {
    display: inline-block;

    margin: 0 auto 15px;

    text-align: left;

    font-family:
        "MS PGothic",
        "ＭＳ Ｐゴシック",
        monospace;

    font-size: 13px;
    line-height: 1.3;

    color: #555;
}


/* =========================
   スマホ
========================= */

@media screen and (max-width: 750px) {

    .site-header {
        padding-top: 60px;
    }

    .site-header h1 {
        font-size: 32px;
    }

    .works {
        flex-direction: column;
        align-items: center;

        gap: 70px;

        margin-bottom: 100px;
    }

    .work-card {
        width: min(330px, 90vw);
    }

}