/**
 * ベースリセットと要素デフォルト
 *
 * Sibloo は Bootstrap 4.1.3 を強制的に読み込み、その Reboot がリセットの多くを
 * 担う。ここでは Reboot と同じ値を自前でも宣言し、Bootstrap の有無に関わらず
 * 同じ結果になるようにする。
 */

:root {
  /* アンカーで飛んだときに上へ空ける量。固定ヘッダーを置く案件では
   * その高さに合わせる。ベースの .header は position: relative で高さを
   * 持たないため、ここでは余白としての既定値だけを持つ。 */
  --scroll-offset: 3.75rem;

  /* テキスト選択時の色 */
  --selection-bg: var(--ink);
  --selection-fg: var(--snow);

  /* hr の罫線 */
  --hr-color: var(--light-gray);
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-fg);
}

*,
*::before,
*::after {
  /* Reboot 依存のうち最も影響が大きい。padding / sizes ユーティリティは
   * すべて border-box を前提にしている。 */
  box-sizing: border-box;
  min-width: 0px;
  min-height: 0px;
}

html {
  /* iOS の横向きで文字が自動拡大されるのを止める */
  -webkit-text-size-adjust: 100%;
  /* タップ時のハイライトを消す */
  -webkit-tap-highlight-color: transparent;

  /* 最小値13pxを保証し、1200px未満では最大22pxまでフォントサイズが流動する */
  font-size: clamp(13px, var(--font-size-base), 22px);

  @media screen and (min-width: 1200px) {
    font-size: clamp(0.1rem, var(--font-size-base), 24px);
  }
}

/**
 * ページ内リンクのスムーススクロール。
 *
 * ネイティブのハッシュ遷移に任せる。位置のオフセットは [id] の
 * scroll-margin-top が受け持つ。
 *
 * 「動きを減らす」設定の環境では即座にジャンプする。
 *
 * フォームのあるページでは 01_FormScript.js がこれを切る。validationEngine が
 * エラー箇所へ移動するときに使う jQuery の animate({ scrollTop }) と噛み合わない
 * ため。理由はそちらのコメントにある。
 */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  line-height: 1.5;
  /* 長い URL や英単語がはみ出して横スクロールを作るのを防ぐ。
   * 収まらないときだけ働くため、通常の行分割には影響しない。 */
  overflow-wrap: break-word;
  font-family: var(--font-serif);
  color: var(--ink);
  background-color: var(--snow);
  background-image: var(--paper);
}

#root {
  margin: 0 auto;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: inherit;
  line-height: inherit;
}

/**
 * リスト・図・引用の margin リセット。
 *
 * 余白はユーティリティで与える方針に揃える。padding-left と list-style は
 * 既定のまま残すため、箇条書きの体裁自体は変わらない。
 */
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

/* Bootstrap の hr は margin 1rem と rgba(0,0,0,.1) の罫線を持つ。
 * 余白はユーティリティで与える方針に揃え、色は変数にする。 */
hr {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--hr-color);
}

img,
iframe,
video {
  max-width: 100%;
}

/* inline 由来の下端の隙間を防ぐ */
img,
svg {
  vertical-align: middle;
}

table {
  border-collapse: collapse;
}

iframe {
  border: none;
  box-shadow: none;
}

a,
a:hover {
  color: var(--ink);
}
/* Reboot と同値。ホバー時の下線を残すかは別途判断する */
a {
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

[id] {
  scroll-margin-top: var(--scroll-offset);
}

/* ユーティリティより後に読む必要があるためここに置いている。
 * 04_padding などへ先を越されると .p-16 のような指定に負けて、
 * 視覚的に隠しきれなくなる。 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* フォーム要素はフォント関連を継承しない */
button,
input,
optgroup,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
textarea {
  resize: vertical;
}

button {
  position: relative;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
  border: 0;
  background: none;
  padding: 0;
}

/**
 * フォーカスリングはキーボード操作でだけ出す。
 *
 * Bootstrap 4.1.3 は button:focus に独自のリングを当てており、詳細度が
 * (0,1,1) あるため素の button { outline: none } では打ち消せない。
 * :not(:focus-visible) を重ねて (0,2,1) にし、ポインタ操作のときだけ消す。
 *
 * Bootstrap が外れた場合も :focus-visible 側が効くため、インジケータは
 * 失われない。
 */
button:focus:not(:focus-visible) {
  outline: none;
}
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* CMS が箇条書きを <p> で出力するため、それを list-item として見せるための
 * アダプタ。ブログ固有ではないのでここに置いている。 */
.list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1.5rem;
  list-style: disc outside none;

  & > p {
    margin: 0;
    display: list-item;
  }
}

