/* NLS HITECH NIAGA — Cinematic Parallax Direction
   Design tokens & shared components */

:root {
  /* Colors */
  --primary-900: #0f172a;
  --primary-800: #1e293b;
  --primary-700: #374151;
  --primary-600: #475569;
  --primary-100: #f1f5f9;
  --primary-50: #f8fafc;
  --accent-600: #2563eb;
  --accent-500: #3b82f6;
  --accent-400: #60a5fa;
  --accent-300: #93c5fd;
  --text-900: #0f172a;
  --text-700: #334155;
  --text-500: #64748b;
  --text-300: #cbd5e1;
  --white: #ffffff;
  --success: #16a34a;
  --error: #dc2626;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;

  /* Container */
  --container: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-900);
  background: var(--primary-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-16);
}
@media (max-width: 900px) { .container { padding: 0 var(--space-6); } }

/* ───── Typography ───── */
.display { font-size: clamp(40px, 5.5vw, 72px); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
.h2 { font-size: clamp(28px, 2.6vw, 36px); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.h3 { font-size: 24px; font-weight: 600; line-height: 1.3; }
.h4 { font-size: 20px; font-weight: 600; line-height: 1.4; }
.body-lg { font-size: 18px; line-height: 1.6; }
.body { font-size: 16px; line-height: 1.6; }
.body-sm { font-size: 14px; line-height: 1.5; color: var(--text-500); }
.label {
  font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent-400);
}

/* ───── Header ───── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: var(--space-4) 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.header.scrolled {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  padding: var(--space-3) 0;
}
.header-inner {
  display: flex; align-items: center; gap: var(--space-8);
  color: var(--white);
}
.brand { display: flex; align-items: center; gap: var(--space-3); font-weight: 700; }
.brand-mark {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
  border-radius: 8px;
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 14px; letter-spacing: -0.02em;
}
.brand-name { font-size: 15px; letter-spacing: 0.02em; line-height: 1.15; }
.brand-name small { display: block; font-size: 10px; font-weight: 500; color: var(--text-300); text-transform: uppercase; letter-spacing: 0.12em; }

.nav { display: flex; gap: var(--space-6); margin-left: auto; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--text-300);
  padding: 6px 2px; position: relative; transition: color 0.2s;
}
.nav a:hover, .nav a.active { color: var(--white); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--accent-500);
}

.header-contacts { display: flex; gap: var(--space-4); align-items: center; font-size: 13px; }
.header-contacts a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-300); }
.header-contacts a:hover { color: var(--white); }
.header-contacts svg { width: 14px; height: 14px; }

.lang-toggle {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid rgba(255,255,255,0.16); border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
}
.lang-toggle button {
  padding: 4px 10px; color: var(--text-300); border-radius: 999px;
  transition: all 0.2s;
}
.lang-toggle button.active { background: var(--accent-600); color: white; }

.hamburger { display: none; width: 36px; height: 36px; color: white; }

@media (max-width: 1080px) {
  .header-contacts { display: none; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .hamburger { display: grid; place-items: center; }
}

/* ───── Hero Parallax ───── */
.hero {
  position: relative; overflow: hidden;
  color: white;
  background: var(--primary-900);
  display: flex; align-items: flex-end;
  padding: var(--space-24) 0 var(--space-16);
}
.hero.full { min-height: 100vh; padding-top: 0; }
.hero.inner { min-height: 60vh; }

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.55) 0%, rgba(15,23,42,0.85) 70%, var(--primary-900) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-6); }
.hero-eyebrow .label { color: var(--accent-400); }
.hero-eyebrow .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.35); border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-300);
}

.hero h1 { max-width: 18ch; margin-bottom: var(--space-6); }
.hero p { max-width: 60ch; color: var(--text-300); font-size: 18px; }

