/* ========================================
   D-GROW Corporate Site - WordPress CSS
   Ported from Next.js globals.css
   ======================================== */

/* --- Base --- */
html {
  scroll-behavior: smooth;
}

body.dgrow-page {
  background: #ffffff;
  color: #111111;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Font utilities --- */
.font-en {
  font-family: 'Inter', sans-serif;
}

.font-heading {
  font-family: 'Montserrat', sans-serif;
}

/* --- Editorial heading style --- */
.heading-en {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* --- Section inner for wide margins --- */
.section-inner {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 768px) {
  .section-inner {
    padding-left: 60px;
    padding-right: 60px;
  }
}

@media (min-width: 1280px) {
  .section-inner {
    padding-left: 120px;
    padding-right: 120px;
  }
}

/* --- Navigation style --- */
.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  opacity: 0.5;
}

/* --- View more link --- */
.view-more {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.3s ease;
}

.view-more:hover {
  opacity: 0.5;
}

.view-more::after {
  content: "";
  display: inline-block;
  width: 40px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.view-more:hover::after {
  width: 60px;
}

/* --- Scroll indicator line --- */
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes bounceCustom {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(100%); }
}

.animate-bounce-custom {
  animation: bounceCustom 2s infinite ease-in-out;
}

/* ========================================
   GIG-style CSS Scroll Animation System
   ======================================== */

.scroll-section {
  will-change: opacity, transform, clip-path;
}

/* --- Fade Up --- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.4s,
              transform 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.4s;
}

.scroll-section.isView .anim-fade-up,
.scroll-section.isView.anim-fade-up {
  opacity: 1;
  transform: translateY(0);
}

/* --- Fade Up (small) --- */
.anim-fade-up-sm {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s,
              transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
}

.scroll-section.isView .anim-fade-up-sm,
.scroll-section.isView.anim-fade-up-sm {
  opacity: 1;
  transform: translateY(0);
}

/* --- Fade Left --- */
.anim-fade-left {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s,
              transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s;
}

.scroll-section.isView .anim-fade-left,
.scroll-section.isView.anim-fade-left {
  opacity: 1;
  transform: translateX(0);
}

/* --- Heading decoration slide --- */
.anim-decoration {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s,
              transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
}

.scroll-section.isView .anim-decoration,
.scroll-section.isView.anim-decoration {
  opacity: 1;
  transform: translateX(0);
}

/* --- Clip-path image reveal (from right) --- */
.anim-clip-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s cubic-bezier(0.79, 0.17, 0.15, 0.96);
}

.scroll-section.isView .anim-clip-reveal,
.scroll-section.isView.anim-clip-reveal {
  clip-path: inset(0);
}

/* --- Clip-path reveal from bottom --- */
.anim-clip-bottom {
  clip-path: inset(0 0 100%);
  transition: clip-path 1.5s cubic-bezier(0.475, 0.425, 0, 0.995) 0.2s;
}

.scroll-section.isView .anim-clip-bottom,
.scroll-section.isView.anim-clip-bottom {
  clip-path: inset(0);
}

/* --- Simple fade in --- */
.anim-fade-in {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s;
}

.scroll-section.isView .anim-fade-in,
.scroll-section.isView.anim-fade-in {
  opacity: 1;
}

/* --- View More link line sweep --- */
.anim-line-sweep::after {
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.6s;
}

.scroll-section.isView .anim-line-sweep::after {
  transform: translateX(0);
}

/* --- Stagger delay utilities --- */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }
.delay-6 { transition-delay: 0.6s !important; }
.delay-7 { transition-delay: 0.7s !important; }
.delay-8 { transition-delay: 0.8s !important; }
.delay-9 { transition-delay: 0.9s !important; }
.delay-10 { transition-delay: 1.0s !important; }

/* --- Diagonal background bar effect --- */
.diagonal-bar {
  position: relative;
  overflow: hidden;
}

.diagonal-bar::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: #ebebeb;
  transform: rotate(15deg);
  clip-path: inset(0 0 100%);
  transition: clip-path 1.5s cubic-bezier(0.475, 0.425, 0, 0.995) 0.2s;
  z-index: 0;
  pointer-events: none;
}

.scroll-section.isView .diagonal-bar::before,
.scroll-section.isView.diagonal-bar::before {
  clip-path: inset(0);
}

/* --- Hero photo strip hover --- */
.hero-photo-strip {
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-photo-strip:hover {
  transform: scale(1.05);
}

/* ========================================
   Hero section clip-paths
   ======================================== */
.hero-clip-bg {
  clip-path: polygon(55% 0, 100% 0, 100% 100%, 35% 100%);
}

@media (max-width: 768px) {
  .hero-clip-bg {
    clip-path: polygon(0 40%, 100% 20%, 100% 100%, 0 100%);
  }
}

/* --- Background skew shape --- */
.bg-skew-shape {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background-color: #f8f9fa;
  transform: skewX(-15deg);
  z-index: -1;
}

/* --- Image skew clip --- */
.image-skew-clip {
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
}

/* --- Service card text clip --- */
@media (min-width: 768px) {
  .service-card-text-clip {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8% 100%);
  }
}
@media (max-width: 767px) {
  .service-card-text-clip {
    clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%);
    margin-top: -6%;
  }
}

/* --- About card text clip --- */
.about-card-text-clip {
  clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
}
@media (max-width: 767px) {
  .about-card-text-clip {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
  }
}

/* --- Recruit section image clip --- */
@media (min-width: 768px) {
  .recruit-left-clip {
    clip-path: polygon(0 0, 100% 0, calc(100% - 160px) 100%, 0 100%);
  }
  .recruit-right-clip {
    clip-path: polygon(160px 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* ========================================
   Intro Overlay Animation
   ======================================== */
@keyframes introLetterIn {
  0% { opacity: 0; transform: translateY(40px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes introSubtitleIn {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

.intro-letter {
  opacity: 0;
  animation: introLetterIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.intro-subtitle {
  opacity: 0;
  animation: introSubtitleIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s forwards;
}

/* ========================================
   Creatures-style Scroll Animation
   ======================================== */
.scrollUp {
  transform: translateY(50px) scale(0.9);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scrollUp.active {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.scrollUp.stagger-1 { transition-delay: 0.1s; }
.scrollUp.stagger-2 { transition-delay: 0.2s; }
.scrollUp.stagger-3 { transition-delay: 0.3s; }
.scrollUp.stagger-4 { transition-delay: 0.4s; }
.scrollUp.stagger-5 { transition-delay: 0.5s; }
.scrollUp.stagger-6 { transition-delay: 0.6s; }

/* ========================================
   Reduced motion preferences
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .anim-fade-up, .anim-fade-up-sm, .anim-fade-left,
  .anim-decoration, .anim-clip-reveal, .anim-clip-bottom, .anim-fade-in {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .diagonal-bar::before {
    clip-path: none !important;
  }
  .scrollUp {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ========================================
   WordPress overrides - hide Blocksy chrome
   ======================================== */
.dgrow-page .site-header,
.dgrow-page .site-footer,
.dgrow-page #main-container {
  display: none !important;
}
