@charset "UTF-8";

/* リセット & 基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #050811;
  color: #ffffff;
  font-family: 'Cormorant Garamond', serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景設定 */
body {
  background-image: url('../images/bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

/* 背景ビネット用オーバーレイ */
.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(4, 9, 20, 0.15) 0%, rgba(3, 6, 14, 0.75) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ヘッダー・左上ロゴ（初回フォーカスインのみ） */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 3.5rem;
  z-index: 20;
  opacity: 0;
  animation: introFocus 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.logo-area {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.header-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.company-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

/* メイン配置：完全センタリング */
.hero {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.content-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
}

/* 
  メイン見出し「NEW FUNCTION」
  1. introFocus: 初回のフォーカスイン（0.4秒後から1.5秒かけて合焦）
  2. focusBreathing: 初回完了後（2.0秒後〜）から始まる有機的なピントの揺らぎループ
*/
.main-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 7.8vw, 7.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #ffffff;
  line-height: 1;
  margin: 0 0 1.6rem 0;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  animation: 
    introFocus 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards,
    focusBreathing 14s ease-in-out 2.0s infinite;
}

/* サブテキスト全体構造 */
.sub-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
}

/* サブ見出し（初回フォーカスインのみ） */
.sub-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.2vw, 1.85rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
  opacity: 0;
  animation: introFocus 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

/* 2段ステートメントと水平ライン（初回フォーカスインのみ） */
.statement-group {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: 0.2rem;
  opacity: 0;
  animation: introFocus 1.4s cubic-bezier(0.16, 1, 0.3, 1) 1.05s forwards;
}

/* 左側アクセントライン */
.accent-line {
  display: inline-block;
  width: clamp(28px, 4vw, 52px);
  min-width: 28px;
  height: 1px;
  min-height: 1px;
  background-color: rgba(255, 255, 255, 0.55);
  margin-top: 0.85em;
  flex-shrink: 0;
}

/* 2段ステートメントテキスト */
.statement-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.95rem, 1.8vw, 1.55rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

/* ====================================================
   アニメーション定義
   ==================================================== */

/* 1. 初回導入用フォーカスイン */
@keyframes introFocus {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
  }
}

/* 
  2. メインテキスト専用の不規則なフォーカス揺らぎ（1周期: 14秒）
  静止・合焦を主軸にしつつ、不均等なタイミングでレンズが迷うような微細ボケを発生
*/
@keyframes focusBreathing {
  0% {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1);
  }
  /* 長めの合焦・静止 */
  28% {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1);
  }
  /* 1回目の微小フォーカス送り（浅いボケ） */
  35% {
    filter: blur(3px);
    opacity: 0.86;
    transform: scale(1.012);
  }
  /* 素早く合焦に復帰 */
  41% {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1);
  }
  /* 再び合焦・静止 */
  62% {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1);
  }
  /* 2回目の少し深め＆スローなボケ */
  74% {
    filter: blur(4.5px);
    opacity: 0.78;
    transform: scale(1.018);
  }
  83% {
    filter: blur(1.5px);
    opacity: 0.92;
    transform: scale(1.006);
  }
  /* 完全合焦に戻り、ループ先頭へ */
  92%, 100% {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1);
  }
}

/* スマートフォン向け最適化 */
@media (max-width: 768px) {
  .header {
    padding: 1.5rem 1.5rem;
  }

  .header-logo {
    width: 24px;
    height: 24px;
  }

  .company-name {
    font-size: 0.72rem;
  }

  .hero {
    padding: 1.25rem;
  }

  .main-title {
    margin-bottom: 1.2rem;
  }

  .statement-group {
    gap: 0.85rem;
  }
}
