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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: #ffffff;
  background: #2c1e4a;
  line-height: 1.8;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.pc-only {
  display: none;
}

@media (min-width: 768px) {
  .pc-only { display: inline; }
}

/* Section Title */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: 0.04em;
}

/* ===================== Hero ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1230 0%, #2c1e4a 40%, #3d1f5c 100%);
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(215, 60, 190, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(100, 60, 200, 0.1) 0%, transparent 50%);
}

/* Mobile hero background image */
.hero-mobile-bg {
  display: none;
  position: absolute;
}

@media (max-width: 767px) {
  .hero-mobile-bg {
    display: block !important;
  }
}

.hero--mobile .hero-mobile-bg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroMobilePan 20s ease-in-out infinite alternate;
}

.hero--mobile #hero-canvas {
  display: none !important;
}

@media (max-width: 767px) {
  #hero-canvas {
    display: none !important;
  }
}

.hero--mobile .hero-content {
  z-index: 2;
}

.hero--mobile .hero-overlay {
  z-index: 1;
}

@keyframes heroMobilePan {
  0% { transform: scale(1.05) translate(0, 0); }
  50% { transform: scale(1.1) translate(-1%, 0.5%); }
  100% { transform: scale(1.05) translate(0.5%, -0.5%); }
}

/* Hide overlay when shader is active */
#hero-canvas.active + .hero-overlay {
  background: none;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 40px 24px;
}

.hero-pretitle {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  margin-bottom: 24px;
  opacity: 0.85;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

@media (min-width: 768px) {
  .hero-title { font-size: 3.2rem; }
  .hero-pretitle { font-size: 2rem; }
}

/* ===================== About ===================== */
.about {
  padding: 100px 0;
  background: #2c1e4a;
}

.about-text {
  text-align: center;
  font-size: 1.1rem;
  line-height: 2;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* ===================== Services ===================== */
.services {
  padding: 100px 0;
  background: #231840;
}

.service-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .service-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 40px 28px;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
}

.service-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  color: #d73cbe;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #d73cbe;
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.7;
}

/* ===================== Works ===================== */
.works {
  padding: 100px 0;
  background: #2c1e4a;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

@media (min-width: 768px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.work-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 36px 32px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
}

.work-image {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  aspect-ratio: 16 / 9;
  background: #1a1230;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-image--dual {
  display: flex;
  gap: 6px;
}

.work-image--dual img {
  width: 50%;
  object-fit: cover;
  object-position: top;
}

.work-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2c1e4a;
  background: #d73cbe;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.work-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.work-project {
  font-size: 1rem;
  color: #d73cbe;
  font-weight: 700;
  margin-bottom: 16px;
}

.work-desc {
  font-size: 0.92rem;
  opacity: 0.85;
  line-height: 1.8;
  margin-bottom: 16px;
}

.work-features {
  list-style: none;
  margin-bottom: 20px;
}

.work-features li {
  font-size: 0.88rem;
  opacity: 0.8;
  padding: 4px 0 4px 20px;
  position: relative;
  line-height: 1.6;
}

.work-features li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: #d73cbe;
  font-size: 0.6rem;
  top: 8px;
}

.work-link {
  display: inline-block;
  font-size: 0.9rem;
  color: #d73cbe;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s;
}

.work-link:hover {
  opacity: 0.7;
}

/* ===================== Contact ===================== */
.contact {
  padding: 100px 0;
  background: #231840;
  text-align: center;
}

.contact-text {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 36px;
}

.contact-email {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d73cbe;
  letter-spacing: 0.04em;
  user-select: all;
}

/* ===================== Footer ===================== */
.footer {
  padding: 48px 0;
  background: #1a1230;
  text-align: center;
}

.footer-company {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-representative {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 6px;
}

.footer-address {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 16px;
}

.footer-copy {
  font-size: 0.8rem;
  opacity: 0.4;
}

/* ===================== Scroll Animations ===================== */
.about,
.service-card,
.work-card,
.contact {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.service-card:nth-child(2) { transition-delay: 0.12s; }
.service-card:nth-child(3) { transition-delay: 0.24s; }
.work-card:nth-child(2) { transition-delay: 0.15s; }

.about.visible,
.service-card.visible,
.work-card.visible,
.contact.visible {
  opacity: 1;
  transform: translateY(0);
}
