@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Sora:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --neon-green: #00FF41;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-body);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

.font-display {
  font-family: var(--font-display);
}

*:focus-visible {
  outline: 2px solid var(--neon-green);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--neon-green);
  outline-offset: 4px;
}

button, a, input, textarea {
  transition: all 0.2s ease-in-out;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Page loader */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#page-loader img {
  height: 3rem;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Scroll progress */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--neon-green);
  z-index: 100;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

/* Back to top */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: var(--neon-green);
  color: #000;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 255, 65, 0.3);
}

#back-to-top.visible { display: flex; }

/* Navbar scrolled state */
nav.nav-scrolled {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Mobile menu */
#mobile-menu {
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}

#mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
}

#mobile-overlay {
  display: none;
}

#mobile-overlay.open {
  display: block;
}

/* Language dropdown */
.lang-dropdown { display: none; }
.lang-dropdown.open { display: block; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Counter */
.counter-value { font-variant-numeric: tabular-nums; }

/* Cookie banner */
#cookie-banner {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s;
}

#cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Hero scroll indicator */
@keyframes bounce-y {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(10px); opacity: 1; }
}

.scroll-indicator { animation: bounce-y 2s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* Tech tabs */
.tech-panel {
  display: none;
  opacity: 0;
}
.tech-panel.active {
  display: block;
  animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Route views */
.route-view { display: none; }
.route-view.active { display: block; }

/* Snap scroll (Why Nipro section mobile) */
.snap-x {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.snap-center {
  scroll-snap-align: center;
}

/* Anchor scroll offset for fixed navbar */
[id] {
  scroll-margin-top: 80px;
}

/* Staggered reveal for grid children */
.grid > .reveal:nth-child(1) { transition-delay: 0s; }
.grid > .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid > .reveal:nth-child(3) { transition-delay: 0.16s; }
.grid > .reveal:nth-child(4) { transition-delay: 0.24s; }
.grid > .reveal:nth-child(5) { transition-delay: 0.32s; }
.grid > .reveal:nth-child(6) { transition-delay: 0.4s; }

/* Industry/service card hover lift */
.group {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* 404 */
.not-found-404 {
  font-size: clamp(8rem, 20vw, 17.5rem);
  line-height: 1;
  font-weight: 700;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}
