/* ==========================================================
   共通スタイル｜全ページで使うパーツ
   Astro化するときは global.css と共通コンポーネントに分かれる
   ========================================================== */

/* ---------- ベース・PCの2カラムレイアウト
     → global.css ---------- */

body {
  font-family: "Oswald", "Noto Sans JP", sans-serif;
  color: #333;
}
body.is-fixed {
  overflow: hidden;
}

@media screen and (min-width: 768px) {
  /* 左にヘッダー、右にmainとfooterを積む2カラム。
     footerをmainの外に出せるよう、横並びはグリッドで組んでいる */
  .wrapper {
    display: grid;
    grid-template-columns: 20.8% 79.2%;
  }
  .header {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .main {
    grid-column: 2;
    grid-row: 1;
  }
  .footer {
    grid-column: 2;
    grid-row: 2;
  }
}

/* ---------- ボタン
     → ヘッダーとページ下部CTAの両方で使うので global.css ---------- */

.button {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 6px 10px 6px 30px;
  width: 160px;
  margin: 0 auto;
}
.button--bg {
  background-color: #fff;
}
.button--bg .button__text {
  color: #4a4a4a;
}
.button--border {
  border: 1px solid #fff;
}
.button--border .button__text {
  color: #fff;
}
.button__icon {
  width: 24px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.button__icon-path {
  fill: #fff;
}
.button__icon-path--contact {
  fill: #4a4a4a;
}
.button__text {
  margin-left: 10px;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #fff;
}

@media screen and (min-width: 768px) {
  .button {
    -webkit-transition: background 0.3s, color 0.3s, opacity 0.3s;
    transition: background 0.3s, color 0.3s, opacity 0.3s;
  }
  .button:hover {
    background-color: #fff;
  }
  .button:hover .button__icon-path {
    fill: #4a4a4a;
  }
  .button:hover .button__text {
    color: #4a4a4a;
  }
  .button--bg {
    color: #4a4a4a;
  }
  .button--bg:hover {
    opacity: 0.7;
  }
}

/* ---------- ヘッダー
     → Header.astro の <style> ---------- */

.header {
  background-color: #4a4a4a;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}
.header__container {
  width: 100%;
  position: relative;
}
.header__logo {
  display: inline-block;
  padding: 14px 24px;
  font-size: 20px;
  color: #fff;
}
.header__menu-button {
  border: none;
  position: absolute;
  top: 24px;
  right: 24px;
  width: 30px;
  height: 36px;
  overflow: hidden;
  color: transparent;
  background: url(../img/bg_menu.png) center center no-repeat;
  background-size: 100% auto;
}
.header__menu-button.is-checked {
  background: url(../img/bg_menu-close.png) center center no-repeat;
  background-size: 100% auto;
}
.header__contents {
  display: none;
  height: calc(100vh - 88px);
  border-top: 1px solid #fff;
  padding-top: 60px;
}
.header__contents.is-open {
  display: block;
}
.header__nav-item + .header__nav-item {
  margin-top: 24px;
}

@media screen and (min-width: 768px) {
  .header {
    position: relative;
    padding: 50px 20px;
  }
  .header__container {
    width: 160px;
    margin: 0 auto;
    position: sticky;
    top: 50px;
  }
  .header__logo {
    font-size: 30px;
    letter-spacing: 0.12em;
    line-height: 1;
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
  }
  .header__logo:hover {
    opacity: 0.7;
  }
  .header__menu-button {
    display: none;
  }
  .header__contents {
    border: none;
    display: block;
  }
}

/* ---------- セクションの共通パーツ
     → 全ページで使うので global.css ---------- */

.section {
  padding: 48px 0;
}
.section__inner {
  padding: 0 32px;
}
.section__head {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-bottom: 32px;
}
.section__head--center {
  text-align: center;
}
.section__head-main {
  font-size: 40px;
  letter-spacing: 0.1em;
}
.section__head-sub {
  font-size: 11px;
}
.section__lead-text {
  font-size: 16px;
  line-height: 1.6;
}
.section__contents {
  margin-top: 40px;
}
.section__more {
  display: block;
  width: 160px;
  margin: 40px auto 0;
  padding: 6px 10px;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #4a4a4a;
  border: 1px solid #4a4a4a;
}

@media screen and (min-width: 768px) {
  .section__inner {
    max-width: 944px;
    margin: 0 auto;
  }
  .section__head {
    margin-bottom: 24px;
  }
  .section__head-main {
    font-size: 60px;
  }
  .section__more {
    -webkit-transition: background 0.3s, color 0.3s;
    transition: background 0.3s, color 0.3s;
  }
  .section__more:hover {
    color: #fff;
    background-color: #4a4a4a;
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .section__head-main {
    font-size: 54px;
  }
}

/* ---------- 実績カード
     → WorkCard.astro の <style>（トップ・実績一覧で共通） ---------- */

.works__item + .works__item {
  margin-top: 40px;
}
.works__item-img {
  margin-bottom: 12px;
  /* CMSから来る画像はサイズがまちまちなので、枠の比率を固定して切り取る */
  aspect-ratio: 3 / 2;
}
.works__item-img img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  -webkit-box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
}
.works__item-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
}
.works__item-link {
  display: inline-block;
  text-decoration: underline;
  font-size: 14px;
}
.works__item-link-area {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  height: 100%;
}
/* タイトルが2行になっても「詳しく見る」の位置が揃うようにする */
.works__item-link-area .works__item-link {
  margin-top: auto;
}

@media screen and (min-width: 768px) {
  .works__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8%;
  }
  .works__item + .works__item {
    margin-top: 0;
  }
  .works__item-link-area {
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
  }
  .works__item-link-area:hover {
    opacity: 0.7;
  }
}

/* ---------- ページ下部のお問い合わせCTA
     → PageBottom.astro の <style> ---------- */

.page-bottom {
  color: #fff;
}
.page-bottom__item {
  padding: 40px;
}
.page-bottom__item--contact {
  background-color: #6f6f6f;
}

@media screen and (min-width: 768px) {
  .page-bottom {
    display: grid;
    grid-template-columns: 1fr;
  }
  .page-bottom__item {
    padding: 54px 10px;
  }
}

/* ---------- フッター
     → Footer.astro の <style> ---------- */

.footer {
  text-align: center;
  padding: 10px;
}
.footer__copy {
  font-size: 11px;
  font-family: "Noto Sans JP", sans-serif;
}

/* ==========================================================
   下層ページ共通｜works / works-detail / contact / thanks
   → ページ見出しは PageHero.astro、それ以外は global.css
   ========================================================== */

/* 下層ページの本文用。要素が少ないぶん、上下の余白を広めに取る */
.page-content {
  padding: 72px 0;
}
.page-head {
  background-color: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  /* スマホではヘッダーが固定されているため、その高さ（88px）ぶん上を空ける */
  padding: 112px 32px 48px;
}
.page-head .section__head-sub {
  color: #6f6f6f;
}
.page-head .section__head {
  margin-bottom: 0;
}
.section__inner--narrow {
  max-width: 640px;
}
.back-link {
  display: block;
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  text-decoration: underline;
}

@media screen and (min-width: 768px) {
  .page-head {
    padding: 64px 32px;
  }
  .page-content {
    padding: 100px 0;
  }
  .section__inner--narrow {
    max-width: 640px;
  }
}

/* ==========================================================
   トップページ専用｜index.html
   → src/pages/index.astro の <style>
   ========================================================== */

.fv {
  position: relative;
}
.fv__contents {
  position: absolute;
  bottom: 26px;
  left: 0;
  width: 100%;
  height: 209px;
  background: url(../img/sp/bg_fv.png) center center no-repeat;
  background-size: 100% auto;
  padding: 32px;
}
.fv__heading-main {
  display: block;
  font-size: 40px;
  letter-spacing: 0.1em;
}
.fv__heading-sub {
  margin-top: 12px;
  display: block;
  font-size: 14px;
}
.service__item + .service__item {
  margin-top: 40px;
}
.service__item-img {
  text-align: center;
  margin-bottom: 14px;
}
.service__item-name {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}
.service__item-text {
  font-size: 14px;
  line-height: 1.6;
}
.works {
  background-color: #fafafa;
}
.about__img {
  margin-bottom: 32px;
}
.about__img img {
  -webkit-box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
}
.about__text {
  font-size: 16px;
  line-height: 1.6;
}
.about__text + .about__text {
  margin-top: 1em;
}
.flow {
  background-color: #fafafa;
}
.flow__list {
  margin-top: 64px;
}
.flow__item {
  position: relative;
  border: 1px solid #808080;
  padding: 46px 16px 24px;
}
.flow__item + .flow__item {
  margin-top: 46px;
}
.flow__item-num {
  position: absolute;
  top: -24px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  font-size: 24px;
  background-color: #4a4a4a;
  color: #fff;
  width: 48px;
  height: 48px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}
.flow__item-img {
  margin-bottom: 24px;
  text-align: center;
}
.flow__item-name {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}
.flow__item-text {
  font-size: 14px;
  line-height: 1.6;
}
.message__img {
  margin-bottom: 32px;
}
.message__img img {
  -webkit-box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
}
.message__text {
  font-size: 16px;
  line-height: 1.6;
}

@media screen and (min-width: 768px) {
  .fv__contents {
    background: url(../img/bg_fv.png) center center no-repeat;
    background-size: 100% auto;
    bottom: 100px;
    left: 0;
    max-width: 627px;
    height: 174px;
    padding-top: 24px;
    padding-left: 96px;
  }
  .service__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8%;
  }
  .service__item + .service__item {
    margin-top: 0;
  }
  .about__container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: reverse;
    -ms-flex-direction: row-reverse;
    flex-direction: row-reverse;
    gap: 40px;
  }
  .flow__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .flow__item + .flow__item {
    margin-top: 0;
  }
  .message__container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: reverse;
    -ms-flex-direction: row-reverse;
    flex-direction: row-reverse;
    gap: 40px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .fv__contents {
    bottom: 50%;
    -webkit-transform: translateY(50%);
    transform: translateY(50%);
  }
  .flow__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 16px;
  }
}

