/* ============================================================
   📄 css/refine.css
   既存サイト（TOP / 空き家管理 / リフォーム）に対する
   「洗練度アップ」上書きレイヤー。
   ──────────────────────────────────────────────
   既存の :root 変数（--orange など）は触らない。
   タイポ・余白・カード影・ボタン・ホバー感のみ刷新。
   各LPのキーカラー（オレンジ／青／緑）は維持される。
   ============================================================ */

/* === グローバル微調整 ============================================ */
html { scroll-padding-top: 80px; }
body {
  font-feature-settings: "palt";
  letter-spacing: 0.02em;
  line-height: 1.85;
}

/* リンクhover */
a { transition: opacity .25s ease, color .25s ease; }

/* === タイポグラフィの底上げ ===================================== */
.section-title,
h1, h2, h3 {
  letter-spacing: 0.03em;
  font-feature-settings: "palt";
}

.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem) !important;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 18px;
}

.section-label {
  font-size: 0.72rem !important;
  letter-spacing: 0.28em !important;
}

.section-sub {
  color: var(--gray, #666);
  font-size: 1rem;
  margin-bottom: 56px;
}

/* === コンテナ余白の最適化 ===================================== */
.section { padding: 110px 0 !important; }
@media (max-width: 768px) {
  .section { padding: 72px 0 !important; }
  .section-title { font-size: clamp(1.5rem, 6vw, 2rem) !important; }
}

/* === カード共通の洗練 ========================================= */
.service-card,
.about-card,
.feature-card,
.flow-step,
.price-card {
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 10px 30px rgba(0,0,0,0.04) !important;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease !important;
  border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
}
.service-card:hover,
.about-card:hover,
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.04), 0 24px 50px rgba(0,0,0,0.10) !important;
}

/* === ボタン刷新（既存色は維持しつつ上品に） ===================== */
.btn,
.btn-primary,
.btn-service,
.btn-line {
  border-radius: 999px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 16px 32px;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease, background .25s ease;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}
.btn:hover,
.btn-primary:hover,
.btn-service:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.14);
}
.btn-line:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(6,199,85,0.32);
}

/* === HERO の刷新（オーバーレイをやや暗く高級に） ================= */
.hero-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.55) 100%) !important;
}
.hero-eyebrow {
  letter-spacing: 0.3em;
  font-size: 0.78rem;
  opacity: 0.9;
}
.hero-title {
  letter-spacing: 0.02em;
  font-weight: 900;
  text-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.hero-sub {
  font-weight: 400;
  opacity: 0.95;
}

/* === サービスカードの画像比率を統一 ============================ */
.service-card-img {
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  transition: transform .8s ease;
}
.service-card:hover .service-card-img { transform: scale(1.06); }

/* === ナビ：薄い影とすりガラス感 ================================ */
.site-nav {
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: rgba(255,255,255,0.92) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* === セクションラベルの線を細く ================================ */
.section-label::before {
  width: 40px !important;
  height: 1px !important;
}

/* === 横断バナー：6つのサービスへの導線（全LP底に挿入用） ======= */
.cross-cta {
  background: #0E0E10;
  color: #fff;
  padding: 80px 0;
}
.cross-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.cross-cta-eyebrow {
  font-family: var(--font-en, 'Montserrat', sans-serif);
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  color: #C9A961;
  margin-bottom: 14px;
}
.cross-cta-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 40px;
  color: #fff;
}
.cross-cta-title em {
  font-style: normal;
  color: #E85D1A;
}
.cross-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.cross-cta-card {
  background: #18181B;
  border: 1px solid #27272A;
  border-radius: 14px;
  padding: 22px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.cross-cta-card:hover {
  transform: translateY(-4px);
  border-color: #C9A961;
  background: #1F1F23;
}
.cross-cta-card-num {
  font-family: var(--font-en, 'Montserrat', sans-serif);
  font-size: 0.72rem;
  color: #C9A961;
  letter-spacing: 0.2em;
}
.cross-cta-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}
.cross-cta-card-desc {
  font-size: 0.83rem;
  color: #A1A1AA;
  line-height: 1.7;
}
.cross-cta-card-arrow {
  margin-top: 6px;
  color: #E85D1A;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* === ふわっとフェードイン用ユーティリティ ========================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   📱 SP最適化レイヤー（全ページ共通）
   iPhone 375px/390px/430px で
   ・横スクロールを完全に抑止
   ・カード1列化・画像フィット・CTA拡大・余白最適化
   PC版（769px以上）には一切影響しない
   ============================================================ */
@media (max-width: 768px) {
  /* --- グローバル：横スクロール抑止 --- */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
  }
  img, video, iframe, svg, canvas, table, picture {
    max-width: 100% !important;
    height: auto;
  }
  /* インラインスタイルで幅指定された画像も抑え込む（widthのみ、heightは維持） */
  img[style*="width"] {
    max-width: 100% !important;
  }

  /* コンテナ・セクション内余白 */
  .container,
  .cross-cta-inner,
  .site-nav-inner,
  .footer-grid,
  .mp-hero-inner,
  .mp-cta-inner,
  .mp-other-inner {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* 極端に大きい見出しをスマホで縮める（clamp未使用の残り物対策） */
  h1 { font-size: clamp(1.6rem, 7vw, 2.2rem) !important; }
  h2:not(.mp-h2) { font-size: clamp(1.35rem, 5.5vw, 1.85rem) !important; }
  h3 { font-size: clamp(1.05rem, 4.5vw, 1.35rem) !important; }

  /* 本文の可読性 */
  p, li { line-height: 1.9; }

  /* legalページの .legal-table は legal/legal.css で個別対応 */

  /* --- 横断導線カード (.cross-cta) SP対応 --- */
  .cross-cta-grid { grid-template-columns: 1fr !important; }

  /* --- CTAボタン：スマホで幅広く押しやすく --- */
  .btn-lg,
  .btn-line.btn-lg,
  .btn-ghost.btn-lg,
  .btn-white.btn-lg {
    min-height: 52px;
  }

  /* --- フッター：SP時の詰まり緩和 --- */
  .site-footer {
    padding: 60px 0 30px;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 0.75rem;
  }

  /* --- word-break：長い日本語URL・英語連結の折返し --- */
  h1, h2, h3, p, li, td, th, a {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* iPhone SE等の極小画面向けの追加調整 */
@media (max-width: 380px) {
  .container,
  .site-nav-inner,
  .footer-grid,
  .cross-cta-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  h1 { font-size: clamp(1.4rem, 6.5vw, 2rem) !important; }
}
