/* ============================================================
   富士ミール サイト共通スタイル
   style.css
   ============================================================ */

/* ------------------------------------------------------------
   カスタムプロパティ（デザイントークン）
   ------------------------------------------------------------ */
:root {
  /* カラー */
  --color-main:       #354B38;   /* メインカラー（グリーン） */
  --color-accent:     #C7A252;   /* アクセント（ゴールド） */
  --color-text:       #343434;   /* 本文テキスト */
  --color-white:      #FFFFFF;
  --color-black:      #000000;
  --color-overlay-dark:   rgba(0, 0, 0, 0.5);
  --color-overlay-darker: rgba(0, 0, 0, 0.7);

  /* フォントファミリー */
  --font-min:   'Zen Old Mincho', serif;
  --font-sans:  'Roboto', sans-serif;

  /* フォントサイズ */
  --fs-hero-copy:  38px;
  --fs-heading-lg: 40px;
  --fs-heading-md: 32px;
  --fs-heading-sm: 24px;
  --fs-sub:        18px;
  --fs-base:       16px;
  --fs-sm:         14px;

  /* フォントウェイト */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;

  /* 行間 */
  --lh-tight:   1.3;
  --lh-normal:  1.7;
  --lh-loose:   2;

  /* レタースペース */
  --ls-base:  0.1em;
  --ls-none:  0;

  /* 余白（セクション） */
  --section-py:    160px;
  --section-px:    32px;
  --section-px-news: 188px;

  /* インナー最大幅 */
  --inner-max: 1528px;

  /* ヘッダー高さ */
  --header-h: 120px;

  /* アニメーション */
  --transition: 0.3s ease;
}


/* ------------------------------------------------------------
   リセット・ベース
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--fs-base);
}

body {
  font-family: var(--font-min);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  background-color: var(--color-white);
  background-image: url('../images/contents_back.png');
  background-repeat: repeat;
  background-size: 30%;
  line-height: var(--lh-normal);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}


/* ------------------------------------------------------------
   共通レイアウト
   ------------------------------------------------------------ */
.inner {
  max-width: var(--inner-max);
  margin-inline: auto;
  width: 100%;
}

.section-title {
  text-align: center;
}

.section-title__en,
.section-title__ja {
  display: block;
}

.section-title__en {
  font-size: var(--fs-heading-lg);
  font-weight: var(--fw-medium);
  line-height: 1;
}

.section-title__ja {
  font-size: var(--fs-sub);
  font-weight: var(--fw-semibold);
  line-height: 1;
  margin-top: 12px;
}

/* anime.js が生成するcharスパン */
.section-title .char {
  display: inline-block;
  opacity: 0;
  white-space: pre; /* スペースを保持 */
}

/* セクションコンテンツ：タイトルアニメーション後に表示 */
.sec-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.sec-content.is-visible {
  opacity: 1;
  transform: translateY(0);
}



/* ------------------------------------------------------------
   ヘッダー
   ------------------------------------------------------------ */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  z-index: 100;
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  text-decoration: none;
}

.header__logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.header__logo-text {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  font-family: var(--font-min);
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  white-space: nowrap;
}

.header__logo-text .company {
  font-size: 24px;
  line-height: 1;
}

.header__logo-text .name {
  font-size: 28px;
  line-height: 1;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 31px;
}

.header__nav a {
  font-family: var(--font-min);
  font-size: var(--fs-sub);
  color: var(--color-white);
  line-height: var(--lh-loose);
  white-space: nowrap;
  transition: opacity var(--transition);
}

.header__nav a:hover {
  opacity: 0.7;
}


/* ------------------------------------------------------------
   ヒーローセクション
   ------------------------------------------------------------ */

/* スライド切り替え時間（JSと合わせる） */
:root {
  --hero-duration:    6000;   /* 各スライドの表示時間(ms) ※JS参照用 */
  --hero-fade:        1500ms; /* フェード時間 */
  --hero-zoom-scale:  1.08;   /* ズーム倍率 */
}

.hero {
  position: relative;
  width: 100%;
  height: 957px;
  overflow: hidden;
}

