/* =========================================================
   NEXWIT — Studio site styles
   Design: dark, modern, glass-morphism, neon gradient accents
   ========================================================= */

:root {
  --bg: #0a0a0f;
  --bg-2: #0f0f17;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f8;
  --text-dim: #a8a8b8;
  --text-muted: #6f6f80;
  --accent-1: #00d4ff;
  --accent-2: #a855f7;
  --accent-3: #ec4899;
  --gradient: linear-gradient(135deg, #00d4ff 0%, #a855f7 50%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(168, 85, 247, 0.15));
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-1: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(168, 85, 247, 0.25);
  --max: 1200px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
a { color: inherit; text-decoration: none; transition: color 160ms ease, opacity 160ms ease; }
a:hover { color: #fff; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Background atmosphere ============ */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  animation: float 22s ease-in-out infinite;
}
.bg-blob-1 {
  width: 520px; height: 520px;
  background: #00d4ff;
  top: -180px; left: -120px;
  opacity: 0.28;
}
.bg-blob-2 {
  width: 620px; height: 620px;
  background: #a855f7;
  top: 40%; right: -200px;
  opacity: 0.22;
  animation-delay: -7s;
}
.bg-blob-3 {
  width: 480px; height: 480px;
  background: #ec4899;
  bottom: -160px; left: 30%;
  opacity: 0.18;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  padding: 0 24px;
  max-width: var(--max);
  margin: 0 auto;
  transition: backdrop-filter 200ms ease, background 200ms ease;
}
.nav.scrolled {
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gradient);
  transition: width 200ms ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-burger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn .arrow { transition: transform 200ms ease; display: inline-block; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  color: #fff;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  z-index: 1;
  padding: 96px 0 120px;
}
.hero-inner {
  max-width: 920px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  backdrop-filter: blur(10px);
}
.badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #00ff9c;
  box-shadow: 0 0 10px #00ff9c;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-dim);
  max-width: 640px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 8px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 720px;
  margin-top: 48px;
}
.stat {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============ Section primitives ============ */
section { position: relative; z-index: 1; }
.platforms, .services, .process, .why { padding: 96px 0; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-1);
  margin-bottom: 16px;
  font-weight: 600;
}
.section-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 760px;
}
.section-sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-dim);
  max-width: 640px;
}

/* ============ Platforms ============ */
.platform-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.platform-card {
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}
.platform-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.platform-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  color: var(--accent-1);
}
.platform-icon svg { width: 24px; height: 24px; }
.platform-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}
.platform-card p {
  font-size: 14px;
  color: var(--text-dim);
}

/* ============ Services ============ */
.service-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  position: relative;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(168, 85, 247, 0.18), transparent 50%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.service-card:hover::before { opacity: 1; }

.service-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-1);
  margin-bottom: 16px;
}
.service-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.service-card p {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 18px;
}
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list li {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ============ Process steps ============ */
.steps {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 28px; left: 6%; right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  padding: 28px 24px;
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}
.step-num {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gradient);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: var(--shadow-glow);
}
.step h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--text-dim);
}

/* ============ Why ============ */
.why-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.why-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: transform 220ms ease, border-color 220ms ease;
}
.why-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.why-icon {
  font-size: 28px;
  margin-bottom: 14px;
}
.why-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.why-card p {
  font-size: 14px;
  color: var(--text-dim);
}

/* ============ CTA ============ */
.cta { padding: 64px 0 96px; }
.cta-card {
  position: relative;
  padding: 64px 40px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.12), rgba(0, 212, 255, 0.06));
  border: 1px solid var(--border-strong);
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.18), transparent 40%);
  pointer-events: none;
}
.cta-card > * { position: relative; }
.cta-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 12px;
}
.cta-card p {
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 28px;
}
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ============ Footer ============ */
.footer {
  position: relative;
  z-index: 1;
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.6);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-tag {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 360px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--text); }

.footer-legal {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.company-meta {
  text-align: right;
  max-width: 70%;
}
.company-meta strong { color: var(--text-dim); font-weight: 600; }

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg-blob { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ Inner pages (contact / legal) ============ */
.page {
  position: relative;
  z-index: 1;
  padding: 80px 0 96px;
}
.page-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-sub {
  font-size: 18px;
  color: var(--text-dim);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.contact-single {
  max-width: 720px;
  margin: 0 auto;
}
.page-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}
.contact-info, .contact-form {
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}
.contact-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  margin-bottom: 8px;
  font-weight: 600;
}
.contact-info > p {
  color: var(--text-dim);
  margin-bottom: 28px;
}
.info-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.info-row:last-child { border-bottom: 1px solid var(--border); }
.info-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  flex-shrink: 0;
  color: var(--accent-1);
}
.info-icon svg { width: 18px; height: 18px; }
.info-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.info-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.info-value a:hover { color: var(--accent-1); }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 200ms ease, background 200ms ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-2);
  background: rgba(0, 0, 0, 0.45);
}
.form-group textarea {
  resize: vertical;
  min-height: 140px;
  font-family: inherit;
}
.form-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}

/* Legal page typography */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}
.legal-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.7;
}
.legal-content ul { padding-left: 22px; margin-bottom: 14px; }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content a {
  color: var(--accent-1);
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}
.legal-content a:hover { color: var(--text); border-color: var(--accent-1); }
.legal-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }

  .nav-links.mobile-open {
    display: flex;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    justify-content: flex-start;
    padding: 32px 24px;
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    gap: 20px;
    z-index: 40;
    border-top: 1px solid var(--border);
  }
  .nav-links.mobile-open a { font-size: 18px; }

  .hero { padding: 48px 0 80px; }
  .platforms, .services, .process, .why { padding: 64px 0; }

  .hero-stats { grid-template-columns: 1fr; }
  .platform-grid, .service-grid, .why-grid, .steps {
    grid-template-columns: 1fr;
  }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-legal { flex-direction: column; }
  .company-meta { text-align: left; max-width: 100%; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-info, .contact-form, .legal-content { padding: 24px; }
  .page-cta { flex-direction: column; align-items: stretch; }
  .page-cta .btn { width: 100%; }

  .cta-card { padding: 40px 24px; }
}

@media (max-width: 420px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}
