/* ============================================================
   Design tokens — dark theme is the default; light is the override
   ============================================================ */
:root {
  color-scheme: dark;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-sans);

  /* Surfaces & text (dark, default) */
  --color-bg: #0a0d18;
  --color-bg-tint: #0e1322;
  --color-surface: #131829;
  --color-surface-alt: #1a2036;
  --color-border: #262e47;
  --color-border-strong: #384263;
  --color-text: #f1f3fa;
  --color-text-muted: #a9b1c9;
  --color-text-faint: #717a96;

  /* Brand — vivid indigo → violet, with bright teal/pink accents used deliberately */
  --color-brand: #6e83ff;
  --color-brand-dark: #5267e8;
  --color-brand-light: #97a6ff;
  --color-violet: #a06bff;
  --color-pink: #ff5fc4;
  --color-accent: #2fe0c4;
  --color-accent-dark: #16b89f;
  --color-amber: #ffb13d;

  --color-brand-tint: rgba(110, 131, 255, 0.14);
  --color-accent-tint: rgba(47, 224, 196, 0.14);

  --color-success: #3fd17f;
  --color-success-bg: rgba(63, 209, 127, 0.14);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #6e83ff 0%, #a06bff 55%, #ff5fc4 120%);
  --gradient-brand-2: linear-gradient(135deg, #6e83ff 0%, #a06bff 100%);
  --gradient-accent: linear-gradient(135deg, #2fe0c4 0%, #6e83ff 100%);
  --gradient-amber: linear-gradient(135deg, #ffd166 0%, #ff8a3d 100%);
  --gradient-text: linear-gradient(110deg, #8ea0ff 0%, #c2a3ff 45%, #ff8fdb 90%);

  --gradient-mesh:
    radial-gradient(ellipse 55% 50% at 10% 0%, rgba(110, 131, 255, 0.30), transparent 60%),
    radial-gradient(ellipse 50% 45% at 95% 8%, rgba(160, 107, 255, 0.07), transparent 58%),
    radial-gradient(ellipse 60% 55% at 50% 105%, rgba(47, 224, 196, 0.16), transparent 60%);

  --grid-overlay: linear-gradient(rgba(110, 131, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 131, 255, 0.08) 1px, transparent 1px);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  --glow-brand: 0 0 0 1px rgba(110, 131, 255, 0.25), 0 8px 28px rgba(110, 131, 255, 0.35);
  --glow-brand-lg: 0 0 0 1px rgba(110, 131, 255, 0.3), 0 16px 44px rgba(110, 131, 255, 0.45);
  --glow-accent: 0 8px 26px rgba(47, 224, 196, 0.3);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-pill: 999px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;

  --container-max: 1200px;
  --transition-fast: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Light theme override ---------- */
[data-theme="light"] {
  color-scheme: light;

  --color-bg: #e2e6ee;
  --color-bg-tint: #eaeefc;
  --color-surface: #ffffff;
  --color-surface-alt: #e6e9f1;
  --color-border: #dde1eb;
  --color-border-strong: #c5cbdc;
  --color-text: #161b27;
  --color-text-muted: #555e72;
  --color-text-faint: #8a92a6;

  --color-brand: #4f63e0;
  --color-brand-dark: #3a4cc4;
  --color-brand-light: #7484ec;
  --color-violet: #8a5cf0;
  --color-pink: #e23fae;
  --color-accent: #0fa890;
  --color-accent-dark: #0c8d78;
  --color-amber: #e08a1a;

  --color-brand-tint: #eaeefb;
  --color-accent-tint: #e6f7f3;

  --color-success: #1d8a55;
  --color-success-bg: #e8f8ef;

  --gradient-brand: linear-gradient(135deg, #4f63e0 0%, #8a5cf0 55%, #e23fae 120%);
  --gradient-brand-2: linear-gradient(135deg, #4f63e0 0%, #8a5cf0 100%);
  --gradient-accent: linear-gradient(135deg, #0fa890 0%, #4f63e0 100%);
  --gradient-amber: linear-gradient(135deg, #ffb13d 0%, #e0701a 100%);
  --gradient-text: linear-gradient(110deg, #4f63e0 0%, #8a5cf0 45%, #e23fae 90%);

  --gradient-mesh:
    radial-gradient(ellipse 55% 50% at 10% 0%, rgba(79, 99, 224, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 45% at 95% 8%, rgba(138, 92, 240, 0.13), transparent 58%),
    radial-gradient(ellipse 60% 55% at 50% 105%, rgba(15, 168, 144, 0.18), transparent 60%);

  --grid-overlay: linear-gradient(rgba(79, 99, 224, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 99, 224, 0.09) 1px, transparent 1px);

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.08);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.12);
  --shadow-md: 0 8px 20px rgba(16, 24, 40, 0.13);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, 0.18);
  --glow-brand: 0 0 0 1px rgba(79, 99, 224, 0.16), 0 8px 22px rgba(79, 99, 224, 0.22);
  --glow-brand-lg: 0 0 0 1px rgba(79, 99, 224, 0.2), 0 14px 36px rgba(79, 99, 224, 0.28);
  --glow-accent: 0 8px 22px rgba(15, 168, 144, 0.22);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  background-image: radial-gradient(ellipse 90% 50% at 50% -10%, var(--color-bg-tint), transparent 70%);
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-base), color var(--transition-base);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-brand-light);
}

[data-theme="light"] a:hover {
  color: var(--color-brand-dark);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

h3 { font-size: 1.32rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.96rem; }

p {
  margin: 0 0 var(--space-4);
  color: var(--color-text-muted);
}

ul {
  margin: 0;
  padding: 0;
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-strong), transparent);
  margin: var(--space-6) 0;
}

::selection {
  background: color-mix(in srgb, var(--color-brand) 35%, transparent);
  color: #fff;
}

/* Gradient text utility */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: var(--space-3);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient-brand);
}

/* ---------- Decorative keyframes ---------- */
@keyframes float-blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-26px, 34px) scale(1.08); }
}

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

@keyframes glow-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------- Scroll reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

  .reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
