/* ═══════════════════════════════════════════════════
   ROOT & RESET
═══════════════════════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg-dark: #020509;
  --surface: #0a111a;
  --card-bg: rgba(13, 22, 35, 0.6);
  --border: #1c2c42;
  --nexora-blue: #0066ff;
  --nexora-cyan: #00e5ff;
  --text-main: #f0f5fa;
  --text-muted: #7d93b3;
}
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
.code-font { font-family: 'Fira Code', monospace; }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--nexora-cyan); }

/* ── Language Toggle ── */
.lang-toggle {
  display: flex; gap: 0;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  background: var(--surface);
}
.lang-btn {
  padding: 6px 14px; font-family: 'Fira Code', monospace;
  font-size: 0.7rem; letter-spacing: 0.1em;
  background: transparent; color: var(--text-muted);
  border: none; cursor: none; transition: all 0.3s;
}
.lang-btn.active { background: var(--nexora-cyan); color: #000; font-weight: 700; }

span[data-id], div[data-id], p[data-id], h3[data-id] { display: none; }
span[data-id].active, div[data-id].active, p[data-id].active, h3[data-id].active { display: block; }
span[data-id].active { display: inline; }

/* ── Header & Nav ── */
header {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 20px 5%;
  background: rgba(2, 5, 9, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(28, 44, 66, 0.5);
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* ── Brand Unit ── */
.brand-unit {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; cursor: none;
}
.brand-icon {
  height: 35px; width: auto;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.2));
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.brand-text-group { display: flex; flex-direction: column; justify-content: center; }
.brand-name {
  font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 1.6rem;
  letter-spacing: 0.05em; line-height: 1;
  background: linear-gradient(110deg, #ffffff 10%, var(--nexora-cyan) 50%, #ffffff 90%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}
.brand-sub {
  font-family: 'Fira Code', monospace; font-size: 0.6rem; font-weight: 600;
  color: var(--nexora-blue); letter-spacing: 0.4em; text-transform: uppercase;
  margin-top: 2px; transition: color 0.3s;
}

.brand-unit:hover .brand-icon { transform: scale(1.1) rotate(5deg); filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.6)); }
.brand-unit:hover .brand-sub { color: var(--nexora-cyan); }
@keyframes shine { to { background-position: 200% center; } }

.header-controls { display: flex; align-items: center; gap: 35px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; font-family: 'Fira Code', monospace;
  transition: all 0.3s; cursor: none;
}
.nav-links a:hover { color: var(--nexora-cyan); text-shadow: 0 0 10px rgba(0,229,255,0.4); }
.nav-links a.active-nav { color: var(--nexora-cyan); text-shadow: 0 0 10px rgba(0,229,255,0.35); }

/* ── Hamburger & Mobile Nav ── */
.hamburger { display: none; width: 44px; height: 40px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: none; position: relative; }
.hamburger-lines,
.hamburger-lines::before,
.hamburger-lines::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  transform: translateX(-50%);
  transition: transform 0.25s ease, top 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}
.hamburger-lines { top: 50%; transform: translate(-50%, -50%); }
.hamburger-lines::before { top: -6px; }
.hamburger-lines::after { top: 6px; }
.hamburger[aria-expanded="true"] .hamburger-lines { background: transparent; }
.hamburger[aria-expanded="true"] .hamburger-lines::before { top: 0; transform: translateX(-50%) rotate(45deg); background: var(--nexora-cyan); }
.hamburger[aria-expanded="true"] .hamburger-lines::after { top: 0; transform: translateX(-50%) rotate(-45deg); background: var(--nexora-cyan); }
.hamburger:hover { border-color: var(--nexora-cyan); }
.hamburger:hover .hamburger-lines,
.hamburger:hover .hamburger-lines::before,
.hamburger:hover .hamburger-lines::after { background: var(--nexora-cyan); }
.hamburger[aria-expanded="true"]:hover .hamburger-lines { background: transparent; }

.mobile-nav {
  position: fixed;
  top: 86px;
  right: 5%;
  width: min(320px, calc(100% - 10%));
  background: rgba(10, 17, 26, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 1100;
  box-shadow: 0 15px 40px rgba(0, 229, 255, 0.08);
}
.mobile-nav a {
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-family: 'Fira Code', monospace;
  cursor: none;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.mobile-nav a:hover { border-color: rgba(0, 229, 255, 0.35); background: rgba(0, 229, 255, 0.05); }
.mobile-nav a.active-nav { border-color: rgba(0, 229, 255, 0.55); background: rgba(0, 229, 255, 0.06); }
.mobile-nav.open { display: flex; }

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 9, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1050;
}

/* ── Hero Section ── */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 0 5%; position: relative;
}
.hero::before {
  content: ''; position: absolute; top: 10%; right: 5%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.15) 0%, transparent 70%);
  pointer-events: none; filter: blur(40px);
}
.hero-tag {
  display: inline-block; padding: 8px 16px;
  background: rgba(0, 229, 255, 0.05); border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--nexora-cyan); font-family: 'Fira Code', monospace;
  font-size: 0.8rem; border-radius: 50px; margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}
