/* Reset and base styles */
:root {
  /* Main colors - 温かみのある茶色系統をベースにした洗練されたカラー */
  --primary-color: #8b5a2b; /* メインカラー：温かみのある茶色（jumpspiderに合わせた色） */
  --primary-dark: #6b452a; /* メインカラーの暗め - jumpspiderの暗い茶色に近い */
  --primary-light: #a67c52; /* メインカラーの明るめ */

  /* Accent colors - 茶色と相性の良い金系統 */
  --accent-color: #d4af37; /* アクセントカラー：上品な金色 - 茶色と調和する高級感 */
  --accent-dark: #b5942f; /* アクセントカラーの暗め */
  --accent-light: #e6c65c; /* アクセントカラーの明るめ */

  /* Dark colors - 深みのある暖色系ダーク */
  --dark-color: #2c2018; /* ダークカラー：深みのある茶色 */
  --dark-secondary: #3d2e24; /* セカンダリーダーク */
  --dark-tertiary: #554236; /* ターシャリーダーク */

  /* Light colors - 温かみのあるライト */
  --light-color: #fdf8f3; /* ライトカラー：柔らかなクリーム色 */
  --light-secondary: #f5ebe0; /* セカンダリーライト */
  --light-tertiary: #e8dcca; /* ターシャリーライト */

  /* Functional colors */
  --text-primary: var(--dark-color); /* メインテキスト */
  --text-secondary: var(--dark-secondary); /* サブテキスト */
  --text-tertiary: var(--dark-tertiary); /* 補足テキスト */
  --background-primary: var(--light-color); /* メイン背景 */
  --background-secondary: var(--light-secondary); /* セカンダリー背景 */

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Shadows - 温かみのある影 */
  --shadow-sm: 0 1px 3px rgba(92, 60, 43, 0.12),
    0 1px 2px rgba(92, 60, 43, 0.24);
  --shadow-md: 0 4px 6px rgba(92, 60, 43, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(92, 60, 43, 0.1),
    0 4px 6px -2px rgba(92, 60, 43, 0.05);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Section padding */
  --section-padding: 5rem 0;
}

/* Base reset and typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--text-primary);
  line-height: 1.8;
  background-color: var(--background-primary);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

/* Container */
.container {
  width: min(100% - 2rem, 1200px);
  margin-inline: auto;
  padding: var(--space-md);
}

/* Utility classes */
.text-gradient {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: var(--space-xs);
}
.mt-2 {
  margin-top: var(--space-sm);
}
.mt-3 {
  margin-top: var(--space-md);
}
.mt-4 {
  margin-top: var(--space-lg);
}
.mt-5 {
  margin-top: var(--space-xl);
}

.mb-1 {
  margin-bottom: var(--space-xs);
}
.mb-2 {
  margin-bottom: var(--space-sm);
}
.mb-3 {
  margin-bottom: var(--space-md);
}
.mb-4 {
  margin-bottom: var(--space-lg);
}
.mb-5 {
  margin-bottom: var(--space-xl);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pageLoad {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-normal),
    transform var(--transition-normal);
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in {
  animation: fadeIn var(--transition-normal) ease-out forwards;
}

.animate-slide-in {
  animation: slideIn var(--transition-normal) ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn var(--transition-normal) ease-out forwards;
}

/* ページ読み込みアニメーション */
body {
  opacity: 1;
}

/* Header styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--light-tertiary);
}

.header-hidden {
  transform: translateY(-100%);
}

/* スクロールトップボタン */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  border: none;
  box-shadow: var(--shadow-md);
  z-index: 900;
}

.scroll-top::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(25%) rotate(-45deg);
}

.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ナビゲーション基本スタイル */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-color);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.8;
}

.logo img {
  height: 2rem;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  padding-left: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-links a i {
  opacity: 0.8;
  transition: all var(--transition-fast);
}

.nav-links a:hover i {
  opacity: 1;
  transform: scale(1.2);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary-color);
  font-weight: 700;
}

