/* ===================================
   正しいお葬式 - スタイルシート
   デザインコンセプト: 清潔 × モダン × 教科書的な信頼感
   =================================== */

/* ----- CSS Variables ----- */
:root {
  /* Color palette: 紺主役 × 水色アクセント × 赤は緊急導線のみ */
  --color-main: #263658;
  --color-main-dark: #1D3557;
  --color-main-text: #457B9D;
  --color-btn: #457B9D;
  --color-btn-dark: #356681;
  --color-btn-rgb: 69, 123, 157;
  --color-action: #C45138;
  --color-action-dark: #A63E2C;
  --color-action-rgb: 196, 81, 56;
  --color-main-bright: #A8DADC;
  --color-main-light: #EFF6FA;
  --color-main-light-end: #E3EEF6;
  --color-main-border: #C5D8E8;
  --color-main-rgb: 38, 54, 88;
  --color-accent: #457B9D;
  --color-accent-rgb: 69, 123, 157;
  --color-accent-light: #A8DADC;
  --color-accent-light-rgb: 168, 218, 220;
  --color-sub: #457B9D;
  --color-sub-dark: #356681;
  --color-footer-bg: #1D3557;
  --color-sub-rgb: 69, 123, 157;
  /* Hero overlay / tonal surfaces */
  --hero-overlay-bottom: rgba(var(--color-main-rgb), 0.8);
  --hero-overlay-secondary: radial-gradient(ellipse 46% 30% at 86% 14%, rgba(239, 246, 250, 0.38) 0%, rgba(239, 246, 250, 0.16) 54%, rgba(239, 246, 250, 0) 100%);
  --hero-overlay-linear: linear-gradient(108deg, rgba(248, 251, 254, 0.28) 0%, rgba(239, 246, 250, 0.18) 42%, rgba(232, 242, 248, 0.1) 72%, rgba(224, 236, 244, 0.04) 100%);
  --hero-overlay-depth: rgba(var(--color-main-rgb), 0.28);
  --hero-overlay-secondary-wide: radial-gradient(ellipse 36% 26% at 88% 14%, rgba(239, 246, 250, 0.3) 0%, rgba(239, 246, 250, 0.08) 56%, rgba(239, 246, 250, 0) 100%);
  --hero-overlay-linear-wide: linear-gradient(108deg, rgba(248, 251, 254, 0.3) 0%, rgba(239, 246, 250, 0.18) 44%, rgba(232, 242, 248, 0.08) 74%, rgba(224, 236, 244, 0.03) 100%);
  --hero-overlay-depth-wide: rgba(var(--color-main-rgb), 0.28);
  --color-surface-tonal-start: #F5F9FC;
  --color-surface-tonal-mid: #EDF4FA;
  --color-surface-tonal-end: #E3EEF6;
  --color-ambient-image-wash: rgba(239, 246, 250, 0.92);
  --color-ambient-image-wash-cta: rgba(239, 246, 250, 0.84);
  --color-bg: #FDFFFF;
  --color-bg-sub: #EFF6FA;
  --color-bg-hero: #EFF6FA;
  --color-surface-overlay: rgba(255, 255, 255, 0.98);
  --color-text: #26303B;
  --color-text-sub: #5D6878;
  --color-border: #E3EBF3;
  --color-border-card: rgba(222, 230, 239, 0.96);
  --color-border-soft: #D9E3EE;
  --color-border-strong: #C7D5E2;
  --color-border-muted: #A5B5C7;
  --color-border-cta: #C5D8E8;
  /* Secondary button */
  --color-button-secondary-bg: var(--color-white);
  --color-button-secondary-border: var(--color-main-border);
  --color-button-secondary-text: var(--color-text);
  --color-button-secondary-hover-bg: var(--color-main-light);
  --color-button-secondary-hover-border: var(--color-main);
  --color-link: #457B9D;
  --color-white: #FFFFFF;
  /* テキスト補助 */
  --color-text-strong: #162131;
  --color-urgent: #B83F2A;
  --color-urgent-start: var(--color-action);
  --color-urgent-end: var(--color-action-dark);
  --color-overlay-scrim: rgba(0, 0, 0, 0.35);
  --color-surface-hover: #F7FAFD;
  --color-banner-text: #D4EEF0;

  /* Border RGB — rgba() での半透明使用に対応 */
  --color-border-rgb: 227, 235, 243;

  /* フォームエラー状態 */
  --color-form-error: #b53122;
  --color-form-error-bg: rgba(197, 64, 45, 0.12);
  --color-form-error-border: #c5402d;

  /* Article アクセント背景 */
  --color-accent-surface: #EFF6FA;

  /* パートナーページ ダーク背景 */
  --color-partner-hero-bg: #2f2e2c;

  /* セレクト矢印 SVG（data URI 内で CSS 変数が使えないため URL ごと変数化） */
  --select-arrow-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5'/%3E%3C/svg%3E");

  /* プランカード グラデーション */
  --color-plan-green-1: #EEF2EB;
  --color-plan-green-2: #E1ECDD;
  --color-plan-green-3: #D5E3CD;
  --color-plan-rose-1: #F4EBEE;
  --color-plan-rose-2: #EEDFE5;
  --color-plan-rose-3: #E5D0D9;
  --color-plan-blue-1: #ECEFF5;
  --color-plan-blue-2: #DEE6F2;
  --color-plan-blue-3: #D0DCEA;

  /* Category Colors - より鮮やかに */
  --cat-group-basic: #D2573E;
  --cat-group-basic-light: rgba(210, 87, 62, 0.12);
  --cat-group-money: #C9A03B;
  --cat-group-money-light: rgba(201, 160, 59, 0.12);
  --cat-group-after: #50A26D;
  --cat-group-after-light: rgba(80, 162, 109, 0.12);
  --cat-group-prepare: #4A8AB8;
  --cat-group-prepare-light: rgba(74, 138, 184, 0.12);

  /* Font Sizes: primitive scale (rem-based) */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;

  /* Typography roles */
  --type-label: var(--font-size-xs);
  --type-body-sm: var(--font-size-sm);
  --type-body: var(--font-size-base);
  --type-body-emphasis: clamp(1rem, 2.2vw, 1.1875rem);
  --type-heading-card: clamp(1.125rem, 4vw, 1.375rem);
  --type-heading-section: clamp(1.5rem, 4.5vw, 2rem);
  --type-heading-page: clamp(1.75rem, 5vw, 2rem);

  /* Typography */
  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-inter: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --transition: 0.3s ease;

  /* Header：高さ / コンテンツ開始位置（フロート時はヘッダー＋余白。パンくずは main 内のため別） */
  --header-height: 134px;
  --header-clear: calc(var(--header-height) + var(--space-sm) + var(--space-xs));

  /* Layout widths（LP全体で3種類） */
  --layout-width-stage: 1440px; /* Header / Hero 用の広幅 */
  --layout-width-content: 1120px; /* 通常セクション用 */
  --layout-width-text: 800px; /* 本文中心セクション用 */

  /* コンテンツページ幅（FAQ・お問い合わせ・プライバシーポリシー等で統一） */
  --content-page-max-width: var(--layout-width-text);

  /*
   * Breakpoint policy:
   * mobile:  0-767px
   * tablet:  768-1023px
   * desktop: 1024px-
   * wide:    1280px-
   *
   * 480px and 640px are allowed only as small-component/container rescue points.
   *
   * Prefer container queries for component-internal changes such as card columns.
   */
}

@media (max-width: 767px) {
  :root {
    --header-height: 70px;
  }
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  /* sticky互換性のため、横方向クリップでスクロールコンテキスト化を避ける */
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: 1.9;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* sticky互換性のため、横方向クリップでスクロールコンテキスト化を避ける */
  overflow-x: clip;
  /* 禁則処理・タイポグラフィ（JIS X 4051準拠） */
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  text-wrap: pretty;
  orphans: 2;
  widows: 2;
}

/* overflow-x: clip 未対応ブラウザ向けフォールバック */
@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.7;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
