:root {
    --accent: #37c978;
    --accent-strong: #18a75f;
    --accent-weak: #2b7a58;
    --accent-bg: #e9fbf1;
    --accent-text: #1e4d3b;
    --ink: #222;
    --muted: #6e6e6e;
    --card: #fff;
    --line: rgba(0,0,0,.08);
}
html, body {
    font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,"Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
    color: var(--ink);
    background: #faf7f2;
    line-height: 1.8;
}

/* ===== ヘッダー（ロゴ入り）===== */
/* ヘッダーをページ上部に固定（他ページと同じ動きに） */
.sub-header.brand-header {
    position: sticky;
    top: 0;
    z-index: 500;
    height: 110px;
}

.brand-header {
    background: linear-gradient(180deg, #fff 0%, #f8fffb 100%);
    border-bottom: 1px solid var(--line);
}
.brand {
    max-width: 1100px;
    margin: 0 50px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}
.brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--accent-bg);
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
.brand-text {
    line-height: 1.3;
}
.brand-name {
    font-size: clamp(1.4rem, 2.2vw + .8rem, 2rem);
    font-weight: 500;
    color: var(--accent-strong);
    letter-spacing: .02em;
}
.brand-tagline {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .95rem;
}
/* ===== Fullscreen Global Nav ===== */
.global-nav{
    position: fixed;
    inset: 0;
    z-index: 300;                          /* ヘッダーより後ろ */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fffb;             /* アクセントカラーで全面 */
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .22s ease;
}
.nav-toggle:checked ~ .global-nav{ 
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

/* 背景（押すと閉じる） */
.nav-backdrop{
    position:absolute;
    inset:0;
    background: transparent;
    display:block;
}

/* パネル本体 */
.global-panel{
    position: relative;
    width: 100%;
    max-width: var(--container, 1100px);
    margin: 0 auto;
    padding: 80px 20px 40px;
    background: none;
    border: none;
    box-shadow: none;
}
/* オーバーレイ内のメニュー全体 */
.global-menu {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* MENU / SNS 見出し */
.global-heading {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* SNS 用にちょっと余白を変えたい場合 */
.global-heading--sub {
  margin-top: 8px;
}

/* ===== メニュー一覧 ===== */
.global-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;   /* 行間, 列の間隔 */
}

.global-list li {
  margin: 0;
}

.global-list a {
    position: relative;
    display: inline-block;
    font-size: clamp(18px, 2.3vw, 22px);
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--accent-strong);
    text-decoration: none;
    opacity: 1;
    padding-bottom: 4px;
    transition: transform .25s ease;
}

/* ホバーは今のままの雰囲気をキープ */
.global-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;                         /* ← 最初は非表示 */
    background: var(--accent-strong);
    transition: width .25s ease;      /* ← スッと伸びるアニメーション */
}
/* ホバーした時だけ下線が伸びる */
.global-list a:hover::after {
  width: 100%;                      /* ← 文字の長さぴったりで完成 */
}

.global-list a:hover {
  transform: translateX(4px);
  opacity: 1;                       /* ← 文字は消えない */
  color: var(--accent-strong);
}

/* ===== SNS リンク ===== */
.global-sns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;            /* ← 横並び */
  gap: 16px 24px;
}

.global-sns a {
  position: relative;        /* 下線のために必須 */
  display: inline-block;
  color: var(--accent-strong);               /* 常に白 */
  font-size: 0.9rem;
  text-decoration: none;
  padding-bottom: 3px;       /* 下線の余白 */
  opacity: 1;
  transition: transform .25s ease;
}

.global-sns a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent-strong);
  transition: width .25s ease;
}
/* ホバー：文字はそのまま、下線だけ伸びる、少し右に動く */
.global-sns a:hover {
  color: var(--accent-strong);      /* 文字色を固定 */
  opacity: 1;       /* 消えない */
  transform: translateX(3px);
}

.global-sns a:hover::after {
  width: 100%;      /* ← ここで文字幅ぴったりの下線が出る！ */
}