/**
 * 印刷
 *
 * Bootstrap 4.1.3 は @page { size: a3 } と、body および .container への
 * min-width: 992px !important を当てており、そのままだと A3 用紙・デスクトップ幅で
 * 印刷される。これらは対になっていて、一部だけ戻すと用紙からはみ出す。
 *
 * ここでは全部戻し、画面と同じレスポンシブな見た目で印刷されるようにする。
 * デスクトップ幅で刷りたい案件は、これらを案件側で戻す。
 *
 * .container は自前では定義していない Bootstrap のクラスだが、案件が使っている
 * 場合に同じ問題が起きるため打ち消しておく。
 */
@media print {
  @page {
    size: auto;
  }

  body,
  .container {
    min-width: 0 !important;
  }
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-weight: 500;
  & > p {
    line-height: 1;
    font-size: 1rem;
    color: var(--dark-green);
    opacity: 0.8;
  }
  & h2, & h3, & h4, & h5, & h6 {
    line-height: 1.25;
    font-family: var(--font-display);
    font-size: 2rem;
  }
  @media (min-width: 768px) {
    & > p {
      font-size: 1.125rem;
    }
    & h2, & h3, & h4, & h5, & h6 {
      font-size: 2.125rem;
    }
  }
  @media (min-width: 1024px) {
    & h2, & h3, & h4, & h5, & h6 {
      font-size: 2.25rem;
    }
  }
  @media (min-width: 1200px) {
    & > p {
      font-size: 1.25rem;
    }
    & h2, & h3, & h4, & h5, & h6 {
      font-size: 2.5rem;
    }
  }
  &.section-title--snow {
    color: var(--snow);
    & > p {
      color: var(--snow);
    }
  }
  &.section-title--32 {
    & > p {
      font-size: 0.875rem;
    }
    & h2, & h3, & h4, & h5, & h6 {
      font-size: 1.5rem;
    }
    @media (min-width: 768px) {
      & > p {
        font-size: 1rem;
      }
      & h2, & h3, & h4, & h5, & h6 {
        font-size: 1.75rem;
      }
    }
    @media (min-width: 1200px) {
      & h2, & h3, & h4, & h5, & h6 {
        font-size: 2rem;
      }
    }
  }
  
  &.section-title--vertical {
    writing-mode: vertical-rl;
    white-space: nowrap;
    gap: 2rem;
    & .section-title__heading-wrapper {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      & > p {
        flex-shrink: 0;
        --tracking: 1.125rem;
      }
      & h2, & h3, & h4, & h5, & h6, p {
        flex-shrink: 0;
        line-height: 1;
        --tracking: 0;
        font-family: var(--font-display);
        font-size: 1.5rem;
        padding-right: 0.375em;
        border-right: 1px solid hsl(from var(--ink) h s l / 0.2);
      }
    }
    @media (min-width: 768px) {
      gap: 3rem;
      & > p {
        font-size: 1rem;
      }
      & .section-title__heading-wrapper {
        & h2, & h3, & h4, & h5, & h6, p {
          font-size: 1.75rem;
        }
      }
    }
    @media (min-width: 1200px) {
      gap: 4rem;
      & .section-title__heading-wrapper {
        & h2, & h3, & h4, & h5, & h6, p {
          font-size: 2rem;
        }
      }
    }
    &.section-title--snow {
      & .section-title__heading-wrapper {
        & h2, & h3, & h4, & h5, & h6, p {
          border-color: hsl(from var(--snow) h s l / 0.2);;
        }
      }
    }
  }
}



.footer-bg-flower {
  width: 17.5rem;
  filter: blur(2px);
  opacity: 0.04;
  position: absolute;
  right: -8.5rem;
  bottom: -3.5rem;
  & imgt {
    width: 100%;
  }
}

