:root {
  --bg: #fefcf9;
  --text: #3e3e3e;
  --accent: #8ca78c;
  --light: #f8f4ec;
  --border: #ddd7c7;
  --brand-font: 'Noto Sans JP', 'Montserrat', sans-serif;
}

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

body {
  font-family: var(--brand-font);
}

/* ブランドフォント強制適用（全体） */
.privacy-policy,
.privacy-policy *,
.contact,
.contact *,
.company-profile,
.company-profile *,
.card,
.card *,
.tokutei,
.tokutei * {
  font-family: var(--brand-font);
  color: #4b534b;
}

img.logo {
  width: 180px; margin-bottom: 1rem;
}

/* ヘッダー */
.global-nav {
  background: #ede8dc;
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: relative;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 0;
  margin: 0;
}

.global-nav li { display: inline-block; }
.global-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1em;
  padding: 0 8px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  line-height: 44px;
  display: inline-block;
}

/* フッター */
footer {
  text-align: center;
  padding: 15px;
  background: #ede8dc;
  color: #666;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  margin-bottom: 4px;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #5e7d5c;
  text-decoration: underline;
}

footer a:not(.footer-links a) {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

footer a:not(.footer-links a):hover {
  color: #5e7d5c;
  text-decoration: underline;
}

/* ハンバーガーボタン */
.nav-toggle,
.nav-toggle:hover,
.nav-toggle:focus,
.nav-toggle.active {
  display: none;
  background: transparent !important;
  border: none;
  width: 44px;
  height: 44px;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1001;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

/* ハンバーガーの3本線 */
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  background: var(--accent);
  height: 4px;
  width: 30px;
  border-radius: 2px;
  position: absolute;
  transition: 0.3s ease;
  content: '';
}

/* 中央の線 */
.nav-toggle span {
  position: relative;
}

/* 上の線 */
.nav-toggle span::before {
  top: -10px;
}

/* 下の線 */
.nav-toggle span::after {
  top: 10px;
}

/* 開いたときの変形（×に） */
.nav-toggle.active span {
  background-color: transparent;
}

.nav-toggle.active span::before {
  transform: rotate(45deg);
  top: 0;
  background: #5e7d5c; /* 線の色を濃くする */
}

.nav-toggle.active span::after {
  transform: rotate(-45deg);
  top: 0;
  background: #5e7d5c; /* 線の色を濃くする */
}

/* 中央線も色変更（透明化済みだけど一応） */
.nav-toggle.active span {
  background: transparent;
}

/* メディアクエリ（モバイル時） */
@media (max-width: 800px) {
  .nav-toggle,
  .nav-toggle:hover,
  .nav-toggle:focus,
  .nav-toggle.active {
    display: flex;
  }

  .global-nav ul {
    display: none;
    flex-direction: column;
    background: #ede8dc;
    position: absolute;
    top: 44px;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 16px 0 12px 0;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    margin: 0;
  }

  .global-nav.open ul {
    display: flex;
  }
}

@media (max-width: 600px) {
  .global-nav ul {
    gap: 5px;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  padding: 20px;
}

.hero-bgimg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero h1 {
  font-size: 2rem;
  min-height: 2.5em; /* ← 高さ確保 */
}

.hero p {
  font-size: 1.2rem; max-width: 640px;
}

.hero.sub-hero {
  height: 220px;
  position: relative;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.22);
  margin-bottom: 40px;
  overflow: hidden;
}

.hero.sub-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.4em;
}

.hero.sub-hero p {
  font-size: 1.1rem;
}

.hero.sub-hero {
  margin-bottom: 60px;
}

#main-title {
  color: transparent;
  transition: color 0.2s;
  white-space: nowrap;
}

#main-title span {
  color: #f0fbf2;
  opacity: 0;
  display: inline-block;
  transition: opacity 0.28s, transform 0.28s;
  transform: translateY(12px);
}

#main-title span.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  #main-title {
    font-size: 1.8rem;
  }
}

