/* 木もれ日建築工房
   Lv01のCSSをここでBEMとCSSカスタムプロパティに組み替える（このレッスンのStep 1）。
   色・余白・角丸は全部ここに集める。あとから直すときに探す場所を1つにするため。 */
:root {
  --green: #2f4f3a;
  --wood:  #b8763e;
  --paper: #faf8f5;
  --line:  #e2ddd4;
  --ink:   #24282a;
  --ink-mid: #6b7169;
  --white: #ffffff;
  --space-section: 80px;
  --space-gutter: 24px;
  --radius: 4px;
  --w: 1080px;
}

/* リセットCSS */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

ul, ol {
  list-style: none;
}

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

body {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
}

/* ヘッダー：ロゴ・ナビ・電話 */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-gutter);
  padding: 20px var(--space-gutter);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo__jp {
  font-size: 19px;
  color: var(--green);
}

.logo__en {
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

/* ナビ：PC用（<nav>のみ）とSP用（<details>）を別々に持つ。
   detailsは閉じていると中身を描画しないため、CSSだけではPC幅で
   強制的に開いた状態を再現できない。だからPC用は別要素にする */
.nav-pc {
  display: block;
}

.nav-sp {
  display: none;
}

.nav__list {
  list-style: none;
}

.nav-pc .nav__list {
  display: flex;
  gap: var(--space-gutter);
}

.nav__toggle {
  cursor: pointer;
}

.nav__link {
  font-size: 15px;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav__link[aria-current="page"] {
  border-bottom-color: var(--green);
  color: var(--green);
}

.tel {
  font-size: 15px;
  white-space: nowrap;
}

.tel-note {
  display: block;
  font-size: 11px;
  color: var(--ink-mid);
}

/* ヒーロー */
.hero {
  position: relative;
}

.hero img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.hero__text {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: var(--space-gutter) var(--space-gutter) 48px;
  max-width: 640px;
  color: var(--white);
  background: rgba(36, 40, 42, 0.5);
}

.hero__text h1 {
  font-size: 34px;
  margin-bottom: 16px;
}

.hero__lead {
  font-size: 16px;
  margin-bottom: 24px;
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero__button {
  display: inline-block;
  padding: 14px 28px;
  background: var(--wood);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 500;
}

.hero__link {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 選ばれる理由 */
.reasons {
  max-width: var(--w);
  margin-inline: auto;
  padding: var(--space-section) var(--space-gutter);
}

.reasons h2 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 48px;
}

.reasons__list {
  display: flex;
  gap: var(--space-gutter);
}

.reasons__item {
  flex: 1;
  padding: 32px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.reasons__heading {
  font-size: 18px;
  color: var(--green);
  margin-bottom: 12px;
}

.reasons__body {
  font-size: 15px;
  color: var(--ink-mid);
}

/* 仕事の流れ */
.flow {
  max-width: var(--w);
  margin-inline: auto;
  padding: var(--space-section) var(--space-gutter);
}

.flow h2 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 48px;
}

.flow__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-gutter);
}

.flow__step {
  padding: 24px;
  border-top: 2px solid var(--green);
}

.flow__num {
  font-family: "Barlow", sans-serif;
  font-weight: 600;
  font-size: 28px;
  color: var(--wood);
  margin-bottom: 8px;
}

.flow__heading {
  font-size: 17px;
  margin-bottom: 8px;
}

.flow__body {
  font-size: 14px;
  color: var(--ink-mid);
  margin-bottom: 12px;
}

.flow__time {
  font-size: 13px;
  color: var(--wood);
}

/* 施工事例（部品②の出力を直したもの） */
.works {
  max-width: var(--w);
  margin-inline: auto;
  padding: var(--space-section) var(--space-gutter);
}

.works h1, .works h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.works__lead {
  color: var(--ink-mid);
  margin-bottom: 48px;
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-gutter);
}

.works__card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.works__thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.works__meta {
  font-size: 12px;
  color: var(--wood);
  padding: 20px 20px 0;
}

.works__title {
  font-size: 18px;
  padding: 8px 20px 0;
}

.works__body {
  font-size: 14px;
  color: var(--ink-mid);
  padding: 12px 20px 0;
}

