/*
Theme Name: 丸正出口製麺
Theme URI: https://deguchi.tv/
Author: 丸正出口製麺株式会社
Description: 丸正出口製麺株式会社 コーポレートサイト用オリジナルテーマ。ロゴ・画像・テキストはSmart Custom Fields（SCF）で編集可能。
Version: 2.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: roimatrix
*/

/* 基本スタイルは assets/css/style.css を functions.php でエンキュー。
   以下は出口製麺版で追加したパーツのスタイル。 */

:root {
  --dg-ink: #2c2826;
  --dg-gold: #b8912f;
  --dg-gold-soft: #b99568;
  --dg-cream: #faf8f4;
  --dg-line: rgba(44, 40, 38, 0.14);
  --dg-muted: #635d58;
}

/* ───────── ロゴ（インラインSVG） ───────── */
.header__logo .dg-logo,
.footer__logo .dg-logo,
.drawer__logo-img .dg-logo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 146 / 32;
}
.drawer__logo-img .dg-logo {
  max-width: 11rem;
}

/* ───────── ヘッダーの電話番号 ───────── */
.header__nav-item--tel {
  display: flex;
  align-items: center;
}
.header__tel {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-decoration: none;
  color: inherit;
}
.header__tel-num {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.header__tel-note {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--dg-muted);
}
@media (max-width: 1240px) {
  .header__nav-item--tel { display: none; }
}

/* ───────── 沿革タイムライン ───────── */
.dg-timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 46rem;
  border-top: 1px solid var(--dg-line);
}
.dg-timeline__item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.2rem;
  padding: 0.95rem 0.2rem;
  border-bottom: 1px solid var(--dg-line);
  align-items: baseline;
}
.dg-timeline__year {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--dg-gold);
  letter-spacing: 0.03em;
}
.dg-timeline__body {
  font-size: 0.92rem;
  line-height: 1.85;
}
.dg-timeline--page { max-width: 48rem; }
@media (max-width: 700px) {
  .dg-timeline__item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.85rem 0;
  }
}

/* ───────── 工程フロー ───────── */
.dg-flowline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 68rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.9rem;
}
.dg-flowline__step {
  position: relative;
  text-align: center;
  padding: 1.5rem 0.6rem 1.3rem;
  background: #fff;
  border: 1px solid var(--dg-line);
}
.dg-flowline__step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.62rem;
  width: 0.36rem;
  height: 0.36rem;
  border-top: 1.6px solid var(--dg-gold);
  border-right: 1.6px solid var(--dg-gold);
  transform: translateY(-50%) rotate(45deg);
}
.dg-flowline__step:last-child::after { display: none; }
.dg-flowline__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.7rem;
  border: 1px solid var(--dg-gold);
  border-radius: 50%;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.86rem;
  color: var(--dg-gold);
}
.dg-flowline__title {
  display: block;
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.dg-flowline__body {
  display: block;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--dg-muted);
}
@media (max-width: 980px) {
  .dg-flowline { grid-template-columns: repeat(3, 1fr); }
  .dg-flowline__step:nth-child(3)::after { display: none; }
}
@media (max-width: 620px) {
  .dg-flowline { grid-template-columns: repeat(2, 1fr); }
  .dg-flowline__step:nth-child(2n)::after { display: none; }
}

/* ───────── 麺の設計軸マトリクス ───────── */
.dg-matrix {
  margin: 0 auto;
  max-width: 46rem;
}
.dg-matrix svg {
  display: block;
  width: 100%;
  height: auto;
}
.dg-matrix__cap,
.dg-note {
  margin-top: 1.1rem;
  font-size: 0.74rem;
  line-height: 1.8;
  color: var(--dg-muted);
  text-align: center;
}

/* ───────── FAQ ───────── */
.dg-faq {
  margin: 0 auto;
  max-width: 48rem;
  border-top: 1px solid var(--dg-line);
}
.dg-faq__row {
  padding: 1.35rem 0.2rem;
  border-bottom: 1px solid var(--dg-line);
}
.dg-faq__q {
  position: relative;
  padding-left: 1.9rem;
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.7;
}
.dg-faq__q::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--dg-gold);
  font-size: 1.02rem;
}
.dg-faq__a {
  position: relative;
  margin: 0.6rem 0 0;
  padding-left: 1.9rem;
  font-size: 0.9rem;
  line-height: 1.95;
  color: var(--dg-muted);
}
.dg-faq__a::before {
  content: "A";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--dg-gold-soft);
  font-family: 'Noto Serif JP', serif;
  font-size: 0.98rem;
}

