:root {
  --primary-red: #dc2626;
  --red-glow: #ef4444;
  --red-dark: #991b1b;
  --black: #000000;
  --black-light: #0a0a0a;
  --gray-dark: #1a1a1a;
  --gray: #2a2a2a;
  --gray-light: #3a3a3a;
  --white: #ffffff;
  --text-gray: #a0a0a0;
  --text-light: #e0e0e0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: var(--black);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  pointer-events: none;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(220, 38, 38, 0.3);
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(0, 0, 0, 0.98);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo-wrapper:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px var(--primary-red));
  transition: filter 0.3s ease;
}

.logo-wrapper:hover .logo-icon {
  filter: drop-shadow(0 0 20px var(--red-glow));
}

.logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}

nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-red), var(--red-glow));
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-red);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--primary-red);
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

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

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

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

main {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  min-height: 100vh;
}

.page {
  display: none;
  animation: fadeIn 0.5s ease;
}

.page.active {
  display: block;
}

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

.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #000;
}

.digital-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-image:
    linear-gradient(rgba(220, 38, 38, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 38, 38, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridPulse 4s ease-in-out infinite;
  z-index: 1;
}

@keyframes gridPulse {
  0%, 100% {
    opacity: 0.3;
    transform: perspective(500px) rotateX(60deg) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: perspective(500px) rotateX(60deg) scale(1.05);
  }
}

.hero-content {
  text-align: center;
  max-width: 1200px;
  padding: 2rem;
  position: relative;
  z-index: 10;
}

.hero-title-wrapper {
  margin-bottom: 4rem;
  perspective: 1000px;
}

.hero-main-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 0.9;
}

.title-line {
  display: flex;
  gap: 0.1em;
  font-size: 8rem;
  letter-spacing: 0.05em;
}

.title-line.labs {
  margin-left: 2em;
}

.char {
  display: inline-block;
  color: var(--white);
  text-shadow:
    0 0 20px rgba(220, 38, 38, 0.8),
    0 0 40px rgba(220, 38, 38, 0.5),
    0 0 60px rgba(220, 38, 38, 0.3);
  animation: charReveal 0.8s ease-out forwards, charGlow 3s ease-in-out infinite;
  opacity: 0;
  transform: translateY(100px) rotateX(-90deg);
  transform-origin: center bottom;
}

.title-line:first-child .char:nth-child(1) { animation-delay: 0s, 1.5s; }
.title-line:first-child .char:nth-child(2) { animation-delay: 0.1s, 1.6s; }
.title-line:first-child .char:nth-child(3) { animation-delay: 0.2s, 1.7s; }
.title-line:first-child .char:nth-child(4) { animation-delay: 0.3s, 1.8s; }
.title-line:first-child .char:nth-child(5) { animation-delay: 0.4s, 1.9s; }
.title-line:first-child .char:nth-child(6) { animation-delay: 0.5s, 2s; }
.title-line:first-child .char:nth-child(7) { animation-delay: 0.6s, 2.1s; }
.title-line:first-child .char:nth-child(8) { animation-delay: 0.7s, 2.2s; }

.title-line.labs .char:nth-child(1) { animation-delay: 0.8s, 2.3s; }
.title-line.labs .char:nth-child(2) { animation-delay: 0.9s, 2.4s; }
.title-line.labs .char:nth-child(3) { animation-delay: 1s, 2.5s; }
.title-line.labs .char:nth-child(4) { animation-delay: 1.1s, 2.6s; }

@keyframes charReveal {
  0% {
    opacity: 0;
    transform: translateY(100px) rotateX(-90deg);
  }
  50% {
    transform: translateY(-10px) rotateX(10deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes charGlow {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(220, 38, 38, 0.8),
      0 0 40px rgba(220, 38, 38, 0.5),
      0 0 60px rgba(220, 38, 38, 0.3);
  }
  50% {
    text-shadow:
      0 0 30px rgba(220, 38, 38, 1),
      0 0 60px rgba(220, 38, 38, 0.8),
      0 0 90px rgba(220, 38, 38, 0.6);
  }
}

.char:hover {
  color: var(--primary-red);
  text-shadow:
    0 0 30px rgba(220, 38, 38, 1),
    0 0 60px rgba(220, 38, 38, 0.8),
    0 0 90px rgba(220, 38, 38, 0.5);
  transform: scale(1.1) translateY(-5px);
  transition: all 0.3s ease;
}

.hero-tagline {
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease-out 1.3s forwards;
  opacity: 0;
}

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

.tagline-en {
  font-size: 1.8rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.tagline-jp {
  font-size: 1.3rem;
  color: var(--text-gray);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 1.5s forwards;
  opacity: 0;
}

.cta-button,
.cta-button-outline {
  padding: 1rem 2.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  cursor: pointer;
}

.cta-button {
  background: linear-gradient(135deg, var(--primary-red), var(--red-dark));
  color: var(--white);
  border: 2px solid var(--primary-red);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.7);
}

.cta-button-outline {
  background: transparent;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
}

.cta-button-outline:hover {
  background: var(--primary-red);
  color: var(--white);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.mission-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(220, 38, 38, 0.05) 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--white);
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
}

.mission-text {
  font-size: 1.3rem;
  text-align: center;
  color: var(--text-light);
  line-height: 2;
  max-width: 800px;
  margin: 0 auto;
}

.page-title {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--white);
  letter-spacing: 3px;
  position: relative;
  padding-bottom: 1.5rem;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
  box-shadow: 0 0 20px var(--primary-red);
}

