/* ===================================================================
   Spice Page (スパイスページ)
   Path: /in/css/pages/spice.css
   目的:
   - 可読性を上げる整形
   - 必要十分なコメントの付与
   - ブレークポイントを統一し下部に集約
   - ロングハンド化（省略表記を排除）
   =================================================================== */


/* ---------------------------------------------
   1) CSS Variables（テーマ変数）
   --------------------------------------------- */
:root {
  --spice-bg: #ffffff;
  --spice-fg: #0f172a;        /* 主要テキスト色 (slate-900) */
  --spice-sub: #475569;       /* 補助テキスト色 (slate-600) */
  --spice-muted: #64748b;     /* サブテキスト色 (slate-500) */
  --spice-line: #e2e8f0;      /* 罫線色 (slate-200) */
  --brand: #1f2937;           /* ブランド色 (gray-800) */
  --accent: #f59e0b;          /* アクセント色 (amber-500) */
  --card: #ffffff;
  --shadow: 0 8px 24px rgba(2, 6, 23, 0.08);

  /* フォントサイズ（流体） */
  --fs-body: clamp(15px, 1.6vw, 16px);
  --fs-sm: clamp(13px, 1.4vw, 14px);
  --fs-h2: clamp(18px, 2.2vw, 20px);
  --fs-hero: clamp(28px, 5vw, 44px);

  /* フォーカスリング（A11y） */
  --focus-ring: 0 0 0 3px rgba(245, 158, 11, 0.35);
}


/* ---------------------------------------------
   2) Reset / Base（土台と文字周り）
   --------------------------------------------- */
* {
  box-sizing: border-box;
}

main {
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;

  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;

  background-color: var(--spice-bg);
  color: var(--spice-fg);

  font-size: var(--fs-body);
  line-height: 1.8;
  letter-spacing: 0.01em;

  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration-line: none;
  text-decoration-thickness: auto;
  text-underline-offset: 0;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
}


/* ---------------------------------------------
   3) Hero（KV：写真＋オーバーレイ＋文言）
   --------------------------------------------- */
.spice-hero {
  position: relative;
  isolation: isolate;
}

.spice-hero img {
  width: 100%;
  height: 44svh;

  object-fit: cover;
  object-position: 50% 50%;

  filter: saturate(1.05) contrast(1.05);
}

/* Heroの上に載せる半透明オーバーレイ＋中央配置 */
.spice-hero__overlay {
  position: absolute;
  inset: 0;

  display: grid;
  place-content: center;
  column-gap: 0;
  row-gap: 16px;

  padding-top: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
  padding-bottom: clamp(20px, 4vw, 40px);
  padding-left: clamp(20px, 4vw, 40px);

  text-align: center;

  background-color: transparent;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.30) 60%, rgba(0, 0, 0, 0.28));
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  color: #ffffff;
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.92;

  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;

  font-size: var(--fs-sm);
}

.spice-hero__title {
  font-size: var(--fs-hero);
  font-weight: 900;

  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
}


/* ---------------------------------------------
   4) CTA（Hero直下のボタン群）
   --------------------------------------------- */
.spice-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;

  column-gap: 16px;
  row-gap: 16px;

  margin-top: 1rem;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;

  flex-wrap: wrap;
}

/* 共通ボタン */
.btn {
  display: inline-block;

  padding-top: 0.85rem;
  padding-right: 1.4rem;
  padding-bottom: 0.85rem;
  padding-left: 1.4rem;

  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;

  font-weight: 700;
  letter-spacing: 0.02em;

  transition-property: background, transform;
  transition-duration: 0.2s, 0.1s;
  transition-timing-function: ease, ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* 主要（反転）ボタン：透明背景＋白枠 */
.btn-primary {
  background-color: transparent;
  color: #ffffff;

  border-top-width: 2px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  border-left-width: 2px;

  border-top-style: solid;
  border-right-style: solid;
  border-bottom-style: solid;
  border-left-style: solid;

  border-top-color: #ffffff;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  border-left-color: #ffffff;
}

.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* アウトラインボタン：白背景＋白枠（黒文字） */
.btn-outline {
  background-color: #ffffff;
  color: #000000;

  border-top-width: 2px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  border-left-width: 2px;

  border-top-style: solid;
  border-right-style: solid;
  border-bottom-style: solid;
  border-left-style: solid;

  border-top-color: #ffffff;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  border-left-color: #ffffff;
}

.btn-outline:hover {
  background-color: #f9fafb;
}


/* ---------------------------------------------
   4) Main（セクション上下余白）
   --------------------------------------------- */
.spice-main {
  padding-top: clamp(36px, 6vw, 84px);
  padding-right: 0;
  padding-bottom: clamp(36px, 6vw, 84px);
  padding-left: 0;
}


/* ---------------------------------------------
   6) Intro（導入文：中央寄せ）
   --------------------------------------------- */
.spice-intro {
  max-width: 1100px;

  margin-top: 0;
  margin-right: auto;
  margin-bottom: 100px;
  margin-left: auto;

  /* padding: clamp(16px, 3vw, 24px) 24px 0; */
  padding-top: clamp(16px, 3vw, 24px);
  padding-right: 24px;
  padding-bottom: 0;
  padding-left: 24px;

  text-align: center;
}

.spice-intro__lead {
  color: var(--spice-sub);
  line-height: 1.9;
  font-size: var(--fs-body);

  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
}


/* ---------------------------------------------
   7) Card Grid（製品カード一覧）
   --------------------------------------------- */
.spice-grid {
  list-style-type: none;

  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;

  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;

  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  row-gap: 24px;
}

/* 単一カード */
.spice-card {
  grid-column: span 4;

  background-color: var(--card);

  border-top-width: 1px;
  border-right-width: 1px;
  border-bottom-width: 1px;
  border-left-width: 1px;

  border-top-style: solid;
  border-right-style: solid;
  border-bottom-style: solid;
  border-left-style: solid;

  border-top-color: var(--spice-line);
  border-right-color: var(--spice-line);
  border-bottom-color: var(--spice-line);
  border-left-color: var(--spice-line);

  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 16px;

  overflow-x: hidden;
  overflow-y: hidden;

  box-shadow: var(--shadow);

  display: flex;
  flex-direction: column;

  transition-property: transform, box-shadow;
  transition-duration: 0.2s, 0.2s;
  transition-timing-function: ease, ease;
}


/* カード上部メディア */
.spice-card__media {
  aspect-ratio: 16 / 9;
  overflow-x: hidden;
  overflow-y: hidden;
  background-color: #f8fafc;
  border-radius: 12px;
  margin-top: 28px;
}

.spice-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.3s ease;
}

