/* ============================================
   AWWWARDS EFFECTS - UNIQUE PER SECTION
   Professional effects matched to content meaning
   ============================================ */

/* ==========================================
   PAGE TRANSITIONS
   ========================================== */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-transition__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
}

.page-transition.active .page-transition__bg {
  transform: scaleY(1);
  transform-origin: top;
}

.page-transition.exit .page-transition__bg {
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1) 0.1s;
}

.page-transition__loader {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-transition.active .page-transition__loader {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.3s;
}

.page-transition.exit .page-transition__loader {
  opacity: 0;
  transform: scale(0.8);
  transition-delay: 0s;
}

.page-transition__loader span {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.1em;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Page content animations */
.page-exit {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.page-enter {
  animation: pageEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   CUSTOM CURSOR
   ========================================== */
.cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  color: #1a1a1a;
  border: 2px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 1;
  transition: transform 0.2s ease, width 0.3s, height 0.3s, background-color 0.3s, opacity 0.3s, border-color 0.3s;
  transform: translate(-50%, -50%);
}

/* Logo inversion window (true invert) */
.cursor.cursor-invert {
  width: 96px;
  height: 96px;
  border-width: 0;
  border-color: transparent;
  background-color: #ffffff;
  mix-blend-mode: difference;
  /* Push the inverted result to crisp black/white */
  filter: grayscale(1) contrast(12);
  /* No fade-in; should feel instant and solid */
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s ease;
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: #1a1a1a;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100001;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.12s ease;
}

/* Ensure click feedback is visible even when the header hides the outer ring */
.cursor-dot.click {
  transform: translate(-50%, -50%) scale(0.7) !important;
}

/* Ensure dot is visible over glass header */
.glass-header ~ .cursor-dot {
  z-index: 100001;
}

.cursor.cursor-light {
  color: #ffffff;
}

.cursor-dot.cursor-light {
  background: #ffffff;
}

.cursor.hover {
  width: 80px;
  height: 80px;
}

.cursor.hover.cursor-click {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(1px) saturate(150%);
  -webkit-backdrop-filter: blur(1px) saturate(150%);
  border-color: currentColor;
}

/* Hide cursor circle when hovering products sidebar */
.cursor.hide-circle {
  opacity: 0 !important;
}

.cursor.hover.cursor-click.cursor-light {
  background: rgba(255, 255, 255, 0.22);
  border-color: currentColor;
}

.cursor.cursor-view {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(1px) saturate(150%);
  -webkit-backdrop-filter: blur(1px) saturate(150%);
  border-color: currentColor;
}

.cursor.cursor-frame {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.cursor.click {
  transform: translate(-50%, -50%) scale(0.8);
}

/* Cursor text states */
.cursor.cursor-view::after {
  content: 'VIEW';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: currentColor;
}

.cursor.cursor-click::after {
  content: 'CLICK';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: currentColor;
}

.cursor.cursor-drag::after {
  content: 'DRAG';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: currentColor;
}

body.has-cursor * {
  cursor: none !important;
}

/* ==========================================
   SCROLL PROGRESS
   ========================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #4a6b7c, #8bb8c9, #4a6b7c);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  z-index: 99999;
  transition: width 0.1s;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================
   HERO SECTION - Cinematic Reveal
   ========================================== */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* ==========================================
   HERO VARIANTS - Purpose-Driven Design Language
   ========================================== */

/* SERVICES PAGE — Capability Hero
   "These are precise, professional services."
   Structured, technical grid suggesting systems & integration */
.hero--services .hero__grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(to right, rgba(139, 184, 201, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(139, 184, 201, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
}

.hero--services::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(139, 184, 201, 0.12);
  border-radius: 4px;
  pointer-events: none;
  animation: serviceModule 8s ease-in-out infinite;
}

.hero--services::before {
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 26, 0.03) 100%);
}

@keyframes serviceModule {
  0%, 100% {
    transform: translateY(0);
    border-color: rgba(139, 184, 201, 0.12);
  }
  50% {
    transform: translateY(-20px);
    border-color: rgba(139, 184, 201, 0.25);
  }
}

/* SOLUTIONS PAGE — System & Ecosystem Hero
   "Everything works together."
   Connected nodes showing integration layers */
.hero--solutions .hero__orbit {
  position: absolute;
  top: 50%;
  right: 8%;
  width: 400px;
  height: 400px;
  transform: translate(0, -50%);
  pointer-events: none;
}

.hero--solutions .hero__orbit::before,
.hero--solutions .hero__orbit::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(139, 184, 201, 0.15);
}

.hero--solutions .hero__orbit::before {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  animation: ecosystemPulse1 6s ease-in-out infinite;
}

.hero--solutions .hero__orbit::after {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  animation: ecosystemPulse2 6s ease-in-out infinite 1s;
}

.hero--solutions::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 26%;
  width: 6px;
  height: 6px;
  background: rgba(139, 184, 201, 0.8);
  border-radius: 50%;
  box-shadow: 
    0 0 0 8px rgba(139, 184, 201, 0.1),
    0 0 20px rgba(139, 184, 201, 0.3);
  animation: ecosystemNode 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ecosystemPulse1 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.4; }
}

