/* ===========================================
   Hero Section — 水コンセプト・フルブリード
   背景全面に水のグラデと波、コンテンツは左端に寄せ、
   気泡パーティクルが浮遊するモーション豊富なヒーロー
   =========================================== */

.hero {
  position: relative;
  min-height: 88vh;
  min-height: 88dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(80px + var(--safe-top));
  padding-bottom: 0;
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 768px) {
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(96px + var(--safe-top));
  }
}

/* ---------- 背景レイヤー ---------- */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero__bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 75% 25%, rgba(34, 190, 240, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 70% 60% at 95% 75%, rgba(0, 122, 171, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 5% 90%, rgba(179, 210, 53, 0.10) 0%, transparent 65%),
    linear-gradient(165deg, rgba(240, 250, 253, 0.55) 0%, rgba(248, 252, 253, 0.45) 45%, rgba(255, 255, 255, 0.55) 100%);
  animation: heroGradientShift 24s ease-in-out infinite;
}

/* ---------- 背景動画レイヤー ---------- */
.hero__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg-video { display: none; }
}

@keyframes heroGradientShift {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 0% 100%, 0% 0%;
  }
  50% {
    background-position: 5% -5%, 95% 105%, -5% 105%, 0% 0%;
  }
}

/* グラデ全体に微細なテクスチャ感（紙のような） */
.hero__bg-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0) 0, rgba(255,255,255,0.2) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* 製品画像を背景として右側に大きく配置 */
.hero__bg-image {
  position: absolute;
  top: 0;
  right: -10%;
  bottom: 0;
  width: 70%;
  background-image: url('../assets/images/products/airelixir-overview.webp');
  background-size: contain;
  background-position: right center;
  background-repeat: no-repeat;
  opacity: 0.55;
  filter: drop-shadow(0 32px 64px rgba(0, 99, 138, 0.18));
  animation: heroImgFloat 12s ease-in-out infinite;
  z-index: 0;
}

@media (max-width: 767px) {
  .hero__bg-image {
    top: auto;
    bottom: 22%;
    right: -20%;
    width: 100%;
    height: 50%;
    opacity: 0.4;
  }
}

@media (min-width: 1280px) {
  .hero__bg-image {
    right: 0;
    width: 60%;
  }
}

@keyframes heroImgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* ---------- 浮遊する水滴SVG（8個、サイズ・位置・速度バラバラ） ---------- */
.hero__droplet {
  position: absolute;
  pointer-events: none;
  filter:
    drop-shadow(0 4px 8px rgba(34, 190, 240, 0.25))
    drop-shadow(0 12px 24px rgba(0, 99, 138, 0.12));
  z-index: 0;
}

/* それぞれ異なるサイズ・位置・速度・遅延 */
.hero__droplet--1 {
  width: 32px; height: 48px;
  top: 14%; left: 6%;
  animation: dropFloat 9s ease-in-out infinite;
}

.hero__droplet--2 {
  width: 56px; height: 84px;
  top: 48%; right: 18%;
  opacity: 0.85;
  animation: dropFloat 11s ease-in-out infinite -3s;
}

.hero__droplet--3 {
  width: 24px; height: 36px;
  top: 28%; right: 6%;
  opacity: 0.9;
  animation: dropFloat 7s ease-in-out infinite -5s;
}

.hero__droplet--4 {
  width: 18px; height: 27px;
  top: 8%; left: 38%;
  opacity: 0.7;
  animation: dropFloat 8s ease-in-out infinite -1s;
}

.hero__droplet--5 {
  width: 40px; height: 60px;
  top: 70%; left: 14%;
  opacity: 0.75;
  animation: dropFloat 13s ease-in-out infinite -7s;
}

.hero__droplet--6 {
  width: 22px; height: 33px;
  top: 22%; right: 32%;
  opacity: 0.65;
  animation: dropFloat 10s ease-in-out infinite -4s;
}

.hero__droplet--7 {
  width: 28px; height: 42px;
  top: 62%; right: 8%;
  opacity: 0.85;
  animation: dropFloat 8s ease-in-out infinite -2s;
}