/* ==========================================================
   実績詳細ページ専用｜works-detail.html
   → src/pages/works/[id].astro の <style>
   ========================================================== */

.work-detail__name {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.5;
}
.work-detail__img {
  margin-top: 24px;
  aspect-ratio: 3 / 2;
}
.work-detail__img img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  -webkit-box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15);
}
.rich-editor {
  margin-top: 32px;
  font-size: 16px;
  line-height: 1.8;
}
.rich-editor p {
  margin-top: 1em;
}
.rich-editor h2 {
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.5;
}
.rich-editor h3 {
  margin-top: 32px;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.6;
}
.rich-editor ul {
  margin-top: 16px;
  padding-left: 1.4em;
  list-style: disc;
}
.rich-editor li + li {
  margin-top: 8px;
}
.rich-editor h2 + p, .rich-editor h3 + p {
  margin-top: 12px;
}
.rich-editor p:first-child {
  margin-top: 0;
}

@media screen and (min-width: 768px) {
  .work-detail__name {
    font-size: 24px;
  }
}

/* ==========================================================
   お問い合わせページ専用｜contact.html
   → src/pages/contact.astro の <style>
   ========================================================== */

.form {
  margin-top: 40px;
}
.form__row + .form__row {
  margin-top: 24px;
}
.form__label {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
  font-family: "Noto Sans JP", sans-serif;
  margin-bottom: 8px;
}
.form__required {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: normal;
  color: #fff;
  background-color: #6f6f6f;
}
.form__control {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-family: "Noto Sans JP", sans-serif;
  color: #333;
  background-color: #fff;
  border: 1px solid #808080;
  border-radius: 0;
}
.form__control:focus {
  outline: 2px solid #4a4a4a;
  outline-offset: -1px;
}
.form__control::-webkit-input-placeholder {
  color: #aaa;
}
.form__control::-moz-placeholder {
  color: #aaa;
}
.form__control::placeholder {
  color: #aaa;
}
.form__textarea {
  min-height: 200px;
  resize: vertical;
}
.form__note {
  margin-top: 24px;
  font-size: 12px;
  line-height: 1.6;
  font-family: "Noto Sans JP", sans-serif;
  color: #6f6f6f;
}
.form__submit {
  display: block;
  width: 200px;
  margin: 24px auto 0;
  padding: 14px 10px;
  font-size: 16px;
  font-family: "Oswald", "Noto Sans JP", sans-serif;
  letter-spacing: 0.08em;
  color: #fff;
  background-color: #4a4a4a;
  border: none;
  cursor: pointer;
}

@media screen and (min-width: 768px) {
  .form__submit {
    -webkit-transition: opacity 0.3s;
    transition: opacity 0.3s;
  }
  .form__submit:hover {
    opacity: 0.7;
  }
}

/* ==========================================================
   送信完了ページ専用｜thanks.html
   → src/pages/thanks.astro の <style>
   ========================================================== */

.thanks {
  text-align: center;
}
.thanks__text {
  font-size: 16px;
  line-height: 1.8;
}
.thanks__text + .thanks__text {
  margin-top: 1em;
}