.nav-links a.active::after {
  width: 100%;
}

/* モバイルメニュー */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1000;
  position: relative;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.hamburger:hover span {
  background-color: var(--primary-color);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--primary-color);
}

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

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--primary-color);
}

/* メディアクエリ内のモバイルメニュースタイル */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--light-tertiary);
    z-index: 900;

    /* 非表示状態 */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;

    /* フレックスボックス設定 */
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* 表示状態 */
  .nav-links.active {
    max-height: 300px; /* 十分な高さ */
    opacity: 1;
    padding: var(--space-md) 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.active li:nth-child(1) {
    transition-delay: 0.05s;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links.active li:nth-child(2) {
    transition-delay: 0.1s;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links.active li:nth-child(3) {
    transition-delay: 0.15s;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links.active li:nth-child(4) {
    transition-delay: 0.2s;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    width: 100%;
  }

  body.menu-open {
    overflow: hidden;
  }

  .profile-content,
  .ceo-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .profile-image,
  .profile-info,
  .ceo-info {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .product-cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
  }

  .contact-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-info {
    max-width: 600px;
    margin: 0 auto;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-xl);
  }
}

/* Hero section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: calc(4rem + var(--space-xl)) 0 var(--space-xl);
  background: linear-gradient(
    135deg,
    var(--light-color) 0%,
    var(--light-secondary) 100%
  );
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
  position: relative;
  overflow: hidden;
}

.hero h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  animation: lineGrow 1s ease-out forwards 0.5s;
}

@keyframes lineGrow {
  to {
    transform: scaleX(1);
  }
}

.hero p {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: var(--space-xl);
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300%;
  height: 300%;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.code-editor {
  margin-top: var(--space-xl);
  background: var(--dark-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  font-family: "Source Code Pro", monospace;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left; /* 左寄せに設定 */
}

.code-editor::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2rem;
  background: var(--dark-secondary);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.code-editor::after {
  content: "● ● ●";
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  color: var(--light-tertiary);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

/* Profile section */
.profile {
  padding: var(--section-padding);
  background: var(--light-color);
  position: relative;
  overflow: hidden;
}

.profile::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    var(--light-secondary) 100%
  );
  transform: rotate(45deg);
  z-index: 1;
}

.profile-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: var(--space-sm);
  align-items: center;
}

