:root {
  --green-dark: #16331a;
  --green-mid: #6f8651;
  --white: #fff;
  --header-side: clamp(24px, 2.55vw, 51px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  min-height: 100%;
  margin: 0;
  color: #111;
  font-family: "Noto Sans JP", Arial, sans-serif;
}

main {
  display: block;
}

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

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
}

.language-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 42px;
  padding: 7px max(16px, calc((100% - 1200px) / 2));
  background: var(--green-dark);
}

.language-link {
  min-width: 104px;
  padding: 5px 18px 6px;
  border-radius: 999px;
  color: var(--white);
  background: var(--green-mid);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: calc(100% - 32px);
  max-width: 1200px;
  height: 68px;
  margin: 16px auto 0;
  padding: 0 8px 0 20px;
  background: var(--white);
}

.site-logo {
  display: block;
  width: min(330px, 28vw);
  flex: 0 1 auto;
}

.site-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  margin-left: auto;
  font-size: clamp(15px, 0.9vw, 18px);
  font-weight: 400;
  white-space: nowrap;
}

.global-nav > a:not(.contact-link) {
  padding: 16px 0;
}

.global-nav > a:not(.contact-link):hover,
.global-nav > a:not(.contact-link):focus-visible {
  color: #387140;
}

.contact-link {
  display: grid;
  width: 190px;
  height: 50px;
  place-items: center;
  color: var(--white);
  background: var(--green-dark);
  font-size: 17px;
  font-weight: 700;
  transition: background-color 0.2s ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  background: #387140;
}

.menu-button {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 887px;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  background: url("../img/hero-bg.png") center / cover no-repeat;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(8, 52, 14, 0.41);
}

.hero__content {
  position: relative;
  margin-top: 96px;
  padding: 0 24px;
  text-align: center;
  animation: hero-fade-up 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero h1 {
  margin: 0;
  font-size: clamp(54px, 5.15vw, 103px);
  font-weight: 700;
  line-height: 1.25;
}

.hero p {
  margin: 6px 0 0;
  font-size: clamp(20px, 1.65vw, 33px);
  font-weight: 700;
}

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

.about-section {
  padding: 44px 16px 64px;
  background: var(--white);
}

.content-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 22px;
  color: #387140;
}

.section-heading__number {
  flex: 0 0 auto;
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 20px;
  margin: 0;
  font-size: 38px;
  line-height: 1.3;
}

.section-heading h2::after {
  height: 1px;
  flex: 1;
  content: "";
  background: #c5c5c5;
}

.company-info {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, 0.8fr);
  gap: 48px;
  margin-top: 42px;
}

.company-info__details h3 {
  margin: 0 0 24px;
  padding-left: 14px;
  border-left: 5px solid #9cb6a0;
  font-size: 27px;
  line-height: 1.2;
}

.company-table {
  margin: 0;
  font-size: 16px;
}

.company-table__row {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(0, 1.75fr);
  gap: 4px;
  margin-bottom: 4px;
}

.company-table dt,
.company-table dd {
  margin: 0;
  padding: 11px 16px;
  background: #f1f1f1;
  line-height: 1.35;
}

.company-table dt {
  background: #e8e8e8;
}

.map-link-wrap {
  margin: 10px 4px 0 0;
  font-size: 14px;
  text-align: right;
}

.map-link-wrap a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.company-map {
  position: relative;
  align-self: center;
  margin: -38px 0 0;
}

.company-map img {
  display: block;
  width: 100%;
  height: auto;
}

.business-card {
  margin-top: 52px;
  padding: 52px 46px 26px;
  border: 1px solid #a9a9a9;
  border-radius: 16px;
}

.business-card > h3 {
  margin: 0 0 22px;
  padding-left: 14px;
  border-left: 5px solid #9cb6a0;
  font-size: 27px;
  line-height: 1.2;
}

.business-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 17px;
  list-style: none;
}

.business-list li {
  position: relative;
  padding-left: 24px;
}

