@charset "UTF-8";

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, table, th, td, figure { margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
li { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { background: none; border: none; cursor: pointer; }

/* Variables */
:root {
  --color-bg: #f5f8ec;         /* 淡いグリーン背景 */
  --color-primary: #086036;    /* 濃いグリーン（ヘッダー・ボタン・ロゴ等） */
  --color-text: #333333;       /* 基本テキスト */
  --color-border: #dcdcdc;     /* 枠線など */
  
  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-round: 'Quicksand', 'Zen Maru Gothic', sans-serif;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font-round);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  letter-spacing: 0.05em;
  font-size: 15px;
  overflow-x: hidden;
  min-width: 320px; /* 小規模端末の保護 */
}

/* アクセシビリティ：キーボードフォーカスの可視化 */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Typography Focus */
h1, h2, h3, .serif {
  font-family: var(--font-round);
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}
.container-narrow { max-width: 700px; }
.container-medium { max-width: 800px; }

.section {
  padding: 120px 0; 
}
.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 70px;
  color: var(--color-text);
}


/* 1. Header */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: 60px;
  background-color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: flex;
  align-items: center;
}
.header-inner {
  width: 100%;
  max-width: 1920px; /* 1920pxベースの制限 */
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-img {
  height: 40px;
  width: auto;
  display: block;
}
.logo-img.is-white {
  filter: brightness(0) invert(1);
}
.hamburger {
  width: 36px; height: 30px; 
  position: relative;
  padding: 0; 
}
.hamburger span {
  position: absolute;
  left: 0;
  display: block; width: 100%; height: 4px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 13px; }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.is-active span:nth-child(1) { transform: translateY(13px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-13px) rotate(-45deg); }

.nav-menu {
  position: absolute;
  top: 80px; 
  right: 20px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 30px 25px; 
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(-20px);
  transform-origin: top right;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 99;
}
.nav-menu.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}
.nav-menu-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.nav-menu-list a {
  display: block;
  font-weight: 700;
  color: var(--color-text);
  padding: 16px 0; 
  border-bottom: 1px dashed var(--color-border);
  transition: color 0.3s;
}
.nav-menu-list a:hover {
  color: var(--color-primary);
}

/* 1. Hero Section */
.hero {
  position: relative;
  width: 100%;
  max-width: 1920px; /* PC版1920pxの制約を明示 */
  margin: 60px auto 0; /* 中央寄せ + header offset */
  height: calc(100vh - 60px);
  min-height: 550px;
  max-height: 900px;
  overflow: hidden;
  background-color: #cddbcf;
}
.hero-image-wrap {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1);
  transition: opacity 3s ease-in-out, transform 0s; 
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1.1);
  transition: opacity 2.5s ease-in-out, transform 10s linear;
  z-index: 1;
}

