:root {
  --navy: #1c2649;
  --ink: #1c2649;
  --paper: #f8fbff;
  --cream: #fbebc6;
  --amber: #fcb900;
  --orange: #ef912c;
  --primary-blue: #408bd1;
  --primary-blue-dark: #336fa7;
  --line: #d5dbe8;
  --measure: 1120px;
  --ver_page_top_button_url: url("/static/images/to-top-btn-icon.svg");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("/static/images/bg/71429e2a21c0a72b2ab4940edab3430f.webp");
  background-position: left top;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: Lato, "Noto Sans JP", "YuGothic", "Yu Gothic", sans-serif;
  line-height: 1.8;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
.container { width: min(var(--measure), calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(860px, calc(100% - 32px)); }

.skip-link {
  position: absolute;
  left: 16px;
  top: 0;
  transform: translateY(-120%);
  background: #fff;
  color: var(--navy);
  padding: 8px 12px;
  z-index: 1000;
}
.skip-link:focus { transform: none; }
.contact-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ヘッダー（透過 ＆ スクロール追従） */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: transparent;
  border-bottom: none;
  box-shadow: none;
  transition: background-color 0.3s ease, padding 0.3s ease;
}
body.header_scrolled .site-header {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding-bottom: 6px;
  border-bottom: none;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
}
.logo { min-width: 0; }
.logo img { width: 168px; max-width: 100%; height: auto; display: block; }
.site-header__inner > * { min-width: 0; }
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle__bar {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.nav-toggle__bar:nth-child(1) { top: 13px; }
.nav-toggle__bar:nth-child(2) { top: 21px; }
.nav-toggle__bar:nth-child(3) { top: 29px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.site-nav ul {
  display: flex;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: #ffffff;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 1px;
  text-decoration: none;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s ease, border-bottom 0.2s ease;
  padding-bottom: 4px;
}
.site-nav a:hover { opacity: 0.8; }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--amber); }

/* メインビジュアル（ヒーロー） */
.hero {
  position: relative;
  height: 95vh;
  min-height: 520px;
  background: var(--navy);
  overflow: hidden;
}
.hero__slide { position: absolute; inset: 0; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__slide--second { animation: hero-fade 10s ease-in-out infinite; }
@keyframes hero-fade {
  0%, 40% { opacity: 0; }
  50%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

/* 代表挨拶 */
.greeting {
  position: relative;
  overflow: hidden;
  padding: 80px 16px;
}
.greeting__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.greeting__panel {
  position: relative;
  width: min(860px, 100%);
  margin-inline: auto;
  padding: 40px 100px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.greeting__sign {
  text-align: right;
  font-size: 1.15rem;
  margin-top: 24px;
}

/* 共通セクション */
.section { padding: 64px 0; }
.section-title {
  margin: 0 0 36px;
  color: var(--navy);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: .12em;
}
.section-title span {
  display: flex;
  align-items: center;
  font-size: 60px;
  line-height: 60px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: italic;
  letter-spacing: normal;
  background: linear-gradient(to bottom, #FCB900, #ef912c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.section-title span::before {
  content: '';
  display: inline-block;
  margin-right: 20px;
  width: 40px;
  height: 1px;
  background-color: #FCB900;
}
.section-more { text-align: right; margin-top: 28px; }

/* ボタン */
.button, button {
  display: inline-block;
  border: 0;
  border-radius: 50px;
  background: var(--amber);
  color: var(--navy);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.button:hover { opacity: 0.9; }
.button--ghost {
  background: transparent;
  border: 1px solid var(--primary-blue);
  color: var(--primary-blue);
}
.button--ghost:hover {
  background: var(--primary-blue);
  color: #fff;
}
fieldset:disabled button, button[aria-disabled="true"] { opacity: .65; }

/* 業務内容（PCは3列、スマホは項目ごとに折りたたみ） */
.business-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.business-list li {
  background: var(--cream);
  padding: 14px 18px;
  border: 2px solid #000000;
  box-shadow: 5px 5px 0px -2px rgb(255, 255, 255), 5px 5px rgb(0, 0, 0);
}
.business-list summary { list-style: none; cursor: default; }
.business-list summary::-webkit-details-marker { display: none; }
.business-list h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}
.business-list h3 span {
  font-family: 'Cormorant Infant', serif;
  font-size: 1.7rem;
  line-height: 1.2;
  color: #9a6b00;
  font-weight: 600;
}
.business-list p { margin: 0; font-size: 0.9rem; line-height: 1.7; }

/* 施工実績カード */
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.works-card {
  position: relative;
  aspect-ratio: 7 / 5;
  overflow: hidden;
  background: var(--navy);
  border-radius: 2px;
}
.works-card__link {
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
}
.works-card__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
}
.works-card:hover .works-card__link img,
.works-card:focus-within .works-card__link img {
  filter: brightness(0.7);
}
.works-card__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.works-card__title {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 600;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}
.works-card__details {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}
.works-card:hover .works-card__title,
.works-card:focus-within .works-card__title {
  opacity: 1;
  transform: translate(-50%, -10%);
}
.works-card:hover .works-card__details,
.works-card:focus-within .works-card__details {
  opacity: 1;
  transform: translate(-50%, 10%);
}

/* 施工事例カテゴリフィルター */
.achievements-btn {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 32px 0 36px;
}
.achievements-btn a {
  border: 1px solid var(--primary-blue);
  border-radius: 50px;
  padding: 8px 22px;
  text-decoration: none;
  color: var(--primary-blue);
  font-weight: 500;
  background: #fff;
  transition: all 0.2s ease;
}
.achievements-btn a:hover {
  background: var(--primary-blue);
  color: #fff;
}
.achievements-btn a[aria-current="page"] {
  background: var(--primary-blue);
  color: #fff;
}
html[data-achievement-category="exterior-repair"] .works-card:not([data-category="exterior-repair"]),
html[data-achievement-category="waterproofing"] .works-card:not([data-category="waterproofing"]),
html[data-achievement-category="leak-repair"] .works-card:not([data-category="leak-repair"]),
html[data-achievement-category="interior-renovation"] .works-card:not([data-category="interior-renovation"]),
html[data-achievement-category="ceiling-repair"] .works-card:not([data-category="ceiling-repair"]),
html[data-achievement-category="others"] .works-card:not([data-category="others"]) { display: none; }

/* 施工事例年度セクション */
.achievements-year-section {
  margin-bottom: 48px;
}
.achievements-year-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-blue);
  display: inline-block;
  letter-spacing: 0.05em;
}

/* 下層ページ上部帯ヘッダー */
.page-hero {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: calc(84px + 16px) 16px 28px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.page-hero h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 8px;
}
.page-hero p {
  margin: 6px 0 0;
  letter-spacing: 2px;
  font-size: 0.95rem;
}

/* 施工事例詳細のパンくずリスト（page-hero がないためヘッダー分の高さを確保） */
.breadcrumb {
  padding: calc(84px + 16px) 0 16px;
  font-size: 0.95rem;
}
.breadcrumb .container { display: flex; flex-wrap: wrap; gap: 8px; }
.project { padding-bottom: 64px; }
.project__category {
  display: inline-block;
  background: var(--primary-blue);
  color: #fff;
  padding: 4px 12px;
  font-size: 0.85rem;
  border-radius: 4px;
  margin: 24px 0 12px;
}
.project__hero { width: 100%; max-height: 800px; object-fit: cover; display: block; }

/* テーブル（会社概要・施工事例詳細） */
.profile {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  background: #fff;
}
.profile th, .profile td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.profile th {
  width: 9.5em;
  font-weight: 600;
  color: var(--navy);
}
.profile__line { display: block; }
.profile__label { display: inline-block; min-width: 6.5em; margin-right: .5em; color: #5b6580; font-size: .9em; }
.profile__note { font-size: .9em; color: #5b6580; }
.profile a { color: inherit; }
.tag-list, .qualified-list { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.tag-list li { background: var(--cream); border-radius: 4px; padding: 0 10px; line-height: 1.9; }
.qualified-list { flex-direction: column; gap: 2px; max-width: 26em; }
.qualified-list li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dotted var(--line); }
.project .profile {
  border: 1px solid #ddd;
}
.project .profile th {
  background: #f9f9f9;
  border: 1px solid #ddd;
  width: 30%;
}
.project .profile td {
  border: 1px solid #ddd;
}
.map {
  width: 100%;
  height: 480px;
  border: 0;
  margin-bottom: 48px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* お問い合わせフォーム */
.contact-lead { font-size: 1.05rem; letter-spacing: 1.6px; text-align: center; }
.contact-lead, .contact-panel, .privacy { margin: 32px auto; }
.contact-panel {
  max-width: 640px;
  padding: 28px;
  background: #fafafa;
  border: 1px solid #ddd;
}
.contact-panel h2 { margin-top: 0; font-size: 1.3rem; }
.contact-panel input:not([type="checkbox"]), .contact-panel textarea {
  width: 100%;
  padding: 10px;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-sizing: border-box;
}
.contact-panel fieldset { border: 0; margin: 0; padding: 0; }
.contact-panel input:not([type="checkbox"])[aria-invalid="true"], .contact-panel textarea[aria-invalid="true"] { border-color: #c62828; background: #fff5f5; outline: 2px solid rgba(198, 40, 40, .25); }
.contact-panel input[type="checkbox"][aria-invalid="true"] { outline: 2px solid #c62828; outline-offset: 2px; }
.field-error { display: block; margin-top: 4px; color: #c62828; font-size: .9rem; line-height: 1.5; }
.field-error:empty { display: none; }
fieldset:disabled { opacity: .6; }
dialog { max-width: 440px; border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
.privacy {
  max-width: 800px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  line-height: 1.8;
}

/* 新着情報 / Instagram */
.news-instagram { text-align: center; }
.instagram-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.instagram-feed img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.instagram-empty { grid-column: 1 / -1; }

/* ページトップへ戻るボタン */
.page_top_btn {
  position: fixed;
  right: 2%;
  bottom: 3%;
  z-index: 99999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary-blue);
  background-image: var(--ver_page_top_button_url);
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: center;
  color: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}
.page_top_btn.is-visible {
  opacity: 1;
  visibility: visible;
}
.page_top_btn:hover {
  transform: translateY(-3px);
  background-color: var(--primary-blue-dark);
}

/* フッター */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 48px 0 24px;
  border-top: none;
}
.site-footer a { color: #fff; }
.footer-offices {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  align-items: start;
  letter-spacing: 1.6px;
  line-height: 1.6;
}
.site-footer address { font-style: normal; }
.footer-contact, .copyright { text-align: center; }
.footer-contact { margin-top: 36px; }
.footer-contact .button { color: var(--navy); background: var(--amber); }

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .greeting__panel { padding: 32px 50px; }
}
@media (max-width: 900px) {
  .footer-offices { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 767px) {
  .section-title span { font-size: 30px; line-height: 40px; }
  .section-title span::before { width: 25px; margin-right: 12px; }
  .greeting__panel { padding: 24px 18px !important; }
  .page-hero h1 { font-size: 1.8rem; letter-spacing: 6px; }
  .page-hero p { font-size: 0.95rem; letter-spacing: 2px; }
}
@media (max-width: 700px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(28, 38, 73, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 16px 20px 24px; gap: 14px; }
  .works-grid, .business-list { grid-template-columns: 1fr; }
  .business-list { gap: 10px; }
  .business-list li { padding: 0; box-shadow: 3px 3px 0 -1px rgb(255, 255, 255), 3px 3px rgb(0, 0, 0); }
  .business-list summary {
    position: relative;
    padding: 12px 44px 12px 16px;
    cursor: pointer;
    min-height: 48px;
  }
  .business-list h3 { margin: 0; }
  .business-list summary::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
  }
  .business-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
  .business-list p { padding: 0 16px 14px; }
  .site-header__inner { min-height: 64px; }
  .logo img { width: 132px; }
  .page-hero { min-height: 140px; padding: calc(64px + 8px) 16px 20px; }
  .breadcrumb { padding-top: calc(64px + 8px); }
  .hero { height: 70svh; min-height: 380px; }
  .section { padding: 44px 0; }
  .section-title { font-size: 1.4rem; margin-bottom: 24px; }
  .greeting { padding: 40px 12px; }
  .site-nav a { display: block; padding: 6px 0; font-size: 16px; }
  /* 会社概要表は項目名と内容を縦積みにして、横幅を使い切る */
  .profile:not(.project .profile) { margin: 20px 0; }
  .profile:not(.project .profile) tr { display: block; border-bottom: 1px solid var(--line); }
  .profile:not(.project .profile) th, .profile:not(.project .profile) td { display: block; width: auto; border: 0; padding: 10px 14px; }
  .profile:not(.project .profile) th { padding-bottom: 0; font-size: .9rem; color: #5b6580; }
  .profile:not(.project .profile) td { padding-top: 2px; overflow-wrap: anywhere; }
  .profile__label { display: block; min-width: 0; margin: 0; }
  .profile__line + .profile__line { margin-top: 6px; }
  .map { height: 300px; margin-bottom: 32px; }
  .footer-offices { letter-spacing: .5px; }
  .site-footer { padding-top: 32px; }
  .contact-panel { padding: 18px; }
  .privacy { padding: 16px; }
}

/* タッチ端末用（ホバー不可の場合） */
@media (hover: none) {
  .works-card .works-card__link img { filter: brightness(0.72); }
  .works-card__overlay {
    background: linear-gradient(transparent 25%, rgba(10, 17, 36, 0.85));
  }
  .works-card .works-card__title {
    opacity: 1;
    top: auto;
    bottom: 35%;
    transform: translateX(-50%);
  }
  .works-card .works-card__details {
    opacity: 1;
    bottom: 8%;
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__slide--second { animation: none; opacity: 0; }
  .works-card__title, .works-card__details, .page_top_btn, .nav-toggle__bar { transition: none; }
}
