@charset "utf-8";

/* ============================================================
   石経石材 TOPページ
   responsive.css  —  メディアクエリ（PCファースト）

   ブレークポイント
     - 1120px 以下 : 大型タブレット（余白調整）
     - 960px  以下 : タブレット（3カラム → 2カラム）
     - 767px  以下 : スマートフォン（1カラム／ハンバーガー）
     - 480px  以下 : 小型スマートフォン
   ============================================================ */

/* ------------------------------------------------------------
   1120px 以下 — 余白と横幅の調整
   ------------------------------------------------------------ */
@media screen and (max-width: 1120px) {
  :root {
    --container-pad: 24px;
    --section-py: 80px;
  }

  /* 高さ固定をやめ、比率で伸縮させる */
  .p-hero__viewport {
    height: auto;
    aspect-ratio: 1080 / 480;
  }
}

/* ------------------------------------------------------------
   960px 以下 — タブレット
   ------------------------------------------------------------ */
@media screen and (max-width: 960px) {
  :root { --fs-h2: 28px; }

  /* ヘッダー：電話番号を小さく */
  .header__tel-link { font-size: 20px; }
  .gnav__link { font-size: 12px; padding: 14px 4px; }

  /* グリッドを2カラムへ */
  .c-grid--3 { grid-template-columns: repeat(2, 1fr); }

  /* 会社概要・ごあいさつを縦積み */
  .p-about__intro,
  .p-about__company {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .p-about__figure { max-width: 560px; }

  /* 墓地検索：エリアパネル */
  .p-area {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .p-area__map { aspect-ratio: 4 / 3; }
  .p-area__map-img { height: 100%; }

  .p-cond__grid { grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }

  /* SNS */
  .p-sns { grid-template-columns: 1fr; gap: 40px; }
  .p-sns__box--fb { min-height: 0; }

  /* フッター：4カラム → 2カラム */
  .l-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* ------------------------------------------------------------
   767px 以下 — スマートフォン
   ------------------------------------------------------------ */
@media screen and (max-width: 767px) {
  :root {
    --fs-body: 15px;
    --fs-h2: 24px;
    --fs-h3: 20px;
    --lh-body: 1.8;
    --ls-body: 0.02em;
    --container-pad: 20px;
    --section-py: 50px;
  }

  /* --- ヘッダー --- */
  .header__bar {
    gap: 8px;
    padding: 10px 16px;
  }
  .header__logo img { width: 120px; height: 26px; }
  html { scroll-padding-top: 70px; }
  .header__tel,
  .header__cta { display: none; }
  .header__toggle {
    display: block;
    position: relative;
    z-index: 2;              /* ドロワーより前面に置き、閉じるボタンとして機能させる */
  }
  .gnav.is-open ~ * .header__toggle-bar,
  .header__toggle[aria-expanded="true"] .header__toggle-bar { background: #fff; }

  /* --- ドロワーメニュー --- */
  .gnav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1;                 /* ヘッダー内での重なり順 */
    width: min(320px, 86vw);
    height: 100dvh;
    padding: 72px 24px 40px;
    overflow-y: auto;
    background: var(--navy-900);
    transform: translateX(100%);
    transition: transform .3s ease;
    visibility: hidden;
  }
  .gnav.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .gnav__list {
    display: block;
    text-align: left;
  }
  .gnav__item,
  .gnav__item:last-child {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
  }
  .gnav__link {
    padding: 16px 4px;
    font-size: 15px;
  }
  .gnav__cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
  }
  /* ドロワーを開いている間は背面をスクロールさせない */
  body.is-nav-open { overflow: hidden; }

  /* --- 見出し --- */
  .c-section-head { margin-bottom: 32px; }
  .c-section-lead { font-size: 14px; }
  .c-section-lead br { display: none; }
  .c-subsection-title { margin: 48px 0 24px; }

  /* --- ボタン --- */
  .c-btn {
    min-height: 48px;
    padding: 0 20px;
    font-size: 13px;
  }
  .c-btn-wrap { margin-top: 32px; }

  /* --- メインビジュアル --- */
  .p-hero { padding-top: 0; }
  .p-hero__viewport { aspect-ratio: 16 / 10; }
  .p-hero__caption {
    left: 16px;
    right: 16px;
    bottom: 16px;
    font-size: 17px;
    line-height: 1.5;
  }
  .p-hero__arrow {
    width: 40px;
    height: 40px;
  }
  .p-hero__arrow--prev { left: 6px; }
  .p-hero__arrow--next { right: 6px; }
  .p-hero__dots { padding: 16px 0 24px; }

  /* --- グリッドを1カラムへ --- */
  .c-grid--3,
  .c-grid--2 { grid-template-columns: 1fr; }
  .c-grid { gap: 16px; }

  /* 事業紹介 */
  .c-service-card { padding: 24px 20px; }
  .c-service-card__icon { width: 34px; height: 34px; margin-bottom: 12px; }

  /* 取扱製品 */
  .p-products__bnr {
    margin-top: 32px;
    padding: 28px 20px;
    gap: 20px;
  }
  .p-products__bnr-text { font-size: 16px; }
  .p-products__bnr-btns {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }
  .p-products__bnr-btns .c-btn { width: 100%; }

  /* 墓地検索 */
  .p-search__tab { font-size: 14px; padding: 14px 4px; }
  .p-area__list { padding: 28px 20px; }
  .p-area__title { margin-bottom: 20px; font-size: 15px; }
  .p-area__btns { gap: 12px; }
  .p-area__map { aspect-ratio: 3 / 4; }
  .p-area__pin { font-size: 11px; gap: 4px; }
  .p-area__dot { width: 9px; height: 9px; }

  .p-cond { padding: 28px 20px 36px; }
  .p-cond__grid { grid-template-columns: 1fr; gap: 24px; }
  .p-cond__legend { font-size: 15px; }
  .p-cond__check { padding: 8px 0; }
  .p-cond__keyword { margin-top: 28px; }

  /* 会社概要テーブル：縦積み */
  .c-table,
  .c-table tbody,
  .c-table tr,
  .c-table th,
  .c-table td {
    display: block;
    width: 100%;
  }
  .c-table tr + tr { margin-top: -1px; }
  .c-table th {
    white-space: normal;
    border-bottom: none;
    padding: 10px 14px;
  }
  .c-table td { padding: 12px 14px; }

  .p-about__media {
    margin-top: 28px;
    padding: 16px 18px;
    font-size: 13px;
  }
  .p-about__figure { max-width: none; }

  /* お客様の声 */
  .c-voice__quote { font-size: 16px; }

  /* FAQ */
  .c-faq__q {
    padding: 16px;
    font-size: 14px;
    gap: 10px;
  }
  .c-faq__a {
    padding: 0 16px 20px;
    gap: 10px;
    font-size: 13px;
  }

  /* SNS */
  .p-sns__box { padding: 16px; }

  /* お問い合わせ */
  .p-contact { padding-block: 56px; }
  .p-contact__lead { font-size: 14px; }
  .p-contact__lead br { display: none; }
  .p-contact__cards {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }
  .p-contact__tel { font-size: 26px; }

  /* フッター */
  .l-footer {
    padding: 40px 0 24px;
    /* 固定CTAバーの高さぶん余白を確保 */
    padding-bottom: 96px;
    font-size: 13px;
  }
  .l-footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .l-footer__areas { margin-top: 32px; padding-top: 24px; }
  .l-footer__bottom { margin-top: 28px; }

  /* --- フローティング --- */
  .c-line-btn {
    right: 12px;
    bottom: 76px;
    padding: 10px 14px;
    font-size: 13px;
  }
  .c-pagetop {
    right: 12px;
    bottom: 132px;
    width: 40px;
    height: 40px;
  }

  /* 固定CTAバー */
  .p-fixed-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-float);
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .15);
  }
  .p-fixed-cta__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 60px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
  }
  .p-fixed-cta__item--tel { background: var(--navy-900); }
  .p-fixed-cta__item--mail { background: var(--accent-cta); }
  .p-fixed-cta__item img { filter: brightness(0) invert(1); }
}

/* ------------------------------------------------------------
   480px 以下 — 小型スマートフォン
   ------------------------------------------------------------ */
@media screen and (max-width: 480px) {
  :root { --container-pad: 16px; }

  .c-section-title { letter-spacing: 0.05em; }
  .p-hero__caption { font-size: 15px; }
  .p-hero__viewport { aspect-ratio: 4 / 3; }

  .c-reason { padding: 24px 20px; }
  .c-reason::before { border-width: 46px 46px 0 0; }
  .c-reason__title { padding-left: 26px; }

  .p-area__pin { font-size: 10px; }
  .p-sns__grid { gap: 6px; }

  .p-contact__tel { font-size: 23px; }
  .l-footer__bottom { font-size: 11px; }
}

/* ------------------------------------------------------------
   ホバーできないデバイス（タッチ端末）
   ------------------------------------------------------------ */
@media (hover: none) {
  a:hover,
  .c-btn:hover { opacity: 1; }
}
