/* ============================================================
   front-page.css - Lefty トップページ専用スタイル
   文字サイズ: rem / 余白・サイズ: px
   ============================================================ */

/* ============================================================
   LOADING（初回アクセス時のみ表示）
   グッドマークの周りを理念英字が回転
   ============================================================ */
.l-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #f0f0f0;
  /* 既定は非表示。初回アクセス（html.is-first-visit）時のみ表示する */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.is-first-visit .l-loading {
  opacity: 1;
  visibility: visible;
}

/* 読み込み完了後はフェードアウト */
.is-first-visit.is-loaded .l-loading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 初回ローディング中は背面スクロールをロック */
.is-first-visit:not(.is-loaded) {
  overflow: hidden;
}

.l-loading__mark {
  position: relative;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
}

.l-loading__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center;
  animation: l-loading-spin 18s linear infinite;
  /* GPUコンポジタ層に昇格：SVG（テキスト＋グラデ）を1回だけラスタライズし、
     以降の回転は再描画せずGPUで合成する＝カクつき軽減 */
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.l-loading__ring-text {
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 600;
  /* 文字サイズに合わせて字間を調整し、textLength(円周長)への圧縮による歪みを防ぐ */
  letter-spacing: 0.05em;
  fill: url(#l-loading-grad);
}

.l-loading__logo {
  position: relative;
  width: 60px;
  height: auto;
}

@media (min-width: 1024px) {
  .l-loading__ring-text {
    font-size: 28px;
    /* 字間を詰めて円周長に近づけ、textLength補正による歪みを最小化 */
    letter-spacing: 0;
  }
  .l-loading__logo {
    width: 70px;
  }
}

@keyframes l-loading-spin {
  from {
    transform: translateZ(0) rotate(0deg);
  }
  to {
    transform: translateZ(0) rotate(360deg);
  }
}

@keyframes l-loading-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .l-loading__ring,
  .l-loading__logo {
    animation: none;
  }
  .l-loading {
    transition: none;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.p-hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-block-start: calc(var(--header-h) + 16px);
  background: var(--color-bg);
}

/* HERO下波線: マーキーの上に絶対配置 */
.p-hero__wave {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: var(--wave-h);
  pointer-events: none;
  z-index: 3;
}

.p-hero__wave::before,
.p-hero__wave::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.p-hero__wave::before {
  height: var(--wave-h);
  background-image: url('../images/wave-bottom-light.svg');
}

.p-hero__wave::after {
  height: var(--wave-h-back);
  background-image: url('../images/wave-bottom.svg');
}

.p-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #cde8f5;
  overflow: hidden;
}

/* ヒーロー静止画スライドショー（3枚クロスフェード＋ゆるやかなズーム） */
.p-hero__slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.p-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  will-change: opacity, transform;
  animation: p-hero-slide 21s ease-in-out infinite;
}

.p-hero__slide--1 {
  animation-delay: 0s;
}

.p-hero__slide--2 {
  animation-delay: 7s;
}

.p-hero__slide--3 {
  animation-delay: 14s;
}

@keyframes p-hero-slide {
  0% {
    opacity: 0;
    transform: scale(1.12);
  }
  5% {
    opacity: 1;
  }
  33% {
    opacity: 1;
  }
  38% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

/* アニメを好まない環境: 先頭画像を静止表示 */
@media (prefers-reduced-motion: reduce) {
  .p-hero__slide {
    animation: none;
  }
  .p-hero__slide--1 {
    opacity: 1;
    transform: none;
  }
}

.p-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.2) 50%,
      rgba(1, 69, 139, 0.1) 100%);
  z-index: 1;
}

/* YouTubeのタイトル・ロゴ・再生ボタンを隠す透明カバー */
.p-hero__video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.p-hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
}

/* キャッチコピー: absolute配置 */
.p-hero__catch {
  position: absolute;
  inset-block-start: 50px;
  inset-inline-start: 40px;
  height: 250px;
}

@media (min-width: 1024px) {
  .p-hero__catch {
    inset-block-start: 40%;
    inset-inline-start: 150px;
    transform: translateY(-50%);
    height: 350px;
  }
}

.p-hero__catch-img {
  display: block;
  height: 100%;
  width: auto;
}

/* ============================================================
   WORKS
   ============================================================ */
