/* ============================================================
   NIXLIGHT TECHNOLOGY LIMITED — Cosmic AI Website Stylesheet
   ============================================================ */

/* ──────────────────────────────────────────────────────────
   CSS Custom Properties
   ────────────────────────────────────────────────────────── */
:root {
  --color-bg:            #020510;
  --color-bg-2:          #050a1e;
  --color-primary:       #00c8ff;
  --color-secondary:     #7b3fff;
  --color-text:          #dce8ff;
  --color-text-muted:    #5a6a8a;
  --color-border:        rgba(0, 200, 255, 0.14);
  --color-border-hover:  rgba(0, 200, 255, 0.40);
  --font-sans:           'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --transition:          0.3s ease;
  --nav-height:          72px;
  --max-width:           1100px;
}

/* ──────────────────────────────────────────────────────────
   Reset & Base
   ────────────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  overflow-x: hidden;
}

a { color: inherit; }

/* ──────────────────────────────────────────────────────────
   Starfield Canvas
   ────────────────────────────────────────────────────────── */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Subtle tech grid overlay on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

/* ──────────────────────────────────────────────────────────
   Navigation
   ────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: rgba(2, 5, 16, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--color-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 58px;
  max-width: 300px;
  width: auto;
  display: block;
  object-fit: contain;
  /* Keep the SVG crisp and visible against the dark nav */
  filter: brightness(1.05);
  transition: opacity 0.25s ease;
}

.logo:hover .logo-img {
  opacity: 0.85;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  color: rgba(220, 232, 255, 0.65);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color var(--transition), text-shadow var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(0, 200, 255, 0.55);
}

/* Language switch */
.lang-switch {
  background: transparent;
  border: 1px solid var(--color-border);
  color: rgba(220, 232, 255, 0.65);
  padding: 0.32rem 0.9rem;
  border-radius: 20px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.lang-switch:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.2);
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ──────────────────────────────────────────────────────────
   Section Base
   ────────────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 9rem 2rem 5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid rgba(0, 200, 255, 0.35);
  padding: 0.38rem 1.1rem;
  border-radius: 20px;
  margin-bottom: 1.8rem;
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.1);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 3rem;
  color: #fff;
}

/* ──────────────────────────────────────────────────────────
   Hero Section
   ────────────────────────────────────────────────────────── */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* Nebula glows */
.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::before {
  width: 70vmax;
  height: 70vmax;
  top: -30%;
  left: -20%;
  background: radial-gradient(ellipse at center, rgba(0, 80, 220, 0.07) 0%, transparent 65%);
  animation: nebulaDrift 24s ease-in-out infinite alternate;
}

.hero-section::after {
  width: 55vmax;
  height: 55vmax;
  bottom: -25%;
  right: -15%;
  background: radial-gradient(ellipse at center, rgba(123, 63, 255, 0.07) 0%, transparent 65%);
  animation: nebulaDrift 18s ease-in-out infinite alternate-reverse;
}

@keyframes nebulaDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(4%, 3%) scale(1.08); }
}

/* Central energy orb */
.hero-orb {
  position: absolute;
  width: min(420px, 60vw);
  height: min(420px, 60vw);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%,
    rgba(0, 200, 255, 0.12) 0%,
    rgba(123, 63, 255, 0.08) 45%,
    transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbPulse 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes orbPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.65; }
  50%       { transform: translate(-50%, -50%) scale(1.18); opacity: 1;    }
}

/* Orbit rings */
.hero-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  pointer-events: none;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: orbitSpin linear infinite;
}

.orbit-1 { width: 360px; height: 360px; border: 1px solid rgba(0, 200, 255, 0.12); animation-duration: 18s; }
.orbit-2 { width: 580px; height: 580px; border: 1px solid rgba(123, 63, 255, 0.08); animation-duration: 28s; animation-direction: reverse; }
.orbit-3 { width: 820px; height: 820px; border: 1px solid rgba(0, 200, 255, 0.05); animation-duration: 44s; }

@keyframes orbitSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.orbit-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary), 0 0 22px rgba(0, 200, 255, 0.5);
}

.orbit-2 .orbit-dot {
  background: var(--color-secondary);
  box-shadow: 0 0 10px var(--color-secondary), 0 0 22px rgba(123, 63, 255, 0.5);
}

.orbit-3 .orbit-dot { display: none; }

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  animation: fadeInUp 1s ease both;
}

.hero-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(0, 200, 255, 0.06);
  border: 1px solid rgba(0, 200, 255, 0.3);
  padding: 0.5rem 1.6rem;
  border-radius: 30px;
  margin-bottom: 2.5rem;
  animation: pulseBorder 3.5s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 200, 255, 0.1); }
  50%       { box-shadow: 0 0 28px rgba(0, 200, 255, 0.35), 0 0 60px rgba(0, 200, 255, 0.1); }
}