.hero h1 { font-size: clamp(3rem, 7vw, 5rem); line-height: 1.05; margin-bottom: 24px; font-weight: 900; }
.hero h1 span { background: linear-gradient(90deg, var(--nexora-cyan), var(--nexora-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.2rem; color: var(--text-muted); max-width: 650px; margin-bottom: 40px; font-weight: 300; }
.typewriter {
  overflow: hidden; white-space: nowrap; border-right: 2px solid var(--nexora-cyan);
  animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--nexora-cyan); } }

.hero-subline { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 40px; }
.hero-cta { display: flex; gap: 15px; }

/* ── Services Grid ── */
section { padding: 120px 5%; position: relative; }
.section-title { font-size: 2.5rem; margin-bottom: 10px; color: var(--text-main); display: flex; align-items: center; gap: 15px; font-weight: 700; }
.section-title::before { content: '/>'; color: var(--nexora-cyan); font-family: 'Fira Code', monospace; font-size: 2rem;}
.section-subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 60px; font-weight: 300;}

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 30px; }

.card {
  background: var(--card-bg); backdrop-filter: blur(10px); border: 1px solid var(--border);
  padding: 40px 35px; border-radius: 12px; transition: all 0.4s ease;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-8px); border-color: var(--nexora-cyan); box-shadow: 0 15px 40px rgba(0, 229, 255, 0.08); }
.card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--nexora-cyan), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.card:hover::before { opacity: 1; }

.card-icon {
  font-size: 2.2rem; margin-bottom: 25px; display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; background: rgba(0, 229, 255, 0.05); border: 1px solid rgba(0, 229, 255, 0.1); border-radius: 12px;
  color: var(--nexora-cyan);
}
.card-title { font-size: 1.5rem; color: var(--text-main); margin-bottom: 15px; font-weight: 700;}
.card-desc { font-size: 1rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 30px; flex-grow: 1; font-weight: 300;}
.card-price { font-family: 'Fira Code', monospace; font-size: 1.1rem; color: var(--nexora-cyan); display: block; margin-top: auto; border-top: 1px dashed var(--border); padding-top: 20px; font-weight: 600; }

/* ── Data Loading ── */
.loading-row { display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.loading-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--nexora-cyan);
  box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.55);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.55); opacity: 0.9; }
  70% { box-shadow: 0 0 0 16px rgba(0, 229, 255, 0); opacity: 1; }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); opacity: 0.9; }
}

