/* 積善株式会社 トップページ */

:root {
  --white: #fff;
  --paper: #fff;
  --cream: #fff;
  --line: #e7dfcf;
  --text: #262626;
  --muted: #6d6b63;
  --green: #476b55;
  --green-dark: #28523d;
  --green-soft: #edf3ed;
  --gold: #c7a462;
  --gold-dark: #b78d45;
  --shadow: 0 12px 30px rgba(57, 54, 42, 0.08);
  --serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  color: var(--text);
  background: var(--white);
  font-family: var(--serif);
  line-height: 1.8;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font-family: var(--serif);
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.22s ease;
}

@media (hover: hover) {
  a[href]:hover {
    opacity: 0.78;
  }
}

a[href]:active {
  opacity: 0.65;
}

a[href]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* 中ページ共通：セクション見出し下のアクセントライン */
.recruit-section__title::after,
.section-title-news::after,
.business-heading h2::after,
.works-heading h2::after,
.company-section-title::after,
.center-title::after,
.philo-headline::after {
  content: "";
  display: block;
  width: 58px;
  height: 2px;
  margin: 12px auto 0;
  background: var(--gold);
}

.company-section-title {
  width: fit-content;
}

svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  a {
    transition: none;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.site-header__inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(110px, 14vw, 220px);
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo__mark {
  width: 145px;
  height: auto;
}

.global-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 2.5vw, 42px);
  font-family: var(--serif);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.global-nav__link {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.global-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.global-nav__link:hover,
.global-nav__link--active {
  color: var(--gold-dark);
}

.global-nav__link:hover::after,
.global-nav__link--active::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: var(--white);
  color: var(--green-dark);
  cursor: pointer;
  place-items: center;
  position: relative;
  padding: 0;
}

.menu-button__line {
  position: absolute;
  left: 8px;
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

.menu-button__line:nth-child(1) {
  top: 12px;
}

.menu-button__line:nth-child(2) {
  top: 20px;
}

.menu-button__line:nth-child(3) {
  top: 28px;
}

.menu-button__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.menu-button[aria-expanded="true"] .menu-button__line:nth-child(1) {
  top: 20px;
  transform: 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) {
  top: 20px;
  transform: rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 582px;
  overflow: hidden;
  background: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  left: -7%;
  right: -7%;
  bottom: -74px;
  height: 150px;
  z-index: 4;
  background: var(--paper);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  border-top: 2px solid rgba(199, 164, 98, 0.42);
}

.hero__visual {
  position: absolute;
  inset: 0;
  background: url("assets/top.png") center / cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.65);
  opacity: 0;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 5;
  max-width: var(--max);
  margin: 0 auto;
  padding: 142px 34px 170px;
}

