/* 
   NITTI INTL - Premium E-Commerce Consulting Theme 
   Palette: Obsidian Blue, Cyber Violet, Sky Blue, Glass Aesthetics
*/

:root {
  --bg-body: #020617; /* Very dark slate, almost obsidian */
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-glass: rgba(15, 23, 42, 0.8);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  /* Premium Accents */
  --accent-primary: #38bdf8; /* Bright Neon Sky Blue */
  --accent-secondary: #8b5cf6; /* Cyber Violet */
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #8b5cf6 100%);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Subtle Atmospheric Mesh Background */
  background-image:
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.05), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.05), transparent 35%);
  background-attachment: fixed;
}

/* Typography & Utilities */
h1, h2, h3 {
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-weight: 800; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: var(--text-main);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.highlight-underline {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-color: rgba(56, 189, 248, 0.3);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: var(--text-main);
  color: #020617;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
  background: #e2e8f0;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--accent-primary);
  color: var(--text-main);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.logo span {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 140px;
  background: radial-gradient(circle at 50% -20%, rgba(139, 92, 246, 0.08) 0%, rgba(0, 0, 0, 0) 60%);
}

.hero-badge {
  display: block;
  width: fit-content;
  margin: 0 auto 24px;
  padding: 6px 14px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-secondary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: 5rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 400;
}

.emphasis-text {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 1.1em;
  letter-spacing: 0.5px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Glowing Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.2;
  animation: floatOrb 10s infinite ease-in-out alternate;
  pointer-events: none;
}

.orb-1 {
  width: 400px; height: 400px; background: var(--accent-primary);
  top: -100px; left: -150px;
}
.orb-2 {
  width: 500px; height: 500px; background: var(--accent-secondary);
  bottom: -200px; right: -150px;
  animation-delay: -5s;
}
.orb-3 {
  width: 300px; height: 300px; background: rgba(56, 189, 248, 0.4);
  top: 30%; left: 50%; transform: translateX(-50%);
  animation-duration: 15s;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1) translateX(0); }
  100% { transform: translateY(-30px) scale(1.1) translateX(30px); }
}