.hero-slide.is-active-no-zoom {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-slide.is-fading-out {
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 2.5s ease-in-out, transform 10s linear;
  z-index: 0;
}

.hero-slide.is-sliding-in-right {
  animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 2;
  opacity: 1;
  transition: none; 
}
.hero-slide.is-sliding-in-left {
  animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 2;
  opacity: 1;
  transition: none; 
}

@keyframes slideInRight {
  from { transform: translateX(100%) scale(1); }
  to { transform: translateX(0) scale(1); }
}
@keyframes slideInLeft {
  from { transform: translateX(-100%) scale(1); }
  to { transform: translateX(0) scale(1); }
}

.slide-1 { background-image: url('images/hero-1.jpg'); }
.slide-2 { background-image: url('images/hero-2.jpg'); }
.slide-3 { background-image: url('images/hero-3.jpg'); }
.slide-4 { background-image: url('images/hero-4.jpg'); }
.slide-5 { background-image: url('images/hero-5.jpg'); }

.hero-content {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.hero-title {
  color: #fff;
  font-family: var(--font-round);
  font-size: 44px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  letter-spacing: 0.1em;
}

.hero-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 20;
}
.hero-dot {
  position: relative; 
  width: 12px;
  height: 12px;
  background-color: #fff;
  border-radius: 50%;
  opacity: 0.4;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  padding: 0;
  border: none;
  cursor: pointer;
}
.hero-dot::after {
  content: "";
  position: absolute;
  top: -10px; right: -10px; bottom: -10px; left: -10px;
}

.hero-dot:hover {
  opacity: 0.7;
  transform: scale(1.2);
}
.hero-dot.is-active {
  opacity: 1;
  transform: scale(1.3);
}

/* 2. Greeting Section */
.greeting {
  text-align: center;
  padding-top: 140px; 
}
.greeting-title {
  font-size: 28px;
  margin-bottom: 70px;
  line-height: 1.8;
  font-weight: 700;
}
.greeting-text p {
  margin-bottom: 30px;
}
.greeting-text p:last-child {
  margin-bottom: 0;
}

/* 3. System Section */
.system {
  text-align: center;
  padding-bottom: 30px; 
}
.system-text p {
  margin-bottom: 30px;
}
.system-text p:last-child {
  margin-bottom: 0;
}

/* 4. Diagram Section */
.section.diagram {
  padding-top: 0; 
}
.diagram-box {
  background-color: transparent;
  padding: 20px 0;
  width: 100%;
}
.diagram-layout {
  display: grid;
  grid-template-columns: 290px 1fr 290px;
  gap: 20px 40px;
  align-items: center;
  justify-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.diag-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.diag-pill {
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  color: #fff;
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
  font-size: 18px;
}
.bg-green { background-color: #0d6e38; }

.diag-illustration {
  width: 100%;
  max-width: 180px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 140px;
}
.diag-illustration img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.figure-placeholder {
  display: none;
}
.is-trainee img {
  transform: scale(1.2);
  transform-origin: bottom center;
}

.diag-arrows {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
.diag-arrows svg {
  width: 100%;
  height: auto;
}
.diag-arrows-top svg, .diag-arrows-bottom svg { max-width: 160px; }
.diag-arrows-left svg { max-width: 180px; }
.diag-arrows-right svg { max-width: 290px; }

/* 5. Company Section */
.company.section .section-title {
  color: #777; 
  font-weight: 700;
}
/* テーブルをラップして横スクロール対応 */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.company-table {
  width: 100%;
  min-width: 500px; /* テーブルが極端に縮むのを防ぐ */
  border-collapse: collapse;
  background-color: #fff;
  border: 1px solid #bcbcbc; 
}
.company-table th, .company-table td {
  border: 1px solid #bcbcbc; 
  padding: 12px 20px;
  color: #777; 
  font-weight: 500;
  font-size: 15px;
}
.company-table th {
  width: 28%;
  text-align: center; 
  vertical-align: middle;
  white-space: nowrap;
}
.company-table td {
  text-align: left;
}

.company-link {
  text-decoration: underline;
}

.company-buttons {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 40px;
}
.btn-square {
  border-radius: 10px; 
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  width: 260px;
  height: 56px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 250px;
  height: 60px;
  border-radius: 30px;
  font-weight: 500;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: #0b824a;
  transform: scale(1.03); 
}

/* 7. Organization Section */
.organization.section {
  padding-bottom: 200px; 
}
.organization-title {
  color: #777; 
  font-weight: 700;
}
.org-diagram {
  padding: 20px 0;
  display: flex;
  justify-content: center;
  background-color: transparent;
}
.org-tree {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}
.org-row {
  display: flex;
  align-items: center;
}
.org-col-main {
  width: 250px;
  display: flex;
  justify-content: center;
}
.org-col-line {
  width: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.org-col-sub {
  width: 250px;
  display: flex;
  justify-content: center;
}
.org-node {
  width: 100%;
  border: 2px solid #777;
  border-radius: 999px;
  padding: 14px 10px;
  background-color: #fff;
  color: #666;
  text-align: center;
  font-weight: 500;
  font-size: 15px;
}
.org-row-line {
  display: flex;
  width: 250px;
  justify-content: center;
  height: 48px;
}
.org-line-v {
  width: 2px;
  height: 100%;
  background-color: #777;
}
.org-line-h {
  width: 100%;
  height: 2px;
  background-color: #777;
}

/* 8. Footer */
.footer {
  background-color: var(--color-primary);
  color: #fff;
  padding: 60px 0 20px;
}
.footer-inner {
  width: 100%;
  max-width: 1920px;
  padding: 0 5%; 
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 40px;
  margin-bottom: 40px;
}
.footer-logo { 
  display: flex; 
  flex-direction: column;
  align-items: center;
  gap: 20px; 
  transition: opacity 0.3s;
}
.footer-logo:hover {
  opacity: 0.8;
}
.footer-logo-img {
  height: 140px; 
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
}
.footer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
}
.footer-company-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: 0.16em; 
  margin-right: -0.16em; 
  line-height: 1;
}
.footer-address {
  line-height: 1.5;
  font-size: 14px;
  opacity: 0.9;
  text-align: left;
}
.footer-right { text-align: right; } 
.footer-links li { margin-bottom: 10px; font-size: 13px; }
.footer-links a:hover { opacity: 0.7; }
.footer-copy { text-align: center; font-size: 11px; opacity: 0.6; }

/* Animation Classes */
.js-fade-up-item, .js-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.js-fade-down {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.is-active.js-fade-up-item, 
.is-active.js-fade-up,
.is-active.js-fade-down {
  opacity: 1;
  transform: translateY(0);
}


/* --- Responsive adjustments --- */

/* ヘッダーのスクロール連動トランジション（モバイルのみ） */
.header {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.header.is-hidden {
  transform: translateY(-100%);
}

@media screen and (max-width: 768px) {
  .hero-title {
    font-size: 24px;
    writing-mode: vertical-rl;
  }
  .slide-1 { background-position: 20% center; }
  .slide-3 { background-position: 70% center; }
  .hero-dots { display: none; }
  .section-title,
  .greeting-title {
    font-size: 18px;
    margin-bottom: 40px;
  }
  .greeting-text,
  .system-text {
    font-size: 13.5px;
    padding: 0 16px;
    line-height: 1.7;
  }
  .cta-buttons { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; }
  .footer-right {
    text-align: right;
    width: 100%;
  }

  /* 組合概要テーブルを縦積みに変更 */
  .table-wrap {
    overflow-x: visible;
  }
  .company-table {
    min-width: unset;
  }
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    font-size: 13px;
  }
  .company-table th {
    background-color: #eaf4ee;
    border-bottom: none;
    white-space: normal;
  }

  /* 監理費明細・運営規定ボタンを縦並びに */
  .company-buttons {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .btn-square {
    width: 80%;
  }
  
  .diagram-layout {
    grid-template-columns: 1fr 80px 1.4fr;
    gap: 15px 10px;
    padding: 0 5px;
  }
  .diag-node {
    width: 120px;
  }
  .diag-pill {
    font-size: 11px;
    padding: 6px 2px;
    margin-bottom: 8px;
    white-space: nowrap;
    width: 120px;
  }
  .diag-illustration {
    height: 70px;
    max-width: 90px;
  }
  .diag-arrows-top svg, .diag-arrows-bottom svg {
    max-width: 84px;
  }
  .diag-arrows-left svg {
    max-width: 95px;
  }
  .diag-arrows-right svg {
    max-width: 170px;
  }
  .diag-arrows-top svg text,
  .diag-arrows-bottom svg text {
    font-size: 21px !important;
  }
  .diag-arrows-left svg text,
  .diag-arrows-right svg text {
    font-size: 15.5px !important;
  }


  .org-diagram {
    display: block;
  }
  .org-tree {
    width: 100%;
  }
  .org-col-main {
    width: calc(50% - 20px);
  }
  .org-col-line {
    width: 40px;
  }
  .org-col-sub {
    width: calc(50% - 20px);
  }
  .org-node {
    font-size: 13px;
    padding: 10px 6px;
  }
  .org-row-line {
    width: calc(50% - 20px);
    height: 30px;
  }
  /* モバイルのみ（管理責任者含む）を改行させる */
  .org-node-wrap {
    display: block;
  }
}

/* スマホ用（375pxブレイクポイント） */
@media screen and (max-width: 375px) {
  .hero-title { font-size: 20px; }
  .section { padding: 80px 0; }
  .section-title,
  .greeting-title {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .company-table th, .company-table td { font-size: 13px; padding: 10px; }
  .btn-square { width: 100%; }
}

/* アクセシビリティ：アニメーション軽減 (reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