.hero__title {
  font-size: clamp(2.55rem, 5.2vw, 4.45rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.18em;
}

.hero__tagline {
  margin-top: 28px;
  color: var(--green-dark);
  font-size: clamp(1rem, 1.75vw, 1.24rem);
  letter-spacing: 0.15em;
}

.hero__tagline span {
  margin: 0 0.55em;
  color: var(--gold);
}

.hero__text {
  margin-top: 26px;
  font-size: 0.98rem;
  line-height: 2.2;
  letter-spacing: 0.08em;
}

.hero__leaf {
  position: absolute;
  z-index: 6;
  width: 150px;
  opacity: 0.72;
  filter: saturate(1);
}

.hero__leaf--top {
  top: 24px;
  left: 0;
}

.hero__leaf--bottom {
  bottom: 18px;
  left: 0;
  width: 260px;
}

.quick-links {
  position: relative;
  z-index: 8;
  max-width: 1080px;
  margin: -20px auto 64px;
  padding: 0 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.quick-link {
  position: relative;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 2px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 5px 14px rgba(81, 67, 43, 0.08);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-link::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.55;
  pointer-events: none;
}

.quick-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.quick-link__icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.quick-link__arrow {
  margin-left: 10px;
  font-family: var(--sans);
  font-size: 1.2rem;
  line-height: 1;
}

.quick-link--green {
  color: var(--white);
  background: linear-gradient(135deg, #28523d, #376a50);
  border-color: var(--green-dark);
}

.quick-link--white {
  color: var(--gold-dark);
  background: var(--white);
  border-color: #e3d9c5;
}

.quick-link--gold {
  color: var(--white);
  background: linear-gradient(135deg, #d0a45d, #b88a44);
  border-color: #c99e58;
}

.section-heading {
  text-align: center;
  margin-bottom: 31px;
}

.section-heading h2 {
  font-size: clamp(1.18rem, 2.1vw, 1.48rem);
  font-weight: 500;
  letter-spacing: 0.2em;
}

.section-heading__leaf {
  display: block;
  width: 28px;
  height: auto;
  margin: 8px auto 0;
  opacity: 0.62;
  transform: rotate(-8deg);
}

.section-heading--compact {
  margin-bottom: 36px;
}

.section-heading--line {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
}

.section-heading--line::before,
.section-heading--line::after {
  display: none;
}

.section-heading--line::before {
  left: 0;
}

.section-heading--line::after {
  right: 0;
}

.page-guide {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 34px 64px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.guide-card {
  width: 100%;
  min-width: 0;
  min-height: 235px;
  padding: 24px 8px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fbfdf9;
  border: 1px solid #e6dfd2;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.guide-card__icon {
  width: 53px;
  height: 53px;
  color: var(--green);
  margin-bottom: 22px;
}

.guide-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guide-card h3 {
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
}

.guide-card p {
  margin-top: 15px;
  color: #54524c;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1.8;
  text-align: center;
  word-break: keep-all;
}

.card-arrow {
  margin-top: auto;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 1.26rem;
  line-height: 1;
}

.values {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 34px 54px;
}

.decor-leaf {
  position: absolute;
  width: 110px;
  opacity: 0.55;
  pointer-events: none;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.value-item {
  padding: 8px 30px 18px;
  text-align: center;
  border-right: 1px solid #e1dacd;
}

.value-item:last-child {
  border-right: 0;
}

.value-item__icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: #f1f6ef;
  border-radius: 50%;
}

.value-item__icon svg {
  width: 40px;
  height: 40px;
}

.value-item__icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.value-item h3 {
  font-size: 1.16rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.value-item p {
  margin-top: 9px;
  color: #585850;
  font-family: var(--sans);
  font-size: 0.72rem;
  line-height: 1.9;
}

.news {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 34px 34px 72px;
}

.decor-leaf--news {
  left: calc(50% - 50vw - 34px);
  top: -70px;
  width: 260px;
  opacity: 0.72;
}

.news-list {
  background: #fbfdf9;
  border-top: 1px solid #ded7ca;
}

.news-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 150px 1fr 24px;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
  border-bottom: 1px solid #ded7ca;
  font-family: var(--sans);
  font-size: 0.76rem;
  transition: background 0.2s ease;
}

.news-row:hover {
  background: #f3f8f0;
}

.news-row time {
  font-weight: 600;
  letter-spacing: 0.09em;
}

.news-row b {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 400;
  text-align: right;
}

.more-button {
  width: 210px;
  min-height: 40px;
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: #625238;
  background: var(--white);
  border: 1px solid var(--gold);
  font-family: var(--sans);
  font-size: 0.82rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.more-button:hover {
  color: var(--white);
  background: var(--gold);
}

.footer {
  position: relative;
  overflow: hidden;
  padding: 40px 34px 20px;
  background: var(--white);
  border-top: 1px solid #e2dccf;
}

.footer::before {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -130px;
  width: 380px;
  height: 260px;
  border-radius: 50%;
  background: var(--white);
  transform: rotate(-18deg);
}

.footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 62px;
  align-items: start;
}

.logo--footer .logo__mark {
  width: 160px;
  height: auto;
}

.footer-brand__tagline {
  margin-top: 14px;
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: 0.12em;
}

.footer-brand__tagline span {
  color: var(--gold);
  margin: 0 0.28em;
}

.footer-brand__message {
  margin-top: 8px;
  color: #5f6258;
  font-family: var(--sans);
  font-size: 0.73rem;
  line-height: 2;
}

.footer-info {
  padding-top: 12px;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 2.1;
}

.footer-nav {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.76rem;
}

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

.copyright {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 23px auto 0;
  padding-top: 13px;
  color: #8c887c;
  border-top: 1px solid #ded7ca;
  font-family: var(--sans);
  font-size: 0.68rem;
  text-align: center;
}

@media (max-width: 980px) {
  .site-header {
    overflow: visible;
  }

  .site-header__inner {
    position: relative;
    height: 68px;
    padding-block: 0;
    flex-direction: row;
    gap: 16px;
  }

  .menu-button {
    display: grid;
    margin-left: auto;
    flex: 0 0 auto;
  }

  .global-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: calc(100vh - 68px);
    display: grid;
    align-content: start;
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    padding: 24px 34px 40px;
    background: var(--white);
    border-top: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 0 14px 24px rgba(57, 54, 42, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    white-space: normal;
  }

  .global-nav--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .global-nav__link {
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid #eee8dc;
    font-size: 1rem;
    text-align: left;
  }

  .global-nav__link:last-child {
    border-bottom: 0;
  }

  .global-nav__link::after {
    left: 0;
    right: auto;
    bottom: 8px;
    width: 40px;
    transform: scaleX(0);
    transform-origin: left center;
  }

  .global-nav__link:hover::after,
  .global-nav__link--active::after {
    transform: scaleX(1);
  }

  .hero__visual {
    left: 20%;
  }

  .quick-links,
  .guide-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide-card {
    min-height: 205px;
  }

  .value-item:nth-child(2) {
    border-right: 0;
  }

  .value-item:nth-child(n + 3) {
    border-top: 1px solid #e1dacd;
    padding-top: 28px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  /* スマホ：TOP画像にテキスト可読用の白オーバーレイを表示 */
  .hero__overlay {
    opacity: 1;
  }

  .site-header__inner,
  .hero__inner,
  .quick-links,
  .page-guide,
  .values,
  .news,
  .footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .logo__mark {
    width: 126px;
    height: auto;
  }

  .global-nav {
    left: 0;
    right: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    min-height: 520px;
  }

  .hero__visual {
    inset: 0;
    opacity: 0.65;
  }

  .hero__overlay {
    background: rgba(255,255,255,0.76);
  }

  .hero__inner {
    padding-top: 110px;
  }

  .hero__title {
    letter-spacing: 0.1em;
  }

  .quick-links,
  .guide-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .quick-links {
    gap: 14px;
  }

  .value-item,
  .value-item:nth-child(2) {
    border-right: 0;
    border-top: 1px solid #e1dacd;
  }

  .value-item:first-child {
    border-top: 0;
  }

  .news-row {
    grid-template-columns: 1fr 20px;
    gap: 4px 10px;
  }

  .news-row time {
    grid-column: 1 / 2;
  }

  .news-row span {
    grid-column: 1 / 2;
  }

  .news-row b {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }

  /* お知らせの葉を背面へ移動し、記事テキストの可読性を確保 */
  .decor-leaf--news {
    z-index: 0;
    left: -70px;
    top: -35px;
    width: 180px;
    opacity: 0.14;
  }

  .news .section-heading,
  .news-list,
  .more-button {
    position: relative;
    z-index: 1;
  }

  .section-heading--line::before,
  .section-heading--line::after {
    display: none;
  }
}
