:root {
  --primary: #020617;
  --primary-light: #0f172a;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --bg-dark: #020617;
  --bg-card: rgba(15, 23, 42, 0.4);
  --border: rgba(255, 255, 255, 0.06);
  --glass: rgba(15, 23, 42, 0.6);
  --gradient: linear-gradient(180deg, #020617 0%, #0f172a 100%);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --button-gradient: linear-gradient(135deg, #3730a3 0%, #6b21a8 100%);
  --glow: rgba(99, 102, 241, 0.2);
  --soft-shadow: 0 20px 40px -15px rgba(0,0,0,0.5);
  --radius: 1.5rem;
  --radius-pill: 3rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  margin: 0;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

section {
  padding: 8rem 0;
  position: relative;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0;
}

.title-xl { font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1.0; color: white; }
.title-lg { font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.1; color: white; }
.title-md { font-size: clamp(1.5rem, 5vw, 2.5rem); color: white; }

h1.title-xl {
  letter-spacing: -0.05em;
}

p {
  line-height: 1.6;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding-bottom: 0.1em; /* Prevent clipping */
}

/* Layout */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--button-gradient);
  color: white;
  border: none;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
  background-size: 200% auto;
}

.btn-primary:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 20px 35px -10px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.badge-pill {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--accent);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
  transform: translateY(-5px);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(99, 102, 241, 0.08), transparent 40%);
  pointer-events: none;
}

/* Problem Card Refinement */
.problem-card {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  text-align: left;
  transition: all 0.4s ease;
}

.problem-card:hover {
  border-color: rgba(255,255,255,0.1);
  background: rgba(15, 23, 42, 0.5);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

@media (max-width: 1024px) {
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .problem-grid { 
    grid-template-columns: 1fr; 
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .problem-grid { 
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .problem-card {
    padding: 2rem 1.5rem;
  }
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.float-slow {
  animation: float 6s ease-in-out infinite;
}

.soft-glow-wrap {
  position: relative;
}

.soft-glow-wrap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: var(--glow-color, var(--accent));
  filter: blur(80px);
  opacity: 0.35;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.glass-card, .cta-box {
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.glass-card:hover, .cta-box:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2) !important;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  opacity: 0;
  animation: fadeInUp 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* Response Grid Refinement */
@media (max-width: 1024px) {
  section { padding: 6rem 0; }
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  section { padding: 4rem 0; }
  .glass-card { padding: 1.5rem; }
  section { padding-bottom: 8.5rem !important; }
}

@media (max-width: 480px) {
  .btn { width: 100%; padding: 0.75rem 1.5rem; }
  .title-xl { font-size: 2.25rem !important; }
  .title-lg { font-size: 1.85rem !important; }
}

/* Utilities */
.mobile-hidden {
  @media (max-width: 768px) {
    display: none !important;
  }
}

.desktop-hidden {
  @media (min-width: 769px) {
    display: none !important;
  }
}

/* Background Elements */
.bg-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  pointer-events: none;
}

.bg-grid-mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, var(--bg-dark) 80%);
  z-index: -1;
  pointer-events: none;
}

/* BRAND BADGE */
.brand-badge {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.brand-badge:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: #6366f1;
    transform: translateY(-2px);
}

.brand-badge-icon {
    width: 24px;
    height: 24px;
    background: #6366f1;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.7rem;
}

.brand-badge-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.brand-badge:hover .brand-badge-text {
    color: var(--text-main);
}

.brand-badge-accent {
    color: #6366f1;
    font-weight: 700;
}

@media (max-width: 768px) {
    .brand-badge {
        bottom: 0.75rem;
        left: 0.75rem;
        padding: 0.3rem 0.6rem;
        gap: 0.4rem;
        transform: scale(0.85);
        transform-origin: bottom left;
        background: rgba(0, 0, 0, 0.85);
    }

    .brand-badge-icon {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
    }

    .brand-badge-text {
        font-size: 0.65rem;
    }
}
