/* ============================================================
   KASHI AI — Design System
   ============================================================ */

:root {
  /* Backgrounds */
  --bg-0: #050507;
  --bg-1: #0A0812;
  --surface: #11101A;
  --card-bg: #171521;

  /* Text */
  --text-1: #F8FAFC;
  --text-2: #D1D5DB;
  --text-3: #9CA3AF;

  /* Brand */
  --purple: #7B00FF;
  --violet: #9D00FF;
  --soft-purple: #A855F7;
  --magenta: #D946EF;
  --pink: #EC4899;
  --orange: #FF6B00;
  --gold: #FFB800;
  /* legacy aliases kept so existing rules resolve */
  --indigo: #9D00FF;
  --blue: #D946EF;
  --cyan: #D946EF;   /* repurposed neon accent → magenta glow */

  --grad: linear-gradient(135deg, #7B00FF 0%, #A855F7 30%, #D946EF 55%, #FF6B00 85%, #FFB800 100%);
  --grad-btn: linear-gradient(90deg, #7B00FF, #D946EF, #FF6B00);
  --grad-text: linear-gradient(120deg, #C77DFF 0%, #D946EF 38%, #FF7A3D 78%, #FFB800 100%);

  /* Glass / borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.05);
  --glass: rgba(255, 255, 255, 0.03);
  --card: rgba(255, 255, 255, 0.02);

  /* Glows (intensity scaled by --glow on body) */
  --glow: 1;
  --glow-purple: rgba(123, 0, 255, 0.45);
  --glow-magenta: rgba(217, 70, 239, 0.35);
  --glow-orange: rgba(255, 107, 0, 0.35);
  --glow-gold: rgba(255, 184, 0, 0.25);
  --glow-blue: rgba(217, 70, 239, 0.35);
  --glow-cyan: rgba(255, 107, 0, 0.30);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  /* Layout */
  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fixed shader canvas behind everything */
#shader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
/* Vignette + grain over the shader for depth */
#bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, transparent 40%, rgba(5,5,7,0.55) 100%),
    radial-gradient(100% 60% at 50% 110%, transparent 50%, rgba(5,5,7,0.85) 100%);
}
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  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: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 75%);
}

main { position: relative; z-index: 2; }

/* ============================================================
   Typography
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--text-1);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); letter-spacing: -0.02em; }

.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; font-style: italic; }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--text-2);
  line-height: 1.55;
  max-width: 60ch;
}
.muted { color: var(--text-3); }

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
section { position: relative; padding-block: clamp(80px, 12vh, 150px); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vh, 72px); }
.section-head h2 { margin-top: 18px; }
.section-head .lead { margin-top: 20px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
              background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  color: #fff;
  background: var(--grad-btn);
  box-shadow: 0 8px 30px rgba(123,0,255,0.45),
              0 4px 18px rgba(255,107,0,0.22),
              inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 48px rgba(123,0,255,0.6), 0 6px 26px rgba(217,70,239,0.35),
              0 0 0 1px rgba(255,255,255,0.06),
              inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-ghost {
  color: var(--text-1);
  background: var(--glass);
  border-color: var(--border);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

/* ============================================================
   Cards / glass
   ============================================================ */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
}
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(20px);
  border-radius: var(--radius);
}

/* Pill chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--glass);
  font-size: 0.85rem;
  color: var(--text-2);
  backdrop-filter: blur(12px);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
