/* ========================================
   Main CSS - 統合された基本スタイル
   ======================================== */

@import url('footer.css');
@import url('reveal.css?v=20260538');

/* ========================================
   Unified Background Styles
   ======================================== */

  /* 統一背景スタイル - 全ページ共通（トップページと同じ背景色） */
.unified-background {
  position: relative;
  min-height: 100vh;
  background: var(--color-main-bg);
  color: #ffffff;
}

/* ページヘッダーがあるページでは背景を透明にして背景画像を表示 */
.unified-background .page-header {
  background: url('../images/top/city-nightscape-resized.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 製品ページのproduct-heroでも背景画像を表示 */
.unified-background .product-hero {
  background: url('../images/products/pro_back.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ========================================
   Global Footer Margin Adjustment
   ======================================== */

/* 全ページ共通 - footerの上とのマージンを狭く */
.main-content > section:last-child {
  margin-bottom: 0;
  padding-bottom: var(--spacing-sm);
}

/* ========================================
   Index Page Specific Styles
   ======================================== */

/* Main Content 調整 */
.main-content {
  position: relative;
}

.main-content > section:last-child {
  margin-bottom: var(--spacing-lg);
}

/* Background images removed */

/* ========================================
   Lazy Load Styles
   ======================================== */

/* ========================================
   Advanced Lazy Load Styles
   ======================================== */

/* 遅延読み込み画像の基本スタイル */
img[data-src] {
  opacity: 0;
  transform: translateY(var(--translate-y, 30px)) scale(var(--scale-from, 0.9));
  transition: all var(--animation-duration, 800ms) var(--animation-easing, ease-out);
  transition-delay: var(--animation-delay, 200ms);
  background-color: #f0f0f0;
  background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

/* 読み込み中のアニメーション */
.lazy-loading {
  opacity: 0.5;
  transform: translateY(var(--translate-y, 30px)) scale(var(--scale-from, 0.9));
  background-color: #f0f0f0;
  background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

/* 読み込み完了後のスタイル */
.lazy-loaded {
  opacity: 1;
  transform: translateY(0) scale(1);
  background: none;
  animation: none;
}

/* アニメーション付き表示 */
.lazy-animate-in {
  opacity: 1;
  transform: translateY(0) scale(var(--scale-to, 1));
  transition: all var(--animation-duration, 800ms) var(--animation-easing, ease-out);
  transition-delay: var(--animation-delay, 200ms);
}

/* ビューポート外に出た時のスタイル */
.lazy-out-of-view {
  opacity: 0;
  transform: translateY(var(--translate-y, 30px)) scale(var(--scale-from, 0.9));
  transition: all 0.4s ease-in;
}

/* スケール効果が有効な場合 */
.lazy-scale-enabled {
  transform: translateY(var(--translate-y, 30px)) scale(var(--scale-from, 0.9));
}

.lazy-scale-enabled.lazy-loaded {
  transform: translateY(0) scale(var(--scale-to, 1));
}

/* エラー時のスタイル */
.lazy-error {
  opacity: 0.3;
  background-color: #ffebee;
  background-image: none;
}

/* シャイマーアニメーション */
@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* プレースホルダー画像のスタイル */
img[data-src]:before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: #f0f0f0;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJMMTMuMDkgOC4yNkwyMCA5TDEzLjA5IDE1Ljc0TDEyIDIyTDEwLjkxIDE1Ljc0TDQgOUwxMC45MSA4LjI2TDEyIDJaIiBmaWxsPSIjQ0NDIi8+Cjwvc3ZnPgo=');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
}

/* ========================================
   Modern CSS Reset
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-align: center;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

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

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}


input,
button,
textarea,
select {
  font: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   CSS Variables - Design Tokens
   ======================================== */

:root {
  /* Colors - Primary (Deep Blue) */
  --color-primary: #1E3A8A;
  --color-primary-dark: #1E40AF;
  --color-primary-light: #3B82F6;
  
  /* Colors - Secondary (Cyber Accent) */
  --color-secondary: #FF6600;
  --color-secondary-dark: #CC5500;
  
  /* Colors - Neutral (Black/Gray Base) */
  --color-white: #FFFFFF;
  --color-black: #000000;
  /* トップ・上層ページの白背景代替（商品詳細は対象外） */
  --color-bg-surface-alt: #f5f5f5;
  --color-body-bg: #22314b;
  --color-main-bg: #2d2d2d;
  --color-gray-50: #151515;
  --color-gray-100: #1c1c1c;
  --color-gray-200: #282828;
  --color-gray-300: #383838;
  --color-gray-400: #555555;
  --color-gray-500: #888888;
  --color-gray-600: #AAAAAA;
  --color-gray-700: #CCCCCC;
  --color-gray-800: #DDDDDD;
  --color-gray-900: #FFFFFF;
  /* 表の枠線（暗背景上の薄いグレー・背景より明るく見えるように） */
  --color-table-border: rgba(255, 255, 255, 0.45);
  
  /* Colors - Cyber Accent */
  --color-cyber-green: #00FF88;
  --color-cyber-purple: #8800FF;
  --color-cyber-orange: #FF8800;
  --color-cyber-red: #FF0044;
  --color-cyber-glow: rgba(0, 212, 255, 0.3);
  
  /* Typography */
  --font-family-base: "Inter", "M PLUS 1p", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-family-heading: "Inter", "M PLUS 1p", -apple-system, BlinkMacSystemFont, sans-serif;
  
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  --font-size-6xl: 3.75rem;     /* 60px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Spacing */
  --spacing-xs: 0.25rem;    /* 4px */
  --spacing-sm: 0.5rem;     /* 8px */
  --spacing-md: 1rem;       /* 16px */
  --spacing-lg: 1.5rem;     /* 24px */
  --spacing-xl: 2rem;       /* 32px */
  --spacing-2xl: 3rem;      /* 48px */
  --spacing-3xl: 4rem;      /* 64px */
  --spacing-4xl: 6rem;      /* 96px */
  --spacing-5xl: 8rem;      /* 128px */
  
  /* Layout */
  --container-max-width: 1200px;
  --container-padding: var(--spacing-xl);
  /* 下層ページ共通ヒーロー（.page-header） */
  --page-header-height: 200px;
  --page-header-height-md: 180px;
  --page-header-height-sm: 160px;
  --page-header-height-xs: 140px;
  /* スマホ（768px以下）で .container 等の左右を揃える单一トークン */
  --page-gutter-sp: var(--spacing-md);
  
  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem;    /* 2px */
  --radius-md: 0.25rem;     /* 4px */
  --radius-lg: 0.5rem;      /* 8px */
  --radius-xl: 1rem;        /* 16px */
  --radius-full: 9999px;
  
  /* Cyber Effects */
  --cyber-border: 1px solid var(--color-black);
  --border-glow: 1px solid var(--color-black);
  --border-glow-thick: 2px solid var(--color-black);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
  --transition-cyber: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Breakpoints (for reference in media queries) */
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-2xl: 1400px;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ========================================
   Base Styles
   ======================================== */

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-gray-700);
  background: var(--color-main-bg);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* 日本語：プロポーショナルメトリクス＋行頭行末の句読点ぶら下げ（対応フォントのみ） */
  font-feature-settings: "palt", "halt";
}

/* 白背景時の文字色調整 */
body.light-bg,
.light-bg,
.content-box,
.page-header,
.section:not(.news-section):not(.hero-images-section) {
  color: #2d3748;
}

body.light-bg h1,
body.light-bg h2,
body.light-bg h3,
body.light-bg h4,
body.light-bg h5,
body.light-bg h6,
.light-bg h1,
.light-bg h2,
.light-bg h3,
.light-bg h4,
.light-bg h5,
.light-bg h6,
.content-box h1,
.content-box h2,
.content-box h3,
.content-box h4,
.content-box h5,
.content-box h6,
.page-header h1,
.page-header h2,
.page-header h3,
.page-header h4,
.page-header h5,
.page-header h6,
.section:not(.news-section) h1,
.section:not(.news-section) h2,
.section:not(.news-section) h3,
.section:not(.news-section) h4,
.section:not(.news-section) h5,
.section:not(.news-section) h6 {
  color: #1a202c;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-gray-900);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-5xl);
}

h2 {
  font-size: var(--font-size-4xl);
}

h3 {
  font-size: var(--font-size-3xl);
}

h4 {
  font-size: var(--font-size-2xl);
}

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--spacing-md);
}

/* 白背景時の段落とリストの文字色調整 */
.light-bg p,
.content-box p,
.page-header p,
.section p {
  color: #2d3748;
}

.light-bg ul,
.light-bg ol,
.light-bg li,
.content-box ul,
.content-box ol,
.content-box li,
.page-header ul,
.page-header ol,
.page-header li,
.section ul,
.section ol,
.section li {
  color: #2d3748;
}

/* Links */
a {
  color: var(--color-black);
  transition: color var(--transition-fast);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


a:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-fluid {
  width: 100%;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Section */
.section {
  padding-top: var(--spacing-4xl);
  padding-bottom: var(--spacing-4xl);
}

.section-sm {
  padding-top: var(--spacing-3xl);
  padding-bottom: var(--spacing-3xl);
}

.section-lg {
  padding-top: var(--spacing-5xl);
  padding-bottom: var(--spacing-5xl);
}

/* ========================================
   Utility Classes
   ======================================== */

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.align-stretch { align-items: stretch; }

.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }
.gap-2xl { gap: var(--spacing-2xl); }
.gap-3xl { gap: var(--spacing-3xl); }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Size */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

/* Font Weight */
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Text Color */
.text-white { color: var(--color-white); }
.text-primary { color: var(--color-black); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-gray-700 { color: var(--color-gray-700); }
.text-gray-800 { color: var(--color-gray-800); }
.text-gray-900 { color: var(--color-gray-900); }

/* Background */
.bg-white { background-color: var(--color-white); }
.bg-gray-50 { background-color: var(--color-gray-50); }
.bg-gray-100 { background-color: var(--color-gray-100); }
.bg-primary { background-color: var(--color-primary); }

/* Margin */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.my-auto { margin-top: auto; margin-bottom: auto; }

/* Padding */
.p-0 { padding: 0; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* ========================================
   Responsive Design
   ======================================== */

/* Mobile Section Adjustments */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--page-gutter-sp);
  }
  
  .section {
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
  }
  
  .section-sm {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
  }
  
  .section-lg {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
  }
  
  /* スマホ：左右マージンを統一 */
  .page-header ~ .section .container,
  .section .container {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
  }
  
  .page-header ~ .section .content-box,
  .section .content-box {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
  }

  /* 日本語・長い英単語の折り返しを揃える（nowrap 指定箇所はそのまま） */
  p,
  li,
  dd,
  td,
  th {
    overflow-wrap: break-word;
    word-break: normal;
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-4xl);
  }
  
  h2 {
    font-size: var(--font-size-3xl);
  }
  
  h3 {
    font-size: var(--font-size-2xl);
  }
  
  h4 {
    font-size: var(--font-size-xl);
  }
  
  h5 {
    font-size: var(--font-size-lg);
  }
  
  h6 {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2 {
    font-size: var(--font-size-2xl);
  }
  
  h3 {
    font-size: var(--font-size-xl);
  }
}

/* Responsive Utilities */
@media (max-width: 1199px) {
  .d-lg-none { display: none; }
  .d-lg-block { display: block; }
}

@media (max-width: 991px) {
  .d-md-none { display: none; }
  .d-md-block { display: block; }
  .grid-cols-md-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .d-sm-none { display: none; }
  .d-sm-block { display: block; }
  .flex-sm-column { flex-direction: column; }
  .grid-cols-sm-1 { grid-template-columns: 1fr; }
  .text-sm-center { text-align: center; }
}