@keyframes ecosystemPulse2 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.3; }
}

@keyframes ecosystemNode {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ZIGBEE INTERCOM PAGE — Product / Technology Hero
   "Secure. Reliable. Engineered."
   Security-focused with precision technical overlay */
.hero--product .hero__scan-line {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero--product .hero__scan-line::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 184, 201, 0.7) 50%, transparent 100%);
  box-shadow: 0 0 12px rgba(139, 184, 201, 0.5);
  animation: securityScan 4s ease-in-out infinite;
}

.hero--product::after {
  content: '';
  position: absolute;
  top: 15%;
  right: 12%;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(139, 184, 201, 0.2);
  pointer-events: none;
  animation: securityFrame 3s ease-in-out infinite;
}

.hero--product::before {
  content: '';
  position: absolute;
  top: 15%;
  right: 12%;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, transparent 0%, rgba(139, 184, 201, 0.05) 100%);
  pointer-events: none;
  z-index: 1;
}

@keyframes securityScan {
  0% { top: -2px; opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { top: calc(100% + 2px); opacity: 0; }
}

@keyframes securityFrame {
  0%, 100% { 
    border-color: rgba(139, 184, 201, 0.2);
    transform: scale(1);
  }
  50% { 
    border-color: rgba(139, 184, 201, 0.4);
    transform: scale(1.05);
  }
}

/* ABOUT PAGE — Credibility & Philosophy Hero
   "These people know what they're doing."
   Typography-driven, minimal texture, white space emphasis */
.hero--about .hero__bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: 
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(139, 184, 201, 0.06) 79px, rgba(139, 184, 201, 0.06) 80px);
}

.hero--about::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 184, 201, 0.2) 50%, transparent 100%);
  pointer-events: none;
}

.hero--about::before {
  background: linear-gradient(135deg, rgba(139, 184, 201, 0.02) 0%, transparent 50%);
  z-index: 1;
}

/* WHY YK SMART PAGE — Differentiation Hero
   "There is a clear reason to choose them."
   Precision structure suggesting engineering discipline */
.hero--why .hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero--why .hero__glow::before {
  content: '';
  position: absolute;
  top: 30%;
  right: 15%;
  width: 1px;
  height: 40%;
  background: linear-gradient(to bottom, transparent 0%, rgba(139, 184, 201, 0.3) 50%, transparent 100%);
  animation: precisionLine 4s ease-in-out infinite;
}

.hero--why .hero__glow::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10%;
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent 0%, rgba(139, 184, 201, 0.3) 50%, transparent 100%);
  animation: precisionLine 4s ease-in-out infinite 0.5s;
}

.hero--why::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 15%;
  width: 4px;
  height: 4px;
  background: rgba(139, 184, 201, 0.6);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 12px rgba(139, 184, 201, 0.4);
  pointer-events: none;
  animation: precisionPoint 4s ease-in-out infinite;
}

