/* ========================================
   有限会社第一印刷 - company.css（会社概要）
======================================== */

/* ========================================
   メッセージ（全幅・左画像／右テキスト・緑背景：サービスメインと同スタイルの独自クラス）
======================================== */
/* sectionのデフォルト余白を打ち消して全幅に */
.sec-message {
    padding: 0;
    overflow: hidden;
}
/* モバイル：テキスト上・画像下の縦積み */
.sec-message__hero {
    display: flex;
    flex-direction: column;
    background-color: var(--color-primary);
}
.sec-message__image {
    order: 2;
    width: 100%;
    display: flex;
    flex-direction: row;
    aspect-ratio: 2 / 1;
    overflow: hidden;
}
.sec-message__image img {
    flex: 1 1 0;
    width: 0;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* 下側（２枚目）の画像は左下をフォーカス */
.sec-message__image img:last-child {
    object-position: left 10% bottom 0;
}
.sec-message__content {
    order: 1;
    position: relative;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 4.5rem var(--section-pad-x);
}
/* 緑地に柄を乗算（::beforeに分離し opacity で元の緑をある程度保つ）
   ※ iPad/iOS Safari は repeat 背景だと background-blend-mode を無視するため、
     mix-blend-mode（要素間合成）で下地の緑（本体の background-color）に重ねる。 */
.sec-message__content::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url('../images/repeat-bg-02.webp');
    background-repeat: repeat;
    background-size: 400px auto;
    mix-blend-mode: multiply;
    opacity: 0.8;
}
.sec-message__content-inner {
    position: relative;
    z-index: 1;
    max-width: 576px;
    margin: 0 auto;
}
/* テキストブロックの上下パディング：576px以上は5.5rem（576px未満は4.5rem）。 */
@media (min-width: 576px) {
    .sec-message__content {
        padding-top: 5.5rem;
        padding-bottom: 5.5rem;
    }
}
@media (min-width: 768px) {
    .sec-message__content-inner {
        max-width: 768px;
    }
}
/* 見出し：緑背景の上なので白抜き・白文字に（円は共通 .sec-heading__en::before を使用） */
.sec-message .sec-heading {
    margin-bottom: 2rem;
}
.sec-message .sec-heading__en {
    display: inline-block;
    background-color: var(--color-white);
    color: var(--color-primary);
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    padding: 0.2em 0.6em;
    border-radius: var(--radius-xs);
}
.sec-message .sec-heading__ja {
    color: var(--color-white);
}
.sec-message__catch {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    font-weight: 900;
    line-height: 1.5;
    color: var(--color-white);
    letter-spacing: 0.02em;
    margin-top: 0.25rem;
    margin-bottom: 0;
}
.sec-message__lead {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
}
.sec-message__lead:last-child {
    margin-bottom: 0;
}
.sec-message__more {
    text-align: right;
}
/* ボタン：緑背景の上なので白ボタンに */
.sec-message__more .btn--primary {
    background-color: var(--color-white);
    color: var(--color-primary);
}
.sec-message__more .btn--primary:hover {
    background-color: var(--color-bg-light);
    color: var(--color-primary-dark);
}

/* 1024px以上：左テキスト・右画像の横並び */
@media (min-width: 1024px) {
    .sec-message__hero {
        flex-direction: row;
        align-items: stretch;
    }
    .sec-message__image {
        order: 2;
        flex: 1;
        min-height: 0;
        align-self: stretch;
        display: flex;
        flex-direction: column;
    }
    .sec-message__image img {
        flex: 1 1 0;
        width: 100%;
        height: 0;
        min-height: 0;
        aspect-ratio: auto;
        object-fit: cover;
    }
    .sec-message__content {
        order: 1;
        flex: 0 0 50%;
        display: flex;
        align-items: center;
        padding: 6.5rem 4rem;
    }
    .sec-message__content-inner {
        max-width: 1200px;
        margin: 0;
    }
    .sec-message .sec-heading {
        margin-bottom: 2.5rem;
    }
}

/* 1200px以上：テキストブロックの上下パディングを128pxに、左右を元の5.5remに戻す */
@media (min-width: 1200px) {
    .sec-message__content {
        padding-top: var(--spacing-3xl);
        padding-bottom: var(--spacing-3xl);
        padding-left: var(--spacing-xxl);
        padding-right: var(--spacing-xxl);
    }
}

/* 1440px以上：テキスト4・画像6の比率に */
@media (min-width: 1440px) {
    .sec-message__content {
        flex: 0 0 40%;
    }
    .sec-message__image {
        flex: 0 0 60%;
    }
}

/* 1600px以上：画像2枚を横並び（左右half&half）に */
@media (min-width: 1600px) {
    .sec-message__image {
        flex-direction: row;
    }
    .sec-message__image img {
        width: 0;
        height: 100%;
    }
}

