/* ===== COSMOS TECH — Guangzhou Jiu Xing Technology Co., Ltd. ===== */
/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #050510;
  --bg-alt: #0A0A1A;
  --surface: #0F0F2E;
  --text: #FFFFFF;
  --secondary: #A0A0C0;
  --muted: #606080;
  --nebula-pink: #FF69B4;
  --nebula-blue: #4169E1;
  --nebula-purple: #7B68EE;
  --gold: #FFD700;
  --border: #1A1A3E;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { color: var(--secondary); margin-bottom: 1rem; }
a { color: var(--nebula-blue); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--nebula-pink); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--nebula-purple);
  margin-bottom: 0.75rem;
}

/* ===== STAR FIELD BACKGROUND ===== */
.star-field {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: var(--text);
  border-radius: 50%;
  animation: twinkle var(--twinkle-duration, 3s) ease-in-out infinite;
  animation-delay: var(--twinkle-delay, 0s);
  opacity: var(--star-opacity, 0.6);
}

@keyframes twinkle {
  0%, 100% { opacity: var(--star-opacity, 0.6); }
  50% { opacity: 0.15; }
}

/* ===== NEBULA GLOW ===== */
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* ===== UTILITY ===== */
.glow-text {
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3), 0 0 80px rgba(123, 104, 238, 0.2);
}

.section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.site-header.scrolled {
  background: rgba(5, 5, 16, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

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

.nav-links a {
  color: var(--secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s;
}

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

.nav-cta {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, var(--nebula-pink), var(--nebula-purple));
  color: var(--text) !important;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: opacity 0.3s, transform 0.3s;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem;
  overflow: hidden;
}

.hero .nebula {
  width: 600px;
  height: 600px;
  top: -10%;
  right: -15%;
  background: radial-gradient(circle, var(--nebula-pink), var(--nebula-purple) 40%, transparent 70%);
}

.hero .nebula-2 {
  width: 400px;
  height: 400px;
  bottom: -5%;
  left: -10%;
  background: radial-gradient(circle, var(--nebula-blue), var(--nebula-purple) 40%, transparent 70%);
  opacity: 0.25;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  background: rgba(15, 15, 46, 0.6);
  backdrop-filter: blur(8px);
}

.hero-badge .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nebula-pink);
  margin-right: 0.5rem;
  vertical-align: middle;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 105, 180, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(255, 105, 180, 0); }
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--nebula-pink), var(--nebula-purple), var(--nebula-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(255, 105, 180, 0.4);
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--secondary);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

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

.btn-primary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--nebula-pink), var(--nebula-purple));
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 105, 180, 0.35);
  color: var(--text);
  opacity: 0.95;
}

.btn-outline {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--nebula-purple);
  background: rgba(123, 104, 238, 0.08);
  color: var(--text);
}

/* ===== SERVICES ===== */
.services {
  background: var(--bg-alt);
  position: relative;
}

.services .nebula {
  width: 500px;
  height: 500px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(123, 104, 238, 0.15), transparent 70%);
  opacity: 0.5;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.service-card.card-pink::before {
  background: linear-gradient(90deg, var(--nebula-pink), transparent);
}

.service-card.card-blue::before {
  background: linear-gradient(90deg, var(--nebula-blue), transparent);
}

.service-card.card-purple::before {
  background: linear-gradient(90deg, var(--nebula-purple), transparent);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 40px rgba(123, 104, 238, 0.15);
  border-color: var(--nebula-purple);
}

.service-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.card-pink .card-icon { background: rgba(255, 105, 180, 0.12); color: var(--nebula-pink); }
.card-blue .card-icon { background: rgba(65, 105, 225, 0.12); color: var(--nebula-blue); }
.card-purple .card-icon { background: rgba(123, 104, 238, 0.12); color: var(--nebula-purple); }

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ===== ABOUT ===== */
.about {
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-quote {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.about-quote mark {
  background: linear-gradient(135deg, var(--nebula-pink), var(--nebula-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-text {
  font-size: 1.0625rem;
  color: var(--secondary);
  line-height: 1.8;
}

.about-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cosmic-ring {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid var(--border);
  position: relative;
}

.cosmic-ring::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  animation: rotate-slow 60s linear infinite;
}

.cosmic-ring::after {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(123, 104, 238, 0.2);
}

.orbit-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nebula-pink);
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--nebula-pink);
  animation: orbit 8s linear infinite;
}

.orbit-dot-2 {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nebula-blue);
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--nebula-blue);
  animation: orbit 8s linear infinite;
  animation-delay: -4s;
}

@keyframes orbit {
  0% { transform: rotate(0deg) translateX(150px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== METRICS ===== */
.metrics {
  background: var(--bg-alt);
  position: relative;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.metric-item {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.3s, border-color 0.3s;
}

.metric-item:hover {
  transform: translateY(-4px);
  border-color: var(--nebula-purple);
}

.metric-star {
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  background: linear-gradient(180deg, var(--text) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

/* ===== PROCESS ===== */
.process {
  position: relative;
}

.process-header {
  text-align: center;
  margin-bottom: 4rem;
}

.process-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  right: -1rem;
  width: calc(100% - 2rem);
  height: 0;
  border-top: 1px dashed var(--border);
  z-index: 0;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 2px solid;
}

.step-1 .step-number { border-color: var(--nebula-pink); color: var(--nebula-pink); }
.step-2 .step-number { border-color: var(--nebula-blue); color: var(--nebula-blue); }
.step-3 .step-number { border-color: var(--nebula-purple); color: var(--nebula-purple); }
.step-4 .step-number { border-color: var(--gold); color: var(--gold); }

.process-step h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ===== TAGS / CONSTELLATION ===== */
.tags-section {
  padding: 4rem 0;
  position: relative;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.tag {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--secondary);
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface);
  transition: color 0.3s, border-color 0.3s;
}

.tag:hover {
  color: var(--text);
  border-color: var(--nebula-purple);
}

.tag-dot {
  color: var(--nebula-pink);
  margin: 0 0.25rem;
  font-size: 0.5rem;
  vertical-align: middle;
}

/* ===== CTA ===== */
.cta-section {
  position: relative;
  padding: 8rem 0;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(15, 15, 46, 0.8) 50%, var(--bg) 100%);
}

.cta-section .nebula {
  width: 700px;
  height: 700px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 105, 180, 0.2) 0%, rgba(123, 104, 238, 0.15) 40%, transparent 70%);
  opacity: 0.6;
}

.cta-section .nebula-2 {
  width: 500px;
  height: 500px;
  top: 30%;
  right: -10%;
  background: radial-gradient(circle, rgba(65, 105, 225, 0.15), transparent 70%);
  opacity: 0.3;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 3rem;
  margin-bottom: 1.25rem;
}

.cta-content p {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 1rem;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* ===== LEGAL PAGES ===== */
.legal-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
}

.legal-hero h1 {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
}

.legal-hero .legal-date {
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
  position: relative;
  z-index: 1;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.legal-content p {
  font-size: 1rem;
  color: var(--secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.legal-content ul {
  color: var(--secondary);
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.legal-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .process-orbit { grid-template-columns: repeat(2, 1fr); }
  .process-step:nth-child(2)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .process-orbit { grid-template-columns: 1fr; }
  .process-step::after { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 5, 16, 0.98);
    backdrop-filter: blur(16px);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

  .nav-links.active { display: flex; }
  .mobile-toggle { display: flex; }

  .hero h1 { font-size: 2.25rem; }
  .cta-content h2 { font-size: 2rem; }
  .about-quote { font-size: 1.5rem; }

  section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline { width: 100%; text-align: center; }
}
