/* ============================================
   株式会社大塚商事 - Main Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #0a0f1e;
  --navy-light: #111832;
  --navy-mid: #1a2744;
  --blue: #0088cc;
  --blue-light: #00b4d8;
  --cyan: #00e5ff;
  --green: #00c896;
  --green-light: #00ffc8;
  --white: #ffffff;
  --gray-100: #f0f2f5;
  --gray-200: #e2e5ea;
  --gray-300: #c8cdd5;
  --gray-400: #8892a0;
  --gray-500: #5a6474;
  --gray-600: #3a4250;
  --text-primary: #e8ecf1;
  --text-secondary: #8892a0;
  --text-dark: #1a2744;
  --text-dark-secondary: #5a6474;
  --gradient-1: linear-gradient(135deg, #0088cc, #00c896);
  --gradient-2: linear-gradient(135deg, #00c896, #00b4d8);
  --gradient-3: linear-gradient(135deg, #0a0f1e, #1a2744);
  --font-main: 'Noto Sans JP', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-display: 'Orbitron', sans-serif;
  --header-height: 80px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* --- Loader --- */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}

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

.circuit-svg {
  width: 120px;
  height: 120px;
}

.circuit-line {
  stroke: var(--blue);
  stroke-width: 2;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.circuit-node {
  fill: var(--cyan);
  opacity: 0;
}

.circuit-node-center {
  fill: var(--green);
  opacity: 0;
}

.cl-1 { animation: drawLine 0.4s 0.2s forwards; }
.cl-2 { animation: drawLine 0.4s 0.4s forwards; }
.cl-3 { animation: drawLine 0.4s 0.6s forwards; }
.cl-4 { animation: drawLine 0.4s 0.8s forwards; }
.cl-5 { animation: drawLine 0.4s 1.0s forwards; }
.cl-6 { animation: drawLine 0.4s 0.5s forwards; }
.cl-7 { animation: drawLine 0.4s 0.7s forwards; }
.cl-8 { animation: drawLine 0.4s 0.9s forwards; }

.cn-1 { animation: nodeAppear 0.3s 0.4s forwards; }
.cn-2 { animation: nodeAppear 0.3s 0.6s forwards; }
.cn-3 { animation: nodeAppear 0.3s 0.8s forwards; }
.cn-4 { animation: nodeAppear 0.3s 1.0s forwards; }
.cn-5 { animation: nodeAppear 0.3s 0.7s forwards; }
.cn-6 { animation: nodeAppear 0.3s 0.9s forwards; }

.circuit-node-center {
  animation: nodeAppear 0.5s 1.2s forwards, nodePulse 1.5s 1.7s infinite;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes nodeAppear {
  to { opacity: 1; }
}

@keyframes nodePulse {
  0%, 100% { r: 8; opacity: 1; }
  50% { r: 12; opacity: 0.6; }
}

.loader-text {
  margin-top: 24px;
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 14px;
  letter-spacing: 4px;
}

.loader-dots::after {
  content: '';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* --- Header --- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}

#header.scrolled {
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 136, 204, 0.1);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.logo-icon svg {
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
}

.logo-sub {
  font-size: 10px;
  color: var(--gray-400);
  letter-spacing: 1px;
}

#nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--gray-300);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.cta-btn {
  background: var(--gradient-1);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  margin-left: 8px;
}

.nav-link.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4);
}

#menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

#menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* --- Hero --- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  overflow: hidden;
}

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

.hero-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 136, 204, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 136, 204, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 2;
}

.hero-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  z-index: 3;
  pointer-events: none;
}

.binary-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.binary-column {
  position: absolute;
  top: -100%;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan);
  opacity: 0.06;
  writing-mode: vertical-rl;
  animation: binaryFall linear infinite;
  user-select: none;
}

@keyframes binaryFall {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200vh); }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: calc(var(--header-height) + 40px) 24px 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 136, 204, 0.1);
  border: 1px solid rgba(0, 136, 204, 0.2);
  border-radius: 100px;
  padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 2px;
  margin-bottom: 32px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: 24px;
}

.hero-line {
  display: block;
}