.page-hero {
  position: relative;
  padding: 7.5rem 0.625rem 0.625rem;
  --content-padding: 0.875rem;
  height: 30rem;
  @media (min-width: 768px) {
    height: 35rem;
    padding: 10rem 1.25rem 1.25rem 4rem;
    --content-padding: 1rem;
  }
  @media (min-width: 1024px) {
    padding-left: 10rem;
    --content-padding: 1.25rem;
  }
  @media (min-width: 1200px) {
    height: 40rem;
    padding-top: 8.75rem;
    padding-left: 15rem;
  }
  & .page-hero__content {
    height: 100%;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: end;
    background-color: var(--dark-green);
    padding: var(--content-padding);
    &::before {
      content: "";
      pointer-events: none;
      position: absolute;
      inset: 1px;
      background-image: var(--paper);
      border-top-right-radius: 1rem;
      border-bottom-left-radius: 1rem;
    }
  }
  & .page-hero__bg-image {
    position: absolute;
    inset: var(--content-padding);
    &::after {
      pointer-events: none;
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.80) 100%);
    }
    & img {
      object-fit: cover;
      width: 100%;
      height: 100%;
    }
  }
  & .page-hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    font-weight: 500;
    color: var(--dark-green);
    margin: 0 1rem 2rem;
    & > p {
      line-height: 1;
      font-size: 1rem;
      opacity: 0.8;
    }
    & h1{
      line-height: 1.25;
      font-family: var(--font-display);
      font-size: 2.25rem;
    }
    @media (min-width: 768px) {
      margin-inline: 2.5rem;
      & > p {
        font-size: 1.125rem;
      }
      & h1 {
        font-size: 2.5rem;
      }
    }
    @media (min-width: 1024px) {
      margin-bottom: 2.5rem;
      & h1 {
        font-size: 2.75rem;
      }
    }
    @media (min-width: 1200px) {
      margin: 0 3.75rem 3rem;
      & > p {
        font-size: 1.25rem;
      }
      & h1 {
        font-size: 3rem;
      }
    }
  }
}

.button {
  --button-bg: var(--dark-green);
  position: relative;
  z-index: 0;
  background-color: var(--button-bg);
  line-height: 1;
  --tracking: 0.02em;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--button-bg);
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem 0.875rem 1.5rem;
  gap: 1.5rem;
  transition: all ease 200ms;
  &::before {
    pointer-events: none;
    content: "";
    position: absolute;
    z-index: -1;
    inset: 1px;
    border-top-right-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
    background-image: var(--paper);
    background-color: var(--snow);
  }
  &::after {
    content: "";
    width: 1.5rem;
    aspect-ratio: 1 / 1;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M12.5303%2011.4697C12.8232%2011.7626%2012.8232%2012.2374%2012.5303%2012.5303L7.53027%2017.5303L6.46973%2016.4697L10.9395%2012L6.46973%207.53027L7.53027%206.46973L12.5303%2011.4697ZM18.5303%2011.4697C18.8232%2011.7626%2018.8232%2012.2374%2018.5303%2012.5303L13.5303%2017.5303L12.4697%2016.4697L16.9395%2012L12.4697%207.53027L13.5303%206.46973L18.5303%2011.4697Z%22%20fill%3D%22%231B3D16%22%2F%3E%0A%3C%2Fsvg%3E%0A");
  }
  &:hover {
    text-decoration: none;
    color: var(--button-bg);
    opacity: 85%;
    transform: scale(0.95);
  }
  
  &.button--ink {
    --button-bg: var(--snow);
    &::before {
      background-image: none;
      background-color: var(--ink);
    }
    &::after {
      background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M12.5303%2011.4697C12.8232%2011.7626%2012.8232%2012.2374%2012.5303%2012.5303L7.53027%2017.5303L6.46973%2016.4697L10.9395%2012L6.46973%207.53027L7.53027%206.46973L12.5303%2011.4697ZM18.5303%2011.4697C18.8232%2011.7626%2018.8232%2012.2374%2018.5303%2012.5303L13.5303%2017.5303L12.4697%2016.4697L16.9395%2012L12.4697%207.53027L13.5303%206.46973L18.5303%2011.4697Z%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fsvg%3E%0A");
    }
  }
  &.button--dark-green {
    --button-bg: var(--snow);
    &::before {
      background-image: none;
      background-color: var(--dark-green);
    }
    &::after {
      background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M12.5303%2011.4697C12.8232%2011.7626%2012.8232%2012.2374%2012.5303%2012.5303L7.53027%2017.5303L6.46973%2016.4697L10.9395%2012L6.46973%207.53027L7.53027%206.46973L12.5303%2011.4697ZM18.5303%2011.4697C18.8232%2011.7626%2018.8232%2012.2374%2018.5303%2012.5303L13.5303%2017.5303L12.4697%2016.4697L16.9395%2012L12.4697%207.53027L13.5303%206.46973L18.5303%2011.4697Z%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fsvg%3E%0A");
    }
  }
}

