/*
Theme Name: Shinshu Kotobuki Chishitsu
Theme URI: https://example.com/
Author: OpenAI
Description: 株式会社 信州寿地質様向けのWordPressテーマ。KTEC v63系のシンプルな構成をもとに、地質調査会社向けに再構成。
Version: 4.7
Text Domain: shinshu-kotobuki
*/

:root {
  --color-ink: #1f2f2a;
  --color-text: #33443e;
  --color-muted: #687872;
  --color-line: rgba(43, 72, 63, .14);
  --color-green: #233b32;
  --color-green-2: #31584b;
  --color-pale: #f4f7f2;
  --color-white: #fff;
  --shadow: 0 18px 48px rgba(28, 52, 44, .12);
  --font-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "HGS明朝E", serif;
  --font-sans: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: #fff;
  font-family: var(--font-serif);
  line-height: 1.9;
  letter-spacing: .03em;
}

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

a {
  color: inherit;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(20, 38, 32, .78), rgba(20, 38, 32, .24) 72%, rgba(20, 38, 32, 0));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  gap: 24px;
}

.site-branding {
  text-decoration: none;
}

.site-title {
  display: block;
  font-size: clamp(20px, 2.4vw, 31px);
  line-height: 1.25;
  letter-spacing: .12em;
  font-weight: 600;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.site-subtitle {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: .22em;
  opacity: .86;
}

.global-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 2vw, 30px);
  font-family: var(--font-serif);
  font-size: 14pt;
  letter-spacing: .12em;
  white-space: nowrap;
}

.global-nav a {
  position: relative;
  display: inline-flex;
  padding-bottom: 5px;
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.global-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, .78);
  transform-origin: left center;
  transition: opacity .25s ease, transform .25s ease;
}

.global-nav a:hover {
  opacity: .78;
}

.global-nav a:hover::after {
  transform: scaleX(.82);
  opacity: .9;
}

.hero {
  position: relative;
  min-height: 720px;
  color: #fff;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #17241f;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(10, 25, 20, .74), rgba(10, 25, 20, .34) 52%, rgba(10, 25, 20, .12)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 170px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: 76px;
  font-family: var(--font-serif);
}

.hero-kicker {
  margin: 0 0 16px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .26em;
  opacity: .9;
}

.hero-title {
  margin: 0;
  font-size: clamp(35px, 5vw, 68px);
  line-height: 1.35;
  letter-spacing: .12em;
  font-weight: 500;
  text-shadow: 0 8px 28px rgba(0,0,0,.32);
}

.hero-lead {
  max-width: 690px;
  margin: 26px 0 0;
  font-size: clamp(16px, 1.55vw, 21px);
  line-height: 2;
  text-shadow: 0 4px 20px rgba(0,0,0,.38);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 178px;
  padding: 13px 24px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .12em;
  text-decoration: none;
  backdrop-filter: blur(6px);
}

.button.dark {
  border-color: var(--color-green);
  background: var(--color-green);
  color: #fff;
  box-shadow: 0 13px 30px rgba(35, 59, 50, .18);
}

.section {
  padding: clamp(64px, 8vw, 110px) 0;
}

.section.pale {
  background: var(--color-pale);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(180px, 320px) 1fr;
  gap: clamp(22px, 5vw, 70px);
  align-items: end;
  margin-bottom: clamp(30px, 5vw, 58px);
}

.section-label {
  display: block;
  margin-bottom: 10px;
  color: var(--color-green-2);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--color-ink);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: .11em;
}

.section-copy {
  margin: 0;
  color: var(--color-muted);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--color-line);
  box-shadow: 0 12px 34px rgba(35, 59, 50, .06);
}

.service-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.service-body {
  padding: 26px;
}

.service-number {
  display: block;
  color: var(--color-green-2);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .16em;
}

.service-card h3 {
  margin: 8px 0 12px;
  color: var(--color-ink);
  font-size: 22px;
  line-height: 1.5;
  font-weight: 500;
}

.service-card p,
.service-card li {
  font-size: 15px;
}

.service-card ul {
  margin: 14px 0 0;
  padding-left: 1.2em;
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
}

.message-text {
  font-size: 17px;
}

.president {
  margin-top: 28px;
  color: var(--color-ink);
  text-align: right;
  font-size: 18px;
}

.message-photo {
  border-radius: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.message-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.work-card {
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #17241f;
  color: #fff;
  text-decoration: none;
}

.work-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.62));
}

.work-card:hover img {
  transform: scale(1.04);
}

.work-title {
  position: relative;
  z-index: 1;
  padding: 22px;
  font-size: 17px;
  line-height: 1.65;
  text-shadow: 0 2px 16px rgba(0,0,0,.4);
}

.profile-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-top: 1px solid var(--color-line);
  background: #fff;
}

.profile-list dt,
.profile-list dd {
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-line);
}

.profile-list dt {
  color: var(--color-green);
  background: rgba(49, 88, 75, .06);
  font-weight: 600;
}

