/* ==========================================================================
   左五右衛門について（page-about.php）
   ========================================================================== */
.p-about {
    --navy: #07396e;
    --deep: #052957;
    --paper: #f7f7ef;
    --line: #bdc9cd;

    color: var(--navy);
    background: var(--paper) url("../images/page/paper.jpg") repeat;
    font-family: var(--font-mincho);
    line-height: 1.9;

    a {
        &:hover {
            text-decoration: underline;
            text-underline-offset: 5px;
        }

        &:focus-visible {
            outline: 3px solid #bf7b23;
            outline-offset: 6px;
        }
    }

    img {
        max-width: 100%;
    }

    h1, h2, h3 {
        font-weight: 600;
    }

    .container {
        width: min(calc(100% - 160px), 1200px);
        margin-inline: auto;
    }

    .eyebrow {
        font-family: Georgia, serif;
        font-size: 12px;
        letter-spacing: .07em;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    /* メインビジュアル（共通ヘッダーの高さ分だけ上に余白を足す） */
    .hero {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        /* 画面幅に応じて高さを可変（画像比率 2160:633 より少し高めにして余白を確保） */
        min-height: calc(clamp(480px, 36vw, 640px) + var(--header-height));
        padding-top: var(--header-height);
        display: flex;
        align-items: center;
        /* 背景は青い和紙柄、写真は右下に重ねる分割構成 */
        background: #063460 url("../images/page/blue-paper.jpg") center / 700px auto;
        color: white;

        .hero-photo {
            position: absolute;
            z-index: -1;
            /* 高さはセクションに合わせ、画像の左端を基準に右側をはみ出させる */
            inset: 0 0 0 38%;
            background: url("../images/page/about-main.png") left bottom / cover no-repeat;
        }

        /* 左下支点の波（写真の上・テキストの下に重ねる） */
        &::after {
            content: "";
            position: absolute;
            z-index: -1;
            left: 0;
            bottom: 0;
            width: 75%;
            aspect-ratio: 2182 / 721;
            background: url("../images/services-bottom.png") left bottom / contain no-repeat;
            pointer-events: none;
        }

        .hero-content {
            margin-inline: max(8%, 40px) auto;
            padding-block: 52px 110px;
        }

        .eyebrow {
            font-size: 13px;
            letter-spacing: .24em;
            margin-bottom: 6px;
        }

        h1 {
            font-size: clamp(32px, 3.3vw, 48px);
            line-height: 1.65;
            letter-spacing: .14em;
        }
    }

    .page-navigation {
        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 16px;
            padding-block: 14px;
            font-size: 11px;
        }

        .section-links {
            display: flex;
            justify-content: flex-start;
            gap: 40px;
            padding-block: 0;

            a {
                font-size: 14px;
                display: flex;
                align-items: center;
                gap: 26px;
                min-height: 44px;
            }
        }
    }

    .section {
        position: relative;
        padding-block: 100px;
    }

    .section-heading {
        margin-bottom: 56px;

        /* 英字ラベルは小さく、和文見出しは大きくしてジャンプ率を確保 */
        .eyebrow {
            font-size: 13px;
            letter-spacing: .24em;
            margin-bottom: 6px;
        }

        h2 {
            font-size: clamp(40px, 3.9vw, 56px);
            line-height: 1.35;
            letter-spacing: .16em;
        }
    }

    /* 代表メッセージ */
    .message {
        overflow: hidden;
        padding-bottom: 130px;

        .container {
            position: relative;
            z-index: 1;
        }

        .message-layout {
            display: grid;
            grid-template-columns: 1.06fr 1fr;
            gap: 70px;
            align-items: start;
        }

        .message-photo {
            padding-top: 8px;

            img {
                width: 100%;
                height: auto;
                aspect-ratio: 1;
                object-fit: contain;
            }
        }

        .message-copy {
            h3 {
                font-size: 30px;
                line-height: 1.7;
                letter-spacing: .13em;
                margin-bottom: 28px;
            }

            p {
                font-size: 15px;
                line-height: 2.2;
                letter-spacing: .055em;
                margin-top: 22px;
            }

            .signature {
                text-align: right;
                margin-top: 30px;
            }

            .draft-note {
                font-size: 10px;
                text-align: right;
                margin-top: 14px;
            }
        }

        .message-pattern {
            position: absolute;
            left: 0;
            bottom: 0;
            width: 32%;
            aspect-ratio: 320 / 155;
            background: url("../images/page/message-seigaiha.png") left bottom / contain no-repeat;
            pointer-events: none;
            z-index: 2;
        }
    }

    /* 理念 */
    .philosophy {
        overflow: hidden;
        color: white;
        background: #063460 url("../images/page/blue-paper.jpg") center / 700px auto;
        padding-bottom: 200px;

        &::before {
            content: "";
            position: absolute;
            right: 0;
            top: 0;
            width: 33%;
            aspect-ratio: 330 / 175;
            background: url("../images/page/philosophy-seigaiha.png") top right / contain no-repeat;
        }

        .container {
            position: relative;
            z-index: 1;
        }

        .philosophy-statement {
            text-align: center;
            font-size: clamp(30px, 2.6vw, 38px);
            line-height: 1.8;
            letter-spacing: .16em;
            margin-block: 0 88px;
        }

        .principles {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            padding: 0;
            margin: 0;
            list-style: none;

            li {
                text-align: left;
                padding: 8px 48px;

                & + li {
                    border-left: 1px solid #94a5bb88;
                }

                .number {
                    display: block;
                    font: 15px Georgia, serif;
                    letter-spacing: .2em;
                    margin-bottom: 8px;
                }

                h3 {
                    font-size: 30px;
                    line-height: 1.5;
                    letter-spacing: .1em;
                    margin-bottom: 16px;
                }

                p {
                    font-size: 15px;
                    line-height: 2;
                    letter-spacing: .05em;
                }
            }
        }

        .ocean-wave {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: auto;
            aspect-ratio: 1000 / 129;
            background: url("../images/page/philosophy-wave.png") center bottom / 100% 100% no-repeat;
            pointer-events: none;
        }
    }

    /* 会社概要 */
    .company {
        padding-block: 110px 120px;

        .company-layout {
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 48px;
        }

        .company-table {
            > div {
                display: grid;
                grid-template-columns: 140px 1fr;
                gap: 28px;
                padding-block: 12px;
                border-bottom: 1px solid var(--line);
                font-size: 15px;
            }

            > div:first-child {
                border-top: 1px solid var(--line);
            }

            dt {
                font-weight: 600;
            }

            dd {
                overflow-wrap: anywhere;
            }
        }
    }
}