/* ── CTA & Socials ── */
.cta-box {
  background: linear-gradient(135deg, rgba(0,102,255,0.05) 0%, rgba(0,229,255,0.02) 100%);
  border: 1px solid rgba(0, 229, 255, 0.3); padding: 80px 5%; text-align: center;
  border-radius: 16px; position: relative; overflow: hidden;
}
.btn {
  display: inline-block; padding: 16px 36px; background: var(--nexora-blue); color: #fff;
  font-family: 'Fira Code', monospace; font-weight: 600; text-decoration: none; cursor: none;
  border-radius: 6px; transition: all 0.3s; margin-top: 20px; letter-spacing: 0.05em;
}
.btn:hover { background: var(--nexora-cyan); color: #000; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,229,255,0.4); }

.cta-title { font-size: 2.2rem; margin-bottom: 15px; }
.cta-desc { color: var(--text-muted); margin-bottom: 20px; }
.contact-section { padding-bottom: 50px; }

.social-grid { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 50px; }
.social-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 8px; text-decoration: none; color: var(--text-main);
  font-family: 'Fira Code', monospace; font-size: 0.9rem; font-weight: 500; transition: all 0.3s; cursor: none;
}
.social-card:hover { border-color: var(--nexora-cyan); background: rgba(0, 229, 255, 0.05); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 229, 255, 0.15); }
.social-icon { font-size: 1.3rem; }

.site-footer { text-align: center; padding: 30px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }

/* ── Custom Cursor ── */
.cursor{ position:fixed;width:8px;height:8px; background:var(--nexora-cyan);border-radius:50%; pointer-events:none;z-index:9999; transform:translate(-50%,-50%); transition:transform .1s,width .2s,height .2s,background .2s; }
.cursor-ring{ position:fixed;width:40px;height:40px; border:1px solid rgba(0, 229, 255, 0.4);border-radius:50%; pointer-events:none;z-index:9998; transform:translate(-50%,-50%); transition:transform .15s ease-out,width .3s,height .3s, border-color .3s; }
body:has(a:hover) .cursor, body:has(button:hover) .cursor {width:18px;height:18px;background:var(--nexora-cyan)}
body:has(a:hover) .cursor-ring, body:has(button:hover) .cursor-ring {width:60px;height:60px; border-color: var(--nexora-cyan); background: rgba(0,229,255,0.05);}

/* ═══════════════════════════════════════════════════
   NEXORA AI TERMINAL GREETING (UPDATED: MINIMIZE LOGIC)
═══════════════════════════════════════════════════ */
.ai-terminal {
  position: fixed; bottom: 30px; right: 30px; width: 340px;
  background: rgba(10, 17, 26, 0.85); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 8px;
  z-index: 1001; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(40px) scale(0.95); pointer-events: none;
}
.ai-terminal.visible {
  opacity: 1; transform: translateY(0) scale(1);
  border-color: rgba(0, 229, 255, 0.4); box-shadow: 0 15px 40px rgba(0, 229, 255, 0.1);
  pointer-events: auto;
}

/* STATE MINIMIZED */
.ai-terminal.minimized {
  transform: translateY(calc(100% - 40px));
  opacity: 0.8;
  border-color: var(--border);
  box-shadow: none;
}
.ai-terminal.minimized:hover {
  transform: translateY(calc(100% - 46px));
  opacity: 1;
  border-color: var(--nexora-cyan);
}

.terminal-header {
  background: rgba(2, 5, 9, 0.9); padding: 10px 15px;
  border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.terminal-header:hover { background: rgba(13, 22, 35, 0.9); }

.header-left { display: flex; align-items: center; gap: 12px; }
.terminal-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-title { color: var(--text-muted); font-size: 0.7rem; letter-spacing: 0.1em; }

.terminal-toggle {
  color: var(--text-muted); font-weight: bold; font-size: 1rem;
  line-height: 1; transition: color 0.3s;
}
.terminal-header:hover .terminal-toggle { color: var(--nexora-cyan); }

.terminal-body {
  padding: 15px; color: var(--text-main); font-size: 0.85rem;
  line-height: 1.6; min-height: 100px;
}
.terminal-body p { margin-bottom: 6px; word-wrap: break-word; }
.term-success { color: var(--nexora-cyan); text-shadow: 0 0 8px rgba(0, 229, 255, 0.2); }
.term-info { color: var(--text-muted); }
.term-white { color: #ffffff; }
.terminal-cursor {
  display: inline-block; width: 8px; height: 15px;
  background-color: var(--nexora-cyan); vertical-align: middle;
  margin-left: 5px; animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 990px) {
  .header-controls { gap: 15px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 3rem; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .ai-terminal { width: calc(100% - 40px); bottom: 20px; right: 20px; left: 20px; }
}
