@import url("fonts.css");

/*
  HOME page styles.
  COMMON_chijimatsu_cpa.css is loaded after this file and supplies shared
  header/footer/responsive rules.
*/

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "NotoSansJP-VariableFont_wght", "ZenKakuGothicNew-Regular", sans-serif;
  color: #ffffff;
  background-color: #00193b;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* First-view hero image and main copy. */
.hero {
  background: linear-gradient(rgba(0, 25, 59, 0.5), rgba(0, 25, 59, 0.5)), url("image/福岡市.jpg") center bottom -20% / cover no-repeat;
  background-attachment: fixed;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 64px;
  padding: 96px 24px 72px;
}

.hero-text h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-family: "Playfair Display", "ShipporiMincho-Bold", serif;
  margin-bottom: 12px;
  letter-spacing: 0.07em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hero-text p {
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  font-family: "Playfair Display", "ShipporiMincho-Medium", serif;
  margin-bottom: 12px;
  letter-spacing: 0.11em;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

/* Alternating top-page sections. */
.about,
.news {
  background-color: #00193b;
  color: #ffffff;
  padding: 56px 12px;
}

.service,
.contact {
  background-color: #ffffff;
  color: #00193b;
  padding: 56px 12px;
}

/* HOME uses a 3-column desktop layout: title / body / action button. */
.section-grid {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1.8fr 220px;
  gap: 32px;
  align-items: stretch;
  padding: 0 20px;
}

.section-title {
  grid-column: 1;
  margin-left: -16px;
}

.section-title p {
  margin: 0 0 8px;
  font-family: "Montserrat", "Oswald-VariableFont_wght", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #b9c8dd;
}

.service .section-title p,
.contact .section-title p {
  color: #557095;
}

.section-title h2 {
  margin: 0;
  font-family: "Playfair Display", "ShipporiMincho-Bold", serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.section-body {
  grid-column: 2;
}

.section-body h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  line-height: 1.7;
}

.section-body p {
  margin: 0;
  line-height: 1.85;
  font-size: 1rem;
}

.more-info {
  grid-column: 3;
  justify-self: end;
  align-self: end;
  display: inline-block;
  margin-right: -12px;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.3s, transform 0.3s;
}

.about .more-info,
.news .more-info {
  background-color: #ffffff;
  color: #00193b;
}

.service .more-info,
.contact .more-info {
  background-color: #00193b;
  color: #ffffff;
}

.more-info:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

/* Accordion on the HOME service section. */
.service-menu {
  display: grid;
  gap: 0;
}

.service-menu article {
  border-top: 1px solid #d9e0ea;
}

.service-menu article:first-child {
  border-top: 0;
}

.service-item {
  width: 100%;
  padding: 18px 0;
  border: 0;
  background: transparent;
  color: #00193b;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.service-item::before {
  content: "▾";
  display: inline-block;
  margin-right: 10px;
  font-size: 0.86rem;
  transition: transform 0.3s ease;
}

.service-item.open::before {
  transform: rotate(180deg);
}

.service-menu p {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding-bottom 0.3s ease;
}

.service-menu p.open {
  max-height: 220px;
  opacity: 1;
  padding-bottom: 18px;
}

/* NEWS list is filled by NEWS_auto.js. */
.news-list {
  display: grid;
}

.news-list article {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.news-list article:first-child {
  border-top: 0;
}

.news-list a {
  display: block;
  padding: 20px 0 22px;
  text-decoration: none;
  transition: opacity 0.3s;
}

.news-list a:hover {
  opacity: 0.76;
}

.news-list time {
  display: block;
  margin-bottom: 10px;
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.news-list h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.6;
}

.contact-lead {
  margin: 0 0 20px;
  padding-top: 20px;
  font-size: 1rem;
  line-height: 1.8;
}

.contact-list dl {
  margin: 0;
  border-top: 1px solid #d9e0ea;
}

.contact-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 4px;
  padding: 13px 0;
  border-bottom: 1px solid #d9e0ea;
}

.contact-list dt {
  color: #00193b;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.contact-list dd {
  margin: 0;
  line-height: 1.8;
}

/* Tablet: stack the HOME 3-column sections. */
@media (max-width: 1180px) {
  .hero {
    margin-top: 0;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-title,
  .section-body,
  .more-info {
    grid-column: auto;
  }

  .section-title {
    margin-left: 0;
  }

  .more-info {
    justify-self: start;
    margin-right: 0;
  }
}

/* Smartphone. */
@media (max-width: 560px) {
  .hero {
    min-height: 420px;
    background-attachment: scroll;
    background-position: center center;
    padding: 72px 18px 56px;
  }

  .about,
  .service,
  .news,
  .contact {
    padding: 48px 12px;
  }

  .contact-list div {
    grid-template-columns: 1fr;
  }
}

/* Narrow smartphone. */
@media (max-width: 420px) {
  .section-grid {
    gap: 18px;
    padding: 0 8px;
  }

  .hero {
    min-height: 380px;
  }

  .section-body h3,
  .service-item,
  .news-list h3 {
    font-size: 1.08rem;
  }

  .more-info {
    width: 100%;
  }
}