.works__spec {
  display: flex;
  gap: 16px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.works__spec div {
  display: flex;
  flex-direction: column;
}

.works__spec dt {
  font-size: 12px;
  color: var(--ink-mid);
}

.works__spec dd {
  font-family: "Barlow", sans-serif;
  font-weight: 600;
  font-size: 15px;
}

.works__more {
  display: inline-block;
  margin-top: 32px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* お知らせ（部品①の出力を直したもの） */
.news {
  max-width: var(--w);
  margin-inline: auto;
  padding: var(--space-section) var(--space-gutter);
}

.news h2 {
  font-size: 28px;
  margin-bottom: 32px;
}

.news__list {
  display: flex;
  flex-direction: column;
}

.news__item {
  display: flex;
  gap: var(--space-gutter);
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.news__date {
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  width: 120px;
  color: var(--wood);
}

.news__title {
  flex: 1;
}

/* CTA（トップ末尾・施工事例末尾で共通） */
.cta {
  max-width: var(--w);
  margin-inline: auto;
  padding: var(--space-section) var(--space-gutter);
  text-align: center;
}

.cta h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.cta__body {
  color: var(--ink-mid);
  margin-bottom: 32px;
}

.cta__button {
  display: inline-block;
  padding: 16px 40px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 500;
}

.cta__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-mid);
}

/* 会社概要・工房のこと */
.company {
  max-width: var(--w);
  margin-inline: auto;
  padding: var(--space-section) var(--space-gutter);
}

.company h1 {
  font-size: 28px;
  margin-bottom: 32px;
}

.company__list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.company__row {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.company__row:last-child {
  border-bottom: none;
}

.company__row dt {
  width: 160px;
  padding: 16px 20px;
  color: var(--wood);
  font-size: 14px;
}

.company__row dd {
  flex: 1;
  padding: 16px 20px;
}

.company--about {
  display: flex;
  gap: 48px;
  align-items: center;
}

.company--about h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.company__photo {
  flex: 1;
}

.company__photo img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}

.company__text {
  flex: 1;
}

.company__text p {
  margin-bottom: 16px;
  color: var(--ink-mid);
}

/* お問い合わせ */
.contact {
  max-width: var(--w);
  margin-inline: auto;
  padding: var(--space-section) var(--space-gutter);
}

.contact h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.contact__lead {
  color: var(--ink-mid);
  margin-bottom: 32px;
}

.contact__block {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.contact__label {
  font-size: 13px;
  color: var(--wood);
  margin-bottom: 4px;
}

.contact__value {
  display: block;
  font-family: "Barlow", sans-serif;
  font-weight: 600;
  font-size: 28px;
  color: var(--ink);
}

.contact__note {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-mid);
}

/* フッター（部品③の出力を直したもの） */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding: 48px var(--space-gutter);
  background: var(--white);
  border-top: 1px solid var(--line);
  color: var(--ink-mid);
  font-size: 14px;
}

.footer__col {
  flex: 1;
}

.footer__col p,
.footer__col li {
  margin-bottom: 8px;
}

.footer__name {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer__note {
  width: 100%;
  margin-top: 24px;
  font-size: 12px;
}

/* 768px以下：1カラムに落とす */
@media (max-width: 768px) {
  header {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .nav-pc {
    display: none;
  }

  .nav-sp {
    display: block;
    order: 3;
    width: 100%;
  }

  .nav__toggle {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    color: var(--green);
  }

  .nav-sp .nav__list {
    display: block;
  }

  .nav-sp .nav__list li {
    padding: 10px 0;
    border-top: 1px solid var(--line);
  }

  .hero img {
    height: 620px;
  }

  .hero__text {
    padding: 16px 16px 32px;
    max-width: none;
  }

  .hero__text h1 {
    font-size: 24px;
  }

  .hero__cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .reasons, .flow, .works, .news, .cta, .company, .contact {
    padding: 48px 16px;
  }

  .reasons__list {
    flex-direction: column;
  }

  .flow__list {
    grid-template-columns: 1fr;
  }

  .works__grid {
    grid-template-columns: 1fr;
  }

  .news__item {
    flex-direction: column;
    gap: 4px;
  }

  .news__date {
    width: auto;
  }

  .company__row {
    flex-direction: column;
  }

  .company__row dt {
    width: auto;
    padding-bottom: 4px;
  }

  .company__row dd {
    padding-top: 0;
  }

  .company--about {
    flex-direction: column;
    gap: 24px;
  }

  .footer {
    flex-direction: column;
    gap: 24px;
  }
}