.p-hero__works {
  position: absolute;
  /* SP: 右下に寄せて右・下をはみ出させる */
  bottom: 20px;
  right: 10px;
  z-index: 4;
  /* width: 110px; */
  /* height: 240px; */
  max-width: 240px;
  display: flex;
  flex-direction: column;
}

.p-hero__works-label {
  font-family: var(--font-en);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 500;
  color: var(--color-white);
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(1, 69, 139, 0.3);
  position: relative;
  z-index: 2;
  margin-bottom: -24px;
  padding-inline-start: 16px;
}

.p-hero__works-card {
  flex: 1;
}

/* outerを囲むリンク: ブロック表示してcard全体をクリック領域に */
.p-hero__works-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* 外側: Figmaシルエット完全再現（SVG clipPath） */
.p-hero__works-outer {
  width: 100%;
  height: 100%;
  /* min-height: 440px; */
  background: linear-gradient(170deg,
      var(--color-grad-1) 0%,
      var(--color-grad-2) 50%,
      var(--color-grad-3) 100%);
  clip-path: url(#clip-works-outer);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 50px 20px;
}

/* 内側: Figmaシルエット完全再現（SVG clipPath） */
.p-hero__works-inner {
  width: 88%;
  aspect-ratio: 329 / 289;
  margin-inline: auto;
  /* margin-top: 16px; */
  clip-path: url(#clip-works-inner);
  flex-shrink: 0;
  position: relative;
}

.p-hero__works-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.p-hero__works-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: block;
  text-decoration: none;
}

.p-hero__works-slide.is-active {
  opacity: 1;
}

.p-hero__works-slide-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

/* アイキャッチ無し: 会社ロゴを中央に表示（cover防止・薄水色背景） */
.p-hero__works-slide-img.p-hero__works-slide-img--noimage {
  background-size: 62% auto;
  background-repeat: no-repeat;
  background-color: var(--color-blue-light-bg);
}


/* aタグホバー: インナーサイズ固定・画像だけズーム */
@media (hover: hover) and (pointer: fine) {

  /* aタグホバー */
  .p-hero__works-link:hover .p-hero__works-slide-img {
    transform: scale(1.06);
  }

  .p-hero__works-link:hover .p-hero__works-cat {
    background: var(--color-orange);
    color: var(--color-white);

  }

  .p-hero__works-link:hover .p-hero__works-title {
    color: var(--color-orange);
  }

  /* 矢印ボタンホバー時: aタグ側の効果をリセット */
  .p-hero__works-link:has(.p-hero__works-arrow:hover) .p-hero__works-slide-img {
    transform: none;
  }

  .p-hero__works-link:has(.p-hero__works-arrow:hover) .p-hero__works-cat {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-blue-dark);

  }

  .p-hero__works-link:has(.p-hero__works-arrow:hover) .p-hero__works-title {
    color: var(--color-white);
  }
}

.p-hero__works-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-inline: 4px;

  margin-top: 4px;
  z-index: 1;
}

.p-hero__works-cat {
  display: inline-block;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-blue-dark);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  transition: background 0.3s ease, color 0.3s ease;
}

.p-hero__works-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.p-hero__works-arrow {
  color: var(--color-white);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: center;
}

.p-hero__works-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .p-hero__works-arrow:hover svg {
    transform: scale(1.4);
  }
}

.p-hero__works-title {
  color: var(--color-white);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 5px;
  padding-inline: 4px;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .p-hero__works {
    bottom: 40px;
    right: 40px;
    width: clamp(220px, 28vw, 360px);
    height: 480px;
    max-width: inherit;
  }
  .p-hero__works-inner {
    width: 92%;
    margin-top: 16px;
  }
  .p-hero__works-meta {
      margin-top: 8px;
      padding-inline: 12px;
  }
  .p-hero__works-cat {
      padding: 4px 12px;
  }
  .p-hero__works-title {
    -webkit-line-clamp: 2;
    margin-top: 12px;
    padding-inline: 12px;
  }
  .p-hero__works-outer {
    padding: 24px 30px 20px;
  }
}

/* ============================================================
   LINE ボタン（ヒーロー固有：絶対配置・人物画像はみ出し装飾）
   色 / border-radius / font は c-btn / c-btn--line（common.css）で管理
   ============================================================ */
