/**
 * ベースリセットと要素デフォルト
 *
 * 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);
  --bg-paper: url(/system_panel/uploads/images/bg-paper.png);
}

::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-sans);
  font-weight: 500;
  color: var(--ink);
  background-color: var(--snow);
  background-image: var(--bg-paper);
}

#root {
  max-width: 1920px;
  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 {
  & .section-title__en {
    font-family: var(--font-display);
    line-height: 1;
    color: var(--yellow);
    letter-spacing: 0;
    font-size: 1.5rem;
  }
  & .section-title__ja {
    font-size: 1.25rem;
    line-height: 1.5;
    letter-spacing: 0.32em;
    font-weight: 700;
    margin-top: 0.75rem;
    color: var(--green);
  }
  
  @media (min-width: 768px) {
    & .section-title__en {
      font-size: 2rem;
    }
    & .section-title__ja {
      font-size: 1.75rem;
    }
  }
  @media (min-width: 1024px) {
    & .section-title__en {
      font-size: 2.5rem;
    }
    & .section-title__ja {
      font-size: 2rem;
    }
  }
  @media (min-width: 1200px) {
    & .section-title__en {
      font-size: 3rem;
    }
    & .section-title__ja {
      font-size: 2.25rem;
    }
  }
}
.hero-title {
  & .hero-title__en {
    font-family: var(--font-display);
    line-height: 1;
    color: var(--yellow);
    letter-spacing: 0;
    font-size: 2rem;
  }
  & .hero-title__ja {
    font-size: 1.5rem;
    line-height: 1.5;
    letter-spacing: 0.32em;
    font-weight: 700;
    margin-top: 0.75rem;
    color: var(--green);
  }
  
  @media (min-width: 768px) {
    & .hero-title__en {
      font-size: 2.5rem;
    }
    & .hero-title__ja {
      font-size: 2rem;
    }
  }
  @media (min-width: 1024px) {
    & .hero-title__en {
      font-size: 3rem;
    }
    & .hero-title__ja {
      font-size: 2.5rem;
    }
  }
  @media (min-width: 1200px) {
    & .hero-title__en {
      font-size: 4rem;
    }
    & .hero-title__ja {
      font-size: 3rem;
    }
  }
}

.section-illust-backdrop {
  pointer-events: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  
  @media (min-width: 1200px) {
    display: block;
  }
  &::before, &::after {
    content: "";
    position: absolute;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
  }
  &::before {
    background-image: url(/system_panel/uploads/images/20260821191539532961.png);
    width: 45%;
    max-width: 20rem;
    bottom: 3.125rem;
    left: 1.25rem;
    aspect-ratio: 160 / 193;
  }
  &::after {
    background-image: url(/system_panel/uploads/images/20260821191539422537.png);
    width: 25%;
    max-width: 11rem;
    right: 2.5rem;
    bottom: 10rem;
    aspect-ratio: 176 / 229;
  }
  
  &.section-illust-backdrop--2 {
    &::before {
      background-image: url(/system_panel/uploads/images/20260822184807310957.png);
      width: 21%;
      max-width: 17.5rem;
      aspect-ratio: 56 / 71;
      left: -1.25rem;
      bottom: 0;
    }
    &::after {
      bottom: unset;
      top: 0;
      right: -1.2rem;
    }
  }
  &.section-illust-backdrop--3 {
    &::before {
      bottom: -2.5rem;
      left: 8rem;
      max-width: 12.375rem;
    }
    &::after {
      background-image: url(/system_panel/uploads/images/20260822191407564912.png);
      bottom: unset;
      top: 4rem;
      right: 8rem;
      width: 10rem;
      aspect-ratio: 339 / 227;
    }
  }
  &.section-illust-backdrop--4 {
    &::before {
      background-image: url(/system_panel/uploads/images/20260822184807310957.png);
      width: 21%;
      max-width: 17.5rem;
      aspect-ratio: 56 / 71;
      left: -1.25rem;
      bottom: 0;
    }
    &::after {
      background-image: url(/system_panel/uploads/images/20260822205914725565.png);
      bottom: unset;
      top: -4rem;
      right: 2rem;
      width: 28%;
      max-width: 20rem;
      aspect-ratio: 32 / 43;
    }
  }
}

.button {
  padding: 1rem 1.5rem 1rem 2rem;
  border-radius: 1.5rem;
  background-color: var(--green);
  box-shadow: var(--shadow-green);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.25;
  font-size: 1.125rem;
  font-weight: 700;
  transition: box-shadow 200ms ease, transform 200ms ease;
  color: var(--snow);
  
  &:hover {
    transform: translateY(5px);
    box-shadow: none;
    text-decoration: none;
    color: var(--snow);
  }
  &::after {
    content: "";
    display: inline-block;
    width: 2rem;
    height: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M27.7075%2016.7076L18.7075%2025.7076C18.5199%2025.8952%2018.2654%2026.0006%2018%2026.0006C17.7346%2026.0006%2017.4801%2025.8952%2017.2925%2025.7076C17.1049%2025.5199%2016.9994%2025.2654%2016.9994%2025.0001C16.9994%2024.7347%2017.1049%2024.4802%2017.2925%2024.2926L24.5862%2017.0001H5C4.73478%2017.0001%204.48043%2016.8947%204.29289%2016.7072C4.10536%2016.5196%204%2016.2653%204%2016.0001C4%2015.7348%204.10536%2015.4805%204.29289%2015.293C4.48043%2015.1054%204.73478%2015.0001%205%2015.0001H24.5862L17.2925%207.70757C17.1049%207.51993%2016.9994%207.26543%2016.9994%207.00007C16.9994%206.7347%2017.1049%206.48021%2017.2925%206.29257C17.4801%206.10493%2017.7346%205.99951%2018%205.99951C18.2654%205.99951%2018.5199%206.10493%2018.7075%206.29257L27.7075%2015.2926C27.8005%2015.3854%2027.8742%2015.4957%2027.9246%2015.6171C27.9749%2015.7385%2028.0008%2015.8687%2028.0008%2016.0001C28.0008%2016.1315%2027.9749%2016.2616%2027.9246%2016.383C27.8742%2016.5044%2027.8005%2016.6147%2027.7075%2016.7076Z%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fsvg%3E%0A");
    background-repeat: no-repeat;
    background-size: contain;
  }
  
  &.button--yellow {
    background-color: var(--yellow);
    box-shadow: var(--shadow-yellow);
  }
  
  &.button--small {
    padding: 0.75rem 1rem 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    
    &::after {
      width: 1.5rem;
      height: 1.5rem;
    }
  }
 
  @media (min-width: 768px) {
    &:not(.button--small) {
      font-size: 1.25rem;
    }
  }
  
  &.button--insta {
    background-image: url(/system_panel/uploads/images/grad-insta.jpg);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    box-shadow: var(--elevation-2);
  }
}

.with-wave {
  &.with-wave--top::before {
    content: "";
    background-image: url(/system_panel/uploads/images/wave-top.png);
  }
  &.with-wave--bottom::after {
    content: "";
    background-image: url(/system_panel/uploads/images/wave-bottom.png);
  }
  &::before, &::after {
    width: 100%;
    display: block;
    aspect-ratio: 32 / 1;
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
}

.person-illust {
  position: absolute;
  top: 0;
  right: 1.25rem;
  transform: rotate(5.06deg) translateY(-85%);
  width: 20%;
  max-width: 10rem;
  z-index: -1;
}

.home-hero {
  height: 37.5rem;
  
  
  @media (min-width: 768px) {
    height: 50rem;
  }
  @media (min-width: 1200px) {
    height: 56.25rem;
  }
}

.home-gallery {
  & .swiper-wrapper {
    transition-timing-function: linear;
  }
  &:not(.swiper-initialized) {
    & .swiper-wrapper {
      display: flex;
      gap: 1.5rem;
    }
    & .swiper-slide {
      min-width: 20rem;
      width: 20rem;
    }
  }
  &.swiper {
    & .swiper-slide {
      & img {
        width: 100%;
        aspect-ratio: 4 / 3;
        box-shadow: var(--elevation-2);
      }
    }
  }
}

.home-intro-image--tl {
  position: absolute;
  width: 10%;
  max-width: 4.375rem;
  left: 5%;
  top: 10rem;
  
  @media (min-width: 1024px) {
    left: 12%;
  }
}
.home-intro-image--tr {
  position: absolute;
  width: 15%;
  max-width: 7.5rem;
  right: 4%;
  top: 8rem;
  
  @media (min-width: 1024px) {
    right: 12%;
  }
}
.home-intro-image--bl {
  display: none;
  
  @media (min-width: 1024px) {
    display: block;
    position: absolute;
    width: 15%;
    max-width: 15.625rem;
    left: 8%;
    bottom: 3rem;
    opacity: 0.4;
  }
}
.home-intro-image--br {
  display: none;
  
  @media (min-width: 1024px) {
    display: block;
    position: absolute;
    width: 15%;
    max-width: 14.25rem;
    right: 4%;
    bottom: 3rem;
    opacity: 0.4;
  }
}

.home-service-backdrop {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 0;
  &::before {
    content: "";
    background: linear-gradient(180deg, rgba(44, 130, 84, 0.10) 0%, rgba(44, 130, 84, 0.60) 100%);
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
  }
  
  & img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
  }
}

.search-title-wrapper {
  display: none;
}
.webgene-search-form-block {
  margin-bottom: 2rem;
}
.search-area-wrapper {
  margin-left: 3.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid hsla(from var(--ink) h s l / 20%);
  
  @media (min-width: 768px) {
    margin-left: 6.25rem;
  }
}
.search-contents-wrapper {
  display: flex;
  column-gap: 1.25rem;
  row-gap: 1rem;
  flex-wrap: wrap;
  & > label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
}

.search-subtitle {
  display: none;
}
