/* ============================================================
   GLOBAL ENHANCEMENTS — NOVO Consultancy
   Scroll animations, hover states, timeline, tabs, etc.
   ============================================================ */

/* Responsive utilities (replacing Tailwind lg: classes) */
@media (max-width: 1023px) { .lg\:hidden { display: block !important; } .lg\:flex { display: none !important; } }
@media (min-width: 1024px) { .lg\:hidden { display: none !important; } .lg\:flex { display: flex !important; } }

/* ---- Scroll Fade-Up Animation ---- */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children > *:nth-child(3) { transition-delay: 160ms; }
.stagger-children > *:nth-child(4) { transition-delay: 240ms; }
.stagger-children > *:nth-child(5) { transition-delay: 320ms; }
.stagger-children > *:nth-child(6) { transition-delay: 400ms; }
.stagger-children > *:nth-child(7) { transition-delay: 480ms; }
.stagger-children > *:nth-child(8) { transition-delay: 560ms; }

/* ---- Hero background animation ---- */
@keyframes hero-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-animated {
  background-size: 200% 200%;
  animation: hero-shift 12s ease-in-out infinite;
}

/* ---- Unified card hover ---- */
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.1);
}

/* ---- Tab underline animation ---- */
.tab-underline {
  position: relative;
}
.tab-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 80%;
  height: 2px;
  background: #3B82F6;
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 1px;
}
.tab-underline:hover::after,
.tab-underline.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ---- Step timeline connector ---- */
.step-timeline {
  position: relative;
}
.step-timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: currentColor;
  opacity: 0.15;
}
.step-timeline .step-dot {
  position: relative;
  z-index: 1;
}
.step-timeline .step-dot::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  border: 2px solid currentColor;
}
.step-timeline .step-dot:first-child::before {
  opacity: 0.8;
  width: 12px;
  height: 12px;
  top: 7px;
  left: -25px;
}

/* ---- Step number badge ---- */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* ---- Image ready-state (subtle grid pattern) ---- */
.img-ready {
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 20px,
    rgba(148, 163, 184, 0.03) 20px,
    rgba(148, 163, 184, 0.03) 21px
  ),
  repeating-linear-gradient(
    90deg,
    transparent,
    transparent 20px,
    rgba(148, 163, 184, 0.03) 20px,
    rgba(148, 163, 184, 0.03) 21px
  );
}

/* ---- Validation section geometric pattern ---- */
.validation-pattern {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(132, 204, 22, 0.03) 40px,
    rgba(132, 204, 22, 0.03) 41px
  );
}

/* ---- Quick-fact row ---- */
.quick-fact {
  font-size: 0.75rem;
  color: #94A3B8;
}

/* ---- Connect timezone indicator ---- */
.tz-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
}
.tz-open {
  background: rgba(34, 197, 94, 0.12);
  color: #22C55E;
}
.tz-closed {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}
.tz-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* ---- Advisory tag pills ---- */
.advisory-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(200, 121, 94, 0.3);
  color: #C8795E;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(245, 240, 232, 0.6);
  transition: all 0.2s ease;
}
.advisory-pill:hover {
  background: #C8795E;
  color: white;
  border-color: #C8795E;
}

/* ---- Project category pill ---- */
.cat-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
}

/* ---- Staggered card entrance for project grid ---- */
.stagger-grid > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-grid.visible > * {
  opacity: 1;
  transform: translateY(0);
}
.stagger-grid > *:nth-child(1) { transition-delay: 0ms; }
.stagger-grid > *:nth-child(2) { transition-delay: 80ms; }
.stagger-grid > *:nth-child(3) { transition-delay: 160ms; }
.stagger-grid > *:nth-child(4) { transition-delay: 240ms; }
.stagger-grid > *:nth-child(5) { transition-delay: 320ms; }
.stagger-grid > *:nth-child(6) { transition-delay: 400ms; }
.stagger-grid > *:nth-child(7) { transition-delay: 480ms; }
.stagger-grid > *:nth-child(8) { transition-delay: 560ms; }

/* ---- Desktop scroll arrows ---- */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid rgba(200, 121, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #C8795E;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.scroll-arrow:hover {
  background: #C8795E;
  color: white;
  border-color: #C8795E;
}
.scroll-arrow-left { left: -16px; }
.scroll-arrow-right { right: -16px; }
@media (max-width: 1023px) {
  .scroll-arrow { display: none; }
}

/* ---- Featured project (span 2 cols) ---- */
.project-featured {
  grid-column: span 2;
}
.project-featured .project-image {
  aspect-ratio: 16/9;
}