@media (max-width:1024px) {
    .p-about {
        .container {
            width: calc(100% - 80px);
        }

        .hero {
            min-height: calc(310px + var(--header-height));

            .hero-photo {
                left: 32%;
            }

            h1 {
                font-size: 36px;
            }
        }

        .section {
            padding-block: 80px;
        }

        .message {
            padding-bottom: 120px;

            .message-layout {
                gap: 32px;
                grid-template-columns: 1fr 1fr;
            }

            .message-copy {
                h3 {
                    font-size: 28px;
                }

                p {
                    font-size: 14px;
                }
            }
        }

        .philosophy {
            padding-bottom: 170px;

            .philosophy-statement {
                font-size: 28px;
                margin-bottom: 64px;
            }

            .principles li {
                padding-inline: 20px;

                h3 {
                    font-size: 24px;
                }

                p {
                    font-size: 14px;
                }
            }

            .ocean-wave {
                height: 100px;
                aspect-ratio: auto;
            }
        }

        .company {
            padding-block: 90px 100px;

            .company-layout {
                display: block;
            }

            .company-table > div {
                grid-template-columns: 160px 1fr;
            }
        }
    }
}

@media (max-width:767px) {
    .p-about {
        .container {
            width: calc(100% - 48px);
        }

        .eyebrow {
            font-size: 11px;
            margin-bottom: 7px;
        }

        .hero {
            min-height: calc(260px + var(--header-height));
            align-items: flex-start;

            .hero-photo {
                inset: 0 0 auto;
                height: calc(260px + var(--header-height));
            }

            /* 写真エリアの下端に揃える */
            &::after {
                bottom: auto;
                top: calc(260px + var(--header-height));
                width: 130%;
                transform: translateY(-100%);
            }

            .hero-content {
                width: 100%;
                margin-inline: 0;
                padding-block: 24px 0;

                > .eyebrow,
                > h1 {
                    margin-inline: 24px;
                }
            }

            .eyebrow {
                font-size: 11px;
                margin-bottom: 4px;
            }

            h1 {
                font-size: 30px;
                line-height: 1.5;
                letter-spacing: .09em;

                span {
                    display: block;
                }
            }
        }

        .page-navigation {
            background: var(--paper) url("../images/page/paper.jpg");
            color: var(--navy);
            padding-inline: 24px;
            margin-top: 102px;

            .breadcrumb {
                padding-block: 17px 10px;
                gap: 12px;
                font-size: 10px;
            }

            .section-links {
                justify-content: space-between;
                gap: 10px;
                padding-block: 0;

                a {
                    font-size: 11px;
                    gap: 9px;
                    white-space: nowrap;
                }
            }
        }

        .section {
            padding-block: 40px;
        }

        .section-heading {
            margin-bottom: 32px;

            .eyebrow {
                font-size: 11px;
                margin-bottom: 4px;
            }

            h2 {
                font-size: 34px;
                letter-spacing: .1em;
            }
        }

        .message {
            padding-top: 28px;
            padding-bottom: 66px;

            .message-layout {
                display: block;
            }

            .message-photo {
                padding: 0;
                margin-bottom: 20px;

                img {
                    max-width: 420px;
                    margin-inline: auto;
                }
            }

            .message-copy {
                h3 {
                    font-size: 25px;
                    line-height: 1.6;
                    margin-bottom: 20px;
                }

                p {
                    font-size: 15px;
                    line-height: 2;
                    margin-top: 20px;
                    letter-spacing: .03em;
                }

                .signature {
                    margin-top: 28px;
                }

                .draft-note {
                    font-size: 10px;
                }
            }

            .message-pattern {
                width: 60%;
                height: auto;
                bottom: 0;
            }
        }

        .philosophy {
            padding-top: 36px;
            padding-bottom: 125px;

            &::before {
                width: 45%;
            }

            .philosophy-statement {
                font-size: 23px;
                line-height: 1.85;
                letter-spacing: .055em;
                margin-block: 25px 22px;
            }

            .principles {
                display: block;

                li {
                    text-align: left;
                    padding: 24px 20%;

                    & + li {
                        border-left: 0;
                        border-top: 1px solid #94a5bb88;
                    }

                    .number {
                        font-size: 14px;
                        margin-bottom: 4px;
                    }

                    h3 {
                        font-size: 24px;
                        white-space: nowrap;
                        margin-bottom: 10px;
                    }

                    p {
                        font-size: 15px;
                    }
                }
            }

            .ocean-wave {
                height: 105px;
                background-size: auto 100%;
                background-position: left bottom;
            }
        }

        .company {
            padding-block: 40px;

            .section-heading {
                margin-bottom: 8px;
            }

            .company-table {
                > div {
                    display: block;
                    padding-block: 17px;
                    font-size: 15px;
                }

                > div:first-child {
                    padding-top: 17px;
                }

                dt {
                    margin-bottom: 4px;
                }
            }
        }
    }
}