.hero-meta {
  display: flex; gap: var(--space-8); flex-wrap: wrap;
  margin-top: var(--space-12); padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-meta-item { font-size: 12px; color: var(--text-300); letter-spacing: 0.06em; text-transform: uppercase; }
.hero-meta-item strong { display: block; color: white; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; margin-bottom: 2px; }

.scroll-cue {
  position: absolute; bottom: var(--space-8); left: 50%; transform: translateX(-50%);
  color: var(--text-300); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 3;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 36px;
  background: linear-gradient(180deg, var(--accent-400), transparent);
  animation: scrollCue 2s ease-in-out infinite;
}
@keyframes scrollCue {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 14px 24px; border-radius: 6px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent-600); color: white;
}
.btn-primary:hover { background: var(--accent-500); transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(37,99,235,0.6); }
.btn-ghost {
  background: transparent; color: white;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--accent-400); }
.btn-dark {
  background: var(--primary-900); color: white;
}
.btn-dark:hover { background: var(--primary-800); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ───── Sections ───── */
.section { padding: var(--space-24) 0; }
.section-dark { background: var(--primary-900); color: white; }
.section-slate { background: var(--primary-800); color: white; }
.section-light { background: var(--primary-50); }
.section-white { background: white; }

.section-head { margin-bottom: var(--space-12); max-width: 760px; }
.section-head .label { margin-bottom: var(--space-3); display: block; }
.section-head h2 { margin-bottom: var(--space-4); }
.section-head p { color: var(--text-500); font-size: 18px; }
.section-dark .section-head p, .section-slate .section-head p { color: var(--text-300); }

/* ───── Portfolio ───── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}
.portfolio-card {
  position: relative; overflow: hidden; border-radius: 4px;
  aspect-ratio: 4 / 3; cursor: pointer;
  background: var(--primary-800);
  transition: transform 0.4s ease;
}
.portfolio-card.wide { grid-column: span 8; aspect-ratio: 16 / 9; }
.portfolio-card.normal { grid-column: span 4; }
.portfolio-card.half { grid-column: span 6; aspect-ratio: 4 / 3; }
.portfolio-card.third { grid-column: span 4; aspect-ratio: 4 / 5; }
@media (max-width: 900px) {
  .portfolio-card { grid-column: span 12 !important; aspect-ratio: 4 / 3 !important; }
}

.portfolio-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.85);
}
.portfolio-card:hover img { transform: scale(1.06); filter: brightness(0.6); }
.portfolio-card-overlay {
  position: absolute; inset: 0;
  padding: var(--space-6);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, transparent 40%, rgba(15,23,42,0.85) 100%);
  color: white;
}
.portfolio-card-overlay .tag {
  align-self: flex-start;
  padding: 4px 10px;
  background: rgba(37,99,235,0.85); border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: var(--space-3);
  opacity: 0; transform: translateY(8px); transition: all 0.3s 0.05s;
}
.portfolio-card:hover .portfolio-card-overlay .tag { opacity: 1; transform: translateY(0); }
.portfolio-card-overlay h4 { margin-bottom: 4px; }
.portfolio-card-overlay .loc { font-size: 13px; color: var(--text-300); }
.portfolio-card-overlay .reveal {
  margin-top: var(--space-4); font-size: 13px; font-weight: 600;
  color: var(--accent-400); letter-spacing: 0.04em;
  opacity: 0; transform: translateY(8px); transition: all 0.3s 0.1s;
}
.portfolio-card:hover .reveal { opacity: 1; transform: translateY(0); }

/* ───── Stats ───── */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
@media (max-width: 760px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: var(--space-8) 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.stat-num {
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 700; line-height: 1; letter-spacing: -0.02em;
  color: white; margin-bottom: var(--space-3);
  font-feature-settings: "tnum";
}
.stat-num .accent { color: var(--accent-400); }
.stat-label { font-size: 13px; color: var(--text-300); letter-spacing: 0.06em; text-transform: uppercase; max-width: 22ch; }

/* ───── Service Cards ───── */
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  padding: var(--space-8);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  transition: all 0.3s;
  position: relative;
  min-height: 280px;
  display: flex; flex-direction: column;
}
.service-card:hover {
  border-color: var(--accent-500);
  background: rgba(37,99,235,0.06);
  box-shadow: 0 0 0 1px var(--accent-500), 0 30px 60px -30px rgba(37,99,235,0.5);
  transform: translateY(-4px);
}
.service-card .num {
  font-size: 12px; font-weight: 600; color: var(--accent-400);
  letter-spacing: 0.12em; margin-bottom: var(--space-6);
}
.service-card .icon {
  width: 48px; height: 48px; margin-bottom: var(--space-4);
  display: grid; place-items: center;
  color: var(--accent-400);
}
.service-card h3 { color: white; margin-bottom: var(--space-3); }
.service-card p { color: var(--text-300); font-size: 14px; flex: 1; }
.service-card .more {
  margin-top: var(--space-6); font-size: 13px; font-weight: 600;
  color: var(--accent-400); display: inline-flex; align-items: center; gap: 6px;
}

/* ───── CTA section ───── */
.cta-section {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 50%, #1e3a8a 100%);
  color: white;
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(96,165,250,0.18), transparent 50%);
}
.cta-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-16);
  align-items: center;
}
@media (max-width: 900px) { .cta-inner { grid-template-columns: 1fr; gap: var(--space-8); } }
.cta-section h2 { margin-bottom: var(--space-4); }
.cta-section p { color: var(--text-300); font-size: 18px; max-width: 50ch; }
.cta-contacts { display: flex; flex-direction: column; gap: var(--space-3); }
.cta-contact {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-6);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  transition: all 0.2s;
}
.cta-contact:hover { background: rgba(255,255,255,0.08); border-color: var(--accent-500); }
.cta-contact-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--accent-600); border-radius: 4px;
  display: grid; place-items: center; color: white;
}
.cta-contact-label { font-size: 11px; color: var(--text-300); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 2px; }
.cta-contact-value { font-size: 16px; font-weight: 600; color: white; }

