/* 
 * NEOTEC Base Stylesheet
 * 全ページ共通（変数・リセット・ヘッダー・フッター・ユーティリティ）
 */

/* ===========================
   CSS Variables
   =========================== */
:root {
    --color-primary: #057E4C;
    --color-primary-light: #E8F5EE;
    --color-text: #1a1a1a;
    --color-text-light: #666666;
    --color-text-gray: #a3a3a3;
    --color-bg: #ffffff;
    --color-bg-light: #f8f8f8;
    --color-border: #e0e0e0;

    /*
     * フォント
     * 和文: A-OTF Gothic MB101 Pro（Morisawa Web）R / M
     * 欧文: Graphik Medium
     * Morisawa はウェイトごとに font-family が分かれるため、
     * Regular は --font-main、Medium は --font-main-medium、Bold は --font-main-bold を使う。
     */
    --font-main: mfw-gothicmb101pro-regular, "Yu Gothic", "游ゴシック", "YuGothic", "游ゴシック体", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
    --font-main-medium: mfw-gothicmb101pro-medium, "Yu Gothic", "游ゴシック", "YuGothic", "游ゴシック体", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
    --font-main-bold: mfw-gothicmb101pro-bold, "Yu Gothic", "游ゴシック", "YuGothic", "游ゴシック体", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
    --font-en: "Graphik Web", mfw-gothicmb101pro-medium, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
    --font-weight-regular: 400; /* Figma R / Gothic MB101 Regular */
    --font-weight-medium: 500;  /* Figma M / Gothic MB101 Medium / Graphik Medium */
    --font-weight-bold: 700;    /* Gothic MB101 Bold */

    --header-height: 89px;
    /* アンカー停止位置: ヘッダー下端（ライン）に section 先頭をぴったり合わせる */
    --anchor-offset: var(--header-height);
    /* PCワイヤーは1280px。左右padding込みでこの幅に収める */
    --content-width: 1440px;
    --side-padding: 40px;
    /* ボタンのホバーでテキストを拡大する倍率（文字の高さが 0.5px 大きくなる。em は使う側の文字サイズで計算される） */
    --hover-label-scale: calc((1em + 0.5px) / 1em);
    /* 下層KV背景。各ページで上書き */
    --page-hero-bg: #ffffff;
}

@media (max-width: 768px) {
    :root {
        --header-height: 75px;
        --side-padding: 20px;
    }
}

/* Lenis: KV動画などを触れるように公式CSSの iframe 無効化を戻す */
html.lenis.lenis-smooth iframe {
    pointer-events: auto;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after {
    box-sizing: border-box;
}

/* iPhone の Safari が、横にスクロールする表などの文字を勝手に大きくしないようにする（指定どおりの大きさで表示） */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.8;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "palt";
}

body.is-nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: normal;
}

p {
    margin: 0;
}

/* ===========================
   Utility Classes
   =========================== */
.u-only-pc { display: flex; }
.u-only-sp { display: none; }

@media (max-width: 768px) {
    .u-only-pc { display: none !important; }
    .u-only-sp { display: block; }
}

/* ===========================
   Animation Utilities
   =========================== */
/* translateY はスクロール中にブロックが上へ戻る引っ掛かりの原因になるため使わない
   出だしと終わりをゆっくりにする ease-in-out（0.42, 0, 0.58, 1）で 1秒 */
.u-animation-fade {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.42, 0, 0.58, 1);
}

.u-animation-fade.is-visible {
    opacity: 1;
}

.u-animation-delay-1 { transition-delay: 0.2s; }
.u-animation-delay-2 { transition-delay: 0.4s; }
.u-animation-delay-3 { transition-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
    .u-animation-fade {
        opacity: 1;
        transition: none;
    }
}

/* 下層ページ内ナビ: 固定ピン用スペーサー（常にフローに残して位置計測する） */
.js-page-anchors-spacer {
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
}

/*
 * 下層ページ内ナビ: Figma D_NAV（PC 1331:1328 / SP 1962:4773）
 * 発火までは非表示。発火後は画面下に固定。
 * マークアップに .js-page-anchors を付け、JS 待ちでワイヤーが一瞬出ないようにする。
 * 会社概要の .company-anchors は PC 左サイド、SP のみ D_NAV。
 */
nav[class*="-anchors"].js-page-anchors {
    position: relative;
    top: auto;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    visibility: hidden;
    pointer-events: none;
}

nav[class*="-anchors"].js-page-anchors.is-pinned {
    position: fixed;
    top: auto;
    bottom: max(24px, calc(12px + env(safe-area-inset-bottom, 0px)));
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    overflow: visible;
    display: flex;
    justify-content: center;
    z-index: 90;
    visibility: visible;
    pointer-events: none;
    opacity: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: opacity 0.7s cubic-bezier(0.08, 0.82, 0.17, 1);
}

nav[class*="-anchors"].js-page-anchors.is-pinned.is-shown {
    opacity: 1;
}

/* フッター（とパンくず）手前の最後のセクションに到達したらフェードアウト（以降のリンクを塞がない） */
nav[class*="-anchors"].js-page-anchors.is-pinned.is-over-footer {
    opacity: 0;
}

/*
 * 透明な間（表示前・フッターと重なっている間）は、ナビ内のどの要素もクリックを受けない。
 * 採用ページの全幅バー（.recruit-anchors__bar）のように子要素で pointer-events: auto を指定していても、
 * 透明なまま下のフッターのリンクを塞がないようにする
 */