/* ---- Output text overlay ---- */
.output-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(10,13,20,0.7) 0%, transparent 100%);
  color: #F8FAFC;
}
.output-overlay .project-name {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 1rem;
  font-weight: 500;
}
.output-overlay .project-location {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ---- Section transition polish ---- */
.section-transition {
  position: relative;
}
.section-transition::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(132, 204, 22, 0.08), transparent);
}

/* ---- Body text max-width refinement ---- */
.prose-body {
  max-width: 65ch;
}


/* ---- Mobile Nav Panel (fallback for pre-compiled CSS) ---- */
.mobile-nav-panel { background: #0A0D14; padding: 20px; }
.mobile-nav-panel a { display: block; color: #94A3B8; text-decoration: none; padding: 12px 0; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mobile-nav-panel a:hover { color: #84CC16; }
.mobile-nav-panel .nav-close { text-align: right; border: none; padding: 0 0 10px; display: block; }
.mobile-nav-panel .lang-toggle { margin-top: 16px; text-align: center; }
.mobile-nav-panel .lang-toggle span { font-size: 12px; color: #94A3B8; margin: 0 6px; }
.mobile-nav-panel .lang-toggle .active-lang { color: #84CC16; font-weight: 500; }

/* ---- Mobile Drawer (right slide-in) ---- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-out;
}
.drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 18rem;
  max-width: 85vw;
  z-index: 50;
  background: #0F172A;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.mobile-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.25rem 0.75rem;
}

.drawer-close-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 0.5rem;
  color: #94A3B8;
  cursor: pointer;
  transition: background 0.15s, color 0.2s;
  z-index: 60;
}
.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #84CC16;
}
.drawer-close-btn:focus-visible {
  outline: 2px solid #84CC16;
  outline-offset: 2px;
}

.drawer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 1.25rem;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.75rem;
  flex: 1;
}

.drawer-nav-link {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #E2E8F0;
  text-decoration: none;
  transition: background 0.15s, color 0.2s;
  position: relative;
}
.drawer-nav-link:hover {
  background: rgba(132, 204, 22, 0.08);
  color: #84CC16;
}
.drawer-nav-link:focus-visible {
  outline: 2px solid #84CC16;
  outline-offset: 2px;
}
.drawer-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 1rem;
  right: 1rem;
  height: 1.5px;
  background: #84CC16;
  transform: scaleX(0);
  transition: transform 0.2s ease-out;
}
.drawer-nav-link:hover::after {
  transform: scaleX(1);
}
.drawer-nav-link.active {
  color: #84CC16;
  background: rgba(132, 204, 22, 0.08);
}
.drawer-nav-link.active::after {
  transform: scaleX(1);
}

.drawer-spacer {
  flex: 1;
}

.drawer-lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.5rem;
}

.lang-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0.375rem;
  border: none;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-btn.active {
  color: #84CC16;
  background: rgba(132, 204, 22, 0.1);
}
.lang-btn:focus-visible {
  outline: 2px solid #84CC16;
  outline-offset: 2px;
}

.lang-sep {
  width: 1px;
  height: 1.25rem;
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   TOUCH-STATE OPTIMIZATIONS
   Hover/active/focus states for touch devices
   ============================================================ */

/* ---- Touch hover replacement: use active + brief highlight ---- */
@media (hover: none) and (pointer: coarse) {

  /* Card hover transforms become touch feedback */
  .card-hover:active {
    transform: scale(0.97);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  /* Nav link tap highlight */
  .drawer-nav-link:active {
    color: #84CC16;
    background: rgba(132, 204, 22, 0.08);
    padding: 0.25rem 1rem;
    border-radius: 4px;
  }

  /* Desktop nav link tap state */
  nav a:active,
  nav button:active {
    color: #84CC16;
    opacity: 0.7;
  }

  /* Button tap feedback */
  a[style*="background:#84CC16"]:active,
  .cta-button:active {
    transform: scale(0.96);
    opacity: 0.85;
  }

  /* Footer link tap */
  footer a:active {
    color: #F8FAFC;
    opacity: 0.7;
  }

  /* Client icon tap */
  .client-icon:active {
    opacity: 1;
    transform: scale(0.95);
  }

  /* Project card overlay tap */
  .card-hover:active .output-overlay {
    background: linear-gradient(to top, rgba(10,13,20,0.85) 0%, transparent 100%);
  }

  /* Social icon tap */
  .social-icon:active,
  footer [aria-label]:active svg {
    transform: scale(0.9);
  }
}

/* ---- Focus-visible ring for all interactive elements on touch ---- */
@media (pointer: coarse) {
  a:focus-visible,
  button:focus-visible {
    outline: 2px solid #84CC16;
    outline-offset: 2px;
    border-radius: 4px;
  }
}

/* ---- Desktop hover: distinct from touch active ---- */
@media (hover: hover) and (pointer: fine) {
  .card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.1);
  }
}