.hero-title {
  font-size: clamp(2.8rem, 8.5vw, 5.8rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1.6rem;
  letter-spacing: -0.02em;
}

.title-line { display: block; color: #fff; }

.title-line.accent {
  color: var(--color-primary);
  animation: textGlow 5s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { text-shadow: 0 0 25px rgba(0, 200, 255, 0.45), 0 0 50px rgba(0, 200, 255, 0.2); }
  to   { text-shadow: 0 0 50px rgba(0, 200, 255, 0.85), 0 0 100px rgba(0, 200, 255, 0.4), 0 0 150px rgba(0, 200, 255, 0.1); }
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-muted);
  margin: 0 auto 3rem;
  max-width: 580px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.9rem 2.3rem;
  border-radius: 30px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  font-family: inherit;
  font-weight: 600;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00b8e8, var(--color-secondary));
  color: #fff;
  box-shadow: 0 4px 22px rgba(0, 200, 255, 0.28);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(0, 200, 255, 0.45), 0 0 60px rgba(123, 63, 255, 0.18);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid rgba(0, 200, 255, 0.45);
}

.btn-outline:hover {
  background: rgba(0, 200, 255, 0.07);
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(0, 200, 255, 0.2);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  z-index: 2;
  animation: fadeInUp 1.8s ease 0.6s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--color-primary));
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

/* ──────────────────────────────────────────────────────────
   About Section
   ────────────────────────────────────────────────────────── */
.about-section {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(4, 8, 28, 0.92) 15%,
    rgba(4, 8, 28, 0.92) 85%,
    transparent 100%);
}

.about-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(123, 63, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4.5rem;
  margin-bottom: 4.5rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: rgba(220, 232, 255, 0.7);
  font-size: 0.975rem;
}

.about-lead {
  font-size: 1.15rem !important;
  color: var(--color-text) !important;
  font-weight: 500;
  line-height: 1.7;
}

/* Pillars */
.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.pillar {
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(0, 200, 255, 0.025);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-primary) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.pillar:hover { border-color: var(--color-border-hover); background: rgba(0, 200, 255, 0.05); transform: translateX(6px); }
.pillar:hover::before { opacity: 1; }

.pillar-icon {
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
  display: inline-block;
  animation: iconPulse 3.5s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { text-shadow: 0 0 8px rgba(0, 200, 255, 0.45); }
  50%       { text-shadow: 0 0 22px rgba(0, 200, 255, 0.9), 0 0 45px rgba(0, 200, 255, 0.35); }
}

.pillar h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

.pillar p {
  font-size: 0.835rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Tagline quote */
.about-tagline {
  text-align: center;
  padding: 3.5rem 1rem;
  border-top: 1px solid var(--color-border);
}

.about-tagline blockquote { border: none; padding: 0; }

.quote-text {
  font-size: clamp(1.1rem, 2.3vw, 1.55rem);
  color: rgba(220, 232, 255, 0.55);
  font-style: italic;
  line-height: 1.65;
}

/* ──────────────────────────────────────────────────────────
   Contact Section
   ────────────────────────────────────────────────────────── */
.contact-section {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 5, 16, 0.98) 25%);
}

.contact-section .section-container {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-sub {
  max-width: 580px;
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.85;
  margin-bottom: 3.5rem;
}

.contact-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 3rem 4.5rem;
  background: rgba(0, 200, 255, 0.025);
  overflow: hidden;
  transition: all 0.4s ease;
  margin-bottom: 3rem;
}

.contact-card:hover {
  border-color: var(--color-border-hover);
  background: rgba(0, 200, 255, 0.045);
  box-shadow: 0 0 50px rgba(0, 200, 255, 0.09);
}

.contact-glow {
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.14) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 4.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.35); }
}

.contact-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: clamp(1.2rem, 3vw, 1.85rem);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all var(--transition);
}

.contact-email:hover {
  text-shadow: 0 0 22px rgba(0, 200, 255, 0.75);
  transform: scale(1.03);
}

.email-icon {
  font-size: 1.4rem;
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.contact-hint {
  margin-top: 1.1rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}

/* Footer */
.footer {
  width: 100%;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-top: auto;
}

/* ──────────────────────────────────────────────────────────
   Scroll Reveal Animations
   ────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.34s; }
.reveal-delay-4 { transition-delay: 0.46s; }

/* ──────────────────────────────────────────────────────────
   Responsive — Tablet
   ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ──────────────────────────────────────────────────────────
   Responsive — Mobile
   ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(2, 5, 16, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.6rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links.open { display: flex; }

  .orbit-1 { width: 220px; height: 220px; }
  .orbit-2 { width: 360px; height: 360px; }
  .orbit-3 { width: 500px; height: 500px; }

  .contact-card { padding: 2.2rem 1.8rem; }

  .section-container { padding-top: 7rem; }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}
