/* ===================================
   ANDOOR Corporate Website - Modern CSS Architecture
   2025 Latest Web Standards
   =================================== */

/* ===================================
   LAYER STRUCTURE
   明確な優先順位管理
   =================================== */
@layer reset, base, theme, layout, components, utilities, animations;

/* ===================================
   LAYER: RESET & BASE
   =================================== */
@layer reset {
  *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--color-white);
  }

  html, body {
    height: 100%;
  }

  body {
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
    position: relative;
  }
  
  /* iOS対策：画面の高さを動的に調整 */
  @supports (-webkit-touch-callout: none) {
    body {
      min-height: -webkit-fill-available;
    }
    
    html {
      height: -webkit-fill-available;
    }
  }
  
  /* フッターを画面下部に固定、余白を防ぐ */
  footer.footer {
    margin-top: auto;
    width: 100%;
    position: relative;
  }
  
  /* Logo Animation Overlay */
  .logo-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
  }
  
  .logo-animation.hidden {
    display: none !important;
  }
}

@layer base {
  :root {
    /* Colors */
    --color-primary: #FF6B35;
    --color-black: #1a1a1a;
    --color-white: #ffffff;
    --color-gray-light: #f5f5f5;
    --color-gray-medium: #999999;
    --color-gray-dark: #333333;
    --scroll-indicator-color: rgba(255, 255, 255, 0.9);
    --nav-hover: var(--color-primary); /* デフォルトはプライマリーカラー */
    
    /* Typography */
    --font-primary: 'Jost', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
    --font-heading: 'Jost', 'Montserrat', 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif;
    --font-script: 'Dancing Script', cursive;
    
    /* Spacing (Fluid Typography) */
    --space-xs: clamp(0.5rem, 1vw, 0.75rem);
    --space-sm: clamp(0.75rem, 2vw, 1rem);
    --space-md: clamp(1rem, 3vw, 1.5rem);
    --space-lg: clamp(1.5rem, 4vw, 2.5rem);
    --space-xl: clamp(2rem, 6vw, 4rem);
    --space-2xl: clamp(3rem, 8vw, 6rem);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows (Layered) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 
      0 2px 4px rgba(0, 0, 0, 0.04),
      0 4px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 
      0 4px 6px rgba(0, 0, 0, 0.04),
      0 10px 20px rgba(0, 0, 0, 0.08),
      0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl:
      0 8px 12px rgba(0, 0, 0, 0.04),
      0 16px 32px rgba(0, 0, 0, 0.08),
      0 24px 48px rgba(0, 0, 0, 0.12);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-blur: blur(20px) saturate(180%);
    
    /* 3D Perspective */
    --perspective: 1000px;
    --perspective-origin: center center;
  }

  body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    position: relative;
  }
  
  /* body部分のみに透過オーバーレイ（ヘッダー・フッター除外） */
  .hero::before,
  .section::before,
  .page-header::before,
  .services-hero::before,
  .capability-section::before,
  .services-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    background-size: 300px 300px;
    pointer-events: none;
    z-index: 1;
  }
  
  /* 明るい背景用：ブラック・オン・ホワイト（multiply） */
  body.theme-pink .hero::before,
  body.theme-pink .section::before,
  body.theme-pink .page-header::before,
  body.theme-pink .services-hero::before,
  body.theme-pink .capability-section::before,
  body.theme-pink .services-cta::before,
  body.theme-purple .hero::before,
  body.theme-purple .section::before,
  body.theme-purple .page-header::before,
  body.theme-purple .services-hero::before,
  body.theme-purple .capability-section::before,
  body.theme-purple .services-cta::before,
  body.theme-blue .hero::before,
  body.theme-blue .section::before,
  body.theme-blue .page-header::before,
  body.theme-blue .services-hero::before,
  body.theme-blue .capability-section::before,
  body.theme-blue .services-cta::before,
  body.theme-green .hero::before,
  body.theme-green .section::before,
  body.theme-green .page-header::before,
  body.theme-green .services-hero::before,
  body.theme-green .capability-section::before,
  body.theme-green .services-cta::before,
  body.theme-yellow .hero::before,
  body.theme-yellow .section::before,
  body.theme-yellow .page-header::before,
  body.theme-yellow .services-hero::before,
  body.theme-yellow .capability-section::before,
  body.theme-yellow .services-cta::before,
  body.theme-white .hero::before,
  body.theme-white .section::before,
  body.theme-white .page-header::before,
  body.theme-white .services-hero::before,
  body.theme-white .capability-section::before,
  body.theme-white .services-cta::before {
    background-image: url('../images/overlay-black-on-white.png?v=3');
    mix-blend-mode: multiply;
    opacity: 0.25;
  }
  
  /* theme-blackも明るい背景用オーバーレイで統一 */
  body.theme-black .hero::before,
  body.theme-black .section::before,
  body.theme-black .page-header::before,
  body.theme-black .services-hero::before,
  body.theme-black .capability-section::before,
  body.theme-black .services-cta::before {
    background-image: url('../images/overlay-black-on-white.png?v=3');
    mix-blend-mode: multiply;
    opacity: 0.25;
  }
}

/* ===================================
   LAYER: THEME
   Dynamic Color Themes
   =================================== */
