/* ============================================================
   Design Pattern Library — base.css
   セクション単位のレイアウトパターンライブラリ共通基盤
   ------------------------------------------------------------
   ・レイアウトのライブラリなので配色は「無彩色＋写真の色」のみ。
     案件適用時は --ink / --paper / --dark を差し替えるだけで
     レイアウトはそのまま流用できる。
   ・全幅（フルブリード）前提。max-width の「箱」に閉じ込めない。
   ・【禁止】左側のみの太いボーダー装飾（border-left アクセント、
     ::before による左縦帯を含む）。強調は余白・タイポ・図形で行う。
   ============================================================ */

/* Noto Sans JP は index.html の <link> で読み込む（@import だと読み込みが直列になり、表示が遅れる） */

:root {
  /* ---- 無彩色トークン（案件でここだけ差し替え） ---- */
  --ink: #2E211A;          /* 主文字（極めて濃い茶＝温かい黒） */
  --ink-soft: #574E45;     /* 副文字（同系の温かいグレー） */
  --ink-faint: #9A8E82;    /* 弱い文字・キャプション（同系） */
  --paper: #FAFAF8;        /* 地（真っ白にせず、ごく薄いグレー） */
  --paper-warm: #f4f1e9;   /* わずかに温かい地（砂のトーン） */
  --line: #DCD6CE;         /* 罫線（地の温かみに合わせる） */
  --line-strong: #073763;  /* 強い罫線 */
  --dark: #073763;         /* ダークセクション地（ブランド濃紺） */
  --dark-ink: #f4f2ee;     /* ダーク上の文字 */
  --dark-line: #2c5c8a;    /* ダーク上の罫線 */

  /* ---- ブランド色（企画提案書0808のキービジュアルから実測）---- */
  --navy: #073763;         /* 表紙・見出しの濃紺 */
  --teal: #04719A;         /* 表紙の円のターコイズ青 */
  --amber: #FED966;        /* 企画書のハイライト黄 */

  /* ---- 書体（セット craft）---- */
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  /* .serif は「見出し用」の意味で使い続ける（書体は本文と同じ） */
  --font-serif: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  /* 半角数字・英字も同じ書体で組む */
  --font-en: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en-display: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-hand: "Klee One", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --en-display-weight: 340; /* Fraunces は可変。ライブラリ既定は Light 寄り */

  /* ---- 流体タイポスケール ---- */
  --fs-display-1: clamp(4rem, 13vw, 13rem);       /* 画面幅級の見出し */
  --fs-display-2: clamp(3rem, 8.5vw, 8rem);       /* 大見出し */
  --fs-display-3: clamp(2.25rem, 5.5vw, 5rem);    /* 中の大見出し */
  --fs-h2: clamp(1.75rem, 3.4vw, 2.875rem);
  --fs-h3: clamp(1.1875rem, 2vw, 1.5rem);
  --fs-body: clamp(1.0625rem, 1.15vw, 1.1875rem); /* 高齢層が読む前提で既定より大きい */
  --fs-small: 0.9375rem;
  --fs-micro: 0.75rem;

  /* ---- モーション（ホバー・開閉の共通語彙）----
     動きは「ゆっくり始まってすっと止まる」を基本にする。
     bounce系・linear は使わない */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);    /* 出現・ホバー */
  --ease-inout: cubic-bezier(0.83, 0, 0.17, 1);  /* パネル開閉 */
  --dur-quick: 0.3s;   /* 色・不透明度 */
  --dur-med: 0.7s;     /* 位置・スケール */
  --dur-slow: 1.1s;    /* パネル・幕 */

  /* ---- 余白スケール ---- */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;
  --sp-6: 6rem;
  --sec-pad: clamp(5rem, 12vh, 10rem);        /* 標準セクション天地 */
  --sec-pad-lg: clamp(7.5rem, 20vh, 16rem);   /* 余白を主役にする時 */
  --gutter: clamp(1.25rem, 4vw, 4.5rem);      /* 画面端の逃げ */

  /* ---- 写真プール（14枚 / assets/photos/） ----
     portrait-bright  人物・白背景・明   2400x1350
     portrait-window  人物・窓辺の光     2400x1600
     interior-highkey 空間・ハイキー     2400x1600
     still-plant      窓辺の観葉植物     2400x1602
     food-japanese    黒い和食器         2400x1600
     cafe-coffee      カフェ・ダーク     2400x1600
     forest-dark      森・ダーク         2400x1600
     forest-light     森・光芒           2400x1595
     sea-dawn         夜明けの海・余白   2400x1600
     craft-pottery    ろくろの手仕事     2400x1597
     still-flower     一輪挿し・黒背景   2400x1600
     texture-concrete コンクリート・縦   1600x2400
     street-kyoto     京都石塀小路       2400x1600
     office-bright    明るいオフィス     2400x1294
  ------------------------------------------------ */
}