/* ========================================
   代表挨拶（max-width 880・576/768/880で中央配置）
======================================== */
/* 背景：CSSで描く方眼紙（20pxマス・緑を薄く・単一格子） */
.sec-greeting,
.sec-contact {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}
@media (min-width: 576px) {
    .sec-greeting,
    .sec-contact {
        padding-top: 5.5rem;
        padding-bottom: 5.5rem;
    }
}
@media (min-width: 1200px) {
    .sec-greeting,
    .sec-contact {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}
.sec-greeting .sec-heading,
.sec-contact .sec-heading {
    margin-bottom: 2rem;
}
@media (min-width: 1024px) {
    .sec-greeting .sec-heading,
    .sec-contact .sec-heading {
        margin-bottom: 2.5rem;
    }
}
.sec-greeting {
    background-color: var(--color-bg-light);
    background-image:
        linear-gradient(to right, rgba(31, 166, 110, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(31, 166, 110, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
}
.sec-greeting__inner {
    max-width: 576px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .sec-greeting__inner {
        max-width: 768px;
    }
}
@media (min-width: 1024px) {
    .sec-greeting__inner {
        max-width: 880px;
    }
}
/* 本文（縦積み）＋署名行の右に顔写真（カードスタイル） */
.sec-greeting__body {
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem 1.5rem;
}
@media (min-width: 576px) {
    .sec-greeting__body {
        padding: 2.5rem 2rem;
    }
}
@media (min-width: 1024px) {
    .sec-greeting__body {
        padding: 3rem 2.5rem;
    }
}
/* 署名行：署名＋顔写真を右側にまとめて配置（左に余白） */
.sec-greeting__sign-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
@media (min-width: 768px) {
    .sec-greeting__sign-row {
        margin-top: 2rem;
    }
}
/* 顔写真 */
.sec-greeting__photo {
    flex: 0 0 auto;
    width: 96px;
}
@media (min-width: 768px) {
    .sec-greeting__photo {
        width: 112px;
    }
}
.sec-greeting__photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-xs);
    box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
    .sec-greeting__photo img {
        border-radius: var(--radius-sm);
    }
}
/* キャッチコピー（本文上・左寄せ大見出し） */
.sec-greeting__catch {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: 0.04em;
    color: var(--color-title);
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
}
.sec-greeting__catch-accent {
    color: var(--color-primary);
}
@media (min-width: 576px) {
    .sec-greeting__catch {
        font-size: 1.875rem;
    }
}
@media (min-width: 768px) {
    .sec-greeting__catch {
        font-size: 2.25rem;
        margin-bottom: 2rem;
    }
}

/* 本文：行下に緑の破線罫線（原稿用紙風）
   行ピッチを line-height の固定pxと一致させ、
   疑似要素をテキスト背面に重ね mask二重がけで
   「行下端（縦）×破線（横）」の交わりだけを残す。 */
.sec-greeting__text {
    line-height: 32px;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    position: relative;
}
.sec-greeting__text::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: rgba(31, 166, 110, 0.25);
    -webkit-mask-image:
        linear-gradient(to bottom, transparent calc(32px - 1.5px), #000 0),
        repeating-linear-gradient(to right, #000 0 4px, transparent 4px 8px);
    mask-image:
        linear-gradient(to bottom, transparent calc(32px - 1.5px), #000 0),
        repeating-linear-gradient(to right, #000 0 4px, transparent 4px 8px);
    -webkit-mask-size: 100% 32px, 100% 100%;
    mask-size: 100% 32px, 100% 100%;
    -webkit-mask-repeat: repeat, repeat;
    mask-repeat: repeat, repeat;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}
@media (min-width: 768px) {
    .sec-greeting__text {
        line-height: 36px;
    }
    .sec-greeting__text::after {
        -webkit-mask-image:
            linear-gradient(to bottom, transparent calc(36px - 1.5px), #000 0),
            repeating-linear-gradient(to right, #000 0 4px, transparent 4px 8px);
        mask-image:
            linear-gradient(to bottom, transparent calc(36px - 1.5px), #000 0),
            repeating-linear-gradient(to right, #000 0 4px, transparent 4px 8px);
        -webkit-mask-size: 100% 36px, 100% 100%;
        mask-size: 100% 36px, 100% 100%;
    }
}
.sec-greeting__sign {
    text-align: right;
    font-size: clamp(0.95rem, 2vw, 1rem);
    font-weight: 700;
    color: var(--color-title);
    margin-top: 0;
}

/* ========================================
   お問い合わせ（リード＋フォーム統合セクション）
======================================== */
/* 背景：repeat-bg-03 を 500px auto でリピートし白地と乗算。
   ※ iPad/iOS Safari は repeat 背景だと background-blend-mode を無視するため、
     柄を ::before に分離し mix-blend-mode で本体の白地に乗算し、opacity で薄める。 */
.sec-contact {
    position: relative;
    background-color: var(--color-white);
}
.sec-contact::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url('../images/repeat-bg-03.webp');
    background-repeat: repeat;
    background-size: 500px auto;
    mix-blend-mode: multiply;
    opacity: 0.2;
}
/* コンテンツ（リード・フォーム）は柄の前面に */
.sec-contact > * {
    position: relative;
    z-index: 1;
}

/* ========================================
   お問い合わせフォーム（max-width 880・576/768/880で中央配置）
======================================== */
/* トンボラッパー：カード（max-width 860px）＋padding分だけ幅を持たせて中央寄せ。
   paddingでカードを内側に寄せ、トンボをカードのすぐ外（ラッパー隅）に出す。 */
.sec-form__trim-wrap {
    max-width: calc(576px + 24px);
    margin: var(--spacing-lg) auto 0;
    padding: 12px;
}
@media (min-width: 768px) {
    .sec-form__trim-wrap {
        max-width: calc(768px + 28px);
        padding: 14px;
    }
}
@media (min-width: 1024px) {
    .sec-form__trim-wrap {
        max-width: calc(880px + 28px);
    }
}
/* フォームのトンボ：ラッパー隅（＝カードのすぐ外）に配置し、共通14pxを上書き */
.sec-form__trim-wrap.has-trim::before {
    top: 0;
    left: 0;
}
.sec-form__trim-wrap.has-trim::after {
    top: 0;
    right: 0;
}
.sec-form__trim-wrap .has-trim__bl {
    bottom: 0;
    left: 0;
}
.sec-form__trim-wrap .has-trim__br {
    bottom: 0;
    right: 0;
}
.sec-form__inner {
    margin: 0 auto;
}

/* アクセス */
.sec-access__inner {
    max-width: var(--section-width-lg);
    margin: 0 auto;
}
.sec-access__map {
    width: 100%;
    height: 360px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
