/* ============================================
   株式会社テラウェル コーポレートサイト
   コーポレートカラー: グリーン #6cbc47 / ブルー #5794c5
   ============================================ */
:root {
  --green: #6cbc47;
  --green-dark: #4f9a2e;
  --green-pale: #f2f8ee;
  --blue: #5794c5;
  --blue-pale: #eef4fa;
  --ink: #1f3044;
  --text: #333a40;
  --muted: #6b7680;
  --line: #e3e8ea;
  --grad: linear-gradient(90deg, var(--blue), var(--green));
  --font-head: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

/* 会社案内と同じ英文フォント(マキナス 4 Square / もじワク研究・商用可) */
@font-face {
  font-family: "Makinas 4 Square";
  src: url("../fonts/Makinas-4-Square-latin.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.9;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { opacity: .85; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.en { font-family: "Montserrat", sans-serif; letter-spacing: .06em; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 8px rgba(31, 48, 68, .08);
  z-index: 100;
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: .06em;
}
.brand img { width: 40px; height: auto; }

.global-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
}
.global-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  border-radius: 6px;
}
.global-nav a:hover { background: var(--green-pale); opacity: 1; }
.global-nav a.active { color: var(--green-dark); border-bottom: 2px solid var(--green); border-radius: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: .3s;
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background: url("../img/hero-leaves.jpg") center / cover no-repeat;
  margin-top: 60px;
  overflow: hidden;
}
/* 動く背景: 3枚の写真がゆっくりズームしながらフェードで切り替わる */
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg .bg {
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  animation: hero-fade 24s infinite;
  will-change: opacity, transform;
}
.hero-bg .bg1 { background-image: url("../img/hero-leaves.jpg"); animation-delay: 0s; }
.hero-bg .bg2 { background-image: url("../img/waterfall.jpg");   background-position: center bottom; animation-delay: 8s; }
.hero-bg .bg3 { background-image: url("../img/sakura.jpg");      animation-delay: 16s; }
@keyframes hero-fade {
  0%   { opacity: 0; transform: scale(1); }
  5%   { opacity: 1; }
  33.3%{ opacity: 1; }
  41%  { opacity: 0; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg .bg { animation: none; }
  .hero-bg .bg1 { opacity: 1; }
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.75) 40%, rgba(255,255,255,.05) 75%);
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 80px 20px; width: 100%; }
.hero h1 {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4.2vw, 3.1rem);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: .16em;
}
.hero .hero-en {
  margin-top: 20px;
  color: var(--green-dark);
  font-family: "Makinas 4 Square", "Montserrat", sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
  font-weight: 400;
  letter-spacing: .1em;
}
.hero .hero-en::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  background: var(--grad);
  margin-top: 22px;
}
.hero .hero-lead {
  margin-top: 22px;
  font-size: 1.02rem;
  color: var(--text);
  max-width: 34em;
}