/* ---- スライドコンテナ ---- */
.hero__slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---- 各スライド ---- */
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--hero-fade) ease;
  will-change: opacity;
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__slide picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

/* ---- ズームイン（拡大）アニメーション ---- */
@keyframes zoomIn {
  from { transform: scale(1); }
  to   { transform: scale(var(--hero-zoom-scale)); }
}

/* ---- ズームアウト（縮小）アニメーション ---- */
@keyframes zoomOut {
  from { transform: scale(var(--hero-zoom-scale)); }
  to   { transform: scale(1); }
}

/* アクティブスライドのみアニメーション適用 */
.hero__slide.is-active[data-zoom="in"] img {
  animation: zoomIn 7s ease forwards;
}

.hero__slide.is-active[data-zoom="out"] img {
  animation: zoomOut 7s ease forwards;
}

/* ---- 下部グラデーション ---- */
.hero__shadow {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 188px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: 2;
}

/* ---- コピーテキスト ---- */
.hero__copy {
  position: absolute;
  left: 89px;
  top: 514px;
  width: 723px;
  z-index: 3;
}

.hero__copy img {
  width: 100%;
  height: auto;
}

/* ---- インジケーター ---- */
.hero__indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  z-index: 3;
}

.hero__indicator-dot {
  width: 60px;
  height: 4px;
  background-color: var(--color-text);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color var(--transition);
}

.hero__indicator-dot.is-active {
  background-color: var(--color-accent);
}


/* ------------------------------------------------------------
   News & Topics セクション
   ------------------------------------------------------------ */
.sec-news {
  padding: var(--section-py) var(--section-px);
}

.sec-news__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
}

.news-list {
  display: flex;
  gap: 32px;
  width: 100%;
}

.news-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
}

.news-card__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex-shrink: 0;
}

.news-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-card__date {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--color-accent);
  line-height: 1.5;
}

.news-card__title {
  font-family: var(--font-min);
  font-size: 20px;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

.news-card__excerpt {
  font-family: var(--font-min);
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
  letter-spacing: var(--ls-base);
}

.btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 64px 4px;
  border-bottom: 1px solid var(--color-black);
  font-family: var(--font-min);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: #040000;
  transition: opacity var(--transition);
}

.btn-more:hover {
  opacity: 0.6;
}


/* ------------------------------------------------------------
   Message セクション
   ------------------------------------------------------------ */
.sec-message {
  position: relative;
  padding: var(--section-py) var(--section-px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sec-message__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.sec-message__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--color-overlay-dark);
}

.sec-message__inner {
  position: relative;
  z-index: 1;
  max-width: var(--inner-max);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 56px;
  color: var(--color-white);
}