/* 円形のカード */
.circle-card {
  width: 400px;
  height: 400px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  margin: 0 auto;
  border: 1px solid var(--light-tertiary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.circle-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.circle-card .profile-image {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.profile-info {
  padding: var(--space-xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  height: 100%;
}

.profile-info h2 {
  font-family: "Kaisei Decol", serif;
  margin-bottom: var(--space-md);
}

.profile-info h3 {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.skill-tag {
  background: var(--primary-color);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--primary-dark);
}

/* CEO section */
.ceo {
  padding: var(--section-padding);
  background: var(--light-secondary);
  position: relative;
}

.ceo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(0deg, var(--light-color) 0%, transparent 100%);
}

.ceo-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: var(--space-sm);
  align-items: center;
}

.ceo-info {
  padding: var(--space-xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  height: 100%;
}

.ceo-info h2 {
  font-family: "Kaisei Decol", serif;
  margin-bottom: var(--space-md);
}

.ceo-info h3 {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.ceo-info blockquote {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-left: 4px solid var(--primary-color);
  background: var(--light-color);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: "Kaisei Decol", serif;
  color: var(--dark-color);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* 円形のカード */
.circle-card {
  width: 300px;
  height: 300px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  margin: 0 auto;
  border: 1px solid var(--light-tertiary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.circle-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.circle-card .profile-image {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ceo-content {
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: var(--space-sm);
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (max-width: 992px) {
  .circle-card {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 768px) {
  .ceo-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .circle-card {
    margin-bottom: var(--space-lg);
  }
}

/* Products section */
.products {
  padding: var(--section-padding);
  background: var(--light-color);
  position: relative;
  overflow: hidden;
}

.products::before,
.products::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--accent-light)
  );
  opacity: 0.1;
  z-index: 1;
}

.products::before {
  top: -150px;
  left: -150px;
}

.products::after {
  bottom: -150px;
  right: -150px;
}

.products .container {
  position: relative;
  z-index: 2;
}

.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.product-card {
  background: white;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
}

.product-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-sm);
  color: var(--primary-color);
}

.product-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  color: var(--dark-color);
  border-bottom: 2px solid var(--light-tertiary);
  padding-bottom: var(--space-sm);
}

.product-card h3 i {
  color: var(--primary-color);
}

.product-card p {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.product-card p i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
  margin-right: var(--space-xs);
  display: inline-block;
  vertical-align: middle;
}

/* 製品カード内の各行をフレックスボックスに */
.product-card p > * {
  display: flex;
  align-items: center;
  line-height: 1.5;
}

.product-stats {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--light-tertiary);
  margin-top: auto;
}

.stat {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9rem;
  color: var(--dark-secondary);
}

.stat i {
  color: var(--primary-color);
}

.info-banner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: linear-gradient(
    45deg,
    rgba(0, 102, 255, 0.1),
    rgba(255, 51, 102, 0.1)
  );
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  border-left: 4px solid var(--primary-color);
}

.info-banner i {
  color: var(--primary-color);
  flex-shrink: 0;
}

.info-banner p {
  margin: 0;
  font-weight: 500;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  color: var(--dark-color);
  position: relative;
}

.product-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

/* Contact section */
.contact {
  padding: var(--section-padding);
  background: linear-gradient(
    135deg,
    var(--dark-color) 0%,
    var(--dark-secondary) 100%
  );
  color: white;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" fill="none"/><circle cx="2" cy="2" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.2;
}

.contact .container {
  position: relative;
  z-index: 2;
}

.contact h2,
.contact p {
  color: white;
  text-align: center;
}

.contact h2 {
  margin-bottom: var(--space-md);
}

.contact p {
  margin-bottom: var(--space-xl);
  opacity: 0.9;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.contact-card {
  text-align: center;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-normal);
}

.contact-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.contact-card h3 {
  color: white;
  margin-bottom: var(--space-md);
}

.contact-card a {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
  font-weight: bold;
}

.contact-card a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: white;
  padding: var(--space-xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--primary-color) 50%,
    transparent 100%
  );
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-info {
  max-width: 400px;
}

.footer-logo {
  display: inline-block;
  color: white;
  text-decoration: none;
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-info p {
  color: var(--light-tertiary);
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
}

.footer-links h3 {
  color: white;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--light-tertiary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: white;
  transform: translateX(5px);
}

.copyright {
  text-align: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-tertiary);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  :root {
    --section-padding: 4rem 0;
  }

  .hero {
    padding: calc(4rem + var(--space-lg)) 0 var(--space-lg);
  }

  .code-editor {
    margin-top: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    display: block;
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--light-tertiary);
    z-index: 900;

    /* 非表示状態 */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;

    /* フレックスボックス設定 */
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* 表示状態 */
  .nav-links.active {
    max-height: 300px; /* 十分な高さ */
    opacity: 1;
    padding: var(--space-md) 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.active li:nth-child(1) {
    transition-delay: 0.05s;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links.active li:nth-child(2) {
    transition-delay: 0.1s;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links.active li:nth-child(3) {
    transition-delay: 0.15s;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links.active li:nth-child(4) {
    transition-delay: 0.2s;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    width: 100%;
  }

  body.menu-open {
    overflow: hidden;
  }

  .profile-content,
  .ceo-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .profile-image,
  .profile-info,
  .ceo-info {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .product-cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
  }

  .contact-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-info {
    max-width: 600px;
    margin: 0 auto;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-xl);
  }
}

/* キーポイント表示 */
.key-points {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-lg) 0;
  flex-wrap: wrap;
}

.key-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  margin: var(--space-xs);
  transition: all var(--transition-normal);
}

.key-point:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
}

.key-point i {
  margin-bottom: var(--space-xs);
  color: var(--accent-color);
}

.key-point .highlight {
  color: var(--accent-color);
  font-weight: bold;
}

.connection {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 var(--space-sm);
}

.connection i {
  color: var(--accent-color);
  font-size: 1.5rem;
}

/* レスポンシブデザイン - メディアクエリ */
@media (max-width: 768px) {
  .key-points {
    flex-direction: column;
  }

  .connection {
    margin: var(--space-xs) 0;
  }

  .connection i {
    transform: rotate(90deg);
  }
}


body.menu-open {
  overflow: hidden;
}
}

