/* =========================================================
   Green Craft Solutions - 共通スタイルシート
   配色: グリーン / ホワイト / ライトグレー / アクセント=ブルーグリーン
   ========================================================= */

/* ---------- カラーパレット & 基本変数 ---------- */
:root {
  --accent: #00796b;          /* ブルーグリーン（アクセント） */
  --accent-dark: #004d40;     /* 濃いブルーグリーン */
  --accent-light: #4db6ac;    /* 明るいブルーグリーン */
  --green: #2e7d52;           /* グリーン */
  --green-soft: #e6f2ee;      /* 薄いグリーン背景 */
  --white: #ffffff;
  --light-grey: #f4f6f5;      /* ライトグレー背景 */
  --grey: #e2e8e6;            /* ボーダー等 */
  --text: #243430;           /* 基本文字色 */
  --text-sub: #5b6b66;        /* サブ文字色 */
  --shadow: 0 10px 30px rgba(0, 77, 64, 0.08);
  --shadow-hover: 0 16px 40px rgba(0, 77, 64, 0.16);
  --radius: 14px;
  --max-width: 1100px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- リセット ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    "Meiryo", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

/* ---------- レイアウト共通 ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 88px;
}

.section--grey {
  background: var(--light-grey);
}

.section--green {
  background: var(--green-soft);
}

/* セクション見出し（和文＋英字サブ） */
.section-head {
  margin-bottom: 44px;
}

.section-head .ja {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  position: relative;
  padding-bottom: 16px;
  display: inline-block;
}

.section-head .ja::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.section-head .en {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: 1.05rem;
  color: var(--text-sub);
  max-width: 720px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  /* スライドメニュー(.gnav)が背景オーバーレイより前面に来るように高くする
     （これがないとメニュー項目をタップできずリンクに飛べない） */
  z-index: 1100;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 77, 64, 0.08);
  border-bottom-color: var(--grey);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.logo .logo-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  display: inline-block;
}

.gnav ul {
  display: flex;
  gap: 36px;
}

.gnav a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  padding-block: 6px;
  color: var(--text);
  transition: color 0.25s var(--ease);
}

.gnav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.gnav a:hover,
.gnav a[aria-current="page"] {
  color: var(--accent);
}

.gnav a:hover::after,
.gnav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ハンバーガー */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1100;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-overlay {
  display: none;
}

/* ---------- メインのトップ余白（固定ヘッダー分） ---------- */
main {
  padding-top: var(--header-h);
}

/* ---------- ファーストビュー（index） ---------- */
.fv {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  /* 画像が無くても崩れないグラデーションのフォールバック */
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--green) 55%, var(--accent-light) 100%);
}

.fv::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/tree01.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* グリーングラデーションを写真の上に半透明で重ねる（ブランドトーン＋文字可読性） */
.fv::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 77, 64, 0.72) 0%,
    rgba(46, 125, 82, 0.55) 55%,
    rgba(77, 182, 172, 0.45) 100%
  );
  z-index: 1;
}

.fv-inner {
  position: relative;
  z-index: 2;
  padding-inline: 24px;
}

.fv-sub {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.9;
}

.fv-title {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.fv-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fv-scroll::after {
  content: "";
  width: 1px;
  height: 46px;
  background: rgba(255, 255, 255, 0.7);
  animation: scrollLine 1.8s var(--ease) infinite;
  transform-origin: top;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0); opacity: 0; transform-origin: bottom; }
}

/* ---------- 下層ページの見出しバナー ---------- */
.page-hero {
  position: relative;
  padding-block: 96px 64px;
  background: linear-gradient(135deg, var(--accent-dark), var(--green));
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 50%);
}

.page-hero .ja {
  position: relative;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-hero .en {
  position: relative;
  display: block;
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ---------- カード（トップの各セクション導線） ---------- */
/* テキスト＋画像の2カラム（トップの事業内容/企業情報） */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.feature-body {
  min-width: 0;
}

.feature-media {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-media img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.feature-media:hover img {
  transform: scale(1.04);
}

.feature {
  display: grid;
  gap: 24px;
}

.feature-text {
  font-size: 1.02rem;
  color: var(--text-sub);
  max-width: 760px;
}

/* MOREボタン */
.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
  box-shadow: 0 8px 20px rgba(0, 121, 107, 0.25);
}

.btn-more:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 121, 107, 0.35);
}

.btn-more .arrow {
  transition: transform 0.3s var(--ease);
}

.btn-more:hover .arrow {
  transform: translateX(4px);
}

/* ---------- お問い合わせカード ---------- */
.contact-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  max-width: 640px;
}

.contact-list {
  display: grid;
  gap: 18px;
  margin-top: 10px;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--grey);
}

.contact-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-list .label {
  min-width: 96px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.contact-list .value {
  font-size: 1.08rem;
  font-weight: 500;
  flex-basis: 100%;
}

.contact-list a.value {
  color: var(--accent-dark);
  transition: color 0.25s var(--ease);
}

.contact-list a.value:hover {
  color: var(--accent-light);
}

/* ---------- 事業フロー図（business） ---------- */
.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.flow-box {
  flex: 1 1 0;
  min-width: 132px;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px 14px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--grey);
  font-weight: 600;
  line-height: 1.5;
  box-shadow: var(--shadow);
}