.hero__droplet--8 {
  width: 16px; height: 24px;
  top: 80%; right: 40%;
  opacity: 0.6;
  animation: dropFloat 6s ease-in-out infinite -6s;
}

@media (max-width: 767px) {
  /* モバイルではコンテンツに被らないように右側中心に配置・縮小 */
  .hero__droplet--1 { width: 22px; height: 33px; top: 8%; left: auto; right: 12%; }
  .hero__droplet--2 { width: 36px; height: 54px; top: 4%; right: 4%; opacity: 0.6; }
  .hero__droplet--3 { width: 18px; height: 27px; top: 18%; right: 30%; opacity: 0.7; }
  .hero__droplet--4 { display: none; }
  .hero__droplet--5 { width: 24px; height: 36px; top: 86%; left: auto; right: 8%; opacity: 0.55; }
  .hero__droplet--6 { width: 16px; height: 24px; top: 80%; right: 38%; opacity: 0.5; }
  .hero__droplet--7 { display: none; }
  .hero__droplet--8 { display: none; }
}

@keyframes dropFloat {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(-2deg);
  }
  33% {
    transform: translateY(-14px) translateX(4px) rotate(2deg);
  }
  66% {
    transform: translateY(-6px) translateX(-4px) rotate(-1deg);
  }
}

/* ---------- 水面の波紋（リップル） ---------- */
.hero__ripple {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(34, 190, 240, 0.35);
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

.hero__ripple::before,
.hero__ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(34, 190, 240, 0.25);
}

.hero__ripple::before {
  inset: 12%;
  border-width: 1px;
  border-color: rgba(34, 190, 240, 0.2);
}

.hero__ripple::after {
  inset: 26%;
  border-width: 1px;
  border-color: rgba(34, 190, 240, 0.15);
}

.hero__ripple--1 {
  width: 360px;
  height: 360px;
  top: 12%;
  right: -8%;
  animation: rippleExpand 9s ease-out infinite;
}

.hero__ripple--2 {
  width: 240px;
  height: 240px;
  bottom: 18%;
  left: -6%;
  animation: rippleExpand 11s ease-out infinite -4s;
}

.hero__ripple--3 {
  width: 180px;
  height: 180px;
  top: 60%;
  right: 38%;
  animation: rippleExpand 7s ease-out infinite -2s;
}

@media (max-width: 767px) {
  .hero__ripple--1 { width: 200px; height: 200px; }
  .hero__ripple--2 { width: 140px; height: 140px; }
  .hero__ripple--3 { display: none; }
}

@keyframes rippleExpand {
  0% { transform: scale(0.6); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* ---------- 下端の波 ---------- */
.hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 14vh;
  min-height: 80px;
  max-height: 200px;
  z-index: 1;
}

.hero__wave-back {
  animation: waveMoveBack 16s ease-in-out infinite;
}

.hero__wave-front {
  animation: waveMoveFront 12s ease-in-out infinite;
}

@keyframes waveMoveBack {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-30px); }
}

@keyframes waveMoveFront {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(40px); }
}

/* ---------- メインコンテンツ ---------- */
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: var(--space-6);

  /* コンテンツを画面左端ギリギリに寄せる */
  padding-left: clamp(1.125rem, 6vw, 5rem);
  padding-right: var(--container-padding);
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 660px;
}

/* ---------- アイブロウラベル ---------- */
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(34, 190, 240, 0.3);
  border-radius: var(--radius-pill);
  align-self: flex-start;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 16px rgba(0, 99, 138, 0.08);
}

.hero__eyebrow-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at 30% 30%, #FFFFFF, var(--color-accent-sky));
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 190, 240, 0.2);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 190, 240, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(34, 190, 240, 0); }
}

@media (min-width: 768px) {
  .hero__eyebrow {
    font-size: var(--fs-small);
    padding: 0.625rem 1.25rem 0.625rem 1rem;
  }
}

/* ---------- タイトル ---------- */
.hero__title {
  font-size: clamp(1.75rem, 7.2vw, 5.5rem);
  font-weight: var(--fw-black);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--color-text);
  word-break: keep-all;
  text-shadow: 0 2px 30px rgba(255, 255, 255, 0.6);
}