.recruit-message-sub-image {
  width: 53.3333333333%;
  position: absolute;
  bottom: 0;
  left: 0;
  transform: translate(-25%, 18.75%);
}

.bg-trees {
  width: 50rem;
  opacity: 0.15;
  filter: blur(1px);
  position: absolute;
  bottom: -8.75rem;
  left: -13.125rem;
  & img {
    width: 100%;
  }
  &.bg-trees--br {
    top: auto;
    right: -10rem;
    bottom: -7.5rem;
    left: auto;
  }
}

.bg-bamboo {
  width: 45%;
  max-width: 25rem;
  opacity: 0.03;
  filter: blur(4px);
  position: absolute;
  top: 8.125rem;
  left: -1.875rem;
  & img {
    width: 100%;
  }
  &.bg-bamboo--tr {
    filter: blur(2px);
    position: absolute;
    top: -5rem;
    right: -1.875rem;
    left: auto;
    transform: scaleX(-1);
  }
}

.bg-bamboo2 {
  width: 40rem;
  opacity: 0.15;
  filter: blur(1px);
  position: absolute;
  bottom: -2.5rem;
  left: -10rem;
  & img {
    width: 100%;
  }
}

.recruit-card-title {
  padding: 0.625rem;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
}

.bg-pine {
  width: 40rem;
  opacity: 0.15;
  filter: blur(1px);
  position: absolute;
  top: 5rem;
  left: -5rem;
  &.bg-pine--bl {
    top: auto;
    bottom: -14.875rem;
    left: -4.5rem;
  }
}

.bg-rock {
  width: 50rem;
  opacity: 0.05;
  position: absolute;
  right: -1.25rem;
  bottom: -0.625rem;
  &.bg-rock--bl {
    width: 45rem;
    right: auto;
    bottom: 0;
    left: 0;
    transform: scaleX(-1);
  }
}

.bg-pine2 {
  width: 75rem;
  filter: blur(2px);
  position: absolute;
  bottom: -2rem;
  left: -2.5rem;
}

.services-slider {
  width: 100%;
  position: relative;
  & .slide-bg {
    position: absolute;
    inset: 0;
    &::before {
      pointer-events: none;
      content: "";
      position: absolute;
      inset: 0;
      background-color: var(--ink);
      opacity: 0.75;
    }
    & img {
      object-fit: cover;
      width: 100%;
      height: 100%;
    }
  }
  & .swiper-pagination {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
  }
  & .swiper-pagination-bullet {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    opacity: 0.5;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    transition: opacity ease 200ms;
    &:hover {
      opacity: 1;
    }
    &.swiper-pagination-bullet-active {
      border: 1px solid var(--snow);
      opacity: 1;
    }
    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  }
}

.swiper:not(.swiper-initialized):not(.services-slider) {
  & .swiper-wrapper {
    display: flex;
    overflow-x: auto;
  }
  & .swiper-slide {
    min-width: 60%;
  }
  
}

.work-slider {
  width: 100%;
  --swiper-pagination-color: var(--dark-green);
  & .swiper-slide {
    & img {
      object-fit: cover;
      width: 100%;
      aspect-ratio: 16 / 9;
    }
  }
  & .swiper-pagination {
    position: relative;
    margin: 0;
    position: static;
  }
}

.bg-carps {
  width: 22.5rem;
  opacity: 0.05;
  filter: blur(6px);
  position: absolute;
  top: 1.25rem;
  left: 3rem;
}

.bg-plum {
  width: 50rem;
  opacity: 0.05;
  filter: blur(2px);
  position: absolute;
  top: 50%;
  right: -5rem;
  transform: translateY(-50%);
}