@media (max-width: 640px) {
  .global-menu {
    padding: 56px 24px 40px;
    gap: 24px;
  }

  .global-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ===== ハンバーガーアイコン（3本線→×） ===== */
/* ボタン本体：幅30px固定 */
.sub-header .menu{
  position: absolute;        /* ヘッダーの中で絶対配置 */
  top: 50%;
  right: 50px;               /* 画面右からの余白 */
  transform: translateY(-50%);
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
  margin-right: 0;           /* もとの余白はリセット */
}

/* 3本線のベース */
.sub-header .menu .bar{
  display: block;
  height: 2px;
  width: 30px;              /* 基本の長さ */
  background: var(--accent-strong);         /* 黒 */
  border-radius: 999px;
  transition:
    width .25s ease,
    transform .25s ease,
    opacity .2s ease;
  transform-origin: center;
}

/* 最初は長さバラバラ */
.sub-header .menu .bar:nth-child(1){ width: 30px; }  /* 一番長い */
.sub-header .menu .bar:nth-child(2){ width: 22px; }
.sub-header .menu .bar:nth-child(3){ width: 16px; }  /* 一番短い */

.sub-header .menu .bar + .bar{
  margin-top: 6px;
}

/* ▼ メニュー閉じているときだけ：ホバーでニュッと同じ長さになる */
.nav-toggle:not(:checked) ~ .sub-header .menu:hover .bar{
  width: 30px;
}

/* ===== チェックされたら綺麗な「×」に変形 ===== */

/* チェック時は3本を中央に寄せる */
.nav-toggle:checked ~ .sub-header .menu{
  align-items: center;
}

/* 3本とも中央に重ねる（30px のまま） */
.nav-toggle:checked ~ .sub-header .menu .bar{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  margin-top: 0;
  transform-origin: center;
}

/* 上の線： ／  */
.nav-toggle:checked ~ .sub-header .menu .bar:nth-child(1){
  transform: translate(-50%, -50%) rotate(45deg);
}

/* 真ん中の線はフェードアウト */
.nav-toggle:checked ~ .sub-header .menu .bar:nth-child(2){
  opacity: 0;
}

/* 下の線： ＼  */
.nav-toggle:checked ~ .sub-header .menu .bar:nth-child(3){
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* 開いているときはホバーしても形が崩れないように */
.nav-toggle:checked ~ .sub-header .menu:hover .bar{
  width: 30px;
}

/* 小さめ画面でのタイポサイズ調整 */
@media (max-width: 520px){
  .global-list a{ font-size: clamp(18px, 5.5vw, 22px); }
}

/*（任意）オーバーレイ表示中の背景スクロール抑止：対応ブラウザ向け */
@supports selector(:has(*)) {
  body:has(#nav-toggle:checked){ overflow: hidden; }
}
/* ===== ページタイトル ===== */
.page-title {
    max-width: 1100px;
    margin: 28px auto 36px;
    padding: 32px 28px 26px;
    background: linear-gradient(135deg, #e9fbf1 0%, #fdf7ec 100%);
    border-radius: 20px;
    border: none;
    box-shadow: 0 18px 40px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}
/* 背景にふわっとしたアクセント */
.page-title::before {
    content: "";
    position: absolute;
    right: -40px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at center,
                rgba(55, 201, 120, 0.20),
                rgba(55, 201, 120, 0));
    opacity: 0.9;
}
.page-title h1 {
    position: relative;
    display: inline-block;
    margin: 0 0 10px;
    padding-left: 7px;
    font-size: clamp(1.6rem, 2.2vw, 2rem);
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--accent-text);
}
.page-title p {
    position: relative;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    padding-left: 15px
}

/* ===== セクション共通 ===== */
section h2 {
    max-width: 1100px;
    margin: 32px auto 12px;
    padding: 0 16px;
    border-left: 6px solid var(--accent);
    font-size: 1.5rem;
    position: relative;
}

/* ===== 施工内容 ===== */
.works {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}
.works p {
    color: var(--muted);
    margin: 6px 0 14px;
}
.works-list {
    background: var(--card);
    border: 1px solid var(line);
    padding: 12px 25px;
    border-radius: 10px;
    padding: 10px auto 10px;
}

/* ===== Before / After ===== */
.before-after {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 4px;
}
.before-after > p {
    color: var(--muted);
    margin: 6px 0 18px;
}
.ba-item {
    margin-bottom: 28px;
}
.ba-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 16px;
}
.ba-image {
    position: relative;
    width: 100%;
    max-width: none;
}
.ba-image .before img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}
.ba-image .after {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ba-image .after img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}
.ba-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}
.ba-image .label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.ba-caption {
    margin-top: .6rem;
}