/* ---- リセット ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;          /* ページ内リンクを滑らかに */
}

/* ---- テキスト可変への備え（全パターン共通の既定）----
   見出し・引用は text-wrap: balance で行を均等化する。
   コピーの字数が増減しても「く。」のような1〜2字の孤立行が
   生まれない。継承されるので行分割 span にも効く。
   ※ nowrap 指定（巨大タイポ）はそのまま優先される */
h1, h2, h3, blockquote { text-wrap: balance; }
/* 日本語は文節で折り返す（対応ブラウザのみ。非対応でも通常の折り返しに戻るだけ）。
   「る。」のような1〜2字の孤立行を防ぐ */
h1, h2, h3, blockquote, .balance { word-break: auto-phrase; }

/* height/block-size の auto への遷移を許可（アコーディオン等で使用。
   未対応ブラウザは即時開閉に自然フォールバック） */
:root { interpolate-size: allow-keywords; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 2;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0.04em;   /* palt で詰まる分を少し戻し、全体をゆったり組む */
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---- 共通ユーティリティ ---- */

/* 欧文ラベル（小さなトラッキング広めの英字） */
.en {
  font-family: var(--font-en);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* 欧文ディスプレイ（Fraunces — オールド調の表情を持つ可変セリフ） */
.en-display {
  font-family: var(--font-en-display);
  font-weight: var(--en-display-weight);
  line-height: 0.95;
  letter-spacing: 0.005em;
}

/* 和文明朝 */
.serif { font-family: var(--font-serif); font-weight: 700; }

/* 見出しタグはすべて太字（Noto Sans JP の実ウェイト 700。合成太字ではない） */
h1, h2, h3, h4, h5, h6 { font-weight: 700; }
/* 見出しに準じる要素も同じ太さで揃える */
.bold,
.faq__q, .kinds__title, .field__label, .btn,
.facts__lead, .facts__item dd strong, .site-footer__brand {
  font-weight: 700;
}

/* 縦書き */
.vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.22em;
}

/* 年・月・日・曜日などの単位。数字より一段小さく組んで数字を立たせる */
.u { font-size: 0.74em; }

/* アウトライン文字（ゴーストテキスト用） */
.ghost {
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-faint);
  text-stroke: 1px var(--ink-faint);
}

/* 写真の共通既定 */
.ph { width: 100%; height: 100%; object-fit: cover; }

/* セクションの器（全幅が既定。内側の逃げは --gutter で取る） */
.pattern { position: relative; overflow: clip; }

/* ダークセクション用の反転 */
.pattern--dark {
  background: var(--dark);
  color: var(--dark-ink);
}
.pattern--dark .ghost { -webkit-text-stroke-color: var(--dark-line); }

/* ---- 共通ホバー：写真のゆっくりズーム ----
   図(figure)側に .ph-zoom を付けると、ホバーで中の写真だけが
   ゆっくり寄る。カード・ギャラリー・行内サムネの既定ホバー
   【注意】transform はスタッキングコンテキストを作るため、
   要素が重なるレイアウトでは必ず全レイヤーに明示的な z-index を
   付けること（付けないとホバー中だけ重なり順が入れ替わる） */
.ph-zoom { overflow: hidden; }
.ph-zoom .ph { transition: transform var(--dur-slow) var(--ease-out); }
.ph-zoom:hover .ph, a:hover .ph-zoom .ph { transform: scale(1.04); }

/* スクリーンリーダー専用テキスト */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- 動きを減らす設定への配慮（全パターン共通）---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 下線リンク（CTAの既定形。ボタンの角丸箱より線で見せる）
   ホバーで下線が右へ抜け、左から戻ってくる */
.line-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.75em;
  font-family: var(--font-en);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 0.6em;
}
.line-link::before,
.line-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
}
.line-link::before {
  transform-origin: right;
  transition: transform var(--dur-med) var(--ease-out);
}
.line-link::after {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out) 0.12s;
}
.line-link:hover::before { transform: scaleX(0); }
.line-link:hover::after { transform: scaleX(1); }
.line-link .arrow {
  font-family: var(--font-sans);
  display: inline-block;
  transition: transform var(--dur-quick) var(--ease-out);
}
.line-link:hover .arrow { transform: translateX(0.35em); }