@media (min-width: 768px) {
  .hero__title {
    line-height: 1.12;
    letter-spacing: -0.035em;
  }
}

.hero__title-line {
  display: block;
  white-space: nowrap;
}

/* 極狭画面ではタイトルを縮小し、長文行は折り返しを許可 */
@media (max-width: 360px) {
  .hero__title {
    font-size: 1.5rem;
  }

  .hero__title-line {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.hero__title-accent {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #22BEF0 0%, #007AAB 50%, #00638A 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: liquidShine 6s ease-in-out infinite;
}

@keyframes liquidShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 水滴アンダーライン（SVG風、波打つ） */
.hero__title-accent::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.05em;
  height: 0.18em;
  background:
    radial-gradient(ellipse 40% 100% at 20% 50%, rgba(34, 190, 240, 0.55), transparent 70%),
    radial-gradient(ellipse 30% 100% at 60% 50%, rgba(34, 190, 240, 0.45), transparent 70%),
    radial-gradient(ellipse 25% 100% at 90% 50%, rgba(34, 190, 240, 0.4), transparent 70%);
  filter: blur(1px);
  z-index: -1;
}

/* ---------- リード文 ---------- */
.hero__lead {
  font-size: clamp(0.9375rem, 1.5vw, 1.1875rem);
  line-height: 1.85;
  color: var(--color-text);
  max-width: 56ch;
  text-shadow: 0 1px 20px rgba(255, 255, 255, 0.5);
}

/* ---------- CTA ---------- */
.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  align-items: stretch;
  margin-top: var(--space-2);
}

@media (min-width: 480px) {
  .hero__ctas {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    margin-top: var(--space-3);
  }
}

.hero__ctas .btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 480px) {
  .hero__ctas .btn {
    width: auto;
  }
}

/* ボタンの矢印アイコン */
.hero__ctas .btn svg {
  transition: transform var(--duration-base) var(--ease-out);
}

.hero__ctas .btn:hover svg {
  transform: translateX(4px);
}

/* リップル効果（ボタンクリック時の波紋） */
.btn--ripple {
  position: relative;
  overflow: hidden;
}

.btn--ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

.btn--ripple:active::before {
  width: 300px;
  height: 300px;
  transition: 0s;
}

/* ---------- CTA 直下のベネフィット記述（PPT 同梱） ----------
   csr-value 側と同じトーン：ライム緑ボーダー+薄グラデ背景+濃い青文字 */
.hero__cta-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  margin: 1.25rem 0 0;
  padding: 0.625rem 1.125rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(220, 240, 200, 0.90) 100%);
  border: 1.5px solid var(--color-accent-lime);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 4px 14px rgba(179, 210, 53, 0.25);
  white-space: nowrap;
  overflow: hidden;
}

.hero__cta-note > span {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero__cta-note svg {
  flex-shrink: 0;
  color: var(--color-accent-lime-hover);
  stroke-width: 2.4;
}

.hero__cta-note strong {
  font-weight: 700;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .hero__cta-note {
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
  }
}

/* スマホでも1行を死守：font-size とアイコン/paddingを圧縮 */
@media (max-width: 767px) {
  .hero__cta-note {
    font-size: clamp(0.6875rem, 2.6vw, 0.8125rem);
    padding: 0.5rem 0.875rem;
    gap: 0.4rem;
  }
  .hero__cta-note svg {
    width: 12px;
    height: 12px;
  }
}

/* 380px以下：さらに密に */
@media (max-width: 379px) {
  .hero__cta-note {
    font-size: 0.625rem;
    padding: 0.45rem 0.7rem;
    gap: 0.3rem;
    letter-spacing: -0.01em;
  }
  .hero__cta-note svg {
    width: 11px;
    height: 11px;
  }
}

/* ---------- スクロール促進 ---------- */
.hero__scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--color-text-sub);
  margin-top: var(--space-3);
  padding: 0.5rem 0;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
  align-self: flex-start;
  text-decoration: none;
}

.hero__scroll-cue:hover {
  color: var(--color-accent-sky);
}

.hero__scroll-cue svg {
  animation: scrollCueBounce 1.8s ease-in-out infinite;
}