.p-hero__line-btn {
  position: absolute;
  inset-inline-start: 20px;
  inset-block-end: 90px;
  z-index: 4;
  text-decoration: none;
  /* ヒーローのLINEボタンだけ横幅を広めに（メニュー内ボタンには影響させない） */
  padding-inline: 42px;
  /* スタッフ写真はボタン後方から上に飛び出す方式のため左余白リセット */
}

@media (min-width: 1024px) {
  .p-hero__line-btn {
    inset-inline-start: 40px;
    inset-block-end: 110px;
  }
}

/* 人物: ピル左端から上にはみ出す・下はoverflow:hiddenでクリップ */
/* ============================================================
   MARQUEE
   ============================================================ */
/* ============================================================
   VOICE（お客様の声）
   ============================================================ */
.p-voice {
  position: relative;
  border-radius: 40px 40px 0 0;
  background: var(--grad-blue);
  overflow: hidden;
  padding-block: 0 var(--wave-h);
  /* 波線の高さ分 */
}

/* VOICE内のセクションラベル: 青背景上なので白に上書き */
.p-voice .c-section-label {
  background: none;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.9);
  color: rgba(255, 255, 255, 0.9);
}

.p-voice .c-section-label__icon {
  background: rgba(255, 255, 255, 0.9);
}

.p-voice__top {
  padding-block: 60px 40px;
}

.p-voice__heading {
  color: var(--color-white);
  margin-bottom: 48px;
}

/* 数字3列 */
.p-voice__stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  /* ulデフォルトリセット */
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 600px) {
  .p-voice__stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* li: 透明・noteを格納するコンテナ */
.p-voice__stat {
  display: flex;
  flex-direction: column;
}

/* 白背景カード本体 */
.p-voice__stat-inner {
  position: relative;
  background: var(--color-white);
  border-radius: 16px;
  padding: 32px 28px;
  padding: 32px 0px 20px;
  overflow: hidden;
  text-align: center;
}

.p-voice__stat-label {
  position: relative;
  z-index: 1;
  font-size: 1.6rem;
  font-weight: 500;
  /* color: var(--color-text-sub); */
  margin-bottom: 12px;
  text-align: center;
}

/* data-en属性: stat-labelの背後に大きく薄く透かす */
.p-voice__stat-label::before {
  content: attr(data-en);
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-en);
  font-size: 5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--color-blue-light);
  opacity: 0.2;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