/* 下層の 2nd View 以降、上スクロール中は下部メニューバーを隠す（ヘッダーと入れ替え。JS: Header.setupScrollDirection） */
html.is-scroll-up nav[class*="-anchors"].js-page-anchors.is-pinned {
    opacity: 0;
}

nav[class*="-anchors"].js-page-anchors.is-pinned:not(.is-shown) *,
nav[class*="-anchors"].js-page-anchors.is-pinned.is-over-footer *,
html.is-scroll-up nav[class*="-anchors"].js-page-anchors.is-pinned * {
    pointer-events: none;
}

nav[class*="-anchors"].js-page-anchors [class*="-anchors__inner"] {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    width: max-content;
    max-width: calc(100vw - 40px);
    margin: 0;
    padding: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0;
    border-radius: 6px;
    box-shadow: 10px 10px 40px 0 rgba(0, 0, 0, 0.08);
    pointer-events: auto;
}

nav[class*="-anchors"].js-page-anchors [class*="-anchors__inner"]::-webkit-scrollbar {
    display: none;
}

/* TYO .atomic-anchor-list_current 相当。left/width を JS が動かす */
nav[class*="-anchors"].js-page-anchors .page-anchors__current {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-radius: 4px;
    background: var(--color-primary);
    pointer-events: none;
    z-index: 0;
    transition:
        left 0.7s cubic-bezier(0.08, 0.82, 0.17, 1),
        width 0.7s cubic-bezier(0.08, 0.82, 0.17, 1),
        top 0.7s cubic-bezier(0.08, 0.82, 0.17, 1),
        height 0.7s cubic-bezier(0.08, 0.82, 0.17, 1);
}

nav[class*="-anchors"].js-page-anchors a {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 12px 24px 13px;
    font-size: 13px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--color-primary);
    background: transparent;
    border: 0;
    border-bottom: 0;
    border-radius: 4px;
    white-space: nowrap;
    transition:
        color 0.7s cubic-bezier(0.08, 0.82, 0.17, 1),
        background-color 0.7s cubic-bezier(0.08, 0.82, 0.17, 1);
}

nav[class*="-anchors"].js-page-anchors a:hover,
nav[class*="-anchors"].js-page-anchors a:focus,
nav[class*="-anchors"].js-page-anchors a:focus-visible {
    color: var(--color-primary);
    background: rgba(5, 126, 76, 0.08);
    border-bottom: 0;
    outline: none;
}

/* 下層ページ内ナビ: スクロール連動アクティブ（D_NAV 緑塗り / ワイヤー下線） */
nav[class*="-anchors"] a.is-active,
nav[class*="-anchors"] a.is-active:hover,
nav[class*="-anchors"] a.is-active:focus,
nav[class*="-anchors"] a.is-active:focus-visible,
nav[class*="-anchors"] a[aria-current="true"] {
    color: #057e4c;
    border-bottom-color: #057e4c;
}

nav[class*="-anchors"].js-page-anchors a.is-active,
nav[class*="-anchors"].js-page-anchors a.is-active:hover,
nav[class*="-anchors"].js-page-anchors a.is-active:focus,
nav[class*="-anchors"].js-page-anchors a.is-active:focus-visible,
nav[class*="-anchors"].js-page-anchors a[aria-current="true"] {
    color: #fff;
    background: transparent;
    border-bottom: 0;
}

nav[class*="-anchors"].js-page-anchors ~ section[id] {
    scroll-margin-top: var(--anchor-offset);
}

@media (max-width: 768px) {
    nav[class*="-anchors"].js-page-anchors.is-pinned {
        bottom: 0;
        justify-content: stretch;
        align-items: stretch;
    }

    nav[class*="-anchors"].js-page-anchors [class*="-anchors__inner"] {
        width: 100%;
        max-width: none;
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-radius: 0;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.04);
    }

    nav[class*="-anchors"].js-page-anchors a {
        padding: 8px 12px 9px;
        color: #737373;
    }

    nav[class*="-anchors"].js-page-anchors a:hover,
    nav[class*="-anchors"].js-page-anchors a:focus,
    nav[class*="-anchors"].js-page-anchors a:focus-visible {
        color: var(--color-primary);
        background: transparent;
    }

    nav[class*="-anchors"].js-page-anchors a.is-active,
    nav[class*="-anchors"].js-page-anchors a.is-active:hover,
    nav[class*="-anchors"].js-page-anchors a.is-active:focus,
    nav[class*="-anchors"].js-page-anchors a.is-active:focus-visible,
    nav[class*="-anchors"].js-page-anchors a[aria-current="true"] {
        color: #fff;
        background: transparent;
    }

    /* 現在地の地は PC と同じブランドカラー（白文字） */
    nav[class*="-anchors"].js-page-anchors .page-anchors__current {
        background: var(--color-primary);
    }
}

@media (prefers-reduced-motion: reduce) {
    nav[class*="-anchors"].js-page-anchors.is-pinned,
    nav[class*="-anchors"].js-page-anchors .page-anchors__current,
    nav[class*="-anchors"].js-page-anchors a {
        transition: none;
    }
}