@layer theme {
  body.theme-pink {
    --color-primary: #FC018F;
    --hero-bg: #FC018F;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(252, 1, 143, 0.2);
    --nav-text: #333333;
    --nav-hover: #FC018F;
    --hamburger-color: #FC018F;
    --button-bg: #FC018F;
    --button-text: #FFFFFF;
    --button-hover-bg: #ff1fa5;
    --footer-bg: #FC018F;
    --footer-text: #FFFFFF;
    --mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --nav-scrolled-bg: rgba(255, 255, 255, 0.98);
    
    .service-title {
      color: #FC018F;
    }
  }

  body.theme-purple {
    --color-primary: #9500FF;
    --hero-bg: #9500FF;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(149, 0, 255, 0.2);
    --nav-text: #333333;
    --nav-hover: #9500FF;
    --hamburger-color: #9500FF;
    --button-bg: #9500FF;
    --button-text: #FFFFFF;
    --button-hover-bg: #b34dff;
    --footer-bg: #9500FF;
    --footer-text: #FFFFFF;
    --mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --nav-scrolled-bg: rgba(255, 255, 255, 0.98);
    
    .service-title {
      color: #9500FF;
    }
  }

  body.theme-blue {
    --color-primary: #1100FF;
    --hero-bg: #1100FF;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(17, 0, 255, 0.2);
    --nav-text: #333333;
    --nav-hover: #1100FF;
    --hamburger-color: #1100FF;
    --button-bg: #1100FF;
    --button-text: #FFFFFF;
    --button-hover-bg: #3a1aff;
    --footer-bg: #1100FF;
    --footer-text: #FFFFFF;
    --mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --nav-scrolled-bg: rgba(255, 255, 255, 0.98);
    
    .service-title {
      color: #1100FF;
    }
  }

  body.theme-green {
    --color-primary: #00FF37;
    --hero-bg: #00FF37;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 255, 55, 0.2);
    --nav-text: #333333;
    --nav-hover: #00FF37;
    --hamburger-color: #00FF37;
    --button-bg: #00FF37;
    --button-text: #000000;
    --button-hover-bg: #1aff4d;
    --footer-bg: #00FF37;
    --footer-text: #FFFFFF;
    --mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --nav-scrolled-bg: rgba(255, 255, 255, 0.98);
    
    .service-title {
      color: #00FF37;
    }
  }

  body.theme-yellow {
    --color-primary: #F8EC00;
    --hero-bg: #F8EC00;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(248, 236, 0, 0.2);
    --nav-text: #333333;
    --nav-hover: #d4c800; /* ホバー時は濃い黄色 */
    --hamburger-color: #F8EC00;
    --button-bg: #F8EC00;
    --button-text: #000000;
    --button-hover-bg: #fff41a;
    --footer-bg: #F8EC00;
    --footer-text: #FFFFFF;
    --mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --nav-scrolled-bg: rgba(255, 255, 255, 0.98);
    
    .service-title {
      color: #F8EC00;
    }
  }

  body.theme-black {
    --color-primary: #000000;
    --hero-bg: #000000;
    --nav-bg: rgba(0, 0, 0, 0.95);
    --nav-text: #FFFFFF;
    --nav-hover: #cccccc; /* ホバー時はライトグレー */
    --hamburger-color: #FFFFFF;
    --button-bg: #FFFFFF;
    --button-text: #000000;
    --button-hover-bg: #f0f0f0;
    --footer-bg: #1a1a1a;
    --footer-text: #FFFFFF;
    --glass-bg: rgba(0, 0, 0, 0.95);
    --glass-border: rgba(255, 255, 255, 0.18);
    --mobile-menu-bg: rgba(0, 0, 0, 0.98);
    --nav-scrolled-bg: rgba(0, 0, 0, 0.98);
    
    .service-title {
      color: #1a1a1a;
    }
    
    .nav-link,
    .logo {
      color: #FFFFFF !important;
    }
    
    .nav-link::after {
      background: #FFFFFF !important;
    }
    
    @media (max-width: 768px) {
      .nav-link {
        border-bottom-color: rgba(255, 255, 255, 0.1) !important;
        
        &:hover {
          color: #FFFFFF !important;
        }
      }
    }
  }

  body.theme-white {
    --color-primary: #FFFFFF;
    --hero-bg: #FFFFFF;
    --color-black: #000000;
    --color-white: #FFFFFF;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.1);
    --nav-text: #1a1a1a;
    --nav-hover: #666666; /* ホバー時はグレー */
    --hamburger-color: #1a1a1a;
    --button-bg: #1a1a1a;
    --button-text: #FFFFFF;
    --button-hover-bg: #333333;
    --footer-bg: #000000;
    --footer-text: #FFFFFF;
    --scroll-indicator-color: rgba(0, 0, 0, 0.9);
    --mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --nav-scrolled-bg: rgba(255, 255, 255, 0.98);
    --icon-color: #FFFFFF; /* アイコンは白 */
    
    .service-title {
      color: #1a1a1a;
    }
    
    .member-icon {
      background: #1a1a1a !important; /* 背景は黒 */
    }
    
    /* ナビゲーションホバー時の色をグレーに */
    .nav-link:hover,
    .nav-link.active {
      color: #666666 !important;
      
      &::after {
        background: #666666 !important;
      }
    }
  }

  /* Partial Dark Mode - Body content only (excluding header, footer, hero) */
  @media (prefers-color-scheme: dark) {
    body:not([class*="theme-"]) {
      /* Body background only */
      background-color: #1a1a1a;
      color: #e5e5e5;
      
      /* Content sections dark mode */
      .section,
      .vision-section,
      .services-section,
      .team-section,
      .about-story,
      .company-info,
      .contact-section,
      .capability-section,
      .services-cta {
        background-color: #1a1a1a;
        color: #e5e5e5;
      }
      
      /* Text colors */
      .section-title,
      .page-title,
      .capability-title,
      h1, h2, h3, h4, h5, h6 {
        color: #e5e5e5;
      }
      
      p, li {
        color: #d1d1d1;
      }
      
      /* Cards and items */
      .service-card,
      .team-member,
      .info-item,
      .sub-capability,
      .growth-area {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
      }
      
      /* Forms */
      .contact-form {
        background: rgba(255, 255, 255, 0.05);
      }
      
      .form-group input,
      .form-group textarea {
        background: rgba(255, 255, 255, 0.08);
        color: #e5e5e5;
        border-color: rgba(255, 255, 255, 0.1);
        
        &::placeholder {
          color: #888888;
        }
      }
      
      /* Keep header, footer, and hero in light mode */
      .header,
      .footer,
      .hero,
      .hero-section {
        background-color: inherit;
        color: inherit;
      }
    }
  }

  body.dark-mode {
    /* Body background only */
    background-color: #1a1a1a;
    color: #e5e5e5;
    
    /* Content sections dark mode */
    .section,
    .vision-section,
    .services-section,
    .team-section,
    .about-story,
    .company-info,
    .contact-section,
    .capability-section,
    .services-cta {
      background-color: #1a1a1a;
      color: #e5e5e5;
    }
    
    /* Text colors */
    .section-title,
    .page-title,
    .capability-title,
    h1, h2, h3, h4, h5, h6 {
      color: #e5e5e5;
    }
    
    p, li {
      color: #d1d1d1;
    }
    
    /* Cards and items */
    .service-card,
    .team-member,
    .info-item,
    .sub-capability,
    .growth-area {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.1);
      
      &:hover {
        background: rgba(255, 255, 255, 0.08);
      }
    }
    
    /* Forms */
    .contact-form {
      background: rgba(255, 255, 255, 0.05);
    }
    
    .form-group input,
    .form-group textarea {
      background: rgba(255, 255, 255, 0.08);
      color: #e5e5e5;
      border-color: rgba(255, 255, 255, 0.1);
      
      &::placeholder {
        color: #888888;
      }
      
      &:focus {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--color-primary);
      }
    }
    
    /* Keep header, footer, and hero in light mode */
    .header,
    .footer,
    .hero,
    .hero-section {
      background-color: var(--hero-bg, #ffffff);
      color: var(--color-black, #1a1a1a);
    }
  }
}