@keyframes precisionLine {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

@keyframes precisionPoint {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.3); }
}

/* CONTACT PAGE — Conversion Hero
   "Let's talk."
   Calm, premium glass effect with slow elegant motion */
.hero--contact .hero__pulse {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 30% 40%, rgba(139, 184, 201, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(74, 107, 124, 0.03) 0%, transparent 50%);
  animation: contactAmbience 10s ease-in-out infinite alternate;
}

.hero--contact::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  border: 1px solid rgba(139, 184, 201, 0.08);
  border-radius: 50%;
  pointer-events: none;
  animation: contactRing 8s ease-in-out infinite;
}

.hero--contact::before {
  background: linear-gradient(135deg, rgba(139, 184, 201, 0.02) 0%, transparent 70%);
  z-index: 1;
}

@keyframes contactAmbience {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

@keyframes contactRing {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.25;
  }
}

/* Reduced motion support for all hero variants */
@media (prefers-reduced-motion: reduce) {
  .hero--about .hero__bg-pattern,
  .hero--about::after,
  .hero--services .hero__grid-lines::before,
  .hero--services .hero__grid-lines::after,
  .hero--solutions .hero__orbit::before,
  .hero--solutions .hero__orbit::after,
  .hero--why .hero__glow::before,
  .hero--why .hero__glow::after,
  .hero--product .hero__scan-line::before,
  .hero--contact .hero__pulse::before,
  .hero--contact .hero__pulse::after {
    animation: none;
  }
}

