/*
 * Malika Favre Design System — exchange-tech.co.jp
 * public/css/ に配置 = Vite/Tailwindのパイプラインを完全バイパス
 * ブラウザが直接読み込む静的CSS
 */

/* ========================================
   Color Palette
   ======================================== */
:root {
  --favre-coral: #E8434A;
  --favre-navy: #1B2A4A;
  --favre-amber: #F5A623;
  --favre-teal: #00B4A6;
  --favre-cream: #FFF5E6;
  --favre-magenta: #C73866;
  --favre-sunset: #FF6B35;
  --favre-heading-weight: 900;
  --favre-heading-tracking: -0.03em;
}

/* ========================================
   Full-Bleed Sections
   ======================================== */
.favre-section {
  position: relative;
  width: 100%;
  /* overflow: hidden だとスクロールコンテナ化し、内部要素の
     animation-timeline: view() がビューポートではなくセクション基準になり
     常に完了状態（エフェクト無効）となる実害を実測（2026-08-30）。
     clip はスクロールコンテナを生成しない（Chrome 90+/Safari 15.4+/Firefox 81+） */
  overflow: clip;
}

.favre-section__content {
  position: relative;
  z-index: 2;
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

@media (min-width: 768px) {
  .favre-section__content {
    padding: 7rem 2rem;
  }
}

@media (min-width: 1024px) {
  .favre-section__content {
    padding: 8rem 2rem;
  }
}

/* ========================================
   Hero
   ======================================== */
.favre-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--favre-navy);
  overflow: hidden;
  margin-top: -5rem;
  padding-top: 5rem;
}

.favre-hero__art {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.favre-hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.favre-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg,
      rgba(27, 42, 74, 0.65) 0%,
      rgba(27, 42, 74, 0.3) 40%,
      rgba(232, 67, 74, 0.15) 70%,
      rgba(27, 42, 74, 0.55) 100%);
}

/* 2026-08-31: ワイド画面ではヒーロー画像を額縁化し左右に余白（圧迫感の軽減・利用者指示）。
   狭幅（〜1023px）は従来どおり全幅 cover で画像左右を切る（スマホ表示の維持）。
   ページレベル構造の切替なのでメディアクエリを使う（container query は
   様々な親に埋め込まれる再利用コンポーネント向け。本ヒーローは TOP 固定のページ構造）。
   余白は rem 下限/上限 + vw 中間値の clamp（WCAG 1.4.4 ズーム対応）。
   上限側は画像のネイティブ幅 1792px（112rem）を超えて引き伸ばさない */
@media (min-width: 1024px) {
  .favre-hero__art,
  .favre-hero__overlay {
    inset-inline: max(clamp(2rem, 5vw, 5rem), calc((100% - 112rem) / 2));
  }
}

/* 浮動シンボル（¥/$/€/£）の配置基準ボックス。
   2026-09-01: シンボルの % 座標がビューポート全幅基準で額縁フレームと
   ズレる実害を修正（利用者報告）。wrapper を額縁と同一 inset-inline にし、
   シンボルの % をフレーム基準へ揃える。狭幅は従来どおり全幅基準 */
.favre-hero__symbols {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .favre-hero__symbols {
    inset-inline: max(clamp(2rem, 5vw, 5rem), calc((100% - 112rem) / 2));
  }
}

.favre-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
}

/* 2026-09-01・利用者指示: ヒーローのテキストは白・外縁は黒。
   外縁は 8 方向の text-shadow（ぼかし 0）で実装する。
   -webkit-text-stroke は輪郭がわずかに滲んで見える実害があったため不採用。
   柔らかい大きな影（旧 0 2px 40px の霞み）も滲みの原因のため置き換えた */
.favre-hero__title,
.favre-hero__subtitle,
.favre-hero__company {
  color: #fff;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 -1px 0 #000,
    0 1px 0 #000,
    -1px 0 0 #000,
    1px 0 0 #000;
}

.favre-hero__title {
  /* 2026-08 リサーチ準拠: rem 項を含む clamp（WCAG 1.4.4 ズーム対応）・
     MAX は MIN の 2.5 倍以内・日本語2行ヒーローは 52px 上限が適正
     （旧: clamp(2.5rem, 8vw, 6rem) は純 vw でズーム非対応かつ過大） */
  font-size: clamp(2rem, 1.25rem + 2.5vw, 3.25rem);
  font-weight: var(--favre-heading-weight);
  letter-spacing: var(--favre-heading-tracking);
  /* 日本語見出しの適正行間（旧 1.05 は英語大文字向けで過密） */
  line-height: 1.35;
}