/* 下層KV（Figma Page 1954:3619 系）。背景は各ページの --page-hero-bg */
.page-hero {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 50vw;
    min-height: 480px;
    max-height: 100svh;
    overflow: hidden;
    background: var(--page-hero-bg, #ffffff);
}

.page-hero__media {
    flex: 0 0 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    background: #eae9e6;
}

.page-hero__media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.page-hero__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

/* 事業ページKV：複数画像を3秒ごとにクロスフェード（Dissolve 1.2s）。切替は base.js の HeroSlideshow */
.page-hero__media--slideshow {
    position: relative;
}

.page-hero__media--slideshow .page-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

/* 1枚目は通常配置にして、SPで枠の高さを保つ */
.page-hero__media--slideshow .page-hero__slide:first-child {
    position: relative;
}

.page-hero__media--slideshow .page-hero__slide.is-prev {
    z-index: 1;
    opacity: 1;
    transition: none;
}

.page-hero__media--slideshow .page-hero__slide.is-active {
    z-index: 2;
    opacity: 1;
}

.page-hero__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    padding: 0 var(--side-padding) 0 60px;
}

.page-hero__title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.page-hero__en {
    margin: 0;
    font-family: var(--font-en);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--color-primary);
}

.page-hero__title {
    margin: 0;
    font-size: 48px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    letter-spacing: -0.02em;
    line-height: 1;
    color: #222;
}

.page-hero__copy {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

.page-hero__lead {
    margin: 0;
    font-size: 16px;
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.02em;
    line-height: 1.55;
    color: #222;
}

.page-hero__anchors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-hero__anchors a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #daf1e8;
    font-size: 14px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--color-primary);
}

.page-hero__anchor-btn {
    display: block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 10px;
    background: var(--color-primary);
    color: #fff;
}

.page-hero__anchor-track {
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
}