.business-list li::before {
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #387140;
  content: "";
}

.business-intro {
  margin: 34px 0 22px;
  font-size: 16px;
  line-height: 1.75;
}

.activity-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  min-height: 128px;
  padding: 22px 0;
}

.activity-item + .activity-item {
  border-top: 1px solid #b9b9b9;
}

.activity-item img {
  display: block;
  width: 68px;
  height: 68px;
  margin: auto;
  object-fit: contain;
}

.activity-item p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
}

.activity-item p + p {
  margin-top: 2px;
}

.group-card {
  margin-top: 40px;
  padding: 48px 44px 28px;
  border: 1px solid #a9a9a9;
  border-radius: 16px;
}

.group-card > h3 {
  margin: 0 0 36px;
  padding-left: 14px;
  border-left: 5px solid #9cb6a0;
  font-size: 27px;
  line-height: 1.2;
}

.company-tree {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
  grid-template-rows: repeat(4, auto);
  align-items: center;
  gap: 28px;
}

.company-tree::before {
  position: absolute;
  top: 68px;
  bottom: 20px;
  left: 244px;
  width: 1px;
  content: "";
  background: #c5cfc7;
}

.tree-root,
.tree-branch {
  position: relative;
}

.tree-root {
  grid-column: 1;
  grid-row: 2;
}

.tree-branches {
  display: contents;
}

.tree-branch--kanto {
  grid-column: 2;
  grid-row: 1;
}

.tree-branch--otaki {
  grid-column: 2;
  grid-row: 2;
}

.tree-branch--single:nth-of-type(3) {
  grid-column: 2;
  grid-row: 3;
}

.tree-branch--single:nth-of-type(4) {
  grid-column: 2;
  grid-row: 4;
}

.tree-branch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 28px;
}

.tree-branch--single {
  grid-template-columns: calc((100% - 28px) / 2);
}

.tree-children {
  position: relative;
  display: grid;
  gap: 8px;
}

.tree-box {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 40px;
  padding: 8px 12px;
  place-items: center;
  color: var(--white);
  background: #00733d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
  transition: filter 0.2s ease, transform 0.2s ease;
}

a.tree-box:hover,
a.tree-box:focus-visible {
  filter: brightness(1.18);
  transform: translateY(-1px);
}

a.tree-box:focus-visible {
  outline: 3px solid #16331a;
  outline-offset: 3px;
}

.tree-box--root {
  background: #159c8d;
}

.tree-box--kanto {
  background: #00733d;
}

.tree-box--otaki,
.tree-branch--otaki .tree-box {
  background: #00a94f;
}

.tree-box--iodine {
  background: #4b43a0;
}

.tree-box--welma {
  background: #8a611b;
}

.tree-root::after,
.tree-branch::before,
.tree-children::before {
  position: absolute;
  content: "";
  background: #c5cfc7;
}

.tree-root::after {
  top: 50%;
  right: -28px;
  width: 28px;
  height: 1px;
}

.tree-branch::before {
  top: 50%;
  left: -14px;
  width: 14px;
  height: 1px;
}

.tree-branch--otaki::before {
  left: -28px;
  width: 28px;
}

.tree-children::before {
  top: 20px;
  bottom: 20px;
  left: -14px;
  width: 1px;
}

.tree-children::after {
  position: absolute;
  top: 50%;
  left: -28px;
  width: 14px;
  height: 1px;
  content: "";
  background: #c5cfc7;
}

.tree-children .tree-box::before {
  position: absolute;
  top: 50%;
  left: -14px;
  width: 14px;
  height: 1px;
  content: "";
  background: #c5cfc7;
}

.kanto-fa-section {
  padding: 70px 16px 84px;
  background: #eff3ee;
}

.fa-block {
  margin-top: 56px;
}

.fa-block > h3 {
  margin: 0 0 24px;
  padding-left: 14px;
  border-left: 5px solid #9cb6a0;
  font-size: 27px;
  line-height: 1.25;
}