@media (max-width: 768px) {
  .hero--solutions .hero__orbit {
    width: 250px;
    height: 250px;
    right: 0;
  }
  
  .hero--solutions .hero__orbit::after {
    animation-name: orbitMoveMobile;
  }
  
  @keyframes orbitMoveMobile {
    0% { transform: rotate(0deg) translateX(125px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(125px) rotate(-360deg); }
  }
}

/* Hero title - Split letter animation */
.hero__title {
  overflow: hidden;
}

.hero__title .word {
  display: inline-block;
  overflow: hidden;
}

.hero__title .char {
  margin-bottom: 15px;
  display: inline-block;
  transform: translateY(120%);
  opacity: 0;
  animation: heroCharReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroCharReveal {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Hero overline - Typewriter effect */
.hero__overline {
  position: relative;
  display: inline-block;
}

.hero__overline::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 1em;
  background: #4a6b7c;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__overline.typed::after {
  display: none;
}

/* Hero description - Fade blur in */
.hero__description {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(30px);
  animation: heroDescReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes heroDescReveal {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* Hero actions - Stagger slide up */
.hero__actions {
  opacity: 0;
  transform: translateY(40px);
  animation: heroActionsReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

@keyframes heroActionsReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   STATS SECTION - Counter Flip Animation
   ========================================== */
.stat {
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat.active {
  opacity: 1;
  transform: translateY(0);
}

.stat__value {
  position: relative;
  overflow: hidden;
}

/* Number flip animation */
.stat__value .digit {
  display: inline-block;
  animation: digitFlip 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform: translateY(100%);
  opacity: 0;
}

@keyframes digitFlip {
  0% {
    transform: translateY(100%) rotateX(-90deg);
    opacity: 0;
  }
  100% {
    transform: translateY(0) rotateX(0);
    opacity: 1;
  }
}

/* Stat label underline grow */
.stat__label {
  position: relative;
}

.stat__label::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #4a6b7c;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s, left 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.stat.active .stat__label::after {
  width: 40px;
  left: calc(50% - 20px);
}

/* ==========================================
   QUOTE BLOCK - Professional Quote Styling
   ========================================== */
.quote-block {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 56px;
  border-radius: 16px;
  border: none;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.quote-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.quote-block__text {
  font-size: 1.15rem;
  line-height: 1.75;
  color: #2a2a2a;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  margin: 0;
}

@media (max-width: 768px) {
  .quote-block {
    padding: 32px 28px;
  }
  
  .quote-block__text {
    font-size: 1.05rem;
  }
}

/* ==========================================
   CARDS - 3D Perspective Hover
   ========================================== */
.card,
.solution-card {
  position: relative;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Card reveal animation */
.card.reveal,
.solution-card.reveal {
  opacity: 0;
  transform: perspective(1000px) rotateX(10deg) translateY(60px);
}

.card.reveal.active,
.solution-card.reveal.active {
  opacity: 1;
  transform: perspective(1000px) rotateX(0) translateY(0);
}

/* Card glow on hover */
.card::before,
.solution-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(74, 107, 124, 0.1),
    transparent 40%
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 1;
}

.card:hover::before,
.solution-card:hover::before {
  opacity: 1;
}

/* Card border glow */
.card::after,
.solution-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(74, 107, 124, 0.3),
    transparent 60%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.card:hover::after,
.solution-card:hover::after {
  opacity: 1;
}

/* Card icon bounce */
.card__icon {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card__icon {
  transform: scale(1.15) rotate(-5deg);
}

/* ==========================================
   PROCESS STEPS - Timeline Animation
   ========================================== */
.process {
  position: relative;
}

/* Connecting line */
.process::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4a6b7c, #8bb8c9);
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.process.active::before {
  width: 100%;
}

.process__step {
  position: relative;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.process__step.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Step number pulse */
.process__number {
  position: relative;
}

.process__number::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: rgba(74, 107, 124, 0.2);
  animation: stepPulse 2s ease-in-out infinite;
  opacity: 0;
}

.process__step.active .process__number::after {
  opacity: 1;
}

@keyframes stepPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0; }
}

/* ==========================================
   SERVICE ITEMS - Horizontal Scroll Reveal
   ========================================== */
.service-item {
  position: relative;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-item:nth-child(odd) {
  transform: translateX(-100px);
}

.service-item:nth-child(even) {
  transform: translateX(100px);
}

.service-item.active {
  opacity: 1;
  transform: translateX(0);
}

/* Service number - Stroke animation */
.service-item__number {
  position: relative;
  background: linear-gradient(90deg, #4a6b7c 0%, #4a6b7c 0%, #ccc 0%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background 1s ease;
}

.service-item.active .service-item__number {
  background: linear-gradient(90deg, #4a6b7c 0%, #4a6b7c 100%, #ccc 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Service visual - Parallax float */
.service-item__visual {
  transition: transform 0.3s ease;
}

.service-item:hover .service-item__visual {
  transform: translateY(-10px);
}

/* Feature list items - Stagger in */
.service-item__feature {
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-item.active .service-item__feature {
  opacity: 1;
  transform: translateX(0);
}

.service-item.active .service-item__feature:nth-child(1) { transition-delay: 0.1s; }
.service-item.active .service-item__feature:nth-child(2) { transition-delay: 0.2s; }
.service-item.active .service-item__feature:nth-child(3) { transition-delay: 0.3s; }
.service-item.active .service-item__feature:nth-child(4) { transition-delay: 0.4s; }
.service-item.active .service-item__feature:nth-child(5) { transition-delay: 0.5s; }

/* ==========================================
   TWO-COL SECTIONS - Clip Reveal
   ========================================== */
.two-col > *:first-child {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.two-col > *:last-child {
  opacity: 0;
  clip-path: inset(0 0 0 100%);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.two-col.active > *:first-child,
.two-col.active > *:last-child {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

/* ==========================================
   FEATURE LIST - Check Mark Animation
   ========================================== */
.feature-list__item {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-list__item.active {
  opacity: 1;
  transform: translateX(0);
}

/* Icon draw animation */
.feature-list__icon {
  position: relative;
}

.feature-list__icon svg path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.feature-list__item.active .feature-list__icon svg path {
  stroke-dashoffset: 0;
}

/* ==========================================
   CTA SECTION - Modern Animated Design
   ========================================== */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding: 80px 40px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta.cta--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating particles background */
.cta__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.cta__particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(139, 184, 201, 0.4);
  border-radius: 50%;
  animation: particleFloat 8s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(139, 184, 201, 0.3);
}

.cta__particle:nth-child(1) {
  left: 15%;
  top: 20%;
  animation-delay: 0s;
  animation-duration: 7s;
}

.cta__particle:nth-child(2) {
  left: 75%;
  top: 60%;
  animation-delay: 1.5s;
  animation-duration: 9s;
}

.cta__particle:nth-child(3) {
  left: 45%;
  top: 80%;
  animation-delay: 3s;
  animation-duration: 8s;
}

.cta__particle:nth-child(4) {
  left: 85%;
  top: 30%;
  animation-delay: 2s;
  animation-duration: 10s;
}

.cta__particle:nth-child(5) {
  left: 25%;
  top: 70%;
  animation-delay: 4s;
  animation-duration: 9s;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(20px, -30px) scale(1.2);
    opacity: 0.6;
  }
  50% {
    transform: translate(-15px, -60px) scale(0.8);
    opacity: 0.4;
  }
  75% {
    transform: translate(30px, -40px) scale(1.1);
    opacity: 0.7;
  }
}

/* Title with gradient animation */
.cta__title {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin-bottom: 24px;
  color: #ffffff;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.cta.cta--visible .cta__title {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ctaTitleShine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Description */
.cta__description {
  position: relative;
  z-index: 1;
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin: 0 auto 40px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.cta.cta--visible .cta__description {
  opacity: 1;
  transform: translateY(0);
}

/* Actions */
.cta__actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

.cta.cta--visible .cta__actions {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .cta {
    padding: 60px 28px;
  }
  
  .cta__actions {
    flex-direction: column;
    width: 100%;
  }
  
  .cta__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta__particle,
  .cta__title {
    animation: none;
  }
}

/* ==========================================
   GRID ITEMS - Stagger Scale
   ========================================== */
.grid > * {
  opacity: 0;
  transform: scale(0.8) translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid.active > *:nth-child(1) { transition-delay: 0s; }
.grid.active > *:nth-child(2) { transition-delay: 0.1s; }
.grid.active > *:nth-child(3) { transition-delay: 0.2s; }
.grid.active > *:nth-child(4) { transition-delay: 0.3s; }
.grid.active > *:nth-child(5) { transition-delay: 0.4s; }
.grid.active > *:nth-child(6) { transition-delay: 0.5s; }
.grid.active > *:nth-child(7) { transition-delay: 0.6s; }
.grid.active > *:nth-child(8) { transition-delay: 0.7s; }

.grid.active > * {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ==========================================
   SECTION HEADERS - Reveal Animation
   ========================================== */
.section-header {
  position: relative;
}

.section-header__overline {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header__title {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.section-header__description {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.section-header.active .section-header__overline,
.section-header.active .section-header__title,
.section-header.active .section-header__description {
  opacity: 1;
  transform: translateY(0);
}

/* Overline - Line grow animation */
.section-header__overline::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 50%;
  width: 0;
  height: 1px;
  background: #4a6b7c;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.section-header--center .section-header__overline::before {
  display: none;
}

.section-header.active .section-header__overline::before {
  width: 30px;
}

/* ==========================================
   MARQUEE
   ========================================== */
.marquee-container {
  background: #0a0a0a;
  padding: 20px 0;
  margin-top: 5px;
  overflow: hidden;
  position: relative;
}

.marquee-container::before,
.marquee-container::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.marquee-container::before {
  left: 0;
  background: linear-gradient(90deg, #0a0a0a, transparent);
}

.marquee-container::after {
  right: 0;
  background: linear-gradient(-90deg, #0a0a0a, transparent);
}

.marquee-track {
  display: flex;
  animation: marquee 25s linear infinite;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 0 30px;
  white-space: nowrap;
}

.marquee-content span {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.marquee-content span:hover {
  color: #8bb8c9;
}

.marquee-content .dot {
  color: #4a6b7c;
  font-size: 0.8rem;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================
   FOOTER - Stagger Up Animation
   ========================================== */
.footer__top > * {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer__top.active > *:nth-child(1) { transition-delay: 0s; }
.footer__top.active > *:nth-child(2) { transition-delay: 0.1s; }

.footer__top.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* Footer wordmark - Characters assemble into place */
.footer__brand-text.footer-brand-split {
  display: inline-block;
  white-space: nowrap;
}

.footer__brand-text .footer-char {
  display: inline-block;
  opacity: 0;
  transform: translate(var(--fx, 0px), var(--fy, 70px)) rotate(var(--fr, 0deg));
  filter: blur(10px);
  will-change: transform, opacity, filter;
}

.footer__brand-text.is-animated .footer-char {
  animation: footerCharAssemble 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes footerCharAssemble {
  0% {
    opacity: 0;
    transform: translate(var(--fx), var(--fy)) rotate(var(--fr));
    filter: blur(10px);
  }
  70% {
    opacity: 1;
    transform: translate(0, -2px) rotate(0deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer__top > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .footer__brand-text .footer-char {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
}

/* Footer links - Hover slide */
.footer__link {
  position: relative;
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer__link:hover {
  transform: translateX(5px);
  color: #8bb8c9;
}

/* ==========================================
   HEADER EFFECTS
   ========================================== */
.header {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              background 0.4s ease, 
              box-shadow 0.4s ease;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.header.hidden {
  transform: translateY(-100%);
}

/* ==========================================
   BUTTON EFFECTS (Ripple for .btn)
   ========================================== */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
  z-index: 10;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ==========================================
   IMAGE REVEAL - Curtain Effect
   ========================================== */
.img-reveal {
  position: relative;
  overflow: hidden;
}

.img-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.img-reveal.active::after {
  transform: scaleX(0);
  transform-origin: right;
}

/* ==========================================
   NOISE OVERLAY
   ========================================== */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================
   SMOOTH SCROLL INDICATOR
   ========================================== */
.scroll-indicator {
  display: none;
}

.scroll-indicator__mouse {
  width: 24px;
  height: 40px;
  border: 2px solid #4a6b7c;
  border-radius: 12px;
  position: relative;
}

.scroll-indicator__mouse::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: #4a6b7c;
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

.scroll-indicator__text {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4a6b7c;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==========================================
   TEXT HIGHLIGHT ON SCROLL
   ========================================== */
.highlight-text {
  background: linear-gradient(90deg, #4a6b7c, #8bb8c9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.highlight-text.active {
  background-size: 100% 100%;
}

/* ==========================================
   PARALLAX ELEMENTS
   ========================================== */
.parallax-slow {
  transition: transform 0.1s linear;
}

.parallax-fast {
  transition: transform 0.05s linear;
}

/* ==========================================
   LOADING STATE
   ========================================== */
.page-loading {
  opacity: 0;
}

.page-loaded {
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* ==========================================
   MOBILE OPTIMIZATIONS
   ========================================== */
@media (max-width: 1024px) {
  .cursor, .cursor-dot {
    display: none !important;
  }
  
  body.has-cursor * {
    cursor: auto !important;
  }
  
  /* Reduce animation complexity on mobile */
  .card::before,
  .card::after,
  .solution-card::before,
  .solution-card::after {
    display: none;
  }
  
  .certification::before {
    display: none;
  }
  
  .process::before {
    display: none;
  }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   PRODUCTS PAGE EFFECTS - DARK EDITORIAL
   ========================================== */

/* Product card subtle entrance */
.product-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Category card entrance */
.category-card {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Filter button subtle pulse on active */
.product-filter__btn.active {
  animation: subtlePulse 2s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Spinner animation for loading states */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Disable on mobile */
@media (max-width: 768px) {
  .product-card,
  .category-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .product-filter__btn.active {
    animation: none;
  }
}