.page-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 4rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: linear-gradient(135deg, var(--gray-dark) 0%, var(--black-light) 100%);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-red);
  box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
}

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

.service-icon {
  font-size: 2.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.service-title {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.service-description {
  color: var(--text-gray);
  line-height: 1.8;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.tech-card {
  background: linear-gradient(135deg, var(--gray-dark) 0%, var(--black-light) 100%);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  transition: all 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-red);
  box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
}

.tech-title {
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.tech-description {
  color: var(--text-gray);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tag {
  background: rgba(220, 38, 38, 0.2);
  color: var(--primary-red);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.work-card {
  background: linear-gradient(135deg, var(--gray-dark) 0%, var(--black-light) 100%);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  transition: all 0.3s ease;
}

.work-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-red);
  box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.work-title {
  font-size: 1.4rem;
  color: var(--white);
  flex: 1;
}

.work-category {
  background: rgba(220, 38, 38, 0.2);
  color: var(--primary-red);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.work-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(220, 38, 38, 0.2);
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.stat-value {
  font-size: 1.8rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: var(--primary-red);
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.work-description {
  color: var(--text-gray);
  line-height: 1.8;
}

.column-categories {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.category-btn {
  background: transparent;
  color: var(--text-gray);
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
  background: var(--primary-red);
  color: var(--white);
  border-color: var(--primary-red);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.column-card {
  background: linear-gradient(135deg, var(--gray-dark) 0%, var(--black-light) 100%);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.column-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-red);
  box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
}

.column-date {
  color: var(--primary-red);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.column-title {
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.column-excerpt {
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.column-category {
  display: inline-block;
  background: rgba(220, 38, 38, 0.2);
  color: var(--primary-red);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 4rem;
}

.about-heading {
  font-size: 2rem;
  color: var(--primary-red);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.about-text {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 2;
}

.company-info {
  background: linear-gradient(135deg, var(--gray-dark) 0%, var(--black-light) 100%);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.info-row {
  display: flex;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(220, 38, 38, 0.1);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: var(--text-gray);
  width: 150px;
  flex-shrink: 0;
}

.info-value {
  color: var(--text-light);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: var(--text-light);
  font-weight: 500;
}

.required {
  color: var(--primary-red);
}

.form-group input,
.form-group textarea {
  background: var(--gray-dark);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--text-light);
  padding: 1rem;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary-red), var(--red-dark));
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.7);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
}

.contact-info h3 {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-gray);
  line-height: 1.8;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-link {
  color: var(--text-light);
  text-decoration: none;
  padding: 1rem;
  background: linear-gradient(135deg, var(--gray-dark) 0%, var(--black-light) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 4px;
  transition: all 0.3s ease;
  text-align: center;
}

.social-link:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

footer {
  background: var(--black-light);
  border-top: 1px solid rgba(220, 38, 38, 0.3);
  padding: 3rem 2rem 2rem;
  margin-top: 6rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo-img {
  width: 35px;
  height: 35px;
  filter: drop-shadow(0 0 10px var(--primary-red));
}

.footer-logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

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

.footer-copyright {
  color: var(--text-gray);
  font-size: 0.85rem;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(220, 38, 38, 0.2);
  width: 100%;
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem 1.5rem;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(220, 38, 38, 0.3);
  }

  nav.active {
    right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .title-line {
    font-size: 4rem;
  }

  .tagline-en {
    font-size: 1.2rem;
  }

  .tagline-jp {
    font-size: 1rem;
  }

  .page-title {
    font-size: 2.5rem;
  }

  .service-grid,
  .tech-grid,
  .works-grid,
  .column-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .work-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-button,
  .cta-button-outline {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 1rem;
  }

  .logo-text {
    font-size: 1.2rem;
  }

  .title-line {
    font-size: 2.5rem;
  }

  .title-line.labs {
    margin-left: 1em;
  }

  .tagline-en {
    font-size: 1rem;
  }

  .tagline-jp {
    font-size: 0.9rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .container {
    padding: 2rem 1rem;
  }
}
