/* ================================================================
   デザインアップグレード v2 — sankoudesign.com 徹底調査版
   参考: ymy-tea.jp / shirahone.org / awahi-magazine.jp /
         giftee.co.jp / bunkafp-2025.studio.site / dimps.co.jp
================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Noto+Sans+JP:wght@400;500;700&family=Geist:wght@300;400;600&display=swap');

/* ================================================================
   CSS カスタムプロパティ拡張（giftee方式のスケールシステム）
================================================================ */
:root {
  /* ── フォント ──────────────────────── */
  --font-serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-sans:  'Noto Sans JP', 'Hiragino Sans', system-ui, sans-serif;
  --font-num:   'Geist', 'Noto Sans JP', sans-serif;

  /* ── シャドウ体系 ──────────────────── */
  --shadow-xs:  0 1px 3px rgba(42,32,32,.06), 0 1px 2px rgba(42,32,32,.04);
  --shadow-sm:  0 2px 8px rgba(42,32,32,.08), 0 1px 4px rgba(42,32,32,.04);
  --shadow-md:  0 4px 16px rgba(42,32,32,.10), 0 2px 6px rgba(42,32,32,.05);
  --shadow-lg:  0 12px 40px rgba(42,32,32,.12), 0 4px 10px rgba(42,32,32,.05);
  --shadow-xl:  0 24px 64px rgba(42,32,32,.15), 0 8px 20px rgba(42,32,32,.06);
  --shadow-coral: 0 8px 32px rgba(212,120,76,.25);

  /* ── clamp スペーシング（shirahone方式）── */
  --sp-xs:  clamp(0.5rem,  1vw   + 0.2rem, 0.75rem);
  --sp-sm:  clamp(1rem,    2vw   + 0.4rem, 1.5rem);
  --sp-md:  clamp(1.5rem,  3vw   + 0.6rem, 2.5rem);
  --sp-lg:  clamp(3rem,    5vw   + 1rem,   5rem);
  --sp-xl:  clamp(5rem,    8vw   + 1.5rem, 9rem);

  /* ── セクション間隔（clamp/shirahone） ── */
  --section-gap-sm: clamp(50px,  4.69vw + 32px, 100px);
  --section-gap-md: clamp(80px,  6.57vw + 55px, 150px);
  --section-gap-lg: clamp(100px, 8vw   + 70px,  200px);

  /* ── イージング ─────────────────────── */
  --ease-out:    cubic-bezier(0.21, 0.51, 0.51, 1);
  --ease-expo:   cubic-bezier(0.19, 1.00, 0.22, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-gentle: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration:    0.45s;
  --dur-fast:    0.22s;
  --dur-slow:    0.7s;
}

/* ================================================================
   ベース
================================================================ */
body {
  font-family: var(--font-sans);
  letter-spacing: 0.025em;
  line-height: 1.85;
  font-feature-settings: 'palt' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-feature-settings: 'palt' 1;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

/* ================================================================
   ヘッダー — すりガラス・スクロール縮小
================================================================ */
.site-header {
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: rgba(255,255,255,0.88) !important;
  border-bottom: 1px solid rgba(240,149,106,0.2) !important;
  box-shadow: 0 1px 20px rgba(0,0,0,0.06) !important;
  transition: padding var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.site-logo {
  font-family: var(--font-serif);
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* ================================================================
   ヒーローセクション — フォト + オーバーレイ（index.html 専用）
================================================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

/* 写真背景 */
.page-hero.has-photo {
  background: linear-gradient(150deg,#FFF5EE 0%,#FDE8D8 100%);
}

.page-hero.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/hero_desk.jpg');
  background-size: cover;
  background-position: center 40%;
  opacity: 0.12;
  filter: saturate(0.6);
}

/* ノイズテクスチャ（awahi方式） */
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 300px;
}

/* 装飾リング（右上） */
.page-hero .hero-ring {
  position: absolute;
  right: -8rem; top: -8rem;
  width: 36rem; height: 36rem;
  border-radius: 50%;
  border: 2px solid rgba(240,149,106,0.15);
  box-shadow:
    inset 0 0 0 clamp(30px,3vw,50px)  rgba(240,149,106,0.06),
    inset 0 0 0 clamp(70px,7vw,110px) rgba(240,149,106,0.04),
    inset 0 0 0 clamp(120px,12vw,180px) rgba(240,149,106,0.025);
  pointer-events: none;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.5vw + 0.6rem, 3rem);
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  color: var(--coral-dark);
  border: 1px solid var(--coral-mid);
  margin-bottom: 1.1rem;
}

/* ================================================================
   SVG ウェーブ区切り
================================================================ */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-top: -1px;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 80px);
}