#hero h1 em {
  font-style: normal;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 16px;
  color: var(--gray-400);
  line-height: 2;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-1);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 136, 204, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--blue);
  background: rgba(0, 136, 204, 0.1);
}

.btn-gradient {
  background: var(--gradient-2);
  color: var(--navy);
  font-weight: 700;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 200, 150, 0.4);
}

.btn-large {
  padding: 18px 48px;
  font-size: 16px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--blue-light);
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 8px;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--gray-400);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Sections --- */
.section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.section-dark {
  background: var(--navy);
  color: var(--text-primary);
}

.section-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.section-bg-animation canvas {
  width: 100%;
  height: 100%;
}

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

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-dark .section-tag {
  color: var(--cyan);
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  margin-bottom: 16px;
}

.section-dark .section-header h2 {
  color: var(--white);
}

.section-description {
  font-size: 15px;
  color: var(--text-dark-secondary);
  line-height: 2;
}

.section-dark .section-description {
  color: var(--gray-400);
}

/* --- Services --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 40px 32px;
  transition: all 0.4s ease;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 136, 204, 0.1);
  border-color: rgba(0, 136, 204, 0.2);
}

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

.service-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(0, 136, 204, 0.03), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover .service-card-bg {
  opacity: 1;
}

.service-icon {
  color: var(--blue);
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-dark-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tags li {
  padding: 4px 12px;
  background: var(--gray-100);
  border-radius: 100px;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

.service-card-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover .service-card-line {
  transform: scaleX(1);
}

/* --- ラクシゴトDX --- */
#rakushigoto {
  position: relative;
}

#rakushigoto-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.rakushigoto-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 48px;
}

.raku-logo-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.raku-logo-hex {
  animation: floatLogo 6s ease-in-out infinite;
}

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

.raku-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rakushigoto-features {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.raku-feature {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.raku-feature:hover {
  background: rgba(0, 200, 150, 0.05);
  border-color: rgba(0, 200, 150, 0.2);
  transform: translateX(8px);
}

.raku-feature-icon {
  flex-shrink: 0;
  color: var(--green);
}

.raku-feature-text h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.raku-feature-text p {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.8;
}

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

/* --- Nova Opus AI --- */
.novaopus-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 48px;
}

.nova-logo-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.nova-logo-hex {
  animation: floatLogo 6s ease-in-out infinite;
}

.nova-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.novaopus-features {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.nova-feature {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.nova-feature:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateX(8px);
}

.nova-feature-icon {
  flex-shrink: 0;
  color: #818cf8;
}

.nova-feature-text h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.nova-feature-text p {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.8;
}

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

/* --- Partner --- */
.partner-grid {
  max-width: 800px;
  margin: 0 auto;
}

.partner-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
}

.partner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, #f7b731, #f5a623, #00c896);
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 136, 204, 0.1);
  border-color: rgba(0, 136, 204, 0.2);
}

.partner-card-inner {
  padding: 48px 40px;
}

.partner-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.partner-logo-area {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, rgba(247, 183, 49, 0.1), rgba(0, 200, 150, 0.1));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}

.partner-title h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 4px;
}

.partner-company {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

.partner-description {
  font-size: 15px;
  color: var(--text-dark-secondary);
  line-height: 1.9;
  margin-bottom: 32px;
}

.partner-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}

.partner-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gray-100);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.partner-feature-item:hover {
  background: rgba(0, 136, 204, 0.06);
}

.partner-feature-icon {
  flex-shrink: 0;
  color: var(--blue);
  display: flex;
  align-items: center;
}

.partner-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.partner-cta .btn-outline {
  border-color: var(--gray-200);
  color: var(--text-dark);
}

.partner-cta .btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(0, 136, 204, 0.05);
}

@media (max-width: 768px) {
  .partner-card-inner {
    padding: 32px 24px;
  }

  .partner-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .partner-features {
    grid-template-columns: 1fr;
  }

  .partner-cta {
    flex-direction: column;
  }

  .partner-cta .btn {
    justify-content: center;
  }
}

/* --- Strengths --- */
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.strength-item {
  padding: 40px;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.strength-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--gradient-1);
  transition: height 0.4s ease;
}