/* ───────── お問い合わせ（トップ最下部） ───────── */
.dg-contact {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 7rem 1.5rem 7.5rem;
  color: var(--dg-cream);
  text-align: center;
}
.dg-contact .entry-banner__img-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(33, 30, 28, 0.55);
}
.dg-contact__inner {
  position: relative;
  z-index: 1;
  max-width: 54rem;
  margin: 0 auto;
}
.dg-contact__title { margin-bottom: 1.2rem; }
.dg-contact__lead {
  font-size: 0.95rem;
  line-height: 2.1;
  margin-bottom: 2.6rem;
}
.dg-contact__actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.dg-contact__btn {
  display: block;
  padding: 1.6rem 1.3rem;
  border: 1px solid rgba(250, 248, 244, 0.42);
  background: rgba(33, 30, 28, 0.32);
  color: var(--dg-cream);
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.dg-contact__btn:hover {
  background: rgba(184, 145, 47, 0.22);
  border-color: rgba(216, 189, 151, 0.8);
}
.dg-contact__btn-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #d8bd97;
  margin-bottom: 0.55rem;
}
.dg-contact__btn-main {
  display: block;
  font-family: 'Noto Serif JP', serif;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.6rem;
  word-break: break-all;
}
.dg-contact__btn-note {
  display: block;
  font-size: 0.7rem;
  line-height: 1.75;
  opacity: 0.78;
}
@media (max-width: 780px) {
  .dg-contact { padding: 5rem 1.2rem 5.5rem; }
  .dg-contact__actions { grid-template-columns: 1fr; }
  .dg-contact__btn-main { font-size: 1.2rem; }
}

/* ───────── CTA（下層ページ）：ボタン2つ並び ───────── */
.sp-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}
.sp-cta__btn--ghost {
  background: transparent;
  border: 1px solid currentColor;
}

/* ───────── フッター追記 ───────── */
.footer__company {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(250, 248, 244, 0.16);
  font-size: 0.8rem;
  line-height: 2;
  color: rgba(250, 248, 244, 0.78);
}
.footer__company-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dg-cream);
  margin-bottom: 0.3rem;
}
.footer__company-line { margin: 0; }
.footer__company-line a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 248, 244, 0.3);
}
.footer__company-note {
  font-size: 0.72rem;
  opacity: 0.8;
}
.footer__demo {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0.95rem 1.5rem 1.4rem;
  font-size: 0.68rem;
  line-height: 1.8;
  text-align: center;
  color: rgba(250, 248, 244, 0.52);
}

/* ───────── ヒーロー見出し：マスク画像から実テキストへ ─────────
   旧テーマは mv_title1.svg / mv_title2.svg（旧キャッチをアウトライン化した画像）を
   CSSマスクとして使っていたため、PHP側の文言を変えても見た目が変わらなかった。
   Noto Serif JP の実テキストに金箔テクスチャを載せる方式に置き換える。
   これにより文言はSCF・テンプレートから自由に変更でき、選択・検索もできる。 */