/* ================================================================
   統計セクション（giftee / awahi 方式）
================================================================ */
.stats-section {
  background: var(--coral-dark);
  color: #fff;
  padding: var(--sp-lg) 2rem;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.05) 0%, transparent 60%);
  pointer-events: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.stat-item {
  padding: 1rem;
  border-left: 1px solid rgba(255,255,255,0.2);
}
.stat-item:first-child { border-left: none; }

.stat-num {
  font-family: var(--font-num);
  font-size: clamp(2.2rem, 4vw + 0.5rem, 3.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  display: block;
}

.stat-unit {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
  margin-left: 0.1em;
}

.stat-label {
  font-size: 0.78rem;
  opacity: 0.75;
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
  display: block;
  font-family: var(--font-sans);
}

/* ================================================================
   桜セクション（sakura accent）
================================================================ */
.sakura-section {
  position: relative;
  overflow: hidden;
  background: #FFF8FA;
  padding: var(--sp-lg) 2rem;
}

.sakura-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/sakura_bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  filter: saturate(0.5) blur(1px);
}

/* ================================================================
   カードシステム全面強化
================================================================ */

/* base card */
.card {
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  transition:
    box-shadow var(--duration) var(--ease-out),
    transform   var(--duration) var(--ease-out);
  will-change: transform, box-shadow;
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* nav-card 強化 */
.nav-card {
  transition:
    box-shadow var(--duration) var(--ease-out),
    transform  var(--duration) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  will-change: transform;
  position: relative;
  overflow: hidden;
}

/* 左アクセントバー */
.nav-card::before {
  content: '';
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 3px;
  background: linear-gradient(180deg, var(--coral-light) 0%, var(--coral) 50%, var(--coral-light) 100%);
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease-expo);
}

.nav-card:hover::before { transform: scaleY(1); }

/* 背景シマーエフェクト */
.nav-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s var(--ease-expo);
  pointer-events: none;
}

.nav-card:hover::after { left: 160%; }

.nav-card:hover {
  border-color: var(--coral-mid) !important;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.nav-card-icon {
  transition: transform 0.35s var(--ease-spring);
  display: block;
}
.nav-card:hover .nav-card-icon {
  transform: scale(1.18) rotate(-3deg);
}

.nav-card-title {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color var(--dur-fast);
}
.nav-card:hover .nav-card-title {
  color: var(--coral-dark);
}

.nav-card-desc {
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-mid);
}

/* ================================================================
   ボタン全面強化
================================================================ */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
  font-family: var(--font-sans);
  letter-spacing: 0.06em;
  font-weight: 700;
  transition:
    transform   var(--dur-fast) var(--ease-spring),
    box-shadow  var(--dur-fast) var(--ease-out),
    background  var(--dur-fast) var(--ease-out);
}

/* シャインエフェクト（ymy-tea 方式） */
.btn-primary::after,
.btn-secondary::after {
  content: '';
  position: absolute;
  top: 0; left: -120%; width: 80%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-15deg);
  transition: left 0.55s var(--ease-expo);
  pointer-events: none;
}

.btn-primary:hover::after,
.btn-secondary:hover::after {
  left: 160%;
}

.btn-primary:hover {
  box-shadow: var(--shadow-coral);
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px) scale(1.02);
}

/* ================================================================
   セクションラベル 強化（awahi方式）
================================================================ */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  margin-bottom: var(--sp-sm);
}

.section-label::before {
  content: '';
  width: 1.5rem; height: 1px;
  background: var(--coral-mid);
  flex-shrink: 0;
}

.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ================================================================
   セクションヘッダー 強化
================================================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text);
}

/* ================================================================
   ページヒーロースモール 強化
================================================================ */
.page-hero-sm {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg,#FFF5EE 0%,#FDE8D8 45%,#FFFAF6 100%);
  padding: clamp(1.75rem, 4vw, 3rem) 2rem;
  border-bottom: 1px solid rgba(240,149,106,0.18);
}

