:root {
  color-scheme: dark;
  /* Base Colors */
  --bg-primary: #020308;
  --bg-secondary: #0a0c16;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  /* Text Colors */
  --text-primary: #f2f2f7;
  --text-secondary: #a0a2ad;
  --text-muted: #6b6d7c;
  
  /* Accents - Refined Gradients */
  --accent-primary: #ff6b6b;
  --accent-secondary: #4ecdc4;
  --gradient-primary: linear-gradient(135deg, #ff6b6b, #ffa502);
  --gradient-cool: linear-gradient(135deg, #4ecdc4, #556270);
  --gradient-glow: radial-gradient(circle at center, rgba(255, 107, 107, 0.15), transparent 70%);
  
  /* UI Elements */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.15);
  
  /* Spacing & Layout */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  
  --container-width: 1200px;
  --header-height: 80px;
  
  /* Effects */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.4);
  --blur-md: blur(12px);
  
  --transition-base: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* Layout */
.page {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

/* --- Header Refactor --- */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: var(--container-width);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  
  background: rgba(10, 12, 22, 0.6);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-smooth);
}

.site-header.scrolled {
  top: 1rem;
  height: 64px;
  background: rgba(10, 12, 22, 0.85);
  box-shadow: var(--shadow-md);
  border-color: var(--border-highlight);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.logo span {
  color: var(--accent-primary);
}

.site-nav {
  display: none;
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.site-nav a {
    font-size: 0.95rem;
    font-weight: 500;
  color: var(--text-secondary);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  transition: var(--transition-base);
  letter-spacing: -0.01em;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn--ghost {
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn--secondary {
  color: var(--text-secondary);
  font-weight: 500;
}

.btn--secondary:hover {
  color: var(--text-primary);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(255, 165, 2, 0.03), transparent 40%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -25%;
  left: -15%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 165, 2, 0.25), rgba(255, 107, 107, 0.1), transparent 65%);
  filter: blur(90px);
  opacity: 0.9;
  z-index: -1;
  animation: float 14s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: -10%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.15), transparent 70%);
  filter: blur(80px);
  opacity: 0.7;
  z-index: -1;
  animation: float 18s ease-in-out infinite reverse;
}

.hero__content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero h1 span {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 4rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: auto;
}

.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(4px);
}

.stat-card h3 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  background: linear-gradient(to bottom, #fff, #aaa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Partners Marquee --- */
.partners {
  margin-bottom: 8rem;
  text-align: center;
}

.partners p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.partners__marquee {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 4rem;
  opacity: 0.6;
}

.partners__marquee span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Sections Generic --- */
.section {
  padding: 6rem 0;
  position: relative;
}

.section__header {
  margin-bottom: 4rem;
  max-width: 600px;
}

.section__header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.section__header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* --- Services Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
}

.icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  display: grid;
  place-items: center;
}

.icon--amber { background: linear-gradient(135deg, #ffd166, #ff9f43); box-shadow: 0 8px 24px rgba(255, 209, 102, 0.2); }
.icon--aqua { background: linear-gradient(135deg, #4bd5ff, #2bcbba); box-shadow: 0 8px 24px rgba(75, 213, 255, 0.2); }
.icon--gradient { background: var(--gradient-primary); box-shadow: 0 8px 24px rgba(255, 107, 107, 0.2); }

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.service-card ul {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.service-card li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.service-card li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* --- Split Section --- */
.section--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.ambient-card {
  position: relative;
  padding: 3rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.ambient-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at top right, rgba(78, 205, 196, 0.2), transparent 70%);
  filter: blur(40px);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.pill-list span {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.02);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- CTA / Contact --- */
.cta {
  background: linear-gradient(180deg, var(--bg-card), transparent);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 4rem;
  margin-bottom: 4rem;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-form label span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.contact-form .full {
  grid-column: 1 / -1;
}

.form-feedback {
  grid-column: 1 / -1;
  min-height: 24px;
  font-size: 0.9rem;
  color: var(--accent-secondary);
}

/* --- Footer --- */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a:hover {
  color: var(--text-primary);
}

/* --- Animations --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    justify-content: space-between;
    padding: 0 1rem;
  }

  .section--split {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    grid-template-columns: 1fr;
  }
  
  .site-footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .cta {
    padding: 2rem;
  }
}
