*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.home {
  background: #ffffff;
  color: #0f172a;
  font-family: 'Noto Sans JP', sans-serif;
  overflow-x: hidden;
}

body.home ::selection {
  background: #e2732c;
  color: #ffffff;
}

body.home::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.45;
}

body.home::-webkit-scrollbar {
  width: 6px;
}

body.home::-webkit-scrollbar-track {
  background: #ffffff;
}

body.home::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lineGrow {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.stagger-children .animate-on-scroll:nth-child(1) {
  transition-delay: 0ms;
}

.stagger-children .animate-on-scroll:nth-child(2) {
  transition-delay: 120ms;
}

.stagger-children .animate-on-scroll:nth-child(3) {
  transition-delay: 240ms;
}

.stagger-children .animate-on-scroll:nth-child(4) {
  transition-delay: 360ms;
}

.hero-title {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-tagline {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero-sub {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

.hero-cta {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both;
}

.hero-line {
  animation: lineGrow 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
  transform-origin: left;
}

.hero-motion-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-ai-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

.hero-halo {
  position: absolute;
  border-radius: 9999px;
  filter: blur(50px);
  opacity: 0.6;
  animation: heroHaloDrift 18s ease-in-out infinite;
}

.hero-halo-a {
  width: 32rem;
  height: 32rem;
  top: -10rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(226, 115, 44, 0.22) 0%, rgba(226, 115, 44, 0.03) 55%, transparent 75%);
}

.hero-halo-b {
  width: 28rem;
  height: 28rem;
  right: -6rem;
  bottom: -8rem;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.14) 0%, rgba(15, 23, 42, 0.02) 55%, transparent 75%);
  animation-delay: -7s;
}

@keyframes heroHaloDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(1.5rem, -1.2rem, 0) scale(1.04);
  }
}

.btn-primary {
  background: #e2732c;
  color: #ffffff;
  font-weight: 700;
  padding: 16px 40px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

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

.btn-primary:hover::before {
  opacity: 1;
}

.btn-outline {
  border: 1px solid rgba(226, 115, 44, 0.5);
  color: #e2732c;
  font-weight: 500;
  padding: 16px 40px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-outline:hover {
  border-color: #e2732c;
  background: rgba(226, 115, 44, 0.08);
  transform: translateY(-2px);
}

.service-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.1);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e2732c, transparent);
  opacity: 0;
  transition: opacity 0.5s;
}

.service-card:hover {
  border-color: rgba(226, 115, 44, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

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

.eco-node {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.eco-node:hover {
  border-color: rgba(226, 115, 44, 0.3);
  background: linear-gradient(135deg, #ffffff, #fff5ed);
}

.blog-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  height: 100%;
}

.blog-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(135deg, rgba(226, 115, 44, 0.1), rgba(15, 23, 42, 0.08));
}

.blog-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(226, 115, 44, 0.18), transparent 45%),
    radial-gradient(circle at 82% 80%, rgba(15, 23, 42, 0.1), transparent 45%),
    #f8fafc;
}

.blog-card-body {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  flex: 1;
}

.blog-card-title {
  transition: color 0.35s ease;
}

.blog-card:hover {
  border-color: rgba(226, 115, 44, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.blog-card:hover .blog-card-image {
  transform: scale(1.04);
}

.blog-card:hover .blog-card-title {
  color: #e2732c;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.12) 20%, rgba(15, 23, 42, 0.12) 80%, transparent);
}

.num-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(226, 115, 44, 0.75);
  text-transform: uppercase;
}

.gradient-text {
  background: linear-gradient(135deg, #e2732c, #f0a060);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grid-bg {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

.radial-accent {
  background: radial-gradient(ellipse at 50% 0%, rgba(226, 115, 44, 0.1) 0%, transparent 60%);
}

.nav-blur {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.media-placeholder {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border: 1px dashed rgba(15, 23, 42, 0.2);
}

.admin-bar .site-nav {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-nav {
    top: 46px;
  }

  .hero-halo-a {
    width: 20rem;
    height: 20rem;
    top: -6rem;
    left: -5rem;
  }

  .hero-halo-b {
    width: 18rem;
    height: 18rem;
    right: -5rem;
    bottom: -6rem;
  }
}