.sec-message .section-title {
  text-align: left;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.sec-message .section-title__en,
.sec-message .section-title__ja {
  color: var(--color-white);
  white-space: nowrap;
}

.sec-message .section-title__ja {
  margin-top: 0;
  padding-bottom: 4px;
}

.sec-message__text-wrap {
  max-width: 904px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  filter: drop-shadow(0px 4px 2px rgba(0, 0, 0, 0.5));
}

.sec-message__read {
  display: flex;
  row-gap: 12px;
  flex-direction: column;
}

.sec-message__read-sm {
  font-size: var(--fs-heading-md);
  font-weight: var(--fw-medium);
  line-height: 1;
}

.sec-message__read-lg {
  font-size: var(--fs-heading-lg);
  font-weight: var(--fw-medium);
  line-height: 1;
  padding-left: 2em;
}

.sec-message__read-end {
  font-size: var(--fs-heading-md);
  font-weight: var(--fw-medium);
  line-height: 1;
  text-align: right;
}

.sec-message__body {
  font-size: var(--fs-sub);
  line-height: var(--lh-loose);
}

.sec-message__sign {
  font-size: var(--fs-sub);
  line-height: var(--lh-loose);
  text-align: right;
}


/* ------------------------------------------------------------
   Company Profile セクション
   ------------------------------------------------------------ */
.sec-company {
  padding: var(--section-py) var(--section-px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sec-company__inner {
  max-width: var(--inner-max);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.company-wrap {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 64px;
}

.company-data {
  flex: 1;
  min-width: 0;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Shippori Mincho B1', var(--font-min), serif;
  font-size: var(--fs-base);
}

.company-table tr {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(20, 20, 20, 0.15);
}

.company-table tr:first-child {
  border-top: 1px solid rgba(20, 20, 20, 0.15);
}

.company-table th {
  width: 124px;
  flex-shrink: 0;
  font-weight: var(--fw-regular);
  text-align: left;
  line-height: 1.6;
}

.company-table td {
  flex: 1;
  min-width: 0;
  line-height: 1.6;
}

.company-map {
  width: 715px;
  height: auto;
  flex-shrink: 0;
  overflow: hidden;
}

.company-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.company-map iframe {
  width: 100%;
  height: 100%;
  display: block;
}


/* ------------------------------------------------------------
   Our Brand セクション
   ------------------------------------------------------------ */
.sec-brand {
  position: relative;
  padding: var(--section-py) var(--section-px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sec-brand__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.sec-brand__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--color-overlay-darker);
}

.sec-brand__inner {
  position: relative;
  z-index: 1;
  max-width: var(--inner-max);
  width: 100%;
  display: flex;
  align-items: center;
  gap: 64px;
}

.sec-brand .section-title {
  text-align: left;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 435px;
  flex-shrink: 0;
}

.sec-brand .section-title__en,
.sec-brand .section-title__ja {
  color: var(--color-white);
  white-space: nowrap;
}

.sec-brand .section-title__ja {
  margin-top: 0;
  padding-bottom: 4px;
}

.brand-contents {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: flex-end;
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 596px;
}

.brand-logo {
  width: 248px;
  height: 158px;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-text__desc {
  font-family: var(--font-min);
  font-size: var(--fs-sub);
  line-height: var(--lh-loose);
  color: var(--color-white);
}

.brand-text__url {
  font-family: var(--font-min);
  font-size: var(--fs-sub);
  line-height: var(--lh-loose);
  color: var(--color-white);
  white-space: nowrap;
  transition: opacity var(--transition);
}

.brand-text__url:hover {
  opacity: 0.7;
}

.brand-photo {
  width: 310px;
  height: 206px;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ------------------------------------------------------------
   フッター
   ------------------------------------------------------------ */
.footer {
  background-color: var(--color-main);
  padding: 80px 64px;
  color: var(--color-white);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  text-decoration: none;
}

.footer__logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.footer__logo-text {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  font-family: var(--font-min);
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  white-space: nowrap;
}

.footer__logo-text .company {
  font-size: 24px;
  line-height: 1;
}

.footer__logo-text .name {
  font-size: 28px;
  line-height: 1;
}

.footer__nav {
  display: flex;
  align-items: center;
  gap: 31px;
}

.footer__nav a {
  font-family: var(--font-min);
  font-size: var(--fs-sub);
  color: var(--color-white);
  line-height: var(--lh-loose);
  white-space: nowrap;
  transition: opacity var(--transition);
}

.footer__nav a:hover {
  opacity: 0.7;
}

.footer__copy {
  border-top: 1px solid var(--color-white);
  padding-top: 24px;
  text-align: right;
}

.footer__copy p {
  font-family: var(--font-min);
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
  letter-spacing: var(--ls-base);
  color: var(--color-white);
}


/* ------------------------------------------------------------
   画像フォーカスイン（ぼかし → 焦点が合う）
   ------------------------------------------------------------ */
.blur-in {
  opacity: 0;
  filter: blur(16px);
  transform: scale(1.04);
  transition:
    opacity   0.9s ease,
    filter    0.9s ease,
    transform 0.9s ease;
  will-change: filter, opacity, transform;
}

.blur-in.is-visible {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}

/* newsカードはsec-content表示後に少し遅らせて発火 */
.news-list .blur-in.is-visible {
  transition-delay: 0.2s;
}


/* ------------------------------------------------------------
   フェードインアニメーション
   ------------------------------------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* news-cardのリンクスタイル */
.news-card__link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--color-text);
  text-decoration: none;
}

.news-card__link:hover .news-card__thumb img {
  transform: scale(1.05);
}


/* ------------------------------------------------------------
   ハンバーガーボタン
   ------------------------------------------------------------ */
.hamburger {
  display: none; /* PC では非表示 */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
  position: fixed;
  top: 20px;
  right: 20px;
}

.hamburger__line {
  display: block;
  width: 26px;
  height: 1.5px;
  background-color: var(--color-white);
  transition: transform 0.4s ease, opacity 0.3s ease, background-color 0.3s ease;
  transform-origin: center;
}

/* ヒーロー通過後：線をテキストカラーに */
.hamburger.is-scrolled .hamburger__line {
  background-color: var(--color-text);
}

/* メニューオープン中は常に白 */
.hamburger.is-open .hamburger__line {
  background-color: var(--color-white);
}


/* ------------------------------------------------------------
   スマホメニュー
   ------------------------------------------------------------ */
.sp-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
}

.sp-menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

/* 背景：中央から円形に広がる（黒） */
.sp-menu__bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-main);
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.sp-menu.is-open .sp-menu__bg {
  clip-path: circle(150% at 50% 50%);
}

/* 閉じるボタン（右上 ×） */
.sp-menu__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease 0.5s;
  z-index: 1;
}

.sp-menu.is-open .sp-menu__close {
  opacity: 1;
}

/* ナビ本体：画面下半分・左寄せ */
.sp-menu__body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0 40px 60px;
}