.spice-card:hover .spice-card__media img {
  transform: scale(1.03);
}

/* カード本文 */
.spice-card__body {
  padding-top: 18px;
  padding-right: 18px;
  padding-bottom: 20px;
  padding-left: 18px;
}

.spice-card__title {
  font-size: var(--fs-h2);
  font-weight: 800;

  font-size: 1.1rem;

  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0.35rem;
  margin-left: 0;
}

.spice-card__title .en {
  font-weight: 600;
  color: var(--spice-muted);
  font-size: 0.9em;

  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0.35em;
}

.spice-card__meta {
  color: var(--spice-sub);
  line-height: 1.9;

  margin-top: 0.4rem;
  margin-right: 0;
  margin-bottom: 0.35rem;
  margin-left: 0;
}

.spice-card__note {
  color: var(--spice-sub);

  margin-top: 0.45rem;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
}


/* ---------------------------------------------
   8) CTA Section（終端CTA・暖色グラデ）
   --------------------------------------------- */
.spice-cta-section {
  text-align: center;

  padding-top: clamp(64px, 10vw, 104px);
  padding-right: 20px;
  padding-bottom: clamp(64px, 10vw, 104px);
  padding-left: 20px;

  margin-top: 96px;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;

  background-color: var(--accent);
  background-image: linear-gradient(135deg, var(--accent), #fbbf24);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  color: #0b1220;
}

.spice-cta-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;

  margin-top: 0;
  margin-right: 0;
  margin-bottom: 12px;
  margin-left: 0;
}

.spice-cta-text {
  color: #0b1220;
  font-size: 1.05rem;

  margin-top: 0;
  margin-right: 0;
  margin-bottom: 24px;
  margin-left: 0;
}

.btn-accent {
  display: inline-block;

  padding-top: 0.9rem;
  padding-right: 1.6rem;
  padding-bottom: 0.9rem;
  padding-left: 1.6rem;

  background-color: #ffffff;
  color: #0b1220;

  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;

  font-weight: 700;

  transition-property: background-color, color, filter;
  transition-duration: 0.2s, 0.2s, 0.2s;
  transition-timing-function: ease, ease, ease;
}

.btn-accent:hover {
  background-color: #f9fafb;
  color: #0b1220;
}


/* =========================================================
   9) Media Queries（幅によるレスポンシブ調整・下部集約）
   統一ルール:
   - 640px → 768px
   - 1024px/860px/800px/960px → 920px
   - min-width は使用しない（近似の max に集約）
   ========================================================= */

/* -------- max-width: 920px（2→1列化・ナビ調整ほか） -------- */
@media (max-width: 920px) {
  /* カードを 3列→2列へ */
  .spice-card {
    grid-column: span 6;
  }
}

/* -------- max-width: 768px（モバイル・1列化・ヒーロー最適化） -------- */
@media (max-width: 768px) {
  /* ナビを非表示（別途ハンバーガー等で代替） */
  .spice-nav {
    display: none;
  }

  /* カードを 1列へ */
  .spice-card {
    grid-column: span 12;
  }

  /* ヒーローの高さ微調整 */
  .spice-hero img {
    height: 46svh;
  }

  /* ヒーローオーバーレイ：下寄せ＋読ませる濃度に変更 */
  .spice-hero__overlay {
    place-content: end;
    align-content: end;
    text-align: left;

    padding-top: 24px;
    padding-right: 24px;
    padding-bottom: 24px;
    padding-left: 24px;

    background-color: transparent;
    background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 12%, rgba(0, 0, 0, 0.70));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
  }

  /* CTAボタン群は左寄せ（文面と整合） */
  .spice-cta-group {
    justify-content: flex-start;
  }

  .btn-primary {
    min-width: auto;
  }
}


/* ---------------------------------------------
   13) Motion Preference（動き軽減設定）
   --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .spice-card {
    transition-property: none;
    transition-duration: 0s;
  }

  .btn {
    transition-property: none;
    transition-duration: 0s;
  }
}
