/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.9;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* height: auto を明示し、HTMLのwidth/height属性による
   縦横比の崩れ（スマホ表示での引き伸ばし）を防止する */
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 共通フォーカスリング（アクセシビリティ） */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 4px;
}

.section-inner {
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: var(--space-section-x);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
  margin-bottom: 1.2em;
}

/* ============================================================
   SCALE BOUNCE ANIMATION（共通アニメーション）
   ------------------------------------------------------------
   実際のキーフレームは js/config.js の値から
   js/animations.js が実行時に生成・注入します。
   下記はJS実行前のフォールバック定義です。
   ============================================================ */
.reveal {
  opacity: 0;
  transform: scale(0);
  will-change: transform, opacity;
}
.reveal.is-visible {
  animation: scaleBounce var(--anim-duration) var(--anim-easing) forwards;
}
@keyframes scaleBounce {
  0%   { opacity: 0; transform: scale(0); }
  50%  { opacity: 1; transform: scale(1.35); }
  72%  { transform: scale(0.85); }
  88%  { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

/* ============================================================
   SLIDE REVEAL（移動＋フェードイン）
   ------------------------------------------------------------
   Hero メインビジュアル／Section1・2・5 画像に使用。
   --slide-offset は js/animations.js が data-direction から
   計算して要素ごとに設定する（right: 正の値／left: 負の値／
   none: 0）。速度・イージングは js/config.js の
   slideReveal オブジェクトから反映される。
   ============================================================ */
.reveal-slide {
  opacity: 0;
  transform: translateX(var(--slide-offset, 0));
  transition: opacity var(--slide-duration) var(--slide-easing),
              transform var(--slide-duration) var(--slide-easing);
  will-change: transform, opacity;
}
.reveal-slide.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   HEADER（ロゴは画像管理・差し替え可能）
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: clamp(16px, 3vw, 28px) var(--space-section-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.site-header .logo {
  display: inline-flex;
  align-items: center;
  pointer-events: auto;
}
.logo__image {
  height: clamp(70px, 10vw, 100px);
  width: auto;
}

/* ============================================================
   LOADING SCREEN
   ------------------------------------------------------------
   ページ読み込み完了後、js/main.js の initLoadingScreen() が
   is-hidden クラスを付与してフェードアウトさせる。
   フェードアウト時間は --loading-fade-duration
   （js/config.js の loading.fadeDurationMs）で制御。
   ============================================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  opacity: 1;
  transition: opacity var(--loading-fade-duration, 600ms) ease;
}
.loading-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-screen__spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-accent-gold);
  animation: loadingSpin 0.8s linear infinite;
}
@keyframes loadingSpin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .loading-screen__spinner { animation-duration: 1.6s; }
}

/* ============================================================
   HERO AREA
   ------------------------------------------------------------
   役割分担：
   .hero       … 画面いっぱいの背景・高さ・中央配置のみを担当
   .hero__inner … コンテンツ幅の上限を持つ2カラムグリッド
                  （4Kなど超ワイド画面でも左右画像の距離が
                  間延びしないよう、幅に上限を設けている）
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* 単色背景（グラデーションは使用しない） */
  background: var(--color-bg);
}

.hero__inner {
  width: 85%;
  max-width: var(--hero-inner-max-width);
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

/* ------------------------------------------------------------
   キャッチコピー画像レイヤー
   ------------------------------------------------------------
   重要：このコンテナ・画像には絶対に背景色を設定しないこと。
   背景色（や不透明な画像）を設定すると、メインビジュアルへ
   重ねた際にメインビジュアルが矩形状に隠れて見えてしまいます。
   差し替える画像は必ず「透過PNG」または「透過WebP」を使用してください
   （背景を白や単色で塗りつぶした画像・JPEGは不可）。
   ------------------------------------------------------------ */
.hero__catch {
  position: relative;
  z-index: 3;
  /* メインビジュアルへ約80px重ねる（デザイン上必須のオーバーラップ） */
  margin-right: calc(-2 * var(--hero-overlap));
  background: none; /* 背景なし（必須） */
}
.hero__catch img {
  width: min(640px, 100%);
  background: none; /* 背景なし（必須）：透過PNG/WebP前提 */
  display: block;
}

.hero__visual {
  position: relative;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__visual img {
  width: 100%;
  height: 100%;
  /* メインビジュアルは背景色付きの矩形写真ではなく、
     周囲が透過した「浮遊イラスト」形式の画像を前提とする。
     object-fit: cover だと画像内の人物が上下でトリミングされて
     見切れてしまうため、全体が必ず収まる contain を使用する。 */
  object-fit: contain;
}

.hero__scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 4vh, 44px);
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--color-text);
  opacity: 0.8;
}
.hero__scroll-cue .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--color-accent-gold), transparent);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.4; }
}

