/* ============================================================
   PurplePulse AI — Global Stylesheet
   Aesthetic: Dark luxury tech with crystalline purple accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── CSS Variables ── */
:root {
  --bg: #07060f;
  --bg-2: #0d0b1a;
  --bg-card: #110f20;
  --bg-card-2: #16132b;
  --border: rgba(140, 90, 255, 0.15);
  --border-bright: rgba(140, 90, 255, 0.4);
  --purple-deep: #4a0fa3;
  --purple: #7c3aed;
  --purple-mid: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-glow: rgba(124, 58, 237, 0.3);
  --accent: #c084fc;
  --accent-pink: #e879f9;
  --text: #f0ecff;
  --text-muted: #8b85a8;
  --text-dim: #4e4a6b;
  --white: #ffffff;
  --gradient-main: linear-gradient(135deg, #7c3aed 0%, #c084fc 50%, #e879f9 100%);
  --gradient-dark: linear-gradient(180deg, #07060f 0%, #0d0b1a 100%);
  --shadow-glow: 0 0 60px rgba(124, 58, 237, 0.25), 0 0 120px rgba(124, 58, 237, 0.1);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(140, 90, 255, 0.1) inset;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h: 80px;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(124, 58, 237, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(192, 132, 252, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

p { color: var(--text-muted); font-size: 1.05rem; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; z-index: 1; }

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

.nav.scrolled {
  background: rgba(7, 6, 15, 0.85);
  backdrop-filter: blur(20px);
  border-color: var(--border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--gradient-main);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px var(--purple-glow);
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-main);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(7, 6, 15, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--white); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-main);
  color: var(--white);
  box-shadow: 0 0 30px var(--purple-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 40px rgba(124, 58, 237, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  color: var(--white);
  border-color: var(--purple-mid);
  background: rgba(124, 58, 237, 0.1);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

.btn-outline {
  background: transparent;
  color: var(--purple-light);
  border: 1px solid var(--border-bright);
}
.btn-outline:hover {
  background: rgba(124, 58, 237, 0.15);
  color: var(--white);
}

/* ── Pill / Tag ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border-bright);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.08);
}

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── Section Labels ── */
.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 16px;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 30px rgba(124, 58, 237, 0.1);
}

/* ── Icon Blocks ── */
.icon-block {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  flex-shrink: 0;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
  margin: 80px 0;
}

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

.section-sm {
  padding: 60px 0;
}

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Text gradient ── */
.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glow line ── */
.glow-line {
  height: 1px;
  background: var(--gradient-main);
  box-shadow: 0 0 20px var(--purple-glow);
  margin: 0;
}

/* ── Footer ── */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
  position: relative;
  z-index: 1;
}

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

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

.footer-col h5 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-family: var(--font-display);
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fade-up {
  animation: fadeUp 0.7s ease both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── Form elements ── */
input, textarea, select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus {
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }
textarea { resize: vertical; min-height: 130px; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* ── Noise overlay ── */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