.page-hero__anchor-icon {
    display: block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

@media (min-width: 1025px) {
    .page-hero__anchor-track {
        transition: transform 0.35s ease;
    }

    .page-hero__anchors a:hover .page-hero__anchor-track,
    .page-hero__anchors a:focus-visible .page-hero__anchor-track {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-hero__anchor-track {
        transform: translateY(-20px);
        transition: none;
    }
}

@media (max-width: 1024px) {
    .page-hero {
        flex-direction: column;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        padding-top: var(--header-height);
    }

    /* SP: 登録画像（780×524）の縦横比のまま表示し、切り抜かない */
    .page-hero__media {
        flex: none;
        width: 100%;
        height: auto;
    }

    .page-hero__media picture,
    .page-hero__media img {
        height: auto;
    }

    .page-hero__text {
        flex: none;
        width: 100%;
        gap: 35px;
        padding: 40px var(--side-padding) 60px;
    }

    .page-hero__title-block {
        gap: 12px;
    }

    .page-hero__title {
        font-size: 36px;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }

    .page-hero__lead {
        font-size: 15px;
        letter-spacing: 0.02em;
    }

    .page-hero__copy {
        gap: 30px;
    }

    .page-hero__anchors {
        column-gap: 16px;
        row-gap: 16px;
    }
}

/* ===========================
   Header
   通常: 先頭セクションと一緒にスクロールし、次セクションで固定。
   トップ / 採用（Figma M1 655:204 / M_HEADER 688:1617）:
     白い固定ヘッダーは KV の下に置き、KV は固定しない。
     KV が去ると下のヘッダーが現れる。KV 内にダークのカバーヘッダーを重ねる。
   =========================== */
.site {
    position: relative;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.4s ease, opacity 0.3s ease;
}

/* 下層の 2nd View 以降、下スクロール中はヘッダーを上へ隠す（影まで見えないよう余分に上げる。JS: Header.setupScrollDirection） */
.site-header.is-scroll-hidden {
    transform: translateY(calc(-100% - 24px));
}

/* 上スクロールで 1st View に戻るとき、固定ヘッダーをフェードアウトしてから元の位置へ戻す */
.site-header.is-fading {
    opacity: 0;
}

/* 固定の切り替えの瞬間はスライド・フェード・ロゴやメニューの色の変化を見せない（中の要素も含めて一度に切り替える） */
.site-header.is-no-anim,
.site-header.is-no-anim * {
    transition: none !important;
}

.site-header.is-fixed {
    position: fixed;
    background: #fff;
    box-shadow: 2px 2px 10px 0 rgba(0, 0, 0, 0.08); /* SP（Figma M_HEADER 688:1601）。PC は下の指定で消す */
}

/* KV 下に隠れる固定ヘッダー（KV は position:fixed にしない）
   ヘッダーはコンテンツより上（1000）。KV だけさらに上（1100）で隠す。 */
body.has-cover-kv .js-header {
    position: fixed;
    z-index: 1000;
    background: #fff;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.08);
}

/* PC: 固定ヘッダーは白地・影なし（メニューのピルとロゴだけを見せる）。SP は白地のまま */
@media (min-width: 769px) {
    .site-header.is-fixed,
    body.has-cover-kv .js-header {
        background: transparent;
        box-shadow: none;
    }
}

/* KV が画面にある間は上へ隠しておく（JS: Header.syncCoverKv）。KV が去るとスライドで上から出る */
body.has-cover-kv .js-header.is-cover-hidden {
    transform: translateY(calc(-100% - 24px));
}

body.has-cover-kv .kv,
body.has-cover-kv .recruit-hero {
    isolation: isolate;
    z-index: 1100;
}

body.has-cover-kv .site-header--cover {
    position: absolute;
    z-index: 20;
    background: transparent;
    box-shadow: none;
}

body.has-cover-kv .js-header .burger-line {
    background: var(--color-primary);
}

body.has-cover-kv.is-nav-open .site-header--cover {
    visibility: hidden;
    pointer-events: none;
}

/* 採用 SP: 初期から白いヘッダー（Figma 2004:2545）。トップのカバーは維持 */
@media (max-width: 768px) {
    body.has-cover-kv:not(.home) .site-header--cover {
        display: none;
    }

    body.has-cover-kv:not(.home) .js-header {
        z-index: 1000;
        background: #fff;
    }

    body.has-cover-kv:not(.home) .js-header .header-inner {
        background: #fff;
    }

    body.has-cover-kv:not(.home) .recruit-hero {
        z-index: 1;
    }

    /* 社員紹介 SP: 初期から header-inner を白地（Figma 2069:2659） */
    body.single-staff .js-header {
        background: #fff;
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.08);
    }

    body.single-staff .js-header .header-inner {
        background: #fff;
    }
}

/* Header Dark Theme (on KV) */
.site-header[data-theme="dark"] {
    background: transparent;
    border-bottom: 1px solid transparent;
}

.site-header[data-theme="dark"] .logo-text {
    color: #fff;
}

.site-header[data-theme="dark"] .header-logo {
    background-color: #ffffff;
}

.site-header[data-theme="dark"] .nav-pill {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(5px);
}

/* トップのKV：黒透過をグラデーションにしたため、メニューの白透過を0.2にする（Figma 60:555） */
.home .site-header[data-theme="dark"] .nav-pill {
    background: rgba(255, 255, 255, 0.2);
}

.site-header[data-theme="dark"] .nav-pill a {
    color: #fff;
}

.site-header[data-theme="dark"] .nav-pill.is-js-track:not(.is-hovering) a[aria-current="page"],
.site-header[data-theme="dark"] .nav-pill.is-js-track.is-hovering a.is-over {
    color: #fff;
}

.site-header[data-theme="dark"] .btn-contact {
    background: var(--color-primary);
    color: #fff;
}

.site-header[data-theme="dark"] .burger-line {
    background: #fff;
}

/* Header Light Theme (default / scrolled past KV) */
.site-header[data-theme="light"] {
    border-bottom: 0px solid rgba(0, 0, 0, 0.06);
}

.site-header[data-theme="light"] .logo-text {
    color: var(--color-primary);
}

.site-header[data-theme="light"] .header-logo {
    background-color: var(--color-primary);
}

/* PC：指定ページ（NEOTECについて・会社概要・管理・営繕工事）の初期表示だけロゴを白にする。固定後は緑のまま */
@media (min-width: 769px) {
    .site-header--logo-white:not(.is-fixed) .header-logo {
        background-color: #ffffff;
    }
}

.site-header[data-theme="light"] .nav-pill {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.site-header[data-theme="light"] .nav-pill a {
    color: var(--color-primary);
}

.site-header[data-theme="light"] .nav-pill.is-js-track:not(.is-hovering) a[aria-current="page"],
.site-header[data-theme="light"] .nav-pill.is-js-track.is-hovering a.is-over {
    color: #fff;
}

.site-header[data-theme="light"] .btn-contact {
    background: var(--color-primary);
    color: #fff;
}

.site-header[data-theme="light"] .burger-line {
    background: var(--color-primary);
}

/* Header Inner */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    max-width: var(--content-width);
    padding: 0 var(--side-padding);
    margin: 0 auto;
}

.site-branding a {
    display: block;
}

.header-logo {
    display: block;
    width: 99px;
    height: 30px;
    background-color: var(--color-primary);
    -webkit-mask-image: url('../images/logo_header.svg');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-image: url('../images/logo_header.svg');
    mask-size: contain;
    mask-repeat: no-repeat;
    transition: background-color 0.4s ease;
}

.logo-text {
    font-family: var(--font-en);
    font-size: 22px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.02em;
    transition: color 0.4s ease;
}

/* Navigation Pill（緑地は .nav-pill__current が滑る。リンク自体は塗らない） */
.nav-pill {
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 4px;
    transition: background 0.4s ease;
}

.nav-pill ul {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
}

/* PC（Figma D_HEADER 60:578）: 帯は592px、1項目めは156px（Figma上の文字幅＋左右20px）・残りは均等割り。
   先頭に JS が .nav-pill__current（span）を差し込むため :first-of-type で li を指す */
@media (min-width: 1025px) {
    /* Figma の LOGO 枠は128px（ロゴ本体は99px）。右のお問い合わせとほぼ同じ幅にしてメニュー帯を中央に置く */
    .site-branding {
        width: 128px;
    }

    .nav-pill {
        width: 592px;
    }

    .nav-pill a {
        width: 100%;
    }

    .nav-pill li {
        flex: 1 1 0;
        min-width: 0;
    }

    .nav-pill li:first-of-type {
        flex: 0 0 156px;
    }

    .nav-pill li:first-of-type a {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.nav-pill__current {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-radius: 4px;
    background: var(--color-primary);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition:
        left 0.4s cubic-bezier(0.08, 0.82, 0.17, 1),
        width 0.4s cubic-bezier(0.08, 0.82, 0.17, 1),
        top 0.4s cubic-bezier(0.08, 0.82, 0.17, 1),
        height 0.4s cubic-bezier(0.08, 0.82, 0.17, 1),
        opacity 0.3s ease;
}

.nav-pill.is-tracked .nav-pill__current {
    opacity: 1;
}

.nav-pill a {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px 11px;
    border-radius: 4px;
    font-size: 13px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.13px;
    line-height: 1.2;
    white-space: nowrap;
    background: transparent;
    transition: color 0.3s ease;
}

/* JS 未適用時のフォールバック（緑地＋白文字） */
.nav-pill:not(.is-js-track) a:hover,
.nav-pill:not(.is-js-track) a:focus-visible,
.nav-pill:not(.is-js-track) a[aria-current="page"] {
    background: var(--color-primary);
    color: #fff;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .nav-pill__current,
    .nav-pill a {
        transition: none;
    }
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 1024px) {
    .nav-pill a {
        padding-left: 14px;
        padding-right: 14px;
    }
    .header-actions {
        margin-right: -10px;
    }
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8.32px 24.54px;
    font-size: 13px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    letter-spacing: 1%;
    border-radius: 4px;
    transition: background 0.3s;
    white-space: nowrap;
}

/*
 * PCホバー：緑地だけを拡大し、文字の大きさは変えない。
 * 緑地はボタンの背景色を引き継ぐ ::before を拡大して表現する（isolation で文字の背面に置く）
 */
@media (hover: hover) and (min-width: 769px) {
    .btn-contact {
        position: relative;
        isolation: isolate;
    }

    .btn-contact::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: inherit;
        transition: transform 0.3s ease;
    }

    .btn-contact:hover::before {
        transform: scale(calc((1em + 1px) / 1em));
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-contact:hover::before {
        transform: none;
    }
}

/* Burger Button */
.burger-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.burger-line {
    display: block;
    width: 20px;
    height: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.4s ease;
}

.burger-btn.is-open .burger-line:first-child {
    transform: translateY(4px) rotate(45deg);
}

.burger-btn.is-open .burger-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* モーダル開時: ロゴ・バーガーを緑、お問い合わせは隠す（Figma 2131:16394） */
body.is-nav-open .site-header,
body.is-nav-open .site-header[data-theme="dark"],
body.is-nav-open .site-header[data-theme="light"] {
    position: fixed;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1300;
    box-shadow: 2px 2px 20px 0 rgba(0, 0, 0, 0);
}

body.is-nav-open .site-header .header-logo,
body.is-nav-open .site-header[data-theme="dark"] .header-logo,
body.is-nav-open .site-header[data-theme="light"] .header-logo {
    background-color: var(--color-primary);
}

body.is-nav-open .site-header .burger-line,
body.is-nav-open .site-header[data-theme="dark"] .burger-line,
body.is-nav-open .site-header[data-theme="light"] .burger-line {
    background: var(--color-primary);
}

body.is-nav-open .btn-contact {
    display: none;
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    .burger-btn {
        display: flex;
    }
    /* Figma: お問い合わせと三本線の間は16px。バーガーは40px枠で線が20pxのため、左の余白10pxを差し引く */
    .header-actions {
        gap: 6px;
    }
    .btn-contact {
        padding: 5.82px 12.54px;
        font-size: 13px;
    }
}

/* ===========================
   Mobile Navigation Overlay（Figma 2131:16394）
   =========================== */
.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    background: #fff;
    z-index: 1290;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.mobile-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.mobile-nav__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px 20px;
}

.mobile-nav__nav {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.mobile-nav__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-nav__heading {
    margin: 0;
    font-size: 13px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--color-primary);
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid #f5f5f5;
    color: #222;
    font-size: 15px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    letter-spacing: 0.02em;
}

.mobile-nav__link:hover,
.mobile-nav__link:focus-visible,
.mobile-nav__link[aria-current="page"] {
    color: #222;
    background: transparent;
}

.mobile-nav__go {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px 20px;
    border: 1px solid var(--color-primary);
    border-radius: 42px;
}

.mobile-nav__go img {
    display: block;
    width: 10px;
    height: 7px;
}

.mobile-nav__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 20px 20px max(16px, env(safe-area-inset-bottom, 0px));
    background: #f7f8f7;
}

.mobile-nav__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 17px 24px;
    border-radius: 60px;
    font-size: 13px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.mobile-nav__cta img {
    display: block;
    width: 18px;
    height: 12px;
    flex-shrink: 0;
}

.mobile-nav__cta--primary {
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
}

.mobile-nav__cta--secondary {
    background: #fff;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.mobile-nav__cta:hover,
.mobile-nav__cta:focus-visible {
    opacity: 0.85;
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* ===========================
   Common Section Styles
   =========================== */
.section-inner {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 80px var(--side-padding);
}

/* 下層KV・スティッキーアンカー：上下paddingのみ打ち消し（左右は維持） */
.section-inner[class*="-page__inner"],
.section-inner[class*="-anchors__inner"],
.section-inner.form-page__inner,
.section-inner.staff-archive__inner,
.section-inner.works-archive__inner,
.section-inner.works-single__inner,
.section-inner.staff-hero__inner,
.section-inner.entry-page__inner {
    padding-top: 0;
    padding-bottom: 0;
}

.section-label {
    font-family: var(--font-en);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 1%;
    line-height: 100%;
    color: var(--color-text-light);
    margin-bottom: 8px;
    display: block;
}

.section-heading {
    font-size: clamp(28px, 3vw, 42px);
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin-bottom: 24px;
}

.btn-more {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    color: var(--color-text);
    transition: opacity 0.3s;
}

.btn-more:hover {
    opacity: 0.6;
}

.btn-more-circle {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
}

.btn-more-circle__label {
    display: inline-block;
    transform-origin: center center;
}

.btn-more-circle .circle-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 27px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 100vmax;
}

.btn-more-circle .circle-arrow svg {
    display: block;
}

/* 矢印ループ（Style Edge .Service__btn 相当。PCホバーのみ） */
.arrow-loop {
    position: relative;
    display: block;
    overflow: hidden;
    line-height: 0;
}

.arrow-loop svg,
.arrow-loop img {
    display: block;
}

.arrow-loop svg:last-child,
.arrow-loop img:last-child {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateX(calc(-100% - 10px));
}

@media (hover: hover) and (min-width: 769px) {
    .btn-more-circle__label {
        transition: transform 0.3s ease;
    }

    .btn-more-circle:hover .btn-more-circle__label {
        transform: scale(var(--hover-label-scale));
    }

    .arrow-loop svg,
    .arrow-loop img {
        transition: transform 0.5s;
    }

    :is(a, button):not(.swiper-button-disabled):hover .arrow-loop svg:first-child,
    :is(a, button):not(.swiper-button-disabled):hover .arrow-loop img:first-child {
        transform: translateX(calc(100% + 10px));
    }

    :is(a, button):not(.swiper-button-disabled):hover .arrow-loop svg:last-child,
    :is(a, button):not(.swiper-button-disabled):hover .arrow-loop img:last-child {
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-more-circle,
    .btn-more-circle__label,
    .arrow-loop svg,
    .arrow-loop img {
        transition: none;
    }

    .btn-more-circle:hover .btn-more-circle__label,
    :is(a, button):not(.swiper-button-disabled):hover .arrow-loop svg:first-child,
    :is(a, button):not(.swiper-button-disabled):hover .arrow-loop img:first-child {
        transform: none;
    }

    .arrow-loop svg:last-child,
    .arrow-loop img:last-child,
    :is(a, button):hover .arrow-loop svg:last-child,
    :is(a, button):hover .arrow-loop img:last-child {
        transform: translateX(calc(-100% - 10px));
    }
}

.btn-more-circle--white {
    color: #ffffff;
}

.btn-more-circle--white .circle-arrow {
    background: #ffffff;
    color: var(--color-primary);
}

.section-label--white {
    color: var(--color-primary) !important;
    font-weight: var(--font-weight-medium);
}

@media (max-width: 768px) {
    .section-inner {
        padding: 64px var(--side-padding);
    }

    .section-inner[class*="-page__inner"],
    .section-inner[class*="-anchors__inner"],
    .section-inner.form-page__inner,
    .section-inner.staff-archive__inner,
    .section-inner.works-archive__inner,
    .section-inner.works-single__inner,
    .section-inner.staff-hero__inner {
        padding-top: 0;
        padding-bottom: 0;
    }

}

/* ===========================
   Footer
   =========================== */
.site-breadcrumb {
    background: #fff;
    border-top: 1px solid #f5f5f5;
}

.site-breadcrumb__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 14px var(--side-padding);
    font-size: 12px;
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #7bbba1;
}

.site-breadcrumb__inner a {
    color: var(--color-primary);
}

.site-breadcrumb__chevron {
    display: block;
    width: 4px;
    height: 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .site-breadcrumb__inner {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

.site-footer {
    background: #404040;
    color: #ffffff;
    padding: 66px 0 0;
}

/* PC Layout */
.footer-inner {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--side-padding) 66px;
    border-bottom: none;
}

.footer-info {
    width: 35%;
}

.footer-right {
    width: 49.4%;
    display: flex;
    flex-direction: column;
    /* CONTACT を左列（会社情報）の下端に揃える */
    justify-content: space-between;
}

/* inline-block だと行の高さぶん下に隙間が出るため block */
.footer-logo-link {
    display: block;
    width: fit-content;
    margin-bottom: 98px;
}

.footer-logo-img {
    display: block;
    width: 185px;
    height: 46px;
    background-color: #ffffff;
    -webkit-mask-image: url('../images/logo_footer.svg');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-image: url('../images/logo_footer.svg');
    mask-size: contain;
    mask-repeat: no-repeat;
}

.footer-company-details .company-name {
    font-size: 14px;
    line-height: 155%;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    margin-bottom: 10px;
    letter-spacing: 2%;
}

.footer-company-details .company-address {
    font-size: 12px;
    line-height: 155%;
    letter-spacing: 2%;
    color: var(--color-text-gray);
}

.footer-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0;
}

.footer-col__title {
    margin-top: 0;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    letter-spacing: -2%;
    line-height: 120%;
    margin-bottom: 20px;
    font-family: var(--font-main-medium);
}

.footer-col a {
    display: block;
    font-size: 12px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 120%;
    color: var(--color-text-gray);
    letter-spacing: -2%;
    margin-bottom: 14px;
    transition: color 0.3s, opacity 0.3s;
}

.footer-col a:hover {
    color: #ffffff;
    opacity: 1;
}

/* Footer Contact Section */
.footer-contact {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 40px;
}

.footer-contact-label {
    display: block;
    font-family: var(--font-en);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    line-height: 100%;
    letter-spacing: 1%;
    margin-bottom: 24px;
}

.footer-contact-desc {
    font-size: 20px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    letter-spacing: -2%;
    line-height: 130%;
}

.btn-contact-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 33px;
    background: #ffffff;
    color: var(--color-primary);
    border-radius: 30px;
    transition: background 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.btn-contact-arrow svg {
    display: block;
}

/* Footer Bottom (Privacy & Copyright) */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 20px var(--side-padding);
}

/* プライバシーマークとリンク（Figma 1820:17959 / 1969:1963） */
.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-pmark {
    display: block;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    transition: opacity 0.3s;
}

/* SPでは薄くしない（PCのみ） */
@media (min-width: 1025px) {
    .footer-pmark:hover {
        opacity: 0.7;
    }
}

.footer-pmark img {
    display: block;
    width: 100%;
    height: 100%;
}

.footer-privacy {
    font-size: 12px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 120%;
    letter-spacing: -2%;
    color: var(--color-text-gray);
    transition: color 0.3s;
}

.footer-privacy:hover {
    color: #ffffff;
}

.footer-copyright {
    font-size: 11px;
    color: #9a9996;
    font-family: var(--font-en);
    letter-spacing: 0.015em;
    line-height: 1.85;
    padding: 0;
    margin: 0;
}

/* Footer Responsive */
@media (max-width: 1024px) {
    .site-footer {
        padding: 64px 0 0;
    }
    .footer-inner {
        flex-direction: column;
        padding: 0 var(--side-padding) 40px;
    }
    .footer-info {
        width: 100%;
        margin-bottom: 64px;
    }
    .footer-logo-link {
        display: flex;
        justify-content: flex-start;
        margin-bottom: 40px;
    }
    .footer-right {
        width: 100%;
    }
    .footer-logo-img {
        width: 175px;
        height: 44px;
        -webkit-mask-image: url('../images/logo_footer-sp.svg');
        mask-image: url('../images/logo_footer-sp.svg');
    }
    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 15px;
        margin-bottom: 0;
    }
    .footer-col a {
        margin-bottom: 14px;
    }
    .footer-contact {
        padding-top: 50px;
        flex-direction: row;
        align-items: end;
        gap: 32px;
    }
    .footer-contact-desc {
        font-size: 20px;
        line-height: 130%;
    }
    .btn-contact-arrow {
        width: 62px;
        height: 29px;
    }
    .footer-bottom-inner {
        flex-direction: column;
        gap: 16px;
        padding: 20px var(--side-padding);
    }
    .footer-legal {
        align-self: center;
        gap: 10px;
    }
}