/* ---------- セクション共通 ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--green-pale); }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title .en-label {
  display: block;
  color: var(--green-dark);
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
}
.section-title h2 {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 500;
  letter-spacing: .14em;
  margin-top: 6px;
}
.section-title h2::after {
  content: "";
  display: block;
  width: 64px; height: 4px;
  background: var(--grad);
  border-radius: 2px;
  margin: 16px auto 0;
}

.lead-center { text-align: center; max-width: 42em; margin: 0 auto 40px; }

/* ---------- カード ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(31, 48, 68, .09);
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(31, 48, 68, .14); }
.card .card-img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card .card-body { padding: 22px 24px 26px; flex: 1; }
.card h3 {
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: .08em;
  font-size: 1.12rem;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 3px solid;
  border-image: var(--grad) 1;
}
.card p { font-size: .95rem; }

/* ---------- 3つの力 ---------- */
.powers {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.power {
  width: 170px; height: 170px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(108, 188, 71, .22);
}
.power.main { background: var(--grad); border: none; color: #fff; box-shadow: 0 8px 22px rgba(87, 148, 197, .35); }
.power strong { font-family: var(--font-head); font-weight: 500; letter-spacing: .1em; font-size: 1.3rem; color: var(--ink); }
.power.main strong { color: #fff; font-size: 1.45rem; }
.power span { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.power.main span { color: rgba(255,255,255,.9); }

/* ---------- テーブル ---------- */
.info-table { width: 100%; border-collapse: collapse; background: #fff; }
.info-table th, .info-table td { padding: 18px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.info-table th { width: 200px; color: var(--ink); font-weight: 700; background: var(--green-pale); white-space: nowrap; }
.info-table ul { list-style: none; }
.info-table ul li::before { content: "・"; color: var(--green-dark); }

/* ---------- 情報開示: 実績表 ---------- */
.results-table { min-width: 700px; }
.results-table th {
  width: auto;
  white-space: normal;
  font-size: .85rem;
  text-align: center;
  border: 1px solid var(--line);
}
.results-table td {
  text-align: center;
  border: 1px solid var(--line);
}

/* ---------- サービス詳細 ---------- */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 72px;
}
.service-block:last-child { margin-bottom: 0; }
.service-block.reverse .service-img { order: 2; }
.service-img { position: relative; border-radius: 14px; box-shadow: 0 6px 20px rgba(31,48,68,.12); }
.service-img > img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 14px; }
.service-badge {
  position: absolute;
  right: -26px; bottom: -26px;
  width: 176px; height: 176px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid var(--green-pale);
  box-shadow: 0 6px 18px rgba(31, 48, 68, .18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-badge img { width: 66%; height: 66%; object-fit: contain; }
.service-block.reverse .service-badge { right: auto; left: -26px; }
.service-text h3 {
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: .1em;
  font-size: 1.35rem;
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 5px solid var(--green);
}

/* ---------- ソリューションマップ ---------- */
.sol-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 3px 12px rgba(31,48,68,.08);
}
.sol-label {
  display: flex; align-items: center; justify-content: center;
  padding: 18px 14px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  font-size: .95rem;
}
.sol-body { background: #fff; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sol-row.c1 .sol-label { background: var(--blue); }
.sol-row.c2 .sol-label { background: #8ea3b5; }
.sol-row.c3 .sol-label { background: var(--green); }
.sol-row.c4 .sol-label { background: var(--green-dark); }
.chip {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .9rem;
  color: var(--ink);
}
.chip.solid { flex-basis: 100%; text-align: center; }
.sol-note { width: 100%; font-size: .85rem; color: var(--muted); }

/* ---------- CTAバンド ---------- */
.cta-band {
  background: var(--grad);
  color: #fff;
  text-align: center;
  padding: 64px 20px;
}
.cta-band h2 { font-family: var(--font-head); font-weight: 500; letter-spacing: .12em; font-size: 1.5rem; margin-bottom: 10px; }
.cta-band p { margin-bottom: 26px; }
.btn {
  display: inline-block;
  padding: 14px 44px;
  border-radius: 999px;
  font-weight: 700;
  background: #fff;
  color: var(--green-dark);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.btn.outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-green { background: var(--green); color: #fff; }

/* ---------- 下層ページヘッダー ---------- */
.page-header {
  margin-top: 60px;
  background: var(--grad);
  color: #fff;
  padding: 74px 20px 60px;
  text-align: center;
}
.page-header h1 { font-family: var(--font-head); font-weight: 500; font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: .2em; }
.page-header .en-label { display: block; font-size: .9rem; opacity: .9; margin-top: 6px; text-transform: uppercase; letter-spacing: .2em; }

/* ---------- 連絡先 ---------- */
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 780px; margin: 0 auto; }
.contact-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(31,48,68,.09);
  padding: 36px 28px;
  text-align: center;
}
.contact-card .label { color: var(--muted); font-size: .9rem; }
.contact-card .value { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: 8px 0 4px; }
.contact-card .note { font-size: .85rem; color: var(--muted); }

/* ---------- アクセス ---------- */
.map-wrap {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(31,48,68,.12);
  margin: 32px auto 0;
  max-width: 480px;
}
.map-wrap iframe { display: block; width: 100%; height: 440px; border: 0; }

/* ---------- フッター ---------- */
.site-footer { position: relative; background: var(--ink); color: #cfd8e0; padding: 56px 0 24px; margin-top: 0; }
/* マスコット: 尻尾の短いクロネコ(フッターの縁にお座り) */
.footer-cat {
  position: absolute;
  top: -111px;
  right: 7%;
  width: 92px;
  pointer-events: none;
  transform-origin: bottom center;
  animation: cat-idle 4s ease-in-out infinite;
}
.footer-cat .cat-body { display: block; width: 100%; }
/* ポーズ切替: 座り(18秒中 約13秒) → 毛づくろい(約4.5秒)
   毛づくろい中は「顔を洗う」と「耳を洗う」の2コマを交互に表示 */
.footer-cat .cat-sit { animation: pose-sit 18s infinite; }
.footer-cat .cat-groom {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: pose-wash 18s infinite;
}
.footer-cat .cat-groom img {
  position: absolute;
  right: -4%;
  bottom: 0;
  height: 100%;
  width: auto;
  transform-origin: 55% 95%;
}
.footer-cat .cat-wash  { animation: frame-a 3s ease-in-out infinite; }
.footer-cat .cat-wash2 { animation: frame-b 3s ease-in-out infinite; opacity: 0; }
/* 18秒サイクル: 座り(12秒) → ふわっと切替 → 顔洗い→耳洗い→顔洗い → ふわっと座りに戻る */
@keyframes pose-sit {
  0%, 66.7% { opacity: 1; }
  68.9%, 87.2% { opacity: 0; }
  89.4%, 100% { opacity: 1; }
}
@keyframes pose-wash {
  0%, 66.7% { opacity: 0; }
  68.9%, 87.2% { opacity: 1; }
  89.4%, 100% { opacity: 0; }
}
/* 3秒で 顔洗い⇄耳洗い を1往復(クロスフェード) */
@keyframes frame-a {
  0%, 40% { opacity: 1; }
  50%, 90% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes frame-b {
  0%, 40% { opacity: 0; }
  50%, 90% { opacity: 1; }
  100% { opacity: 0; }
}
.footer-cat .cat-tail {
  position: absolute;
  left: 84.7%;
  top: 78.6%;
  width: 15.3%;
  transform-origin: 12% 42%;
  animation: cat-wag 5s ease-in-out infinite;
}
.footer-cat .cat-eyelid {
  position: absolute;
  left: 16%;
  top: 23.6%;
  width: 11.5%;
  height: 9%;
  background: #181818;
  border-radius: 50%;
  opacity: 0;
  animation: cat-blink 6s infinite;
}
@keyframes cat-idle {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.02); }
}
@keyframes cat-wag {
  0%, 55%, 100% { transform: rotate(0deg); }
  65% { transform: rotate(-14deg); }
  75% { transform: rotate(9deg); }
  85% { transform: rotate(-4deg); }
}
@keyframes cat-blink {
  0%, 90%, 96%, 100% { opacity: 0; }
  92%, 94% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-cat, .footer-cat .cat-tail, .footer-cat .cat-eyelid, .footer-cat .cat-sit,
  .footer-cat .cat-groom, .footer-cat .cat-wash, .footer-cat .cat-wash2 { animation: none; }
  .footer-cat .cat-groom { opacity: 0; }
}
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand img { width: 44px; background: #fff; border-radius: 8px; padding: 4px; }
.footer-brand strong { color: #fff; font-size: 1.05rem; display: block; }
.footer-brand p { font-size: .85rem; margin-top: 8px; }
.footer-nav ul { list-style: none; }
.footer-nav a { color: #cfd8e0; font-size: .92rem; line-height: 2.2; }
.footer-nav a:hover { color: var(--green); }
.copyright { text-align: center; font-size: .8rem; color: #8fa0af; margin-top: 40px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
  .service-block { grid-template-columns: 1fr; gap: 26px; }
  .service-block.reverse .service-img { order: 0; }
  .service-badge { width: 128px; height: 128px; right: 6px; bottom: -22px; }
  .service-block.reverse .service-badge { left: auto; right: 6px; }
  .sol-row { grid-template-columns: 1fr; }
  .sol-label { padding: 10px; }
  .contact-cards { grid-template-columns: 1fr; }
  .info-table th { width: 120px; }

  .nav-toggle { display: block; }
  .global-nav {
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: #fff;
    box-shadow: 0 10px 20px rgba(31,48,68,.12);
    transform: translateY(-130%);
    transition: transform .3s;
  }
  .global-nav.open { transform: translateY(0); }
  .global-nav ul { flex-direction: column; padding: 10px 0; }
  .global-nav a { padding: 14px 24px; }
  .global-nav a.active { border-bottom: none; border-left: 4px solid var(--green); }

  .hero { min-height: 62vh; }
  .section { padding: 60px 0; }
  .footer-cat { width: 72px; top: -87px; right: 6%; }
}