.flow-box small {
  display: block;
  font-size: inherit;
  font-weight: 600;
  color: var(--text-sub);
  margin-top: 0;
}

/* GCS関連は強調 */
.flow-box.is-gcs {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  border-color: transparent;
}

.flow-box.is-gcs small {
  color: var(--white);
}

.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--accent);
  font-size: 1.4rem;
  flex: 0 0 auto;
}

.flow-arrow .h { display: inline; }
.flow-arrow .v { display: none; }

/* ---------- 2カラム（business） ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.col-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.col-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.col-card h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--accent-dark);
}

.col-card p {
  color: var(--text-sub);
}

/* ---------- 会社概要テーブル（about） ---------- */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  max-width: 760px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-table th,
.profile-table td {
  text-align: left;
  padding: 20px 24px;
  border-bottom: 1px solid var(--grey);
  vertical-align: top;
}

.profile-table tr:last-child th,
.profile-table tr:last-child td {
  border-bottom: none;
}

.profile-table th {
  width: 200px;
  background: var(--green-soft);
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.04em;
}

/* ---------- プライバシーポリシー（privacy） ---------- */
.policy {
  max-width: 820px;
}

.policy h2 {
  font-size: 1.2rem;
  color: var(--accent-dark);
  margin-top: 48px;
  margin-bottom: 14px;
  padding-left: 16px;
  border-left: 4px solid var(--accent);
}

.policy h3 {
  font-size: 1.02rem;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

.policy p,
.policy ol {
  color: var(--text-sub);
  margin-bottom: 8px;
}

.policy ol {
  padding-left: 1.4em;
}

.policy ol li {
  list-style: decimal;
  margin-bottom: 4px;
}

.policy .office-box {
  margin-top: 16px;
  padding: 22px 24px;
  background: var(--light-grey);
  border-radius: var(--radius);
  line-height: 2;
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--accent-dark);
  color: rgba(255, 255, 255, 0.85);
  padding-block: 56px 28px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 36px;
}

.footer-company .name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.footer-company .addr {
  font-size: 0.92rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.footer-nav a {
  font-size: 0.92rem;
  position: relative;
  transition: color 0.25s var(--ease);
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-bottom a:hover {
  color: var(--white);
}

/* ---------- スクロール出現アニメーション ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 順次表示用ディレイ */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* =========================================================
   レスポンシブ（スマホ ≤768px）
   ========================================================= */
@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .section {
    padding-block: 60px;
  }

  /* backdrop-filter は固定配置のスライドメニュー(.gnav)の描画を壊し、
     背景が透けて文字が読めなくなるためスマホでは無効化し、ヘッダーを不透明に */
  .site-header {
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* ロゴを1行に収め、ヘッダーからはみ出さないように縮小 */
  .header-inner {
    gap: 12px;
  }

  .logo {
    font-size: 1.12rem;
    letter-spacing: 0.03em;
    line-height: 1.2;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
  }

  .logo .logo-mark {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
  }

  /* ナビをハンバーガー＋スライドインに */
  .nav-toggle {
    display: block;
  }

  .gnav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    background: var(--white);
    box-shadow: -10px 0 40px rgba(0, 77, 64, 0.15);
    padding: calc(var(--header-h) + 24px) 32px 32px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 1050;
  }

  .gnav.is-open {
    transform: translateX(0);
  }

  .gnav ul {
    flex-direction: column;
    gap: 4px;
  }

  .gnav li {
    border-bottom: 1px solid var(--grey);
  }

  .gnav a {
    display: block;
    padding: 16px 4px;
    font-size: 1.05rem;
  }

  .gnav a::after {
    display: none;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    /* 画面を暗くしない（メニュー外タップで閉じる機能は維持） */
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
    z-index: 1040;
  }

  .nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  /* 2カラム → 1カラム */
  .two-col {
    grid-template-columns: 1fr;
  }

  /* テキスト＋画像も縦積み（画像はテキストの下） */
  .feature-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-media img {
    max-height: 240px;
  }

  /* フロー図 → 縦並び */
  .flow {
    flex-direction: column;
    align-items: center;
  }

  .flow-box {
    max-width: 260px;
    width: 100%;
  }

  .flow-arrow .h { display: none; }
  .flow-arrow .v { display: inline; }

  /* 会社概要テーブルを縦積みに */
  .profile-table,
  .profile-table tbody,
  .profile-table tr,
  .profile-table th,
  .profile-table td {
    display: block;
    width: 100%;
  }

  /* ラベル帯・値帯それぞれの上下中央に文字を揃える */
  .profile-table th {
    border-bottom: none;
    padding: 14px 24px;
  }

  .profile-table td {
    padding: 14px 24px;
  }

  .contact-card {
    padding: 26px;
  }

  .footer-top {
    flex-direction: column;
    gap: 28px;
  }
}

/* 動きを減らす設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