.fa-block > p,
.fa-feature p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.8;
}

.fa-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 48px;
  margin-top: 34px;
}

.fa-feature--image-right {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  margin-top: 64px;
}

.fa-feature figure {
  margin: 0;
}

.fa-feature img {
  display: block;
  width: 100%;
  height: auto;
}

.fa-feature h4 {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.5;
}

.fa-feature--image-right figure h4 {
  color: #387140;
  text-align: center;
}

.fa-feature figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.contact-section {
  padding: 88px 16px;
  background: #8ba986;
}

.contact-card {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 48px 32px 42px;
  border: 1px solid #a9a9a9;
  border-radius: 16px;
  background: var(--white);
  text-align: center;
}

.contact-card h2 {
  margin: 0;
  color: #387140;
  font-family: "Noto Sans JP", Arial, sans-serif;
  font-size: 28px;
  line-height: 1.4;
}

.contact-card__rule {
  display: block;
  width: 120px;
  height: 5px;
  margin: 28px auto 30px;
  background: #9cb6a0;
}

.contact-card p {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.7;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 500;
}

.email-link img {
  display: block;
  width: 28px;
  height: 22px;
  object-fit: contain;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 58px;
  padding: 20px 16px;
  align-items: center;
  color: var(--white);
  background: var(--green-dark);
  font-size: 12px;
  text-align: center;
}

.site-footer .content-container {
  display: block;
}

@media (max-width: 1100px) and (min-width: 801px) {
  .company-tree {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
  }

  .company-tree::before {
    left: 200px;
  }

  .tree-root::after {
    right: -20px;
    width: 20px;
  }

  .tree-branch {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
  }

  .tree-branch--single {
    grid-template-columns: calc((100% - 20px) * 0.45);
  }

  .tree-branch::before {
    left: -10px;
    width: 10px;
  }

  .tree-branch--otaki::before {
    left: -20px;
    width: 20px;
  }

  .tree-children::before {
    left: -10px;
  }

  .tree-children .tree-box::before {
    left: -10px;
    width: 10px;
  }

  .tree-children::after {
    left: -20px;
    width: 10px;
  }

  .tree-box {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }
}

@media (max-width: 1200px) {
  .global-nav {
    gap: 22px;
    font-size: 15px;
  }

  .contact-link {
    width: 168px;
  }
}

