/**
 * ベースリセットと要素デフォルト
 *
 * 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-sans);
  color: var(--ink);
  background-color: #F7F3ED;
  font-weight: 500;
}

#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: 2rem;
  line-height: 1.25;
  font-family: var(--font-serif);
  & > p {
    color: var(--red);
    --tracking: 0.32em;
    font-weight: 400;
    font-size: 1rem;
  }
  & > h2, & > h3, & > h4, & > h5, & > h6 {
    font-size: 1.5rem;
  }
  @media (min-width: 768px) {
    & > p {
      font-size: 1.125rem;
    }
    & > h2, & > h3, & > h4, & > h5, & > h6 {
      font-size: 1.75rem;
    }
  }
  @media (min-width: 1024px) {
    & > p {
      font-size: 1.25rem;
    }
    & > h2, & > h3, & > h4, & > h5, & > h6 {
      font-size: 2rem;
    }
  }
  @media (min-width: 1200px) {
    & > p {
      font-size: 1.5rem;
    }
    & > h2, & > h3, & > h4, & > h5, & > h6 {
      font-size: 2.5rem;
    }
  }
}

.button {
  position: relative;
  padding: 0.75rem 1.25rem 0.75rem 1.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--elevation-2);
  line-height: 1.25;
  background-color: var(--ink);
  --button-color: var(--snow);
  color: var(--button-color);
  transition: all ease 200ms;
  &::after {
    content: "";
    aspect-ratio: 1 / 1;
    width: 1.5rem;
    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%22M20.6475%2012.3976L13.8975%2019.1476C13.7909%2019.247%2013.6498%2019.3011%2013.5041%2019.2985C13.3584%2019.2959%2013.2193%2019.2369%2013.1163%2019.1338C13.0132%2019.0308%2012.9542%2018.8917%2012.9516%2018.746C12.949%2018.6003%2013.0031%2018.4593%2013.1025%2018.3526L18.8916%2012.5626H3.75C3.60082%2012.5626%203.45774%2012.5034%203.35225%2012.3979C3.24676%2012.2924%203.1875%2012.1493%203.1875%2012.0001C3.1875%2011.8509%203.24676%2011.7079%203.35225%2011.6024C3.45774%2011.4969%203.60082%2011.4376%203.75%2011.4376H18.8916L13.1025%205.64763C13.0031%205.541%2012.949%205.39996%2012.9516%205.25424C12.9542%205.10851%2013.0132%204.96947%2013.1163%204.86641C13.2193%204.76335%2013.3584%204.70432%2013.5041%204.70175C13.6498%204.69918%2013.7909%204.75327%2013.8975%204.85263L20.6475%2011.6026C20.7528%2011.7081%2020.812%2011.8511%2020.812%2012.0001C20.812%2012.1492%2020.7528%2012.2922%2020.6475%2012.3976Z%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fsvg%3E%0A");
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  &:hover {
    text-decoration: none;
    color: var(--button-color);
    opacity: 0.85;
    transform: scale(0.95);
  }
  &.button--snow {
    background-color: var(--snow);
    --button-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%22M20.6475%2012.3976L13.8975%2019.1476C13.7909%2019.247%2013.6498%2019.3011%2013.5041%2019.2985C13.3584%2019.2959%2013.2193%2019.2369%2013.1163%2019.1338C13.0132%2019.0308%2012.9542%2018.8917%2012.9516%2018.746C12.949%2018.6003%2013.0031%2018.4593%2013.1025%2018.3526L18.8916%2012.5626H3.75C3.60082%2012.5626%203.45774%2012.5034%203.35225%2012.3979C3.24676%2012.2924%203.1875%2012.1493%203.1875%2012.0001C3.1875%2011.8509%203.24676%2011.7079%203.35225%2011.6024C3.45774%2011.4969%203.60082%2011.4376%203.75%2011.4376H18.8916L13.1025%205.64763C13.0031%205.541%2012.949%205.39996%2012.9516%205.25424C12.9542%205.10851%2013.0132%204.96947%2013.1163%204.86641C13.2193%204.76335%2013.3584%204.70432%2013.5041%204.70175C13.6498%204.69918%2013.7909%204.75327%2013.8975%204.85263L20.6475%2011.6026C20.7528%2011.7081%2020.812%2011.8511%2020.812%2012.0001C20.812%2012.1492%2020.7528%2012.2922%2020.6475%2012.3976Z%22%20fill%3D%22%23474240%22%2F%3E%0A%3C%2Fsvg%3E%0A");
    }
  }
  &.button--rainbow {
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.20) 100%), linear-gradient(90deg, #E9A3B6 0%, #89BDDB 25%, #E0CD6C 50%, #C896D1 75.48%, #E9A3B6 100%);
    --button-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%22M20.6475%2012.3976L13.8975%2019.1476C13.7909%2019.247%2013.6498%2019.3011%2013.5041%2019.2985C13.3584%2019.2959%2013.2193%2019.2369%2013.1163%2019.1338C13.0132%2019.0308%2012.9542%2018.8917%2012.9516%2018.746C12.949%2018.6003%2013.0031%2018.4593%2013.1025%2018.3526L18.8916%2012.5626H3.75C3.60082%2012.5626%203.45774%2012.5034%203.35225%2012.3979C3.24676%2012.2924%203.1875%2012.1493%203.1875%2012.0001C3.1875%2011.8509%203.24676%2011.7079%203.35225%2011.6024C3.45774%2011.4969%203.60082%2011.4376%203.75%2011.4376H18.8916L13.1025%205.64763C13.0031%205.541%2012.949%205.39996%2012.9516%205.25424C12.9542%205.10851%2013.0132%204.96947%2013.1163%204.86641C13.2193%204.76335%2013.3584%204.70432%2013.5041%204.70175C13.6498%204.69918%2013.7909%204.75327%2013.8975%204.85263L20.6475%2011.6026C20.7528%2011.7081%2020.812%2011.8511%2020.812%2012.0001C20.812%2012.1492%2020.7528%2012.2922%2020.6475%2012.3976Z%22%20fill%3D%22%23474240%22%2F%3E%0A%3C%2Fsvg%3E%0A");
    }
  }
  &.button--bd-red {
    background-color: var(--snow);
    --button-color: var(--red);
    border: 1px solid var(--red);
    &::after {
      background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M13.765%208.26492L9.265%2012.7649C9.19391%2012.8312%209.09989%2012.8672%209.00274%2012.8655C8.90559%2012.8638%208.8129%2012.8244%208.74419%2012.7557C8.67548%2012.687%208.63613%2012.5943%208.63441%2012.4972C8.6327%2012.4%208.66876%2012.306%208.735%2012.2349L12.5944%208.37492H2.5C2.40054%208.37492%202.30516%208.33541%202.23483%208.26509C2.16451%208.19476%202.125%208.09938%202.125%207.99992C2.125%207.90047%202.16451%207.80508%202.23483%207.73476C2.30516%207.66443%202.40054%207.62492%202.5%207.62492H12.5944L8.735%203.76492C8.66876%203.69384%208.6327%203.59981%208.63441%203.50266C8.63613%203.40551%208.67548%203.31282%208.74419%203.24411C8.8129%203.17541%208.90559%203.13605%209.00274%203.13434C9.09989%203.13262%209.19391%203.16868%209.265%203.23492L13.765%207.73492C13.8352%207.80524%2013.8747%207.90055%2013.8747%207.99992C13.8747%208.0993%2013.8352%208.19461%2013.765%208.26492Z%22%20fill%3D%22%23AA4C4F%22%2F%3E%0A%3C%2Fsvg%3E%0A");
    }
  }
}

.footer-contact-bg-dec {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 51.625rem;
  & img {
    width: 100%;
    height: 100%;
  }
}

.diamond {
  aspect-ratio: 1 / 1;
  width: 0.625rem;
  background-color: var(--red);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  @media (min-width: 1024px) {
    width: 0.75rem;
  }
}

.page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 10rem 1.25rem 0;
  @media (min-width: 768px) {
    padding-inline: 2rem;
  }
  @media (min-width: 1024px) {
    padding-top: 12.5rem;
  }
  @media (min-width: 1200px) {
    padding-top: 15rem;
  }
  
  & .page-hero__title {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 80rem;
    width: 100%;
    margin-inline: auto;
    line-height: 1.25;
    --tracking: 0;
    font-family: var(--font-serif);
    & p {
      font-size: 2.5rem;
    }
    & h1 {
      font-size: 1rem;
    }
    @media (min-width: 768px) {
      & p {
        font-size: 5rem;
      }
      & h1 {
        font-size: 1.5rem;
      }
    }
    @media (min-width: 1024px) {
      & p {
        font-size: 7rem;
      }
      & h1 {
        font-size: 1.75rem;
      }
    }
    @media (min-width: 1200px) {
      & p {
        font-size: 8.25rem;
      }
      & h1 {
        font-size: 2.25rem;
      }
    }
  }
}

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

.intro-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.service-image {
  position: sticky;
  top: 0;
  width: 100%;
  object-fit: cover;
  max-height: 100%;
  height: 100svh;
}


.pricing-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  
  &::before, &::after {
    content: "";
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    filter: blur(4rem);
    display: block;
    position: absolute;
  }
  
  &::before {
    width: 35%;
    max-width: 28.125rem;
    left: -8.1%;
    top: 3rem;
  }
  &::after {
    width: 30%;
    right: -5%;
    bottom: -5rem;
    max-width: 25rem;
  }
  
  
  &.pricing-deco--blue {
    &::before, &::after {
      background-color: var(--pale-blue);
    }
  }
  &.pricing-deco--yellow {
    &::before, &::after {
      background-color: var(--pale-yellow);
    }
  }
  &.pricing-deco--green {
    &::before, &::after {
      background-color: var(--pale-green);
    }
  }
}

.faq-list {
  & .faq-label {
  }
}

.home-intro-badge {
  transform: rotate(8deg);
}

.home-story-backdrop {
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.00) 4.81%, #FFF 95.19%);
}

.magazine-image {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) rotate(-7.63deg);
  top: -6rem;
  width: 40%;
  aspect-ratio: 25 / 32;
  object-fit: cover;
  
  @media (min-width: 414px) {
    width: 35%;
  }
  @media (min-width: 768px) {
    top: 50%;
    left: -5.3125rem;
    transform: translateY(-50%) rotate(-7.63deg);
    width: 10rem;
  }
}

.insta-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  & .intro-deco {
    min-width: 25rem;
    @media (min-width: 768px) {
      min-width: 37.5rem;
    }
  }
}