.main-mv__title .title__main--catch1,
.main-mv__title .title__main--catch2 {
  -webkit-mask-image: none;
  mask-image: none;
  width: auto;
  aspect-ratio: auto;
  display: block;
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: clamp(2.45rem, 6.3vw, 5.3rem);
  line-height: 1.18;
  letter-spacing: 0.045em;
  margin-top: 0;
  background-image: url(assets/images/common/gold-back.webp);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 240% 240%;
  /* 基底の `background:` ショートハンドが -webkit-background-clip を
     border-box に戻してしまうため、ここで両方を明示的に再指定する */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.main-mv__title .title__main--catch2 {
  margin-top: 0.35em;
}
.main-mv__title .title__main--catch1 span,
.main-mv__title .title__main--catch2 span {
  display: inline;
}
.main-mv__title .title__main--catch1::before,
.main-mv__title .title__main--catch2::before {
  content: none;
  display: none;
}
.main-mv__title br { display: none; }

/* ───────── 既存テーマの不具合修正 ─────────
   .arrow-link は ::before に3remの暗い正方形を敷き、その上に
   .arrow-link__icon（矢印）を重ねる設計。ところが --environment の
   バリアントはアイコンを持たないため、正方形が本文の先頭に重なり、
   同色（#2c2826）の文字が読めなくなる。装飾を外して回避する。 */
.arrow-link.arrow-link--environment::before {
  content: none;
  display: none;
}
.environment__arrow-link {
  margin-top: 2.4rem;
}
.arrow-link__text.arrow-link__text--environment {
  line-height: 1.9;
  text-align: left;
}

/* CONTACT見出しは基底の暗いグラデーション（#2c2826→#b99568）のため
   暗い背景では沈む。淡色グラデーションに差し替える。 */
.dg-contact .title__main--entry {
  background: linear-gradient(100deg, #faf8f4 0%, #f0e2c9 42%, #d8bd97 72%, #b8912f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ───────── モバイル：ヒーロー本文の折り返し ─────────
   .main-mv__text には横幅・余白の指定がなく、旧キャッチの行長に
   ぴったり合わせて調整されていたため、文言を長くすると画面外へ
   はみ出す。幅と左右余白を与えて自然に折り返させる。 */
@media screen and (max-width: 780px) {
  .main-mv__text {
    box-sizing: border-box;
    width: 100%;
    padding-left: 6.1538461538vw;
    padding-right: 6.1538461538vw;
  }
  .main-mv__message {
    font-size: 3.95vw;
    line-height: 1.85;
  }
}

/* ───────── 全ページ共通・画面下部固定のご相談バー ─────────
   z-index は header(900) より上、drawer-overlay(1000) より下に置き、
   メニューを開いたときは覆われるようにする。
   780px以下は既存の .sp-buttons（fixed, bottom:0, z-index:1005）が
   下端を占有するため、その高さぶん上へ逃がす。 */
.dg-fixedcta {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 999;
  background: linear-gradient(100deg, #2c2826 0%, #35302c 62%, #4a3f2e 100%);
  border-top: 1px solid rgba(216, 189, 151, 0.45);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.22);
}
.dg-fixedcta__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  max-width: 78rem;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
}
.dg-fixedcta__text {
  margin: 0;
  color: var(--dg-cream);
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.dg-fixedcta__tel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1.6rem;
  border: 1px solid rgba(216, 189, 151, 0.7);
  background: rgba(184, 145, 47, 0.16);
  color: var(--dg-cream);
  text-decoration: none;
  line-height: 1.25;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.dg-fixedcta__tel:hover {
  background: rgba(184, 145, 47, 0.34);
  border-color: #d8bd97;
}
.dg-fixedcta__tel-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: #d8bd97;
}
.dg-fixedcta__tel-num {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.dg-fixedcta__tel-note {
  font-size: 0.62rem;
  opacity: 0.78;
}

/* バーが最下部のコンテンツに重ならないよう、フッターに余白を足す */
.footer { padding-bottom: 12rem; }

@media screen and (max-width: 1080px) {
  .dg-fixedcta__inner { gap: 1.1rem; padding: 0.7rem 1.1rem; }
  .dg-fixedcta__text { font-size: 0.88rem; }
  .dg-fixedcta__tel { padding: 0.45rem 1.1rem; }
  .dg-fixedcta__tel-num { font-size: 1.15rem; }
}

@media screen and (max-width: 780px) {
  /* .sp-buttons（電話する／MENU）は fixed bottom:0 / z-index:1005 で下端を占有し、
     さらにスクロールで is-hidden（translateY(100%)）になる。そのため単純に
     bottom を上げるとボタンが隠れた瞬間に下端が透けてしまう。
     bottom:0 のまま padding-bottom でボタン分の逃げを作り、背景は下端まで
     敷き詰める（ボタンは z-index が上なので手前に描かれる）。 */
  .dg-fixedcta {
    bottom: 0;
    padding-bottom: 16.5vw;
  }
  .dg-fixedcta__inner {
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.7rem 4.5vw 0.8rem;
  }
  .dg-fixedcta__text {
    font-size: 3.4vw;
    line-height: 1.7;
    text-align: center;
  }
  .dg-fixedcta__tel {
    flex-direction: row;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.35rem 1rem;
  }
  .dg-fixedcta__tel-label { display: none; }
  .dg-fixedcta__tel-num { font-size: 4.6vw; }
  .dg-fixedcta__tel-note { font-size: 2.7vw; }
  .footer { padding-bottom: 54vw; }
}