.favre-hero__title span {
  display: block;
}

.favre-hero__subtitle {
  /* rem 項を追加（旧: 純 vw でズーム非対応）。サイズ感は従来どおり */
  font-size: clamp(1rem, 0.75rem + 1.25vw, 1.5rem);
  font-weight: 500;
  margin-top: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.favre-hero__company {
  /* rem 項を追加（旧: 純 vw でズーム非対応） */
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 700;
  margin-top: 2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.favre-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 3rem;
  align-items: center;
}

@media (min-width: 640px) {
  .favre-hero__actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ========================================
   Buttons
   ======================================== */
.favre-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.favre-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.favre-btn:active {
  transform: translateY(0);
}

.favre-btn--coral {
  background-color: var(--favre-coral);
  color: #fff;
}

.favre-btn--amber {
  background-color: var(--favre-amber);
  color: var(--favre-navy);
}

.favre-btn--teal {
  background-color: var(--favre-teal);
  color: #fff;
}

.favre-btn--outline {
  background-color: transparent;
  color: #fff;
  border: 3px solid #fff;
}

.favre-btn--outline:hover {
  background-color: #fff;
  color: var(--favre-navy);
}

/* ========================================
   Section Transitions — Diagonal
   ======================================== */
.favre-clip-top-diagonal {
  clip-path: polygon(0 5vw, 100% 0, 100% 100%, 0 100%);
  margin-top: -5vw;
  padding-top: calc(5vw + 3rem);
}

.favre-clip-top-diagonal-reverse {
  clip-path: polygon(0 0, 100% 5vw, 100% 100%, 0 100%);
  margin-top: -5vw;
  padding-top: calc(5vw + 3rem);
}

/* ========================================
   About Section
   ======================================== */
.favre-about {
  background-color: var(--favre-cream);
  position: relative;
}

.favre-about__image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.favre-about__image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.favre-about__text {
  color: var(--favre-navy);
}

.favre-about__text h2 {
  /* セクション見出しの適正帯: 28〜40px（旧 32〜56px は日本語見出しとして過大・純 vw） */
  font-size: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
  font-weight: var(--favre-heading-weight);
  letter-spacing: var(--favre-heading-tracking);
  /* 日本語見出しの適正行間 1.2〜1.4（旧 1.1 は過密） */
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.favre-about__text p {
  /* 日本語本文: 16〜18px（16px 最低・18px 推奨）。line-height 1.8 は最適値のため維持 */
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.8;
  color: #3a3a4a;
}

/* ========================================
   Features — Bold Color Cards
   ======================================== */
.favre-features {
  background-color: var(--favre-navy);
  position: relative;
}

.favre-features__title {
  /* セクション見出しの適正帯: 28〜40px（about h2 と統一） */
  font-size: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
  font-weight: var(--favre-heading-weight);
  letter-spacing: var(--favre-heading-tracking);
  line-height: 1.3;
  color: #fff;
  text-align: center;
  margin-bottom: 3rem;
}

.favre-features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .favre-features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .favre-features__grid {
    grid-template-columns: repeat(3, 1fr);
    /* 2026-09-01: ヒーローと同じ額縁化（利用者指示）。左右の余白をヒーロー画像の
       フレームと縦に揃えるため同一式を使う。狭幅（〜1023px）は従来どおり全幅 */
    margin-inline: max(clamp(2rem, 5vw, 5rem), calc((100% - 112rem) / 2));
  }
}

.favre-feature-card {
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  /* 2026-09-01: アイコン削除後はテキストを上下均等に（利用者指示「上下余白均等に」。
     グリッド行は最も高いカードに伸縮するため、center で各カードの上下余白が均等になる） */
  justify-content: center;
}

.favre-feature-card:hover {
  transform: scale(1.02);
  z-index: 2;
}

.favre-feature-card__title {
  /* カード見出し: 24px（アイコン削除後の視覚アンカーとして本文 16px との
     階層比 1.5・モジュラースケール整合。2026-09-01・利用者指示で最適化） */
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.favre-feature-card__desc {
  /* 日本語本文の最低ライン 16px（旧 0.95rem=15.2px は下回る） */
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.9;
}

.favre-feature-card:nth-child(1) {
  background-color: var(--favre-coral);
  color: #fff;
}

.favre-feature-card:nth-child(2) {
  background-color: var(--favre-teal);
  color: #fff;
}

.favre-feature-card:nth-child(3) {
  background-color: var(--favre-amber);
  color: var(--favre-navy);
}

.favre-feature-card:nth-child(4) {
  background-color: var(--favre-magenta);
  color: #fff;
}

.favre-feature-card:nth-child(5) {
  background-color: var(--favre-sunset);
  color: #fff;
}

.favre-feature-card:nth-child(6) {
  background-color: var(--favre-navy);
  color: var(--favre-cream);
  border: 2px solid var(--favre-teal);
}

/* ========================================
   World Map
   ======================================== */
.favre-world {
  background-color: var(--favre-navy);
  position: relative;
}

.favre-world__image {
  width: 100%;
  height: auto;
  display: block;
}

/* 2026-09-01: ヒーローと同じ額縁化（利用者指示）。ワイド画面では世界地図画像の
   左右に余白を取り、ヒーロー画像・特徴カード群とフレームの縦位置を揃える。
   狭幅（〜1023px）は従来どおり全幅表示を維持する。
   画像は in-flow のためセクションの padding-inline で額縁を作る。
   なお飛行機アニメーション（flight-overlay SVG）とオーバーレイテキスト
   （overlay-text/heading/subheading）は 2026-09-01 に利用者指示で削除済み */
@media (min-width: 1024px) {
  .favre-world {
    --favre-world-frame: max(clamp(2rem, 5vw, 5rem), calc((100% - 112rem) / 2));
    padding-inline: var(--favre-world-frame);
  }
}

/* ========================================
   CTA Section
   ======================================== */
.favre-cta {
  background-color: var(--favre-coral);
  position: relative;
}

.favre-cta__content {
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

@media (min-width: 768px) {
  .favre-cta__content {
    padding: 7rem 2rem;
  }
}

.favre-cta__title {
  /* セクション見出しの適正帯: 28〜40px（about h2 / features title と統一） */
  font-size: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
  font-weight: var(--favre-heading-weight);
  color: #fff;
  letter-spacing: var(--favre-heading-tracking);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.favre-cta__desc {
  /* 日本語本文: 16〜18px（about p と統一）。line-height 1.8 は最適値のため維持 */
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.favre-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .favre-cta__actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ========================================
   Decorative
   ======================================== */
.favre-floating-symbol {
  position: absolute;
  font-weight: 900;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

/* ========================================
   Scroll Animations
   ======================================== */
.favre-reveal {
  opacity: 1;
  transform: none;
}

@supports (animation-timeline: view()) {
  .favre-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: favre-reveal-in ease-out both;
    animation-timeline: view();
    /* reveal.css と統一（2026-08-30）: 要素サイズ非依存でスクロール追従が長く続く */
    animation-range: entry 0% cover 40%;
  }

  .favre-reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    animation: favre-reveal-scale-in ease-out both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }

  @keyframes favre-reveal-in {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes favre-reveal-scale-in {
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--favre-coral);
    transform-origin: left;
    z-index: 100;
    animation: scroll-progress-grow linear both;
    animation-timeline: scroll();
  }

  @keyframes scroll-progress-grow {
    from {
      transform: scaleX(0);
    }

    to {
      transform: scaleX(1);
    }
  }
}

/* ========================================
   Hero Entry Animations
   ======================================== */
@keyframes favre-hero-fade-in {
  from {
    opacity: 0;
    transform: scale(1.05);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes favre-hero-text-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.favre-hero__art {
  animation: favre-hero-fade-in 1.2s ease-out;
}

.favre-hero__title {
  animation: favre-hero-text-up 0.8s ease-out 0.3s both;
}

.favre-hero__subtitle {
  animation: favre-hero-text-up 0.8s ease-out 0.5s both;
}

.favre-hero__company {
  animation: favre-hero-text-up 0.8s ease-out 0.7s both;
}

.favre-hero__actions {
  animation: favre-hero-text-up 0.8s ease-out 0.9s both;
}

.favre-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: favre-bounce 2s ease-in-out infinite;
}

@keyframes favre-bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* ========================================
   prefers-reduced-motion
   ========================================
   分岐を置かない: Windows の「アニメーション効果」OFF 環境では Chrome が
   prefers-reduced-motion: reduce を報告し、全エフェクトが常時表示化する
   実害を実測（2026-08-30）。cerahd.jp top-init.ts H11（2026-08-30）と同判断 */