/* ===================================
   LAYER: LAYOUT
   Container Queries Ready
   =================================== */
@layer layout {
  .container {
    width: min(90%, 1200px);
    margin-inline: auto;
    padding-inline: var(--space-md);
    container-type: inline-size;
    container-name: main-container;
  }

  /* Bento Grid Layout */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    grid-auto-flow: dense;
    
    & > .featured {
      grid-column: span 2;
      grid-row: span 2;
      
      @container (max-width: 768px) {
        grid-column: span 1;
        grid-row: span 1;
      }
    }
  }

  /* Flexbox Utilities */
  .flex {
    display: flex;
    gap: var(--space-md);
    
    &.center {
      justify-content: center;
      align-items: center;
    }
    
    &.between {
      justify-content: space-between;
      align-items: center;
    }
  }

  /* Section Spacing */
  .section {
    padding-block: var(--space-2xl);
    position: relative;
  }
}

/* ===================================
   LAYER: COMPONENTS
   Modern Component Styles with Nesting
   =================================== */
@layer components {
  
  /* ===================================
     GLASSMORPHISM NAVIGATION
     =================================== */
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-md) 0;
    font-family: var(--font-primary);
    
    /* Glassmorphism Effect */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    
    transition: all var(--transition-base);
    
    &.scrolled {
      padding: var(--space-sm) 0;
      background: var(--nav-scrolled-bg, rgba(255, 255, 255, 0.98));
      box-shadow: var(--shadow-lg);
    }
    
    .nav-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      max-width: 1200px;
      margin-inline: auto;
      padding-inline: var(--space-lg);
    }
    
    .logo {
      text-decoration: none;
      color: var(--nav-text);
      font-size: clamp(1.25rem, 2vw, 1.5rem);
      font-weight: 700;
      transition: transform var(--transition-base);
      
      & img {
        height: clamp(24px, 3vw, 32px);
        width: auto;
        display: block;
      }
      
      &:hover {
        transform: scale(1.05);
      }
    }
    
    .nav-menu {
      display: flex;
      gap: var(--space-lg);
      list-style: none;
      margin: 0;
      padding: 0;
      font-family: 'Jost', 'Noto Sans JP', sans-serif !important;
      
      @media (max-width: 768px) {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80vw);
        height: 100vh;
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-2xl) var(--space-lg);
        background: var(--mobile-menu-bg, rgba(255, 255, 255, 0.98));
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        border-left: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
        transition: right var(--transition-slow);
        z-index: 1000;
        
        &.active {
          right: 0;
        }
      }
      
      & li {
        list-style: none;
        margin: 0;
        padding: 0;
      }
    }
    
    .nav-link {
      position: relative;
      color: var(--nav-text);
      text-decoration: none;
      font-family: 'Jost', 'Noto Sans JP', sans-serif !important;
      font-weight: 500;
      font-size: 0.95rem;
      letter-spacing: 0.02em;
      transition: color var(--transition-fast);
      
      @media (max-width: 768px) {
        display: block;
        padding: var(--space-md) 0;
        font-size: 1.2rem;
        font-weight: 500;
        letter-spacing: 0.05em;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        transition: all var(--transition-base);
        
        &:hover {
          color: var(--nav-hover, var(--color-primary));
          padding-left: var(--space-sm);
        }
        
        &:last-child {
          border-bottom: none;
        }
      }
      
      &::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--nav-hover, var(--color-primary));
        transition: width var(--transition-base);
        
        @media (max-width: 768px) {
          display: none;
        }
      }
      
      &:hover, &.active {
        color: var(--nav-hover, var(--color-primary));
        
        &::after {
          width: 100%;
          background: var(--nav-hover, var(--color-primary));
        }
      }
    }
    
    /* Modern Hamburger */
    .hamburger {
      display: none;
      flex-direction: column;
      justify-content: space-between;
      width: 30px;
      height: 24px;
      cursor: pointer;
      padding: 0;
      background: transparent;
      border: none;
      position: relative;
      z-index: 1001;
      
      @media (max-width: 768px) {
        display: flex;
      }
      
      & span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--hamburger-color);
        transition: all var(--transition-base);
        border-radius: 2px;
        transform-origin: center;
      }
      
      &.active {
        & span:nth-child(1) {
          transform: translateY(10.5px) rotate(45deg);
        }
        & span:nth-child(2) {
          opacity: 0;
          transform: scaleX(0);
        }
        & span:nth-child(3) {
          transform: translateY(-10.5px) rotate(-45deg);
        }
      }
    }
    
    /* Dark Mode Toggle Button */
    .dark-mode-toggle {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border: 1px solid var(--glass-border);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
      z-index: 1000;
      
      &:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
      }
      
      .icon {
        font-size: 24px;
        transition: transform 0.3s ease;
      }
      
      &:active .icon {
        transform: rotate(180deg);
      }
      
      @media (max-width: 768px) {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        
        .icon {
          font-size: 20px;
        }
      }
    }
  }

  /* ===================================
     SECTION COMMON STYLES
     =================================== */
  .section {
    padding-block: clamp(4rem, 10vw, 8rem);
    background: var(--color-white);
    position: relative;
  }

  /* ===================================
     SECTION TITLE
     =================================== */
  .section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: clamp(2rem, 5vw, 3.75rem);
    text-align: center;
    position: relative;
    letter-spacing: 0.05em;
    
    &::after {
      content: '';
      display: block;
      width: 80px;
      height: 4px;
      background: var(--color-primary);
      margin: 20px auto 0;
      border-radius: 2px;
    }
  }

  /* ===================================
     VISION SECTION
     =================================== */
  .vision-section {
    padding-block: clamp(4rem, 10vw, 8rem);
    background-color: #ffffff;
  }
  
  .vision-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
  }
  
  .vision-text {
    font-family: var(--font-handwriting);
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.8;
    color: var(--color-black);
    font-weight: 900;
    letter-spacing: 0.05em;
  }
  
  /* Desktop version: show on desktop, hide on mobile */
  .vision-line-desktop {
    display: inline;
  }
  
  .vision-line-mobile {
    display: none;
  }
  
  .br-desktop {
    display: block;
  }
  
  /* Mobile version: hide desktop, show mobile */
  @media (max-width: 768px) {
    .vision-text {
      font-size: clamp(1.25rem, 4vw, 1.75rem); /* モバイル: 20px～28px */
    }
    
    .vision-line-desktop {
      display: none;
    }
    
    .vision-line-mobile {
      display: inline;
    }
    
    .br-desktop {
      display: none;
    }
  }

  /* ===================================
     SERVICES SECTION
     =================================== */
  .services-section {
    background: #ffffff;
    padding-block: clamp(4rem, 10vw, 8rem);
  }
  
  .services-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
  }

  /* ===================================
     TIMELINE SERVICE CARDS
     =================================== */
  .service-card {
    position: relative;
    padding: var(--space-xl);
    padding-left: 60px;
    background: var(--color-white);
    border-radius: 0;
    border-left: 4px solid var(--color-primary);
    box-shadow: none;
    transition: all var(--transition-base);
    
    /* Timeline dot */
    &::before {
      content: '';
      position: absolute;
      left: -10px;
      top: 40px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--color-primary);
      box-shadow: 0 0 0 4px var(--color-white);
      transition: all var(--transition-base);
    }
    
    /* Number indicator */
    &::after {
      content: attr(data-number);
      position: absolute;
      top: 30px;
      left: 60px;
      font-size: 4rem;
      font-weight: 700;
      color: var(--color-primary);
      opacity: 0.08;
      line-height: 1;
      pointer-events: none;
    }
    
    &:hover {
      background: rgba(0, 0, 0, 0.02);
      padding-left: 70px;
      
      &::before {
        transform: scale(1.3);
        box-shadow: 0 0 0 6px var(--color-white), 0 0 20px var(--color-primary);
      }
      
      &::after {
        opacity: 0.12;
      }
    }
    
    @media (max-width: 768px) {
      padding-left: 40px;
      
      &::after {
        font-size: 2.5rem;
        left: 40px;
      }
    }
  }

  .service-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--color-black);
    transition: all var(--transition-base);
  }
  
  .service-description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.7;
    color: var(--color-gray-dark);
    transition: transform var(--transition-base);
  }

  /* ===================================
     VISION SECTION
     =================================== */
  .vision-section {
    background: var(--color-white);
  }

  .vision-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
  }

  .vision-text {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 2;
    color: var(--color-black);
    font-weight: 400;
  }

  .vision-line-desktop {
    display: block;
  }

  .vision-line-mobile {
    display: none;
  }

  @media (max-width: 768px) {
    .vision-line-desktop {
      display: none;
    }
    
    .vision-line-mobile {
      display: block;
    }
  }

  /* ===================================
     TEAM SECTION
     =================================== */
  .team-section {
    background: var(--color-white);
  }

  .team-intro {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--color-gray-dark);
    margin-bottom: clamp(3rem, 6vw, 5rem);
    line-height: 1.8;
  }

  .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    max-width: 1200px;
    margin: 0 auto;
  }

  .team-member {
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-white);
    border-radius: clamp(12px, 2vw, 20px);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    transform-style: preserve-3d;
    
    &:hover {
      transform: translateY(-10px);
      box-shadow: var(--shadow-xl);
    }
  }

  .member-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    svg {
      width: 40px;
      height: 40px;
      color: white;
    }
  }

  .member-title {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-sm);
  }

  .member-role {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: var(--color-gray-dark);
  }

  /* ===================================
     HERO SECTION with 3D Logo
     =================================== */
  .hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hero-bg);
    overflow: hidden;
    z-index: 1;
    pointer-events: auto;
    
    /* Hero内のcontainerを全幅・センター配置に */
    & > .container {
      width: 100%;
      max-width: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding-inline: 0;
    }
    
    .hero-logo-wrapper {
      position: relative;
      perspective: 1000px !important;
      perspective-origin: center center;
      transform-style: preserve-3d;
      display: flex;
      align-items: center;
      justify-content: center;
      
      .hero-logo {
        max-width: clamp(300px, 50vw, 600px);
        width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
        cursor: move;
        
        /* 3D Transform Setup - NO TRANSITION for instant response */
        transform-style: preserve-3d !important;
        transition: none !important;
        filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
        
        /* Performance optimization */
        will-change: transform, opacity;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        -webkit-transform-style: preserve-3d !important;
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateZ(0px) scale(1);
        
        &.animate {
          animation: heroFadeIn 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
      }
    }
    
    /* Modern Scroll Indicator */
    .scroll-indicator {
      position: absolute;
      bottom: var(--space-xl);
      left: 50%;
      transform: translateX(-50%);
      cursor: pointer;
      opacity: 0;
      animation: fadeInArrow 1s ease 2s forwards;
      z-index: 10;
      transition: transform var(--transition-base);
      
      &:hover {
        transform: translateX(-50%) scale(1.1);
        
        .scroll-indicator-line {
          height: 55px;
          background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 1),
            rgba(255, 255, 255, 0)
          );
        }
      }
    }
    
    .scroll-indicator-line {
      width: 2px;
      height: 45px;
      background: linear-gradient(
        to bottom,
        transparent,
        var(--scroll-indicator-color, rgba(255, 255, 255, 0.9)),
        transparent
      );
      margin: 0 auto;
      position: relative;
      border-radius: 2px;
      transition: all var(--transition-base);
      filter: drop-shadow(0 0 10px var(--scroll-indicator-color, rgba(255, 255, 255, 0.6)));
    }
    
    .scroll-indicator-dot {
      width: 10px;
      height: 10px;
      background: var(--scroll-indicator-color, white);
      border-radius: 50%;
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      box-shadow: 
        0 0 15px var(--scroll-indicator-color, white),
        0 0 30px var(--scroll-indicator-color, rgba(255, 255, 255, 0.6)),
        0 0 45px var(--scroll-indicator-color, rgba(255, 255, 255, 0.3));
      animation: scrollDotMove 2.5s ease-in-out infinite;
    }
    
    @keyframes scrollDotMove {
      0% {
        transform: translateX(-50%) translateY(0);
        opacity: 0;
      }
      15% {
        opacity: 1;
      }
      85% {
        opacity: 1;
      }
      100% {
        transform: translateX(-50%) translateY(40px);
        opacity: 0;
      }
    }
  }

  /* ===================================
     TEAM SECTION
     =================================== */
  .team-section {
    padding-block: clamp(4rem, 10vw, 8rem);
    background-color: #ffffff;
    margin-bottom: 0;
  }
  
  .team-intro {
    text-align: center;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    line-height: 1.8;
    color: var(--color-black);
    max-width: 800px;
    margin: 0 auto clamp(3rem, 6vw, 5rem);
    font-weight: 500;
  }
  
  .team-grid {
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 5vw, 3.75rem);
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    
    @media (max-width: 768px) {
      gap: clamp(1.5rem, 4vw, 2rem);
    }
  }

  /* ===================================
     TEAM MEMBER CARDS
     =================================== */
  .team-member {
    padding: clamp(1.5rem, 3vw, 2rem) clamp(1rem, 2vw, 1.5rem);
    background: transparent;
    border-radius: clamp(12px, 2vw, 20px);
    text-align: center;
    transition: all var(--transition-base);
    transform-style: preserve-3d;
    flex: 0 0 auto;
    width: clamp(140px, 20vw, 180px);
    
    &:hover {
      transform: translateY(-8px);
      background: rgba(0, 0, 0, 0.02);
    }
    
    .member-icon {
      width: clamp(80px, 15vw, 100px);
      height: clamp(80px, 15vw, 100px);
      margin: 0 auto clamp(1rem, 3vw, 1.5rem);
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--color-primary);
      border-radius: 50%;
      color: var(--icon-color, white);
      transition: transform var(--transition-bounce);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
      
      & svg {
        width: 55%;
        height: 55%;
        color: var(--icon-color, white);
      }
    }
    
    &:hover .member-icon {
      transform: scale(1.1) rotate(5deg);
      box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    }
    
    .member-title {
      font-size: clamp(1rem, 2.5vw, 1.15rem);
      font-weight: 600;
      margin-bottom: var(--space-xs);
      color: var(--color-black);
    }
    
    .member-role {
      font-size: clamp(0.8rem, 2vw, 0.9rem);
      color: var(--color-gray-medium);
    }
  }

  /* ===================================
     FOOTER
     =================================== */
  .footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: var(--space-2xl) 0 var(--space-lg);
    
    .footer-content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: var(--space-xl);
      border-bottom: 1px solid rgba(255, 255, 255, 0.2);
      margin-bottom: var(--space-lg);
      
      @media (max-width: 640px) {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
      }
    }
    
    .footer-logo {
      text-decoration: none;
      display: inline-block;
      transition: transform var(--transition-base);
      
      & img {
        height: 28px;
        width: auto;
      }
      
      &:hover {
        transform: scale(1.05);
      }
    }
    
    .footer-info {
      text-align: right;
      
      @media (max-width: 640px) {
        text-align: center;
      }
      
      & p {
        font-size: 0.9rem;
        line-height: 1.8;
        opacity: 0.9;
      }
    }
    
    .footer-bottom {
      text-align: center;
      
      & p {
        font-size: 0.85rem;
        opacity: 0.8;
      }
    }
  }

  /* ===================================
     ABOUT PAGE
     =================================== */
  .page-header {
    padding: clamp(6rem, 15vw, 10rem) 0 clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    background: transparent;
    position: relative;
  }
  
  .page-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--color-black);
    margin: 0;
    text-align: center;
  }
  
  .about-story {
    padding-block: clamp(4rem, 10vw, 6rem);
  }
  
  .story-content {
    max-width: 900px;
    margin: 0 auto;
  }
  
  .story-text {
    font-family: var(--font-handwriting);
    font-size: clamp(1.5rem, 4vw, 2rem); /* PC: 24px～32px */
    line-height: 1.8;
    color: var(--color-black);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.05em;
  }
  
  /* Desktop version: show on desktop, hide on mobile */
  .story-line-desktop {
    display: inline;
  }
  
  .story-line-mobile {
    display: none;
  }
  
  /* Mobile version: hide desktop, show mobile */
  @media (max-width: 768px) {
    .story-text {
      font-size: 1.25rem; /* モバイル: 20px 固定 */
    }
    
    .story-line-desktop {
      display: none;
    }
    
    .story-line-mobile {
      display: inline;
    }
  }
  
  .company-info {
    padding-block: clamp(4rem, 10vw, 8rem);
    background: transparent;
  }
  
  /* PC: Clean centered layout */
  .info-grid {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .info-item {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
    
    &:last-child {
      border-bottom: none;
    }
    
    .info-label {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--color-gray-medium);
      margin-bottom: clamp(0.75rem, 2vw, 1rem);
      letter-spacing: 0.15em;
      text-transform: uppercase;
    }
    
    .info-value {
      font-size: clamp(1.1rem, 2.5vw, 1.3rem);
      color: var(--color-black);
      line-height: 1.8;
      font-weight: 500;
    }
  }
  
  /* Contact button styling */
  .contact-button {
    display: inline-block;
    padding: 14px 36px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
      background: var(--button-hover-bg);
    }
  }
  
  /* Mobile: Keep the same centered layout */
  @media (max-width: 768px) {
    .info-item {
      padding: 1.75rem 1rem;
      
      .info-label {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
      }
      
      .info-value {
        font-size: 1rem;
      }
    }
    
    .contact-button {
      font-size: 0.95rem;
      padding: 12px 28px;
    }
  }

  /* ===================================
     CONTACT PAGE
     =================================== */
  .contact-section {
    padding-block: clamp(2rem, 5vw, 3rem) clamp(4rem, 10vw, 6rem);
  }
  
  .contact-description {
    text-align: center;
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    line-height: 1.8;
    color: var(--color-black);
    max-width: 800px;
    margin: 0 auto clamp(3rem, 6vw, 4rem);
    font-family: var(--font-primary);
  }
  
  /* デスクトップ版を表示、モバイル版を非表示 */
  .contact-description .desktop-br {
    display: inline;
  }
  
  .contact-description .mobile-br {
    display: none;
  }
  
  /* モバイル版：デスクトップを非表示、モバイルを表示 */
  @media (max-width: 768px) {
    .contact-description .desktop-br {
      display: none;
    }
    
    .contact-description .mobile-br {
      display: inline;
    }
  }
  
  .contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem);
    background: white;
    border-radius: clamp(16px, 3vw, 24px);
    box-shadow: var(--shadow-md);
  }
  
  .form-group {
    background-color: #f5f5f5;
    padding: 20px;
    margin-bottom: 0;
    border-radius: 0;
  }
  
  .form-group:first-child {
    border-radius: 12px 12px 0 0;
  }
  
  .form-group:last-of-type {
    border-radius: 0 0 12px 12px;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
  }
  
  .form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-black);
    font-size: clamp(0.95rem, 2vw, 1rem);
  }
  
  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: clamp(0.75rem, 2vw, 1rem);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: clamp(0.95rem, 2vw, 1rem);
    font-family: var(--font-primary);
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    transition: all var(--transition-base);
    margin-bottom: 0;
  }
  
  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
  }
  
  .form-group textarea {
    min-height: 150px;
    resize: vertical;
  }
  
  .submit-btn {
    width: 100%;
    padding: clamp(1rem, 3vw, 1.25rem);
    background: var(--color-primary) !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
  }
  
  .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--button-hover-bg, var(--color-primary)) !important;
  }
  
  .submit-btn:active {
    transform: translateY(0);
  }
  
  .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
  
  .form-message {
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
  }
  
  .form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
  }
  
  .form-message.error {
    background: #ffebee;
    color: #c62828;
  }
  
  .contact-info {
    padding-block: clamp(3rem, 8vw, 5rem);
    background: transparent;
  }
  
  .contact-details {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }
  
  .contact-details p {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.8;
    color: var(--color-black);
    margin-bottom: var(--space-md);
  }
  
  .contact-details a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-base);
  }
  
  .contact-details a:hover {
    color: var(--button-hover-bg);
  }

  /* ===================================
     BUTTONS
     =================================== */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: var(--button-bg);
    color: var(--button-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    
    &:hover {
      background: var(--button-hover-bg);
      transform: translateY(-2px) scale(1.02);
      box-shadow: var(--shadow-md);
    }
    
    &:active {
      transform: translateY(0) scale(0.98);
    }
  }

  /* ============ SERVICES PAGE SPECIFIC ============ */
  /* Hero Section */
  .services-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 20px 80px;
    background: #ffffff;
    position: relative;
  }

  .services-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 80px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }

  .services-hero-subtitle {
    font-size: 24px;
    color: #666;
    font-weight: 400;
    line-height: 1.6;
  }

  /* Capability Sections */
  .capability-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0;
    position: relative;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .capability-section.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .capability-section:nth-child(even),
  .capability-section:nth-child(odd) {
    background-color: #ffffff;
  }

  .capability-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    width: 100%;
  }

  .capability-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
  }

  .capability-content.reverse {
    direction: rtl;
  }

  .capability-content.reverse > * {
    direction: ltr;
  }

  .capability-text {
    position: relative;
  }

  .capability-number {
    display: none;
  }

  .capability-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 56px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 30px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-align: center;
  }

  .capability-description {
    font-size: 20px;
    line-height: 1.8;
    color: #1a1a1a;
    margin-bottom: 40px;
  }

  .capability-features {
    list-style: none;
    padding: 0;
  }

  .capability-features li {
    font-size: 18px;
    color: #1a1a1a;
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
  }

  .capability-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 20px;
  }

  /* Sub Capabilities */
  .sub-capabilities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
  }

  .sub-capability {
    padding: 24px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    transition: all 0.3s ease;
  }

  .capability-section:nth-child(even) .sub-capability {
    background: rgba(255, 255, 255, 0.8);
  }

  .sub-capability:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  }

  .sub-capability h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
  }

  .sub-capability p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
  }

  /* Growth Areas */
  .growth-areas {
    display: grid;
    gap: 30px;
    margin-top: 40px;
  }

  .growth-area {
    padding: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    transition: all 0.3s ease;
  }

  .capability-section:nth-child(odd) .growth-area {
    background: rgba(0, 0, 0, 0.02);
  }

  .growth-area:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  }

  .growth-area h4 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
  }

  .growth-area ul {
    list-style: none;
    padding: 0;
  }

  .growth-area li {
    font-size: 16px;
    color: #1a1a1a;
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
  }

  .growth-area li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #1a1a1a;
    font-weight: 700;
  }

  /* Visual Placeholder */
  .capability-visual {
    position: relative;
  }

  .visual-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #1a1a1a;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* モバイル用 - 表示エリアを大きく */
  @media (max-width: 768px) {
    .visual-placeholder {
      aspect-ratio: 16/9;
      min-height: 300px;
    }
  }

  .capability-section.visible .visual-placeholder {
    transform: scale(1);
  }

  .capability-section:not(.visible) .visual-placeholder {
    transform: scale(0.9);
  }

  .visual-placeholder:hover {
    transform: scale(1.02);
  }

  .visual-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
  }

  .visual-icon {
    font-size: 120px;
    color: rgba(255, 255, 255, 0.15);
    user-select: none;
    transition: all 0.3s ease;
  }
  
  /* モバイル用 - アイコンを大きく・濃く */
  @media (max-width: 768px) {
    .visual-icon {
      font-size: 180px;
      color: rgba(255, 255, 255, 0.25);
    }
  }

  /* Specific Visual Styles */
  .venture-visual {
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a1a 100%);
  }

  .venture-visual:hover .visual-icon {
    color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
  }

  .product-visual {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  }

  .product-visual:hover .visual-icon {
    color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
  }

  .growth-visual {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
  }

  .growth-visual:hover .visual-icon {
    color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
  }

  .partnership-visual {
    background: linear-gradient(135deg, #283747 0%, #1c2833 100%);
  }

  .partnership-visual:hover .visual-icon {
    color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
  }

  /* CTA Section */
  .services-cta {
    padding: 120px 20px;
    text-align: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: #ffffff;
    position: relative;
  }

  .cta-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
  }

  .cta-description {
    font-size: 20px;
    line-height: 1.8;
    color: #cccccc;
    margin-bottom: 50px;
  }

  .cta-button {
    display: inline-block;
    padding: 18px 48px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    background-color: #ffffff;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
  }

  .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
    background-color: #f5f5f5;
  }

  /* Responsive - Services Page */
  @media (max-width: 1024px) {
    .services-hero-title {
      font-size: 60px;
    }
    
    .capability-title {
      font-size: 44px;
    }
    
    .capability-content {
      gap: 60px;
    }
    
    .capability-container {
      padding: 0 40px;
    }
  }

  @media (max-width: 768px) {
    .services-hero {
      min-height: 60vh;
      padding: 120px 20px 60px;
    }
    
    .services-hero-title {
      font-size: 44px;
    }
    
    .services-hero-subtitle {
      font-size: 18px;
    }
    
    .capability-section {
      min-height: auto;
      padding: 80px 0;
    }
    
    .capability-content {
      grid-template-columns: 1fr;
      gap: 40px;
      display: flex;
      flex-direction: column;
    }
    
    .capability-content.reverse {
      direction: ltr;
    }
    
    .capability-visual {
      order: 1;
    }
    
    .capability-text {
      order: 2;
      display: flex;
      flex-direction: column;
    }
    
    .capability-number {
      order: 1;
    }
    
    .capability-title {
      order: 2;
      font-size: 36px;
    }
    
    .capability-description,
    .capability-features,
    .sub-capabilities,
    .growth-areas {
      order: 3;
    }
    
    .capability-container {
      padding: 0 20px;
    }
    
    .capability-description {
      font-size: 18px;
    }
    
    .sub-capabilities {
      grid-template-columns: 1fr;
      gap: 20px;
    }
    
    .visual-icon {
      font-size: 80px;
    }
    
    .cta-title {
      font-size: 36px;
    }
    
    .cta-description {
      font-size: 16px;
    }
  }

  @media (max-width: 480px) {
    .services-hero-title {
      font-size: 32px;
    }
    
    .capability-title {
      font-size: 28px;
    }
    
    .capability-description {
      font-size: 16px;
    }
    
    .capability-features li {
      font-size: 16px;
    }
    
    .visual-icon {
      font-size: 60px;
    }
  }
}