.strength-item:hover {
  border-color: rgba(0, 136, 204, 0.2);
  box-shadow: 0 10px 40px rgba(0, 136, 204, 0.06);
}

.strength-item:hover::before {
  height: 100%;
}

.strength-number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1;
}

.strength-item h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.strength-item p {
  font-size: 14px;
  color: var(--text-dark-secondary);
  line-height: 1.8;
}

/* --- About --- */
.about-content {
  max-width: 800px;
  margin: 0 auto 48px;
}

.about-table {
  width: 100%;
  border-collapse: collapse;
}

.about-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.about-table th,
.about-table td {
  padding: 20px 24px;
  text-align: left;
  vertical-align: top;
}

.about-table th {
  width: 160px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-light);
  white-space: nowrap;
}

.about-table td {
  font-size: 15px;
  color: var(--gray-300);
  line-height: 1.8;
}

/* --- Contact --- */
.contact-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label:not(.checkbox-label) {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.required {
  color: #e53e3e;
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-main);
  background: var(--white);
  transition: var(--transition);
  color: var(--text-dark);
}

.form-group input:not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-300);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Privacy Checkbox */
.form-privacy {
  margin-bottom: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--gradient-1);
  border-color: var(--blue);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 6px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.privacy-link {
  color: var(--blue);
  text-decoration: underline;
  font-weight: 700;
}

.privacy-link:hover {
  color: var(--blue-light);
}

#submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

#submit-btn:disabled:hover {
  box-shadow: none;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
  isolation: isolate;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* モーダル表示時に他の要素を抑制 */
body.modal-open #header,
body.modal-open #loader,
body.modal-open #hero,
body.modal-open .section,
body.modal-open #footer,
body.modal-open .noise-overlay {
  z-index: auto !important;
}

.modal {
  position: relative;
  z-index: 100000;
  background: var(--white);
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--text-dark);
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  color: var(--text-dark-secondary);
  line-height: 2;
}

.modal-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 28px;
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--blue);
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-body ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

.modal-body ul li {
  list-style: disc;
  margin-bottom: 4px;
}

.privacy-contact {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0;
}

.privacy-contact p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.8;
}

.privacy-date {
  text-align: right;
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 24px;
}

.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--gray-200);
  text-align: center;
  flex-shrink: 0;
}

.modal-footer .btn {
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 48px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
  background: var(--gradient-1);
  color: var(--white);
  transition: all 0.3s ease;
}

.modal-footer .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 136, 204, 0.4);
}

.form-submit {
  text-align: center;
  margin-top: 16px;
}

/* --- Footer --- */
#footer {
  background: var(--navy);
  color: var(--gray-400);
  padding: 64px 0 32px;
  position: relative;
  overflow: hidden;
}

.footer-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 136, 204, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 136, 204, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-address {
  font-size: 14px;
  line-height: 1.8;
}

.footer-links h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 14px;
  color: var(--gray-400);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--blue-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
}

/* --- Scroll Animations (AOS replacement) --- */
[data-aos] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos="fade-down"] {
  transform: translateY(-40px);
}

[data-aos="fade-left"] {
  transform: translateX(40px);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translate(0, 0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .rakushigoto-showcase {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .novaopus-showcase {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .strengths-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  #nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(20px);
    padding: 100px 32px 32px;
    transition: right 0.4s ease;
  }

  #nav.active {
    right: 0;
  }

  #nav ul {
    flex-direction: column;
    gap: 8px;
  }

  .nav-link {
    display: block;
    padding: 16px;
    font-size: 16px;
  }

  .nav-link.cta-btn {
    text-align: center;
    margin-left: 0;
    margin-top: 16px;
  }

  #menu-toggle {
    display: flex;
    z-index: 1001;
  }

  #menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  #menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 36px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-table th,
  .about-table td {
    display: block;
    padding: 8px 16px;
  }

  .about-table th {
    padding-bottom: 0;
  }

  .about-table tr {
    padding: 12px 0;
    display: block;
  }

  .section {
    padding: 80px 0;
  }
}
