/* ==========================================================================
   ESBrain Web Page Cleaned & Corrected CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  --font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Color Palette */
  --color-primary-coral: #e06d53;
  --color-primary-dark-coral: #b82e14;
  --color-accent-orange: #e86548;
  --color-bg-light: #f1f4f2;
  --color-bg-mid: #dbeaf3;
  --color-bg-data: #cadce8;
  --color-navy-dark: #0a2540;
  --color-navy-card: #0c2037;
  --color-text-main: #345066;
  --color-text-sub: #8ba3be;

  --max-width: 1000px;
}

/* --------------------------------------------------------------------------
   2. Base Resets & Layout Rules
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--color-bg-light);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
}

body {
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.sp-only {
  display: none;
}

/* Background Wrapper */
.main-background-wrapper {
  width: 100%;
  height: auto;
  background-image: url('../img/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  overflow: hidden;
  position: relative;
}

/* --------------------------------------------------------------------------
   3. Navigation Header
   -------------------------------------------------------------------------- */
.navbar {
  width: 100%;
  background: rgba(203, 227, 239, 0.2);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(138, 163, 181, 0.2);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  color: #0a2540;
  transition: color 0.3s ease;
}

.logo-icon {
  font-size: 16px;
  color: #3b5998;
  transition: color 0.3s ease;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
  transition: color 0.3s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-primary-coral);
  transform: translateY(-1px);
}

.hamburger-btn {
  display: none;
}

.hamburger-btn span {
  background-color: #1e293b;
  transition: background-color 0.3s ease;
}

/* Dark Navbar States */
.navbar.is-dark .nav-logo,
.navbar.is-dark .nav-links a {
  color: #f1f4f2 !important;
}

.navbar.is-dark .hamburger-btn span {
  background-color: #f1f4f2 !important;
}

.navbar.is-dark {
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   4. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  width: 100%;
  padding-top: 85px;
  padding-bottom: 20px;
  height: auto;
  position: relative;
  overflow: hidden;
  text-align: center;
}

h1.hero-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  margin: -45px auto 65px auto;
  text-align: center;
  z-index: 10;
}

.hero-title-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  height: auto;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInHeroTitle 0.8s ease forwards;
  animation-delay: 0.6s;
  object-fit: contain;
}