/* ───── Footer ───── */
.footer {
  background: #0a0f1c; color: var(--text-300);
  padding: var(--space-24) 0 var(--space-8);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.footer h5 { color: white; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a:hover { color: white; }
.footer-tagline { max-width: 36ch; color: var(--text-500); margin-top: var(--space-4); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4);
  padding-top: var(--space-6); font-size: 12px; color: var(--text-500); letter-spacing: 0.04em;
}
.footer-bottom .lang-toggle { border-color: rgba(255,255,255,0.16); }

/* ───── Modal ───── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,0.85); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: var(--space-8);
  opacity: 0; transition: opacity 0.3s;
}
.modal-backdrop.open { display: flex; opacity: 1; }
.modal {
  background: var(--primary-800); color: white;
  max-width: 1080px; width: 100%; max-height: 90vh; overflow: auto;
  border-radius: 6px;
  display: grid; grid-template-columns: 1.5fr 1fr;
  position: relative;
}
@media (max-width: 800px) { .modal { grid-template-columns: 1fr; } }
.modal-img { aspect-ratio: 4 / 3; background: #000; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: var(--space-8); }
.modal-close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: white;
  display: grid; place-items: center; z-index: 2;
}
.modal-close:hover { background: var(--accent-600); }
.modal .tag { display: inline-block; padding: 4px 10px; background: var(--accent-600); border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--space-4); }

/* ───── Utilities ───── */
.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-up.in { opacity: 1; transform: translateY(0); }

.divider {
  height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  margin: var(--space-16) 0;
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--primary-900);
  display: none;
  flex-direction: column;
  padding: 100px var(--space-6) var(--space-6);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: var(--space-4) 0;
  font-size: 24px; font-weight: 600; color: white;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-menu-contacts {
  margin-top: auto; padding-top: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3); color: var(--text-300);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-bg { transform: none !important; }
}