.p-voice__stat-num {
  position: relative;
  z-index: 2;
  font-family: var(--font-en);
  font-size: clamp(4rem, 6vw, 6.4rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

/* カウンター: 数字は大きく、suffix（単位）は小さく */
.js-counter {
  display: inline-block;
}

.p-voice__stat-number {
  font-size: clamp(6rem, 6vw, 8rem);
  font-weight: 700;
}

.p-voice__stat-suffix {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 700;
  margin-inline-start: 2px;
}

/* noteはstat内・innerの外 */
.p-voice__note {
  margin-top: 6px;
  font-size: 1.1rem;
  color: var(--color-white);
}

/* レビューマーキー */
.p-voice__reviews {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.p-voice__row {
  overflow: hidden;
}

.p-voice__track {
  display: inline-flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 各口コミを白背景・固定サイズのカードにして高さを揃える（画像は中央にcontainで収める） */
.p-voice__track > li {
  flex-shrink: 0;
  width: 280px;
  height: 165px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p-voice__row--forward .p-voice__track {
  animation: voice-forward 120s linear infinite;
  will-change: transform;
}

.p-voice__row--reverse .p-voice__track {
  animation: voice-reverse 120s linear infinite;
  will-change: transform;
}

@keyframes voice-forward {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes voice-reverse {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

.p-voice__review-img {
  /* カード幅いっぱいに表示（左右の余白をなくす）。縦の差分は白カードに溶けるので目立たない */
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 1024px) {
  /* カード間の左右の余白はPCで少し詰める */
  .p-voice__track {
    gap: 10px;
  }

  .p-voice__track > li {
    width: 360px;
    height: 210px;
  }

  .p-voice__row--forward .p-voice__track {
    animation: voice-forward 160s linear infinite;
  }

  .p-voice__row--reverse .p-voice__track {
    animation: voice-reverse 160s linear infinite;
  }
}

@media (prefers-reduced-motion: reduce) {

  .p-voice__row--forward .p-voice__track,
  .p-voice__row--reverse .p-voice__track {
    animation: none;
  }
}

/* ============================================================
   FEATURE（Leftyのお掃除）
   ============================================================ */
.p-feature {
  padding-block: var(--section-padding);
  background: var(--color-bg);
}

/* PC: bodyをflexで左右 / SP: そのまま縦並び */
.p-feature__body {
  display: flex;
  flex-direction: column;
  gap: 30px;
  /* margin-block-start: 48px; */
}


/* 左: 円グラフ */
.p-feature__graph {
  width: min(400px, 100%);
  margin-inline: auto;
  transform: scale(1.03);
}

.p-feature__visual {
  width: 100%;
  height: auto;
  object-fit: contain;
  /* border-radius: 50%; */
}

/* 右: FEATURE一覧 */
.p-feature__heading {
  margin-bottom: 40px;
}

/* 非アクティブ: 白背景・枠線なし */
.p-feature__item {
  padding: 20px 28px;
  border-radius: 16px;
  margin-bottom: 20px;
  background: var(--color-white);
}

.p-feature__item:last-child {
  margin-bottom: 0;
}

.p-feature__item-label {
  display: block;
  /* span→ブロック表示 */
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-blue-light);
  /* margin-bottom: 6px; */
}

@media (min-width: 1024px) {
  .p-feature__item-label {
    font-size: 1.8rem;
  }
}

.p-feature__item-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.p-feature__item-body {
  font-size: 1.4rem;
  color: var(--color-text-sub);
  line-height: 1.8;
}

@media (min-width: 900px) {
  .p-feature__body {
    flex-direction: row;
    align-items: flex-start;
    gap: 60px;
  }

  /* 左: 円グラフ */
  .p-feature__graph {
    width: min(550px, 60%);
    /* flex: 0 0 400px; */
    transform: none;
  }

  .p-feature__items {
    flex: 1;
  }
}


/* ============================================================
   FAQ（よくある質問）
   ============================================================ */
.p-faq {
  background: var(--color-blue-light);
  padding-block-start: calc(var(--section-padding) + var(--wave-h) - 47px);
  /* 波線の高さ分 */
  padding-block-end: var(--section-padding);
  border-radius: 0 0 40px 40px;
  position: relative;
}

/* 上部波線: c-wave-bottomと同仕様をセクション上端に反転して配置 */
.p-faq::before,
.p-faq::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

.p-faq::before {
  top: 0;
  height: var(--wave-h);
  background-image: url('../images/wave-bottom-light.svg');
  opacity: 0.6;
  transform: scaleY(-1);
}

.p-faq::after {
  top: 0;
  height: var(--wave-h-back);
  background-image: url('../images/wave-bottom.svg');
  transform: scaleY(-1);
}

/* FAQ内セクションラベルを白に */
.p-faq .c-section-label {
  background: none;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.9);
  color: rgba(255, 255, 255, 0.9);
}

.p-faq .c-section-label__icon {
  background: rgba(255, 255, 255, 0.9);
}

.p-faq__heading {
  color: var(--color-white);
  margin-bottom: 48px;
}

.p-faq__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  /* 左右独立した高さ */
}

@media (min-width: 1024px) {
  .p-faq__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.p-faq__item {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
}

.p-faq__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  background: none;
  transition: background var(--transition-base);
}

@media (hover: hover) and (pointer: fine) {
  .p-faq__btn:hover {
    background: rgba(1, 69, 139, 0.04);
  }
}

.p-faq__q-label,
.p-faq__a-label {
  font-family: var(--font-en);
  font-size: 2.4rem;
  color: var(--color-blue-light);
  flex-shrink: 0;
}

.p-faq__q-label {
  line-height: 1;
}

.p-faq__a-label {
  line-height: 1.4;
}

.p-faq__btn span:nth-child(2) {
  flex: 1;
}

/* アコーディオンパネル: カクつき防止のためopacityも併用 */
.p-faq__answer {
  display: flex;
  gap: 10px;
  padding-inline: 20px;
  font-size: 1.3rem;
  overflow: hidden;
  height: 0;
  opacity: 0;
  visibility: hidden;
  transition: height 0.35s ease, opacity 0.35s ease;
}

.p-faq__answer.is-open {
  height: auto;
  opacity: 1;
  visibility: visible;
}



.p-faq__answer p {
  color: var(--color-text-sub);
  line-height: 1.8;
  flex: 1;
  padding-bottom: 20px;
}