.js-hide {
  color: transparent !important;
  text-shadow: none !important;
  transition: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

/* 事業内容 */
.services {
  padding: 0px 20px 30px 20px;
  background: var(--bg);
  text-align: center;
}

.services h2 {
  font-size: 2.4rem;
  margin-bottom: 30px;
  color: var(--accent);
}

/* ブランドメッセージ */
.brand-message {
  background: linear-gradient(120deg, #f8f4ec 70%, #e2efe4 100%);
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(140, 167, 140, 0.09);
  padding: 56px 24px 44px 24px;
  margin: 48px auto 40px auto;
  max-width: 680px;
  text-align: center;
  position: relative;
}

.brand-message h2 {
  color: var(--accent);
  font-size: 2.1rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.1em;
  font-weight: 700;
  line-height: 1.18;
}

.brand-message p {
  color: #4b534b;
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 2;
  margin: 0 auto;
  max-width: 540px;
}

@media (max-width: 700px) {
  .brand-message {
    padding: 38px 8vw 30px 8vw;
    max-width: 98vw;
    margin: 28px 1vw 30px 1vw;
  }
  .brand-message h2 {
    font-size: 1.2rem;
  }
  .brand-message p {
    font-size: 1rem;
  }
}

/* 会社概要 */
.company-profile {
  padding: 30px;
  background: #f8f4ec;
  text-align: left;
  max-width: 800px;
  margin: 0 auto 30px auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.company-profile h2 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 30px;
}

.company-profile table {
  width: 100%;
  border-collapse: collapse;
  background: var(--light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.company-profile th,
.company-profile td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  vertical-align: top;
}

.company-profile th {
  background: #f1f6f2;
  font-weight: 700;
  color: var(--accent);
  text-align: left;
  min-width: 140px;
  width: 210px;
  padding-bottom: 8px;
}

.company-profile td {
  padding-top: 4px;
}

@media (max-width: 600px) {
  .company-profile table,
  .company-profile th,
  .company-profile td {
    display: block;
    width: 100%;
  }

  .company-profile th {
    background: #f1f6f2;
    font-weight: bold;
    min-width: unset;
    width: 100%;
    padding-bottom: 8px;
  }

  .company-profile td {
    border-top: none;
    padding-top: 4px;
  }
}

/* プライバシーポリシー＆特商法 */
.privacy-policy {
  padding: 30px 30px 30px 30px;
  background: #f8f4ec;
  text-align: left;
  max-width: 800px;
  margin: 0 auto 30px auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.privacy-policy h2 {
  font-size: 2rem;
  color: var(--accent);
}

.privacy-policy h3 {
  margin-top: 10px;
  font-size: 1rem;
  color: var(--accent);
}

.privacy-policy p {
  margin: 10px;
  font-size: 1rem;
}

.privacy-policy ul,
.privacy-policy ol {
  margin: 10px;
  margin-left: 30px;
}

.privacy-policy table {
  width: 100%;
  border-collapse: collapse;
  background: var(--light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.privacy-policy th,
.privacy-policy td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  vertical-align: top;
}

.privacy-policy th {
  background: #f1f6f2;
  font-weight: 700;
  color: var(--accent);
  text-align: left;
  min-width: 140px;
  width: 210px;
  padding-bottom: 8px;
}

.privacy-policy td {
  padding-top: 4px;
}

.privacy-policy details {
  margin-bottom: 0.5em;
}

@media (max-width: 600px) {
  .privacy-policy table,
  .privacy-policy th,
  .privacy-policy td {
    display: block;
    width: 100%;
  }
.privacy-policy th {
    background: #f1f6f2;
    font-weight: bold;
    min-width: unset;
    width: 100%;
    padding-bottom: 8px;
  }
  .privacy-policy td {
    border-top: none;
    padding-top: 0;
    padding-top: 4px;
  }
}

/* お問い合わせ */
.contact {
  background: var(--light);
  padding: 30px 30px;
  text-align: left;
  max-width: 800px;
  margin: 0 auto 30px auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--accent);
}

form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input, textarea {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}

textarea {
  min-height: 120px;
}

/* お問い合わせフォームのチェックボックス用だけに適用 */
form label[for="agree"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  margin: 0.8em 0 1.2em 0;
  width: 100%;
}

form label[for="agree"] input[type="checkbox"] {
  margin: 0;
  width: 1.1em; height: 1.1em;
}
form label[for="agree"] span {
  display: inline;
}

/* 404ページ */
.not-found {
  background: var(--light);
  padding: 30px 30px;
  text-align: center;
}

/* ボタン */
button {
  background: var(--accent);
  color: white !important;
  font-family: var(--brand-font);
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  min-height: 44px;
}

button:hover {
  background: #769d77;
}

a.button {
  display: inline-block;
  background: var(--accent);
  color: white !important;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 600;
  transition: background 0.2s;
  margin-top: 16px;
  min-height: 44px;
}

a.button:hover {
  background: #769d77;
}

/* カード表示 */

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.card {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: 0.3s ease;
}

@media (min-width: 600px) {
  .card {
    flex: 1 1 calc(50% - 20px);
  }
}
@media (min-width: 800px) {
  .card {
    flex: 1 1 calc(33.333% - 20px);
  }
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.card h3 {
  margin-bottom: 10px; color: var(--accent);
}

.services,
.company-profile,
.contact,
.privacy-policy,
.tokutei {
  margin-top: 0;
}