.machine-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.group-note {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--color-line);
}

.group-note img {
  width: 150px;
}

.group-note a {
  display: inline-flex;
  flex: 0 0 auto;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.contact-card {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--color-line);
}

.contact-card h3 {
  margin: 0 0 12px;
  color: var(--color-ink);
  font-size: 22px;
  font-weight: 500;
}

.contact-card p {
  margin: 0;
}

.contact-card p + p {
  margin-top: 8px;
}

.footer {
  padding: 38px 0;
  color: rgba(255,255,255,.82);
  background: var(--color-green);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .12em;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.page-hero {
  min-height: 420px;
}

.page-hero .hero-content {
  padding-top: 92px;
}

@media (max-width: 900px) {
  .header-inner {
    min-height: 74px;
    width: min(100% - 26px, 1180px);
  }

  .global-nav {
    gap: 10px;
    font-size: 14pt;
    letter-spacing: .04em;
  }

  .site-subtitle {
    display: none;
  }

  .hero {
    min-height: 620px;
  }

  .section-head,
  .message-layout,
  .service-grid,
  .works-grid,
  .contact-cards {
    grid-template-columns: 1fr;
  }

  .works-grid {
    gap: 14px;
  }
}

@media (max-width: 560px) {
  body {
    letter-spacing: .01em;
  }

  .site-title {
    font-size: 18px;
    letter-spacing: .06em;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
  }

  .global-nav {
    width: 100%;
    justify-content: space-between;
  }

  .global-nav a {
    font-size: 14pt;
  }

  .hero-content,
  .container,
  .footer-inner {
    width: calc(100% - 28px);
  }

  .hero {
    min-height: 590px;
  }

  .hero-title {
    letter-spacing: .06em;
  }

  .hero-lead {
    font-size: 15px;
  }

  .section {
    padding: 56px 0;
  }

  .profile-list {
    grid-template-columns: 1fr;
  }

  .profile-list dt {
    padding-bottom: 8px;
    border-bottom: 0;
  }

  .profile-list dd {
    padding-top: 0;
  }

  .group-note,
  .footer-inner {
    flex-direction: column;
  }
}


.work-card-image-link{
  display:block;
  width:100%;
  height:100%;
}
.work-card-image-link img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}


/* v24: 施工実績カード内の画像リンクを背景画像と同じ扱いにして、説明文位置を揃える */
.work-card-image-link{
  position:absolute;
  inset:0;
  z-index:0;
  display:block;
  width:100%;
  height:100%;
}
.work-card-image-link img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.work-card::after{
  pointer-events:none;
}


/* v32: ヘッダー「お問い合わせ」横 Instagramリンク */
.global-nav .global-nav-instagram{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  padding:0;
  margin-left:6px;
  line-height:1;
  text-decoration:none;
}
.global-nav .global-nav-instagram::after{
  display:none;
}
.global-nav .global-nav-instagram img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:6px;
}


/* v34: スマホでもInstagramアイコンを表示するため、お問い合わせとアイコンをグループ化 */
.nav-contact-instagram{
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.global-nav .nav-contact-instagram .global-nav-instagram{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  flex:0 0 34px;
  padding:0;
  margin-left:0;
  line-height:1;
}
.global-nav .nav-contact-instagram .global-nav-instagram img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
@media (max-width: 560px){
  .global-nav{
    gap:6px;
    align-items:center;
  }
  .global-nav a{
    font-size:13px;
  }
  .nav-contact-instagram{
    gap:5px;
  }
  .global-nav .nav-contact-instagram .global-nav-instagram{
    width:30px;
    height:30px;
    flex-basis:30px;
  }
}


/* v37: 施工実績画像ライトボックス */
body.works-lightbox-open{
  overflow:hidden;
}
.works-lightbox-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:32px;
}
.works-lightbox-modal.is-open{
  display:flex;
}
.works-lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.72);
}
.works-lightbox-panel{
  position:relative;
  z-index:1;
  max-width:min(92vw, 1200px);
  max-height:88vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.works-lightbox-image{
  display:block;
  max-width:100%;
  max-height:88vh;
  width:auto;
  height:auto;
  object-fit:contain;
  box-shadow:0 18px 56px rgba(0,0,0,0.4);
  background:#fff;
}
.works-lightbox-close{
  position:absolute;
  top:-18px;
  right:-18px;
  z-index:2;
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,0.55);
  background:rgba(0,0,0,0.78);
  color:#fff;
  font-size:30px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 0 3px;
}
.works-lightbox-close:hover{
  background:#000;
}
.work-card-image-link{
  cursor:zoom-in;
}
@media (max-width: 640px){
  .works-lightbox-modal{
    padding:18px;
  }
  .works-lightbox-panel{
    max-width:94vw;
    max-height:84vh;
  }
  .works-lightbox-image{
    max-height:84vh;
  }
  .works-lightbox-close{
    top:-14px;
    right:-10px;
    width:40px;
    height:40px;
  }
}