/* 関連ページ（共通・Figma 1634:7222 / 2014:7532） */
.related-pages {
    background: #f1f9f6;
    border-top: 1px solid rgba(5, 126, 76, 0.08);
}

.related-pages .section-inner {
    padding-top: 64px;
    padding-bottom: 64px;
}

.related-pages__head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.related-pages .section-label {
    margin: 0;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--color-primary);
}

.related-pages__title {
    margin: 0;
    font-size: 16px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #222;
}

.related-pages__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 32px;
}

.related-pages__card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    color: inherit;
}

.related-pages__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    align-self: stretch;
    min-width: 0;
}

.related-pages__copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.related-pages__en {
    margin: 0;
    padding-left: 2px;
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--color-primary);
}

.related-pages__name {
    margin: 0;
    font-size: 18px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #222;
}

.related-pages__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px 20px;
    background: var(--color-primary);
    border-radius: 42px;
    line-height: 0;
}

.related-pages__btn img {
    display: block;
    width: 10px;
    height: 7px;
}

.related-pages__media {
    flex: 0 0 163px;
    width: 163px;
    height: 91px;
    border-radius: 8px;
    overflow: hidden;
}

.related-pages__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

@media (hover: hover) and (min-width: 769px) {
    .related-pages__card:hover .related-pages__media img {
        transform: scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .related-pages__media img,
    .related-pages__btn img {
        transition: none;
    }
}

@media (max-width: 1024px) {
    .related-pages__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .related-pages .section-inner {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .related-pages__grid {
        gap: 4px;
    }

    .related-pages__card {
        padding: 20px;
    }

    .related-pages__body {
        gap: 24px;
        justify-content: flex-start;
    }

    .related-pages__media {
        flex-basis: 113px;
        width: 113px;
        height: 92px;
    }
}

/* ===========================
   固定ヘッダー下のオフセット（下層の共通）
   =========================== */
.has-header-offset {
    padding-top: calc(var(--header-height) + 40px);
}

@media (max-width: 768px) {
    .has-header-offset {
        padding-top: calc(var(--header-height) + 24px);
    }
}

/* ===========================
   通常投稿（ニュース記事の骨格）
   =========================== */
.entry-page {
    padding-bottom: 80px;
}

.section-inner.entry-page__inner {
    max-width: 800px;
}

.entry-page__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #8c8c8c;
    margin-bottom: 40px;
}

.entry-page__breadcrumb a {
    color: inherit;
}

.entry {
    text-align: left;
}

.entry-header {
    margin-bottom: 40px;
}

.entry-header .entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text);
}