/* Interactive Graphic Dashboard Mockup */
.hero-graphic {
  margin-top: 60px;
  perspective: 1000px;
  transform-style: preserve-3d;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-mockup {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(56, 189, 248, 0.05);
  overflow: hidden;
  transform: rotateX(5deg) rotateY(0deg);
  transition: transform 0.1s ease-out;
}

.mockup-header {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 15px;
}

.dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #334155; }
.dot:nth-child(1) { background: #ef4444; }
.dot:nth-child(2) { background: #eab308; }
.dot:nth-child(3) { background: #22c55e; }

.mockup-title { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.5px; margin-left: auto; margin-right: auto; transform: translateX(-20px); }

.mockup-body {
  padding: 30px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.metric-name {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 140px;
  gap: 15px;
}

.bar {
  flex: 1;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 6px 6px 0 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bar:hover {
  background: rgba(139, 92, 246, 0.4);
  transform: scaleY(1.05);
}

.bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
}

/* Animations */
.animate-pop-in {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

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

/* Common Section */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 50px;
  text-align: center;
}

/* Service Grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card, .benefit-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.service-card:hover, .benefit-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.08);
}

.service-card h3, .benefit-card h3 {
  font-size: 1.4rem;
  margin: 20px 0 12px;
  color: var(--text-main);
}

.service-card p, .benefit-card p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.service-details {
  list-style: none;
}

.service-details li {
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-details i {
  color: var(--accent-primary);
}

.icon-box {
  width: 48px;
  height: 48px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Protocol / Autonomy Section */
.autonomy-section {
  padding: 100px 0;
  background: linear-gradient(180deg, #020617 0%, #060b1f 100%);
  border-top: 1px solid rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.autonomy-grid {
  display: flex;
  align-items: center;
  gap: 60px;
}

.autonomy-content { flex: 1.2; }
.autonomy-visual { flex: 0.8; }

.autonomy-badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-secondary);
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 24px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.autonomy-list {
  list-style: none;
  margin-top: 30px;
}

.autonomy-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.autonomy-list strong { color: var(--text-main); }
.autonomy-list i {
  color: var(--accent-secondary);
  min-width: 24px;
  margin-top: 2px;
}

/* Funnel Simulator & Utilities */
.sim-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  outline: none;
  border: none;
  margin-top: 5px;
  cursor: pointer;
}

.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  transition: transform 0.2s;
}

.sim-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.funnel-simulator {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(56, 189, 248, 0.05);
  overflow: hidden;
  max-width: 450px;
  margin: 0 auto;
}

.funnel-header {
  padding: 15px 25px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  position: relative;
  transition: background 0.3s;
}

.toggle-knob {
  width: 18px;
  height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.3s, background 0.3s;
}

.toggle-label.active {
  color: var(--accent-primary) !important;
}

.tilt-element {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Results / Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.result-card {
  background: var(--bg-card);
  padding: 40px 30px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: transform 0.3s;
}

.result-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.3);
}

.result-metric {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 10px;
  line-height: 1;
}

.result-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 15px;
}

.result-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Contact CTA */
.cta-box {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cta-box h2 {
  font-size: 3rem;
  margin-bottom: 15px;
}

.contact-form {
  max-width: 450px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
  outline: none;
}

textarea.form-control {
  height: 120px;
  resize: vertical;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(2, 6, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal-overlay.active {
  opacity: 1; pointer-events: all;
}

.modal-content {
  background: var(--bg-body);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 40px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: translateY(20px);
  transition: all 0.4s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.close-modal {
  position: absolute; top: 20px; right: 20px; color: var(--text-muted); cursor: pointer;
}

.close-modal:hover { color: var(--text-main); }

/* Chat Widget */
.chat-widget {
  position: fixed; bottom: 30px; right: 30px; z-index: 1500; font-family: var(--font-main);
}

.chat-toggle {
  width: 60px; height: 60px; background: var(--accent-gradient);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4); cursor: pointer; transition: transform 0.3s;
}

.chat-toggle:hover { transform: scale(1.05); }

.chat-window {
  position: absolute; bottom: 80px; right: 0; width: 340px; height: 480px;
  background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px; backdrop-filter: blur(20px); display: flex; flex-direction: column;
  overflow: hidden; opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: all 0.3s ease; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.chat-window.active {
  opacity: 1; transform: translateY(0); pointer-events: all;
}

.chat-header {
  padding: 16px 20px; background: rgba(0, 0, 0, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; gap: 12px;
}

.chat-messages {
  flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
}

.message {
  padding: 12px 16px; border-radius: 12px; font-size: 0.9rem; max-width: 85%;
}

.message.bot { background: rgba(255, 255, 255, 0.05); color: var(--text-main); align-self: flex-start; border-bottom-left-radius: 2px; }
.message.user { background: var(--accent-primary); color: #000; align-self: flex-end; border-bottom-right-radius: 2px; font-weight: 500; }

.chat-input-area {
  padding: 15px; border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; gap: 10px; background: rgba(0,0,0,0.2);
}
.chat-input-area input {
  flex: 1; background: transparent; border: none; color: #fff; font-family: inherit; font-size: 0.9rem; outline: none;
}

/* Responsive */
.mobile-menu-btn { display: none; cursor: pointer; z-index: 1100; }
.mobile-nav-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: rgba(2, 6, 23, 0.98); backdrop-filter: blur(20px); z-index: 2000;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.mobile-nav-overlay.active { opacity: 1; pointer-events: all; }
.close-mobile-nav { position: absolute; top: 30px; right: 24px; cursor: pointer; }
.mobile-nav-links { list-style: none; text-align: center; }
.mobile-nav-links li { margin: 30px 0; }
.mobile-nav-links a { color: #fff; font-size: 2rem; font-weight: 700; text-decoration: none; }

@media (max-width: 900px) {
  .autonomy-grid { flex-direction: column; }
  .autonomy-visual { margin-top: 30px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .calc-body { grid-template-columns: 1fr !important; gap: 30px !important; padding: 25px !important; }
}

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-menu-btn { display: block; }
  
  /* General Spacing Optimizations */
  .container { padding: 0 16px; width: 100%; max-width: 100vw; box-sizing: border-box; }
  .section { padding: 60px 0; max-width: 100vw; overflow: hidden; }
  .section-title { font-size: 2rem; margin-bottom: 30px; }

  /* Hero Optimizations */
  .hero { padding-top: 160px; min-height: auto; padding-bottom: 80px; width: 100%; max-width: 100vw; box-sizing: border-box; }
  .hero h1 { font-size: 2.3rem; word-wrap: break-word; }
  .hero p { font-size: 1.05rem; }
  .hero-buttons { flex-direction: column; width: 100%; gap: 12px; }
  .hero-buttons .btn { width: 100%; text-align: center; }
  
  /* Cards & Grids */
  .service-grid { grid-template-columns: 1fr; width: 100%; max-width: 100vw; box-sizing: border-box; }
  .service-card, .benefit-card { padding: 24px 20px; width: 100%; box-sizing: border-box; }
  .result-card { padding: 30px 20px; width: 100%; box-sizing: border-box; }
  
  /* Make Graphic Dashboard Stack on Mobile */
  .hero-graphic { margin-top: 40px; transform-style: flat; perspective: none; width: 100%; max-width: 100%; box-sizing: border-box; }
  .dashboard-mockup { transform: none !important; width: 100%; max-width: 100%; box-sizing: border-box; }
  .mockup-header { padding: 12px 16px; flex-wrap: wrap; }
  .mockup-body { padding: 20px 16px; }
  .metric-row { flex-direction: column; gap: 15px; margin-bottom: 25px; }
  .metric-item { flex-direction: row; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; flex-wrap: wrap; }
  .metric-val { font-size: 1.2rem; }
  .chart-bars { height: 100px; gap: 6px; }
  
  /* Funnel Simulator Mobile overrides */
  .funnel-simulator { width: 100%; max-width: 100%; box-sizing: border-box; }
  .funnel-header { padding: 15px 16px !important; flex-wrap: wrap; gap: 10px; justify-content: center; text-align: center; }
  .funnel-body { padding: 20px 16px !important; }
  .funnel-result { padding: 15px 16px !important; flex-wrap: wrap; }
  .funnel-stage { margin-bottom: 15px !important; word-wrap: break-word; }

  /* Optimize Ambient Orbs */
  .orb-1 { width: 200px; height: 200px; top: 0; left: -50px; filter: blur(50px); }
  .orb-2 { width: 250px; height: 250px; bottom: 0; right: -50px; filter: blur(50px); }
  .orb-3 { width: 150px; height: 150px; filter: blur(50px); top: 50%; }

  /* Scale Process Cards Down */
  .process-card { padding: 16px; margin-bottom: 15px; width: 100%; box-sizing: border-box; }
  .process-arrow { margin-bottom: 15px; }
  
  .cta-box { padding: 40px 20px; width: 100%; box-sizing: border-box; }
  .cta-box h2 { font-size: 2rem; word-wrap: break-word; letter-spacing: 0; }
  .contact-form { width: 100%; box-sizing: border-box; }
}