/* ================================
   SyGrow Design System — Blue Accent
   ================================ */

:root {
  /* Primary Blue */
  --color-primary: #005BAC;
  --color-primary-rgb: 0, 91, 172;
  --color-primary-dark: #004a8c;
  --color-primary-light: #3b82f6;

  --color-secondary: #555555;
  --color-secondary-rgb: 85, 85, 85;

  --color-accent: #E0F2FE;
  --color-accent-rgb: 224, 242, 254;

  --color-background: #ffffff;
  --color-surface: #ffffff;

  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;

  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;

  /* Shadow System */
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-large: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-blue: 0 30px 60px -12px rgba(0, 91, 172, 0.12);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
}

/* ================================
   Global Typography
   ================================ */

body {
  font-family: 'Plus Jakarta Sans', 'Inter', 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--color-primary);
  color: white;
}

/* ================================
   Dot Grid Background
   ================================ */

.dot-bg {
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ================================
   Utility Classes
   ================================ */

.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-medium { box-shadow: var(--shadow-medium); }

.glass-effect {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ================================
   Navigation
   ================================ */

.nav-underline {
  position: relative;
}
.nav-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1.5px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-underline:hover::after {
  width: 100%;
}

/* ================================
   Buttons
   ================================ */

.btn-modern {
  background: var(--color-text);
  color: #ffffff;
  border-radius: var(--radius-full);
  box-shadow: none;
  transition: all 0.5s ease;
}

.btn-modern:hover {
  background: var(--color-primary);
  box-shadow: 0 20px 40px -8px rgba(0, 91, 172, 0.2);
}

.btn-outline-primary {
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  transition: all 0.5s ease;
}

.btn-outline-primary:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* ================================
   Cards
   ================================ */

.card-modern {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  transition: box-shadow 0.3s ease;
}

.card-modern:hover {
  box-shadow: var(--shadow-medium);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-light);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.glass-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-blue);
}

/* ================================
   Hero Typography
   ================================ */

.hero-text {
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Hero Decorative Lines */
.hero-line-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: hero-draw 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--line-delay, 0s);
}

.hero-dot {
  opacity: 0;
  animation: hero-dot-in 0.6s ease forwards;
  animation-delay: var(--dot-delay, 1s);
}

@keyframes hero-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes hero-dot-in {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 0.2;
    transform: scale(1);
  }
}

.hero-planet {
  opacity: 0;
  animation: hero-planet-in 0.8s ease forwards;
  animation-delay: 1.4s;
}

@keyframes hero-planet-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ================================
   Logo
   ================================ */

.logo-container {
  width: 10rem;
  height: 4rem;
  position: relative;
}

.logo-container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ================================
   Scroll Indicator
   ================================ */

.scroll-indicator {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ================================
   Intersection Observer Animations
   — Supports both legacy (.is-visible) and new (.active)
   ================================ */

/* Reveal (new design) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.active,
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in up (legacy) */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.39, 0.575, 0.565, 1),
              transform 0.7s cubic-bezier(0.39, 0.575, 0.565, 1);
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in */
.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
}
.fade-in.is-visible {
  opacity: 1;
}

/* Stagger */
.stagger-child {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.stagger-child:nth-child(1) { transition-delay: 0.1s; }
.stagger-child:nth-child(2) { transition-delay: 0.2s; }
.stagger-child:nth-child(3) { transition-delay: 0.3s; }
.stagger-child:nth-child(4) { transition-delay: 0.4s; }
.stagger-child:nth-child(5) { transition-delay: 0.5s; }
.stagger-child:nth-child(6) { transition-delay: 0.6s; }

.stagger-container.is-visible .stagger-child {
  opacity: 1;
  transform: translateY(0);
}

/* Text Reveal */
.text-reveal { overflow: hidden; }
.text-reveal-content {
  transform: translateY(100%);
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}
.text-reveal.is-visible .text-reveal-content {
  transform: translateY(0);
}

/* Slide */
.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-in-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale */
.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Magnetic */
.magnetic {
  transition: transform 0.3s ease;
  cursor: pointer;
}
.magnetic:hover {
  transform: translateY(-2px);
}
.magnetic-strong:hover {
  transform: translateY(-3px);
}

/* Parallax */
.parallax-slow,
.parallax-medium,
.parallax-fast {
  transform: translateZ(0);
}