.entry-cat {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--color-text);
    border-radius: 2px;
    font-size: 12px;
    line-height: 1.5;
}

.entry-date {
    font-variant-numeric: tabular-nums;
}

.entry-tags {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.entry-tags__icon {
    display: block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.entry-title {
    font-size: clamp(28px, 3.2vw, 40px);
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin: 0;
}

.entry-lead {
    margin: 12px 0 0;
    font-size: clamp(16px, 1.8vw, 20px);
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.6;
}

.entry-thumb {
    margin: 0 0 40px;
}

.entry-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gutenberg / クラシック共通: ブロック間の余白を揃える */
.entry-content > * {
    margin-block-start: 1.5em;
    margin-block-end: 0;
}

.entry-content > *:first-child {
    margin-block-start: 0;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin-block-start: 2em;
}

.entry-content h1 { font-size: 1.75em; }
.entry-content h2 { font-size: 1.5em; }
.entry-content h3 { font-size: 1.25em; }
.entry-content h4 { font-size: 1.1em; }

.entry-content p,
.entry-content li {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}

.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content a:hover {
    opacity: 0.7;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li + li {
    margin-top: 0.4em;
}

.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
    margin-top: 0.4em;
}

.entry-content blockquote {
    margin-inline: 0;
    padding: 8px 0 8px 20px;
    border-left: 3px solid var(--color-primary);
    color: #4a4a4a;
}

.entry-content figure {
    margin-inline: 0;
}

.entry-content figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: #8c8c8c;
}

/* Gutenberg 配置（なし＝カラム幅 / 左・右は縮小して寄せ / 中央） */
.entry-content .alignleft {
    float: left;
    max-width: 360px;
    margin: 0 1.5em 1em 0;
}

.entry-content .alignright {
    float: right;
    max-width: 360px;
    margin: 0 0 1em 1.5em;
}

.entry-content .aligncenter {
    display: block;
    float: none;
    margin-left: auto;
    margin-right: auto;
}

.entry-content::after {
    content: "";
    display: table;
    clear: both;
}

/* YouTube等: なし＝100% / 左・中央・右＝85%で位置だけ変える（floatしないので下の要素は回り込まない） */
.entry-content .wp-block-embed {
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.entry-content .wp-block-embed.alignleft,
.entry-content .wp-block-embed.alignright,
.entry-content .wp-block-embed.aligncenter {
    width: 85%;
    max-width: 85%;
}

.entry-content .wp-block-embed.alignleft {
    margin-left: 0;
    margin-right: auto;
}

.entry-content .wp-block-embed.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.entry-content .wp-block-embed.alignright {
    margin-left: auto;
    margin-right: 0;
}

.entry-content .wp-block-embed__wrapper {
    position: relative;
}

.entry-content .wp-block-embed iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: 100%;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--color-border);
    padding: 10px 12px;
    text-align: left;
}