/* ===================================
   LAYER: ANIMATIONS
   Modern CSS Animations
   =================================== */
@layer animations {
  
  /* 3D Float Animation */
  @keyframes float3d {
    0%, 100% {
      transform: 
        perspective(var(--perspective))
        rotateY(-5deg)
        rotateX(2deg)
        translateY(0)
        translateZ(0);
    }
    50% {
      transform: 
        perspective(var(--perspective))
        rotateY(5deg)
        rotateX(-2deg)
        translateY(-20px)
        translateZ(50px);
    }
  }
  
  /* Hero Fade In */
  @keyframes heroFadeIn {
    from {
      opacity: 0;
      transform: scale(0.9) translateY(30px);
      filter: blur(10px) drop-shadow(0 0 0 transparent);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
      filter: blur(0) drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    }
  }
  
  /* Arrow Fade In */
  @keyframes fadeInArrow {
    to {
      opacity: 0.8;
    }
  }
  
  /* Bounce Animation */
  @keyframes bounce {
    0%, 100% {
      transform: translateX(-50%) translateY(0);
    }
    50% {
      transform: translateX(-50%) translateY(-10px);
    }
  }
  
  /* Scroll-driven animations (when element enters viewport) */
  .fade-in-up {
    animation: fadeInUp linear;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ===================================
   LAYER: UTILITIES
   Utility Classes
   =================================== */
@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  
  .text-center {
    text-align: center;
  }
  
  .text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--button-hover-bg));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

/* ===================================
   SCROLL-DRIVEN ANIMATIONS
   CSS-only scroll animations (2025 standard)
   =================================== */
@supports (animation-timeline: view()) {
  .service-card,
  .team-member,
  .section-title {
    animation: fadeInUp linear;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  
  /* Stagger effect with nth-child */
  .service-card:nth-child(2) {
    animation-range: entry 5% cover 45%;
  }
  
  .service-card:nth-child(3) {
    animation-range: entry 10% cover 50%;
  }
  
  .service-card:nth-child(4) {
    animation-range: entry 15% cover 55%;
  }
}

/* ===================================
   VIEW TRANSITIONS API
   Page transition animations
   =================================== */
@supports (view-transition-name: root) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.5s;
  }
  
  ::view-transition-old(root) {
    animation-name: fadeOutScale;
  }
  
  ::view-transition-new(root) {
    animation-name: fadeInScale;
  }
  
  @keyframes fadeOutScale {
    to {
      opacity: 0;
      transform: scale(0.95);
    }
  }
  
  @keyframes fadeInScale {
    from {
      opacity: 0;
      transform: scale(1.05);
    }
  }
}