@media (max-width: 480px) {
:root {
  --section-padding: 3rem 0;
}

.container {
  padding: var(--space-md) var(--space-sm);
}

h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.hero {
  padding: calc(var(--space-xl) + 4rem) 0 var(--space-xl);
}

.hero-content {
  gap: var(--space-lg);
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.cta-buttons {
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

.btn {
  width: 100%;
  text-align: center;
  padding: var(--space-md) var(--space-lg);
}

.nav-links a {
  width: 100%;
  text-align: center;
}

.product-cards,
.contact-cards {
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.profile-image,
.profile-info,
.ceo-info {
  max-width: 100%;
}

.footer-links {
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  text-align: center;
}

.scroll-top {
  bottom: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
}
}

/* Scroll Top Button */
.scroll-top {
position: fixed;
bottom: 2rem;
right: 2rem;
width: 3rem;
height: 3rem;
background: var(--primary-color);
border: none;
border-radius: 50%;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transform: translateY(20px);
transition: all var(--transition-normal);
box-shadow: var(--shadow-lg);
z-index: 1000;
}

.scroll-top.visible {
opacity: 1;
transform: translateY(0);
}

.scroll-top:hover {
background: var(--primary-dark);
transform: translateY(-3px);
}

.scroll-top svg {
width: 1.5rem;
height: 1.5rem;
}

/* Floating Icons */
.floating-icons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  }

  .floating-icon {
  position: absolute;
  color: rgba(139, 90, 43, 0.25); /* 薄い茶色（primary-color）*/
  font-size: 2rem;
  z-index: 1;
  animation: float 20s ease-in-out infinite alternate;
  text-shadow: 0 0 10px rgba(139, 90, 43, 0.25);
  transform-origin: center;
  filter: blur(0.5px);
  }

  .floating-icon:nth-child(1) {
  top: 15%;
  left: 10%;
  font-size: 2.5rem;
  animation-delay: 0s;
  animation-duration: 18s;
  }

  .floating-icon:nth-child(2) {
  top: 25%;
  right: 15%;
  font-size: 3rem;
  animation-delay: -2s;
  animation-duration: 22s;
  color: rgba(212, 175, 55, 0.25); /* 薄い金色（accent-color）*/
  }

  .floating-icon:nth-child(3) {
  bottom: 30%;
  left: 20%;
  font-size: 2rem;
  animation-delay: -4s;
  animation-duration: 25s;
  color: rgba(85, 66, 54, 0.25); /* 薄いダーク色（dark-tertiary）*/
  }

  .floating-icon:nth-child(4) {
  bottom: 20%;
  right: 10%;
  font-size: 2.8rem;
  animation-delay: -6s;
  animation-duration: 19s;
  color: rgba(166, 124, 82, 0.25); /* 薄い明るい茶色（primary-light）*/
  }

  .floating-icon:nth-child(5) {
  top: 50%;
  left: 50%;
  font-size: 3.2rem;
  animation-delay: -8s;
  animation-duration: 23s;
  color: rgba(230, 198, 92, 0.25); /* 薄い明るい金色（accent-light）*/
  }

  @keyframes float {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.25;
  }
  20% {
    transform: translateY(-15px) rotate(5deg) scale(1.03);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-25px) rotate(10deg) scale(1.05);
    opacity: 0.35;
  }
  60% {
    transform: translateY(-20px) rotate(5deg) scale(1.04);
    opacity: 0.4;
  }
  80% {
    transform: translateY(-10px) rotate(-5deg) scale(1.02);
    opacity: 0.3;
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.25;
  }
  }