.entry-content details {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.entry-content summary {
    cursor: pointer;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
}

.entry-content pre,
.entry-content code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.entry-content pre {
    overflow-x: auto;
    padding: 16px;
    background: #f5f5f4;
}

.entry-content .wp-block-image,
.entry-content .alignwide,
.entry-content .alignfull {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.entry-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.entry-list .entry-meta {
    margin: 0 0 8px;
    font-size: 13px;
    color: #8c8c8c;
}

.entry-list__item-title {
    font-size: 22px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin: 0 0 8px;
}

.entry-list__item-title a:hover {
    color: var(--color-primary);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.entry-nav {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.entry-nav .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.entry-nav .nav-previous,
.entry-nav .nav-next {
    min-width: 0;
    max-width: 48%;
}

.entry-nav .nav-previous {
    margin-right: auto;
    text-align: left;
}

.entry-nav .nav-next {
    margin-left: auto;
    text-align: right;
}

.entry-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: inherit;
}

.entry-nav a:hover {
    color: var(--color-primary);
}

.entry-nav__label {
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.06em;
    color: #8c8c8c;
}

.entry-nav__title {
    font-size: 14px;
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
}

/* ===========================
   ニュース一覧（テキスト1行）
   =========================== */
.news-page {
    padding-bottom: 80px;
}

.news-page__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #8c8c8c;
    margin-bottom: 40px;
}

.news-page__breadcrumb a {
    color: inherit;
}

.news-page__header {
    margin-bottom: 40px;
}

.news-page__title {
    font-size: clamp(28px, 3.2vw, 40px);
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
    line-height: 1.3;
    margin: 8px 0 0;
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--color-border);
}

.news-list__item {
    border-bottom: 1px solid var(--color-border);
}

.news-list__item a {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 16px 0;
    color: inherit;
}

.news-list__date {
    font-variant-numeric: tabular-nums;
    color: #8c8c8c;
    flex-shrink: 0;
}

.news-list__cat {
    color: #8c8c8c;
    flex-shrink: 0;
}

.news-list__title {
    color: var(--color-text);
}

.news-list__item a:hover .news-list__title {
    color: var(--color-primary);
}

.news-page__pagination {
    margin-top: 40px;
}

.news-page__pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-page__pagination .page-numbers a,
.news-page__pagination .page-numbers span {
    color: inherit;
}

.news-page__pagination .page-numbers .current {
    color: var(--color-primary);
    font-family: var(--font-main-medium);
    font-weight: var(--font-weight-medium);
}

.news-page__pagination .page-numbers a:hover {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .news-list__item a {
        padding: 14px 0;
        font-size: 14px;
    }
}

/* ===========================
   見出し: 行ごとに下から迫り上がる（.js-heading-fadein、全ページ共通。行分けと発火は base.js）
   =========================== */
.js-heading-fadein .heading-fadein__wrap {
    display: block;
    /* 迫り上がりは下端だけで隠す。左右を切ると、行末の「プ」の丸など枠からわずかに出る字形が欠ける */
    clip-path: inset(-0.1em -0.5em 0 -0.5em);
    padding-bottom: 0.2em;
    margin-bottom: -0.2em;
}

.js-heading-fadein .heading-fadein__line {
    display: inline-block;
    /* 測った行が実際の表示で枠より広くなったとき（Safari・フォントの読み込み差など）は、切れずに折り返す */
    max-width: 100%;
    white-space: normal;
    translate: 0 calc(100% + 0.2em);
    transition: translate 1.4s cubic-bezier(0.15, 0.85, 0.3, 1);
}

.js-heading-fadein.is-visible .heading-fadein__line {
    translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
    .js-heading-fadein .heading-fadein__line {
        translate: 0 0;
        transition: none;
    }
}