@keyframes scrollCueBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- スタッツバー（フッター帯） ---------- */
.hero__stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: var(--space-3) clamp(1.125rem, 6vw, 5rem);
  background: #FFFFFF;
  margin-top: auto;
}

/* 統計バーの上端：動画の上に被さる大きな波（stats バーが波形で動画にせり出すイメージ）
   ::before を stats の真上に -60px 持ち上げ、波の filled 領域が動画にレイヤーする構造 */
.hero__stats::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1440 60' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'><path d='M0,22 C240,-2 480,46 720,22 C960,-2 1200,46 1440,22 L1440,60 L0,60 Z' fill='white'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  /* 細いハイライトラインを波の頂上に重ねて、エッジを引き締める */
}

.hero__stats::after {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1440 60' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'><path d='M0,22 C240,-2 480,46 720,22 C960,-2 1200,46 1440,22' fill='none' stroke='%2322BEF0' stroke-width='1.6' stroke-linecap='round' opacity='0.55'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

@media (min-width: 768px) {
  .hero__stats::before,
  .hero__stats::after {
    top: -80px;
    height: 80px;
  }
}

@media (min-width: 768px) {
  .hero__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    padding: var(--space-4) clamp(1.125rem, 6vw, 5rem);
  }
}

.hero__stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 0.625rem;
  border-bottom: 1px solid rgba(34, 190, 240, 0.15);
}

.hero__stat:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .hero__stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-block: 0;
    border-bottom: none;
    border-right: 1px solid rgba(34, 190, 240, 0.15);
    padding-right: var(--space-4);
  }

  .hero__stat:last-child {
    border-right: none;
    padding-right: 0;
  }
}

.hero__stat-number {
  font-family: var(--font-heading);
  font-size: clamp(1.625rem, 3.8vw, 2.625rem);
  font-weight: var(--fw-black);
  line-height: 1;
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}

.hero__stat-number small {
  font-size: 0.5em;
  color: var(--color-accent-sky);
  margin-left: 4px;
  font-weight: var(--fw-semibold);
}

.hero__stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-sub);
  line-height: 1.4;
}

@media (max-width: 767px) {
  .hero__stat-label {
    flex: 1;
  }
}

@media (min-width: 768px) {
  .hero__stat-label {
    font-size: var(--fs-small);
    order: -1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    font-weight: var(--fw-semibold);
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__bg-gradient,
  .hero__bg-image,
  .hero__bubble,
  .hero__wave-back,
  .hero__wave-front,
  .hero__eyebrow-dot,
  .hero__scroll-cue svg {
    animation: none;
  }
}

/* ============================================================
   スタッツの注記マーク + 脚注（理論値・実運用変動の透明化）
   ============================================================ */
.hero__stat-mark {
  font-size: 0.55em;
  font-weight: 600;
  color: var(--color-accent-lime);
  margin-left: 2px;
  vertical-align: super;
  line-height: 1;
}

.hero__footnote {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: var(--space-3) auto 0;
  padding: 0.45rem 1rem;
  background: rgba(0, 30, 50, 0.55);
  border: 1px solid rgba(34, 190, 240, 0.30);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero__footnote strong {
  color: var(--color-accent-lime);
  font-weight: 700;
}

/* デスクトップでもギリギリ1行を維持できるよう、font-sizeとpaddingを抑制 */
@media (min-width: 1024px) {
  .hero__footnote {
    font-size: 0.75rem;
    padding: 0.55rem 1.125rem;
  }
}

/* タブレットでは clamp で可変 */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__footnote {
    font-size: clamp(0.6875rem, 1.5vw, 0.75rem);
    padding: 0.55rem 1rem;
  }
}

/* スマホでは可読性優先で折り返しを許可（1行強制を解除） */
@media (max-width: 767px) {
  .hero__footnote {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: 0.6875rem;
    line-height: 1.6;
    padding: 0.55rem 0.875rem;
    text-align: center;
    white-space: normal;
    border-radius: var(--radius-md);
    overflow: visible;
    text-overflow: clip;
  }
}

@media (max-width: 379px) {
  .hero__footnote {
    font-size: 0.625rem;
    line-height: 1.55;
    padding: 0.5rem 0.75rem;
    text-align: left;
  }
}