@media (max-width: 800px) {
  .language-bar {
    min-height: 38px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .language-link {
    min-width: 96px;
    padding: 4px 14px 5px;
    font-size: 11px;
  }

  .header-inner {
    height: 72px;
    margin: 12px 16px 0;
    padding: 0 16px;
  }

  .site-logo {
    width: min(280px, calc(100% - 64px));
  }

  .menu-button {
    position: relative;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 11px 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-button__line {
    display: block;
    width: 100%;
    height: 2px;
    margin: auto;
    background: var(--green-dark);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .menu-button[aria-expanded="true"] .menu-button__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] .menu-button__line:nth-child(2) {
    opacity: 0;
  }

  .menu-button[aria-expanded="true"] .menu-button__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .global-nav {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    display: none;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--white);
    font-size: 16px;
  }

  .global-nav.is-open {
    display: grid;
  }

  .global-nav a {
    padding: 14px 8px;
    border-top: 1px solid #ddd;
  }

  .global-nav .contact-link {
    width: 100%;
    height: 54px;
    border: 0;
  }

  .hero {
    min-height: 620px;
  }

  .hero__content {
    margin-top: 72px;
  }

  .hero h1 {
    font-size: clamp(38px, 10vw, 64px);
  }

  .hero p {
    max-width: 560px;
    font-size: 16px;
    line-height: 1.7;
  }

  .about-section {
    padding: 34px 16px 48px;
  }

  .section-heading {
    gap: 12px;
  }

  .section-heading__number {
    font-size: 38px;
  }

  .section-heading h2 {
    gap: 12px;
    font-size: 27px;
  }

  .company-info {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 30px;
  }

  .company-info__details h3 {
    margin-bottom: 18px;
    font-size: 22px;
  }

  .company-table {
    font-size: 14px;
  }

  .company-table__row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 8px;
  }

  .company-table dt,
  .company-table dd {
    padding: 9px 12px;
  }

  .company-map {
    width: min(100%, 360px);
    margin: 0 auto;
  }

  .business-card {
    margin-top: 36px;
    padding: 30px 20px 16px;
    border-radius: 12px;
  }

  .business-card > h3 {
    font-size: 22px;
  }

  .business-list,
  .business-intro,
  .activity-item p {
    font-size: 14px;
  }

  .business-intro {
    margin-top: 26px;
  }

  .activity-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 0;
  }

  .activity-item img {
    width: 48px;
    height: 48px;
  }

  .group-card {
    margin-top: 28px;
    padding: 30px 20px 22px;
  }

  .group-card > h3 {
    margin-bottom: 26px;
    font-size: 22px;
  }

  .company-tree {
    display: block;
  }

  .company-tree::before {
    display: none;
  }

  .tree-branches,
  .tree-branch,
  .tree-branch--single,
  .tree-children {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tree-root {
    position: relative;
    margin-bottom: 28px;
  }

  .tree-root::after {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: 16px;
    right: auto;
    display: block;
    width: 1px;
    height: 28px;
    content: "";
    background: #c5cfc7;
  }

  .tree-branches {
    position: relative;
    gap: 24px;
    margin-left: 16px;
    padding-left: 32px;
  }

  .tree-branches::before {
    position: absolute;
    top: 0;
    bottom: 21px;
    left: 0;
    display: block;
    width: 1px;
    content: "";
    background: #c5cfc7;
  }

  .tree-branch {
    position: relative;
    grid-column: 1;
    grid-row: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .tree-branch--kanto,
  .tree-branch--otaki,
  .tree-branch--single:nth-of-type(3),
  .tree-branch--single:nth-of-type(4) {
    grid-column: 1;
    grid-row: auto;
  }

  .tree-branch::before,
  .tree-branch--otaki::before {
    position: absolute;
    top: 21px;
    left: -32px;
    display: block;
    width: 32px;
    height: 1px;
    content: "";
    background: #c5cfc7;
  }

  .tree-children {
    position: relative;
    margin-top: 8px;
    margin-left: 16px;
    padding-left: 32px;
  }

  .tree-children::before {
    position: absolute;
    top: -16px;
    bottom: 21px;
    left: 0;
    display: block;
    width: 1px;
    content: "";
    background: #c5cfc7;
  }

  .tree-children::after {
    display: none;
  }

  .tree-children .tree-box::before {
    position: absolute;
    top: 50%;
    left: -32px;
    display: block;
    width: 32px;
    height: 1px;
    content: "";
    background: #c5cfc7;
  }

  .company-tree::before {
    display: none;
  }

  .tree-box {
    min-height: 42px;
    font-size: 13px;
  }

  .kanto-fa-section {
    padding: 48px 16px 56px;
  }

  .fa-block {
    margin-top: 38px;
  }

  .fa-block > h3 {
    font-size: 22px;
  }

  .fa-block > p,
  .fa-feature p {
    font-size: 14px;
  }

  .fa-feature,
  .fa-feature--image-right {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 28px;
  }

  .fa-feature--image-right figure {
    grid-row: 1;
  }

  .fa-feature h4 {
    font-size: 17px;
  }

  .contact-section {
    padding: 52px 16px;
  }

  .contact-card {
    padding: 34px 20px 32px;
  }

  .contact-card h2 {
    font-size: 22px;
  }

  .contact-card p {
    font-size: 15px;
  }

  .email-link {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .site-footer {
    min-height: 72px;
    padding-top: 22px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
    font-size: 12px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }

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