@keyframes fadeInHeroTitle {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



.hero-visual-wrapper {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 20px;
}

.hero-stage {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.icebergFactory-img {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto;
  animation: floatAnimation 4s ease-in-out infinite;
  will-change: transform;
}

@keyframes floatAnimation {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* Floating Cards Row */
.floating-cards-row {
  position: absolute;
  top: 25%;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 95%;
  max-width: 900px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.feature-card {
  background: rgba(226, 237, 245, 0.85);
  border-radius: 10px;
  padding: 6px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  border: 2px solid rgba(224, 109, 83, 0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card img {
  width: 125px;
  height: 180px;
  object-fit: contain;
  border-radius: 10px;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.05) !important;
  box-shadow: 0 14px 32px rgba(230, 92, 64, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes float1 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes float2 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-9px);
  }
}

@keyframes float3 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes float4 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes float5 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

.card-float-1 {
  animation: float1 4.5s ease-in-out infinite;
}

.card-float-2 {
  animation: float2 5.2s ease-in-out infinite 0.4s;
}

.card-float-3 {
  animation: float3 4.8s ease-in-out infinite 0.8s;
}

.card-float-4 {
  animation: float4 5.5s ease-in-out infinite 0.2s;
}

.card-float-5 {
  animation: float5 4.9s ease-in-out infinite 0.6s;
}

/* Hero CTA Buttons */
.hero-cta-buttons {
  position: absolute;
  top: calc(25% + 220px);
  left: 0;
  right: 0;
  margin: 140px auto 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 30;
  width: 100%;
  max-width: 500px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 230px;
  height: 48px;
  border-radius: 24px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: 0.5px;
}

.btn-try {
  background: linear-gradient(90deg, #e66847, #d95338);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(230, 104, 71, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-try:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(230, 104, 71, 0.6);
}

.btn-login {
  background: linear-gradient(90deg, #182c42, #112033);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 20px rgba(17, 32, 51, 0.3);
}

.btn-login:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(17, 32, 51, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   5. Workflow & Data Platform Sections
   -------------------------------------------------------------------------- */
.section {
  width: 100%;
  padding: 65px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: #2b3a4a;
  margin-bottom: 4px;
}

.section-subtitle {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #334155;
  font-weight: 500;
}

.workflow-section {
  padding-top: 0;
  margin-top: -250px;
  position: relative;
  z-index: 10;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.workflow-card {
  background: rgba(226, 237, 245, 0.85);
  border: 0.75px solid rgba(224, 109, 83, 0.8);
  border-radius: 10px;
  padding: 24px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.workflow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  background: #e6f0f7;
}

.step-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary-coral);
  margin-bottom: 8px;
  line-height: 1;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 12px;
  line-height: 1.65;
  color: #475569;
}

/* Data Platform Section Base */
.data-platform-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
  overflow: hidden;
  z-index: 1;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 170px;
}

.data-platform-section .container {
  position: relative;
  z-index: 5;
}

/* Metallic Rivet Card */
.rivet-card {
  position: relative;
  background: linear-gradient(135deg, #f0f4f8 0%, #d1dce5 25%, #b3c4d1 50%, #e1e9f0 75%, #a8bcce 100%);
  border: 1px solid #7e9bb3;
  outline: 1px solid rgba(255, 255, 255, 0.6);
  outline-offset: -2px;
  border-radius: 8px;
  padding: 22px 14px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(8, 26, 46, 0.15), 0 6px 14px rgba(8, 26, 46, 0.12);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.rivet-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 1), inset 0 -2px 6px rgba(8, 26, 46, 0.2), 0 12px 24px rgba(8, 26, 46, 0.18);
}

.rivet {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #90a8bd 60%, #4a6378 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 0 1px rgba(0, 0, 0, 0.6);
  border: 1px solid #5a748c;
}

.r-tl {
  top: 7px;
  left: 7px;
}

.r-tr {
  top: 7px;
  right: 7px;
}

.r-bl {
  bottom: 7px;
  left: 7px;
}

.r-br {
  bottom: 7px;
  right: 7px;
}

.card-label {
  font-size: 14px;
  font-weight: 800;
  border-radius: 2px;
  padding: 4px 0;
  width: 90%;
  display: inline-block;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card-info {
  font-size: 13px;
  font-weight: 700;
  color: #1e2e3e;
  line-height: 1.5;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* --------------------------------------------------------------------------
   6. Ice Scene Wrapper & Fog / Tooltips
   -------------------------------------------------------------------------- */
.ice-scene-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  z-index: 2;
  left: 0;
  transform: none;
  /* ★重要：はみ出た要素（上部や吹き出し）を隠さないようにする */
  overflow: visible !important;
}

/* 2. 画像自体の表示制限を解除 */
.ice-scene-img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
  /* 切れるのを防ぐために cover から contain に変更 */
}

/* Fog Animation */
.fog-container {
  position: absolute;
  top: 10%;
  left: 0;
  width: 100%;
  height: 450px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.fog-cloud {
  position: absolute;
  width: 800px;
  height: 350px;
  background: radial-gradient(ellipse at center,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(220, 240, 255, 0.4) 40%,
      rgba(255, 255, 255, 0) 70%);
  filter: blur(20px);
  border-radius: 50%;
  will-change: transform, opacity;
  animation: moveFog 12s linear infinite;
}

.fog-1 {
  top: 10px;
  animation-duration: 12s;
  animation-delay: 0s;
}

.fog-2 {
  top: 50px;
  animation-duration: 9s;
  animation-delay: 4s;
  transform: scale(1.3);
}

.fog-3 {
  top: 20px;
  animation-duration: 15s;
  animation-delay: 8s;
  transform: scale(0.8);
}

@keyframes moveFog {
  0% {
    transform: translateX(0);
    opacity: 0;
  }

  5% {
    opacity: inherit;
  }

  95% {
    opacity: inherit;
  }

  100% {
    transform: translateX(-2000px);
    opacity: 0;
  }
}


/* パターン3：シームレス無限ループ流れ */
.fog-cloud3 {
  position: absolute;
  width: 900px;
  height: 350px;
  background: radial-gradient(ellipse at center,
      rgba(255, 255, 255, 0.65) 0%,
      rgba(220, 240, 255, 0.35) 45%,
      rgba(255, 255, 255, 0) 70%);
  filter: blur(20px);
  border-radius: 50%;
  will-change: transform;
  animation: moveFogSeamless 20s linear infinite;
}

.fog-7 {
  top: 0px;
  right: -900px;
  animation-duration: 18s;
  animation-delay: 0s;
}

.fog-8 {
  top: 40px;
  right: -900px;
  animation-duration: 25s;
  animation-delay: 6s;
  transform: scale(1.2);
}

.fog-9 {
  top: 20px;
  right: -900px;
  animation-duration: 21s;
  animation-delay: 12s;
  transform: scale(0.85);
}

@keyframes moveFogSeamless {
  0% {
    transform: translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 0.8;
  }

  90% {
    opacity: 0.8;
  }

  100% {
    transform: translateX(calc(-100vw - 900px));
    opacity: 0;
  }
}

/* ==========================================================================
   Fog Animations (3 Variations)
   ========================================================================== */

/* 1. 共通ベーススタイル */
.fog-container {
  position: absolute;
  top: 10%;
  left: 0;
  width: 100%;
  height: 450px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.fog-cloud {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  background: radial-gradient(ellipse at center,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(220, 240, 255, 0.4) 40%,
      rgba(255, 255, 255, 0) 70%);
  /* background: radial-gradient(ellipse at center,
      rgba(255, 255, 255, 0.65) 0%,
      rgba(220, 240, 255, 0.35) 45%,
      rgba(255, 255, 255, 0) 70%); */
  filter: blur(25px);
}

/* --------------------------------------------------------------------------
   パターンA：fog-float (ふわふわ浮遊)
   -------------------------------------------------------------------------- */
.fog-float {
  width: 800px;
  height: 350px;
  animation: floatFog 10s ease-in-out infinite alternate;
}

.fog-float.fog-1 {
  top: 10px;
  left: 10%;
  animation-duration: 10s;
  animation-delay: 0s;
}

.fog-float.fog-2 {
  top: 40px;
  right: 15%;
  animation-duration: 13s;
  animation-delay: -3s;
  transform: scale(1.3);
}

.fog-float.fog-3 {
  top: 20px;
  left: 35%;
  animation-duration: 8s;
  animation-delay: -5s;
  transform: scale(0.9);
}

@keyframes floatFog {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.4;
  }

  50% {
    transform: translateY(-20px) translateX(30px) scale(1.05);
    opacity: 0.8;
  }

  100% {
    transform: translateY(15px) translateX(-20px) scale(0.95);
    opacity: 0.5;
  }
}

/* --------------------------------------------------------------------------
   パターンB：fog-pulse (パルス蒸気風)
   -------------------------------------------------------------------------- */
.fog-pulse {
  width: 600px;
  height: 300px;
  animation: pulseFog 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.fog-pulse.fog-1 {
  top: 20px;
  left: 15%;
  animation-duration: 12s;
  animation-delay: 0s;
}

.fog-pulse.fog-2 {
  top: 60px;
  left: 45%;
  animation-duration: 14s;
  animation-delay: 4s;
}

.fog-pulse.fog-3 {
  top: 30px;
  right: 10%;
  animation-duration: 10s;
  animation-delay: 8s;
}

@keyframes pulseFog {
  0% {
    transform: scale(0.6) translateY(30px);
    opacity: 0;
  }

  40% {
    opacity: 0.75;
  }

  80% {
    transform: scale(1.2) translateY(-20px);
    opacity: 0.2;
  }

  100% {
    transform: scale(1.3) translateY(-30px);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   パターンC：fog-flow (シームレス横流れ)
   -------------------------------------------------------------------------- */
.fog-flow {
  width: 900px;
  height: 350px;
  animation: moveFogSeamless 20s linear infinite;
}

.fog-flow.fog-1 {
  top: 0px;
  right: -900px;
  animation-duration: 18s;
  animation-delay: 0s;
}

.fog-flow.fog-2 {
  top: 40px;
  right: -900px;
  animation-duration: 25s;
  animation-delay: 6s;
  transform: scale(1.2);
}

.fog-flow.fog-3 {
  top: 20px;
  right: -900px;
  animation-duration: 21s;
  animation-delay: 12s;
  transform: scale(0.85);
}

@keyframes moveFogSeamless {
  0% {
    transform: translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 0.8;
  }

  90% {
    opacity: 0.8;
  }

  100% {
    transform: translateX(calc(-100vw - 900px));
    opacity: 0;
  }
}







/* Tooltip Bubbles */
.tooltip-bubble {
  position: absolute;
  background: rgba(50, 85, 115, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 8px;
  padding: 25px 18px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 2.4;
  transition: transform 0.6s ease, opacity 0.6s ease, background 0.2s ease;
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  transform: translateY(20px);
}

.tooltip-bubble:hover {
  transform: scale(1.05) translateY(0) !important;
  background: rgba(50, 85, 115, 0.85);
}

.tooltip-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   7. Factory Section & Footer
   -------------------------------------------------------------------------- */
.factory-section {
  position: relative;
  width: 100%;
  background-color: #061424;
  color: #ffffff;
  padding: 70px 0 90px 0;
  overflow: hidden;
  z-index: 5;
}

.circuit-bg-light {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1920px;
  height: 100%;
  background-image: url('../img/circuit_light.svg');
  background-repeat: no-repeat;
  background-position: top center;
  pointer-events: none;
  opacity: 0.8;
}

.circuit-bg {
  position: absolute;
  top: -50px;
  width: 550px;
  height: 220%;
  background-image: url('../img/circuit_dark.svg');
  background-repeat: repeat-y;
  background-position: top center;
  pointer-events: none;

  z-index: 1;
}

.circuit-left {
  left: -220px;
}

.circuit-right {
  right: -220px;
  transform: scaleX(-1);
}

.factory-section .container,
.factory-header,
.factory-main-card,
.factory-grid {
  position: relative;
  z-index: 2;
}

.factory-header {
  text-align: center;
  margin-bottom: 45px;
}

.factory-title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(90deg, #e65c40, #ff7b54);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.factory-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: #7ca5c3;
}

.factory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.factory-sub-card {
  background: #0a1c31;
  border: 1px solid #1d3d61;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.factory-sub-card p {
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
  margin-top: 6px;
}

.factory-sub-card:hover {
  border-color: #38bdf8;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.15);
}

.sub-runner-container {
  width: 100%;
  height: 120px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 32, 55, 0.6);
  border-radius: 8px;
}

.sub-runner-img {
  width: 100%;
  max-width: 100%;
  max-height: 100px;
  height: auto;
  object-fit: contain;
  display: block;
}

.sub-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.factory-sub-card:hover .sub-card-title {
  color: #ffffff;
}

.footer {
  width: 100%;
  background: #b5d1e2;
  border-top: 1px solid rgba(138, 163, 181, 0.4);
  padding: 20px 0;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  color: #1e293b;
}

.copyright {
  font-size: 12px;
  color: #475569;
}

/* Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-content {
  transition-delay: 0.25s;
}

.delay-cascade>*:nth-child(1) {
  transition-delay: 0.1s;
}

.delay-cascade>*:nth-child(2) {
  transition-delay: 0.25s;
}

.delay-cascade>*:nth-child(3) {
  transition-delay: 0.4s;
}

.delay-cascade>*:nth-child(4) {
  transition-delay: 0.55s;
}

/* --------------------------------------------------------------------------
   8. Responsive Media Queries
   -------------------------------------------------------------------------- */

/* PC Only Styles (769px+) */
@media (min-width: 769px) {

  .hero-headlin_label,
  .hero-headlin_labele {
    width: 100%;
    max-width: 280px;
    margin-bottom: -10px;
  }

  .hero-headlin_title {
    width: 100%;
    max-width: 650px;
  }

  .hero-headline_sub {
    width: 100%;
    max-width: 580px;
    margin-top: 15px;
  }

  .bubble-left {
    top: 5%;
    left: 12%;
    max-width: 220px;
  }

  .bubble-mid {
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
  }

  .bubble-right {
    top: 5%;
    right: 12%;
  }

  .tooltip-bubble.bubble-left.is-visible {
    transition-delay: 0s;
  }

  .tooltip-bubble.bubble-mid.is-visible {
    transition-delay: 0.3s;
  }

  .tooltip-bubble.bubble-right.is-visible {
    transition-delay: 0.6s;
  }
}

/* Tablet (max-width: 850px) */
@media (max-width: 850px) {

  .workflow-grid,
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  .sp-only {
    display: block;
  }

  .hero-section {
    padding-bottom: 40px !important;
  }

  /* Navigation Hamburger */
  .hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
  }

  .hamburger-btn span {
    width: 100%;
    height: 2px;
    background-color: #345066;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .hamburger-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(10, 15, 30, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
  }

  /* Floating Cards Mobile Layout */
  .floating-cards-row {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: -480px auto 20px auto;
    width: 100%;
    max-width: 320px;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .feature-card {
    padding: 4px !important;
  }

  .feature-card img {
    width: 100% !important;
    max-width: 85px !important;
    height: auto !important;
    aspect-ratio: 125 / 180;
  }

  /* Hero Mobile Titles */
  .hero-headlin_label {
    width: 60% !important;
    max-width: 240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: -30px;
  }

  .hero-headlin_title {
    width: 90% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-headline_sub {
    width: 80% !important;
    max-width: 320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Mobile CTA Buttons */
  .hero-cta-buttons {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    margin: 24px auto 0 auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0 20px;
  }

  .hero-cta-buttons a,
  .hero-cta-buttons button {
    width: 100%;
    max-width: 320px;
  }

  /* Mobile Ice Scene (Full Width Expand) */
  /* 1. Ice Scene Wrapper を画面横幅いっぱいにブレイクアウト（全幅化） */
  .ice-scene-wrapper {
    position: relative;
    /* 親要素(container)の枠を突き破って画面幅いっぱい(100vw)にする */
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 0;
    display: block;
    overflow: hidden;
    z-index: 2;
  }

  /* 2. 画像自体の表示制限を解除 */
  .ice-scene-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    /* 切れるのを防ぐために cover から contain に変更 */
  }

  /* 3. 上部の吹き出し（bubble-midなど）が上に突き出しても見切れないよう位置を微調整 */
  .tooltip-bubble {
    z-index: 30 !important;
  }

  /* 4. 親セクション側の見切れ・重なりを防止 */
  .data-platform-section,
  .main-background-wrapper {
    overflow: visible !important;
  }

  /* 3. 横スクロールバーの発生を防ぐ設定 */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
  }



  .tooltip-bubble {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.4;
  }

  .workflow-section {
    margin-top: 40px !important;
    padding-top: 20px;
  }

  .circuit-bg {
    width: 550px;
    height: 80%;
  }
}

/* Small Mobile (max-width: 550px) */
@media (max-width: 600px) {

  .workflow-grid,
  .platform-grid,
  .factory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 550px) {
  .hero-headline_sub {
    margin-top: 15px;
  }
}

/* 親セクション自体のパディングと配置干渉をリセット */
.data-platform-section {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

/* スクロールバーの影響や親要素の幅指定を完全に破壊して100%化 */
.data-platform-section .ice-scene-wrapper {
  width: 100% !important;
  max-width: none !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  width: 100vw !important;
  box-sizing: border-box !important;
}

/* 画像自体の隙間をなくし幅いっぱいに引き伸ばす */
.ice-scene-img {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  margin-top: 100px !important;
}

/* スマホ画面用の吹き出し（枠テキスト）位置の正解定義 */
@media (max-width: 768px) {
  .bubble-left {
    top: -20%;
    left: 6%;
    max-width: 220px;
  }

  .bubble-mid {
    top: -38%;
    left: 40%;
  }

  .bubble-right {
    top: -10%;
    right: 6%;
  }
}

/* --------------------------------------------------------------------------
   Slide-in Main Card & Overlay
   -------------------------------------------------------------------------- */

/* 背景オーバーレイ */
.main-card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.main-card-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* スライドインするメインカード（画面左に固定） */
.factory-main-card-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 90%;
  max-width: 420px;
  height: 100vh;
  background: #0c2037;
  border-right: 1px solid #1d3d61;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  padding: 40px 30px;
  z-index: 999;
  color: #ffffff;

  /* 初期状態：左画面外へ隠す */
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 開いた状態（画面内へ表示） */
.factory-main-card-modal.is-active {
  transform: translateX(0);
}

/* 閉じるボタン */
.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #ffffff;
}

/* カード内テキスト設定 */
.main-card-title {
  font-size: 20px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 16px;
}

.main-card-text {
  font-size: 14px;
  line-height: 1.7;
  color: #cbd5e1;
}


/*カード 開きかたテストCSSイメージ */
/* --------------------------------------------------------------------------
   Cyber Hologram Main Card
   -------------------------------------------------------------------------- */

/* 背景暗転オーバーレイ */
.main-card-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 16, 29, 0.75);
  backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.main-card-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

/* ホログラム展開カード本体 */
.hologram-main-card {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 480px;
  background: rgba(10, 25, 45, 0.92);
  border: 1.5px solid #38bdf8;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.3), inset 0 0 15px rgba(56, 189, 248, 0.15);
  color: #ffffff;
  z-index: 999;
  cursor: pointer;
  /* カード全体がクリック可能であることを提示 */
  user-select: none;

  /* ホログラム特有の跳ねるようなズーム＆イージング */
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s ease,
    visibility 0.3s ease;
}

/* 開いたときのスタイル */
.hologram-main-card.is-active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

/* 右上の閉じる表示ヒント */
.close-hint {
  font-size: 10px;
  color: #38bdf8;
  text-align: right;
  letter-spacing: 1px;
  margin-bottom: 12px;
  opacity: 0.8;
}

/* タイトルとテキストの設定 */
.hologram-main-card .card-title {
  font-size: 20px;
  font-weight: 800;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hologram-main-card .card-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #cbd5e1;
}

/* 左右のサーキット背景画像を明るくくっきり表示する修正 */
.circuit-bg {
  /* 1. 透明度を100%（または0.8〜0.9）にしてくっきりさせる */
  opacity: 0.5 !important;

  /* 2. 明るさとコントラストを上げて光らせる */
  filter: brightness(1.4) contrast(1.2) drop-shadow(0 0 8px rgba(56, 189, 248, 0.6)) !important;

  /* 3. 暗く沈むのを防ぐため、通常表示（または screen / lighten）にする */
  mix-blend-mode: normal !important;

}

/* ホログラムカード内の画像サイズ最適化 */
.hologram-main-card img {
  width: 100%;
  /* カードの幅に合わせて自動フィット */
  max-height: 180px;
  /* 高くなりすぎないよう制限（お好みで調整） */
  object-fit: contain;
  /* 画像のアスペクト比（縦横比）を崩さず収める */
  display: block;
  margin: 12px auto 16px;
  /* 上下の余白調整 */
  border-radius: 8px;
  /* カードになじむよう軽く角丸に */

  /* サイバー感を出すための軽い発光（不要なら削除OK） */
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

.hologram-main-card .card-title {
  text-align: center;
  /* タイトルを中央揃え */
  font-size: 20px;
  font-weight: 800;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  margin: 0 auto 16px;
  /* 中央配置の余白調整 */
  letter-spacing: 0.5px;
}