/* Wave divider */
.wave-divider {
position: absolute;
left: 0;
right: 0;
color: var(--primary-color);
width: 100%;
height: 120px;
overflow: hidden;
line-height: 0;
transform: rotate(180deg);
}

.wave-divider.bottom {
bottom: -2px;
transform: rotate(0deg);
}

.wave-divider.top {
top: -2px;
}

.wave-divider svg {
width: calc(100% + 1.5px);
height: 120px;
display: block;
}

/* Section with waves */
.has-waves {
position: relative;
background: var(--light-secondary);
margin: var(--space-xl) 0;
padding: calc(var(--space-xl) + 60px) 0;
}

.has-waves p {
color: var(--dark-color);
}

/* Code editor animation */
.code-editor {
background: #1e1e1e;
border-radius: 0.5rem;
padding: 1rem;
font-family: "Fira Code", monospace;
color: #d4d4d4;
margin-top: 2rem;
}

/* Keyword highlighting and animations */
.highlight {
position: relative;
color: white !important;
font-weight: 700;
display: inline-block;
background-color: var(--primary-color);
padding: 0 4px;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
z-index: 1;
}

/* 特定のタグ内のハイライト表示を強化 */
h1 .highlight,
h2 .highlight {
color: white !important;
background-color: var(--primary-color) !important;
opacity: 1 !important;
visibility: visible !important;
display: inline-block !important;
}

.highlight i {
color: white !important;
}

.highlight::after {
content: "";
position: absolute;
bottom: -2px;
left: 0;
width: 100%;
height: 3px;
background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
border-radius: var(--radius-sm);
}

.keyword {
position: relative;
font-weight: 600;
color: var(--dark-color) !important;
display: inline-block;
padding: 0 2px;
}

.keyword::after {
content: "";
position: absolute;
bottom: -2px;
left: 0;
width: 100%;
height: 2px;
background: var(--primary-color);
border-radius: var(--radius-sm);
transform: scaleX(0);
transform-origin: left;
transition: transform var(--transition-fast);
}

.keyword:hover::after {
transform: scaleX(1);
}

/* コードエディタのタイプライター効果 */
.code-editor {
  position: relative;
  background: var(--dark-color);
  color: #f8f8f2;
  font-family: "Fira Code", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 2.5rem 1.5rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-top: var(--space-xl);
  overflow: hidden;
  white-space: pre;
  max-width: 100%;
  height: 300px;
  overflow-y: auto;
  text-align: left; /* 左寄せに設定 */
}

.code-editor .comment {
  color: #6272a4;
}

.code-editor .keyword {
  color: #ff79c6;
}

.code-editor .string {
  color: #f1fa8c;
}

.code-editor .function {
  color: #50fa7b;
}

.code-editor .type {
  color: #8be9fd;
}

/* タイプライターカーソル */
.code-editor::after {
  content: "|";
  position: absolute;
  right: auto;
  bottom: auto;
  color: #f8f8f2;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from,
  to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* マウススポットライトエフェクト */
.spotlight-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0) 70%);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity var(--transition-normal);
  mix-blend-mode: overlay;
}

/* タッチデバイスではスポットライトを非表示 */
@media (hover: none) {
  .spotlight-effect {
    display: none;
  }
}