/* カテゴリラベル */
.sp-menu__label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sp-menu.is-open .sp-menu__label {
  opacity: 1;
  transition-delay: 0.55s;
}

.sp-menu__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  list-style: none;
}

.sp-menu__item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.sp-menu.is-open .sp-menu__item {
  opacity: 1;
  transform: translateY(0);
}

.sp-menu__link {
  font-family: var(--font-min);
  font-size: 28px;
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  letter-spacing: 0.05em;
  line-height: 1.8;
  display: block;
  transition: opacity 0.3s ease;
}

.sp-menu__link:hover {
  opacity: 0.5;
}


/* ============================================================
   レスポンシブ（スマホ対応）
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --fs-heading-lg: 28px;
    --fs-heading-md: 22px;
    --fs-sub:        16px;
    --fs-base:       14px;

    --section-py:    80px;
    --section-px:    20px;
    --section-px-news: 20px;
  }

  /* ヘッダー */
  .header {
    padding: 20px;
  }
  .header__logo-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;

    .company{
      font-size: 14px;
    }
    .name{
      font-size: 22px;
    }
  }
  .header__nav {
    display: none;
  }

  .hamburger {
    display: flex;
    /* position: fixed / top / right はベーススタイルで定義済み */
  }

  /* ヒーロー */
  .hero {
    height: 100svh;
    min-height: 500px;
  }

  .hero__copy {
    left: 20px;
    width: calc(100% - 40px);
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
  }

  /* News */
  .sec-news__inner {
    gap: 40px;
  }

  .news-list {
    flex-wrap: wrap;
    gap: 32px 20px;
  }

  .news-card {
    flex: 0 0 calc(50% - 10px);
  }

  /* Message */
  .sec-message__read-sm {
    font-size: 20px;
  }
  .sec-message__read-lg {
    font-size: 24px;
  }
  .sec-message__read-end {
    font-size: 20px;
  }
  .sec-message__body {
    font-size: var(--fs-base);
  }

  /* Company */
  .company-wrap {
    flex-direction: column;
    min-height: auto;
  }

  .company-map {
    width: 100%;
    height: 240px;
  }

  /* Brand */
  .sec-brand__inner {
    flex-direction: column;
    gap: 40px;
  }

  .sec-brand .section-title {
    width: 100%;
  }

  .brand-contents {
    flex-direction: column;
    width: 100%;
  }

  .brand-info {
    width: 100%;
    flex-direction: column;
  }

  .brand-logo {
    width: 180px;
    height: 120px;
  }

  .brand-photo {
    width: 100%;
    height: 200px;
  }

  /* Footer */
  .footer {
    padding: 60px 20px 40px;
  }

  .footer__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-bottom: 32px;
  }

  .footer__nav {
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  .footer__nav a {
    font-size: var(--fs-base);
  }
}