/* ===== お見積り ===== */
.estimate {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 24px;
}
.estimate ol {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 30px;
    margin: 8px 10px 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.05);
}
.estimate li {
    margin: .45rem 0;
}
.estimate h2 {
    margin-top: 36px;
}
.estimate-note {
    margin-left: 20px;
}

/* ===== お問い合わせ ===== */
.contact {
    max-width: 1100px;
    margin: 0 auto 40px;
    padding: 0 16px;
}
.contact-person {
    margin: 10px 0 20px;
    font-size: 0.95rem;
    color: #222;  
}
/* 右側の名前＋資格 */
.contact-name {
    font-weight: 600;
}

/* 資格はサブ情報っぽく */
.contact-role {
    color: #666;
    font-weight: 400;
}
.contact .contact-info {
    list-style: none;
    padding: 0;
    margin: 0 auto 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact .contact-info li {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 10px;
    color: var(--ink);
    font-weight: 600;
}
.contact-info a {
    text-decoration: none;
}
.contact-info a:hover {
    text-decoration: underline;
}
/* スマホでは少しだけ全体幅に合わせる */
@media (max-width: 600px) {
  .contact-person {
      flex-direction: column;
        align-items: flex-start;
        gap: 4px;
  }
}
/* ===== 画像の角丸（既存 .cardに合わせて） ===== */
img {
    border-radius: 10px;
}

/* ===== フッター ===== */
.footer-bottom {
    text-align: center;
    padding: 12px 0 20px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}
.ft-copy{
  max-width: 1100px;
  margin: 16px auto 0;
  border-top: 1px solid rgba(255,255,255,.25);
  padding-top: 12px;
  text-align: center;
  font-size: .85rem;
  opacity: .85;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px){
  .brand { grid-template-columns: 56px 1fr; }
  .brand-logo{ width:56px; height:56px; }
  .page-title{ padding: 28px 16px 20px; }
  .ba-flex { grid-template-columns: 1fr;}
  .ba-image{ max-width: 100%; }
}
/* =========================================================
   スマホ時のヘッダー調整（ロゴ＋事業名を1行に収める）
========================================================= */
@media (max-width: 600px) {

/* ヘッダー高さは可変にして余裕を持たせる */
  .sub-header.brand-header {
    height: auto;
    min-height: 72px;
  }

  /* ロゴ＋テキストを横並び、大きめに */
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 12px;          /* ちょい外側を詰める */
    padding-right: 76px;     /* ← ここでハンバーガー分のスペースを確保 */
  }

  /* ロゴは少し大きくして存在感UP */
  .brand-logo {
    width: 52px;
    height: 52px;
  }

  /* テキストは折り返さない（2行に分かれてもOK） */
  .brand-text {
    white-space: nowrap;
  }

  /* 事業名を大きめに */
  .brand-name {
    font-size: 1.45rem;      /* ← ここでしっかり大きく */
    line-height: 1.2;
  }

  /* サブタイトルも少しだけ大きく */
  .brand-tagline {
    font-size: 0.9rem;
  }

  /* ハンバーガーは少し内側に寄せるだけ */
  .sub-header .menu {
    right: 16px;
  }
}
/* =========================================================
   スマホ時：ページタイトルを必ず1行にする
========================================================= */
@media (max-width: 600px) {
  .page-title h1 {
    font-size: 1.25rem;     /* 少し小さく */
    white-space: nowrap;    /* ← 1行に強制 */
  }
}