/* ---- モバイル：キャッチコピーを上、メインビジュアルを下に ---- */
@media (max-width: 860px) {
  .hero__inner {
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .hero__catch {
    order: 1;
    margin-right: 0;
    padding-inline: var(--space-section-x);
    padding-block: 14px;
    text-align: center;
  }
  .hero__catch img { margin-inline: auto; width: min(420px, 95%); }
  .hero__visual { order: 2; height: 52vh; }
}

/* ============================================================
   GENERIC SECTION SPACING（テンポ良くスクロールできるよう半減）
   ============================================================ */
.section {
  padding-block: var(--space-section-y);
  position: relative;
}

/* ---- 見出し画像（Section1/4/5共通） -------------------------- */
.section1__heading,
.section4__heading,
.section5__heading {
  text-align: center;
  margin-bottom: var(--space-gap-lg);
}
.section1__heading img,
.section4__heading img,
.section5__heading img {
  width: min(var(--heading-image-max-width), 92%);
  margin-inline: auto;
}

/* ---- Section1 --------------------------------------------- */
.section1__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-gap-lg);
  align-items: center;
}
.section1__text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 500;
  margin: 0 0 0.9em;
  letter-spacing: 0.02em;
}
.section1__text p {
  color: var(--color-accent-beige);
  font-size: 1.08rem;
  line-height: 1.9;
  max-width: 68ch;
}
.section1__image {
  overflow: hidden;
  border-radius: var(--radius-card);
}
.section1__image img {
  border-radius: var(--radius-card);
  /* シャドウなし（画像には影をつけない方針） */
}

@media (max-width: 860px) {
  .section1__grid { grid-template-columns: 1fr; }
  .section1__image { order: -1; }
}

/* ---- Section2（横スクロール直前の大画像）----------------------
   画像の下端をセクション境界にぴったり合わせ、余白を作らない。
   背景色を切り替えるJS処理は使用しない（削除済み）。
   -------------------------------------------------------------- */
.section2 {
  padding-top: var(--space-section-y);
  padding-bottom: 0;
}
.section2__inner {
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: var(--space-section-x);
}
.section2__image {
  overflow: hidden;
}
.section2__image img {
  width: 100%;
  display: block;
  /* 角丸・シャドウなし：次セクションへ隙間なくつなげる */
}

/* ============================================================
   SECTION 3 — 縦スクロール → 横スクロール（署名演出／LINE-UP）
   ============================================================ */
.hscroll {
  position: relative;
  background: var(--color-bg-white);
  color: var(--color-text-on-white);
}
.hscroll__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hscroll__heading {
  padding-inline: var(--space-section-x);
  margin-bottom: clamp(20px, 3vw, 40px);
}
.hscroll__heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.04em;
}
.hscroll__track {
  display: flex;
  gap: clamp(20px, 2.4vw, 36px);
  padding-inline: var(--space-section-x);
  will-change: transform;
}

/* LINE-UPカード：画像を主役にした構成（画像は約1.5倍に拡大） */
.product-card {
  flex: 0 0 clamp(360px, 39vw, 510px);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card); /* LINE-UPカードのみシャドウを残す */
  display: flex;
  flex-direction: column;
}
.product-card__image { aspect-ratio: 4 / 3; overflow: hidden; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: clamp(16px, 2vw, 22px); }
.product-card__product-name {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-accent-beige);
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}
.product-card__subheading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}
.product-card__desc {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--color-accent-beige);
  margin: 0;
}

/* ============================================================
   SECTION 4 — 動画紹介エリア（外部URL / iframe埋め込み）
   ============================================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-gap-md);
  max-width: 980px;
  margin-inline: auto;
}
.video-item {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  color: var(--color-text);
}
.video-item__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-card);
}
.video-item__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--anim-easing);
}
.video-item:hover .video-item__thumb img,
.video-item:focus-visible .video-item__thumb img { transform: scale(1.06); }

.video-item__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-item__play span {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(0, 20, 30, 0.35);
  border: 1px solid var(--color-accent-gold);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
  transition: transform 0.35s var(--anim-easing), background 0.35s;
}
.video-item:hover .video-item__play span { transform: scale(1.08); background: rgba(0, 20, 30, 0.55); }
.video-item__play svg { width: 20px; height: 20px; fill: var(--color-accent-gold); margin-left: 3px; }

.video-item__title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* ---- Video Modal（iframeで外部サイトを表示） ------------------ */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 10, 16, 0.86);
  padding: 4vh 4vw;
}
.video-modal.is-open { display: flex; }
.video-modal__inner {
  position: relative;
  width: min(1000px, 100%);
}
.video-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.video-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal__close {
  position: absolute;
  top: -46px;
  right: 0;
  background: none;
  border: 1px solid var(--color-accent-gold);
  color: var(--color-text);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.video-modal__close:hover { background: var(--color-accent-gold-soft); }

/* ============================================================
   SECTION 5
   ============================================================ */
.section5 { background: var(--color-bg); color: var(--color-text); }
.section5__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-gap-lg);
  align-items: center;
}
.section5__image {
  overflow: hidden;
  border-radius: var(--radius-card);
}
.section5__image img {
  border-radius: var(--radius-card);
  /* シャドウなし */
}
.section5__text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 500;
  margin: 0 0 0.9em;
}
.section5__text p {
  color: var(--color-accent-beige);
  font-size: 1.08rem;
  line-height: 1.9;
  max-width: 68ch;
}
@media (max-width: 860px) {
  .section5__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER（お問い合わせボタンは画像・差し替え可能）
   ============================================================ */
.site-footer {
  padding-block: var(--space-section-y) clamp(32px, 5vw, 56px);
  text-align: center;
  background: var(--color-bg);
  color: var(--color-text);
}
.footer-cta {
  display: inline-block;
  transition: transform 0.3s var(--anim-easing);
}
.footer-cta:hover {
  transform: scale(1.05) translateY(-3px);
}
.footer-cta__image {
  width: min(420px, 82vw);
  height: auto;
  margin-inline: auto;
}

.footer-nav {
  margin-top: clamp(36px, 5vw, 56px);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.footer-nav a {
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.footer-nav a:hover { border-color: var(--color-accent-gold); }

.footer-copyright {
  margin-top: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-accent-beige);
  opacity: 0.8;
}