.page-hero-sm::after {
  content: '';
  position: absolute;
  right: -4rem; top: -4rem;
  width: 20rem; height: 20rem;
  border-radius: 50%;
  border: 2px solid rgba(240,149,106,0.12);
  box-shadow: inset 0 0 0 3rem rgba(240,149,106,0.05),
              inset 0 0 0 6rem rgba(240,149,106,0.03);
  pointer-events: none;
}

.page-hero-sm h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.06em;
  font-size: clamp(1.25rem, 2.5vw + 0.3rem, 1.9rem);
  line-height: 1.38;
}

/* ================================================================
   フッター 強化
================================================================ */
footer {
  position: relative;
  background: var(--text) !important;
  color: rgba(255,255,255,0.6) !important;
  padding: 2rem !important;
}

footer p { color: rgba(255,255,255,0.55); font-size: 0.8rem; }
footer p:first-child { color: rgba(255,255,255,0.75); font-weight: 600; }

footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg,
    var(--coral) 0%,
    var(--coral-mid) 50%,
    var(--coral) 100%);
  position: absolute;
  top: 0; left: 0; right: 0;
}

/* ================================================================
   スクロールフェードイン（Intersection Observer と連携）
================================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 遅延バリエーション */
.fade-in[data-delay='1'] { transition-delay: 0.08s; }
.fade-in[data-delay='2'] { transition-delay: 0.16s; }
.fade-in[data-delay='3'] { transition-delay: 0.24s; }
.fade-in[data-delay='4'] { transition-delay: 0.32s; }

/* ================================================================
   ページ遷移アニメーション
================================================================ */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
main.container { animation: pageIn 0.5s var(--ease-out) both; }

/* ================================================================
   ポップアップ 強化
================================================================ */
.popup-panel {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
}
.popup-title {
  font-family: var(--font-serif);
  letter-spacing: 0.05em;
  font-weight: 500;
}
.popup-btn {
  transition: all 0.25s var(--ease-spring);
}
.popup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212,120,76,0.3);
}

/* ================================================================
   テーブル 強化
================================================================ */
th {
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

/* ================================================================
   DLウィジェット 強化（awahi方式 slide-right）
================================================================ */
.dl-item {
  transition:
    background var(--dur-fast) var(--ease-out),
    transform  var(--dur-fast) var(--ease-out),
    padding-left 0.25s var(--ease-out);
}
.dl-item:hover {
  transform: translateX(6px);
  padding-left: 1.2rem !important;
}

/* ================================================================
   ナビリンク 強化
================================================================ */
.site-nav a {
  font-family: var(--font-sans);
  letter-spacing: 0.03em;
  transition: all var(--dur-fast) var(--ease-out);
}

/* ================================================================
   コンテナ最大幅
================================================================ */
.container {
  max-width: min(1200px, 95vw);
  margin-left: auto;
  margin-right: auto;
}

/* ================================================================
   装飾ブロブ（background shape）— SVG inline で実装
================================================================ */
.blob-decoration {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  filter: blur(40px);
  border-radius: 50%;
  background: var(--coral);
}

/* ================================================================
   数値・統計 テキスト
================================================================ */
.stat-number {
  font-family: var(--font-num);
  font-size: clamp(2rem, 4vw + 0.8rem, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--coral-dark);
  line-height: 1;
}

/* ================================================================
   イメージカード（aspect-ratio 対応）
================================================================ */
.img-card {
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
}
.img-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-gentle);
}
.img-card:hover img { transform: scale(1.04); }

/* ================================================================
   2カラムスプリットセクション（giftee方式）
================================================================ */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 768px) {
  .split-section { grid-template-columns: 1fr; }
}

/* ================================================================
   アラート・バッジ系 強化
================================================================ */
.alert {
  border-radius: var(--r);
  border-left: 4px solid;
}
.alert-info    { border-color: var(--info-light); }
.alert-success { border-color: var(--success); }
.alert-warning { border-color: var(--warning); }
.alert-danger  { border-color: var(--danger); }

/* ================================================================
   リンク下線アニメーション
================================================================ */
a[href]:not(.btn-primary):not(.btn-secondary):not(.nav-card):not(.site-nav a):not(.site-logo):not(.popup-btn):not(.dl-btn) {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.25s, color 0.25s;
}

/* ================================================================
   モーション設定尊重
================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
  .nav-card::after { display: none; }
}

/* ================================================================
   印刷
================================================================ */
@media print {
  body, h1, h2, h3 { font-family: var(--font-serif); }
  .stats-section,
  .sakura-section { background: white !important; }
}
