/* styles.css */
:root{
  --ka-primary:#4E2686;
  --ka-accent:#FAE14D;
  --ka-bg:#ffffff;
  --ka-muted:#f5f6fa;
  --ka-ink:#0f172a;
}

html { scroll-behavior: smooth; }

body{
  font-family: Inter, Helvetica, Arial, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ka-ink);
  background: var(--ka-bg);
}

/* Headings use Poppins (loaded via Google Fonts in HTML) */
h1,h2,h3,h4,h5,h6,.font-heading{
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
}

/* Optional helper classes (works alongside Tailwind) */
.bg-brand{ background: var(--ka-primary); }
.text-brand{ color: var(--ka-primary); }
.border-brand{ border-color: var(--ka-primary); }

.bg-accent{ background: var(--ka-accent); }
.text-accent{ color: var(--ka-accent); }
.border-accent{ border-color: var(--ka-accent); }
/* Tailwind custom color fallback (for bg-primary/text-primary usage in HTML) */
.bg-primary{ background: var(--ka-primary) !important; }
.text-primary{ color: var(--ka-primary) !important; }
.border-primary{ border-color: var(--ka-primary) !important; }

.bg-accent{ background: var(--ka-accent) !important; }
.text-accent{ color: var(--ka-accent) !important; }
.border-accent{ border-color: var(--ka-accent) !important; }

/* Cleaner focus outline for accessibility */
:focus-visible{
  outline: 3px solid rgba(250,225,77,0.9);
  outline-offset: 2px;
}


/* Opacity helpers (fallback for Tailwind bg-primary/10 etc.) */
.bg-primary-10{ background-color: rgba(78,38,134,0.10) !important; }
.bg-primary-15{ background-color: rgba(78,38,134,0.15) !important; }
.bg-accent-10{ background-color: rgba(250,225,77,0.10) !important; }

.font-body{ font-family: Inter, Helvetica, Arial, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

/* ------------------------------
   Premium Dark Mode (global fallback)
   ------------------------------ */
html.dark body{
  background: #020617;
  color: #e2e8f0;
}

html.dark .text-slate-900{ color:#e2e8f0 !important; }
html.dark .text-slate-700{ color:#cbd5e1 !important; }
html.dark .text-slate-600{ color:#94a3b8 !important; }
html.dark .text-slate-500{ color:#94a3b8 !important; }

html.dark .bg-white{ background-color: rgba(255,255,255,0.06) !important; }
html.dark .bg-slate-50{ background-color: rgba(255,255,255,0.06) !important; }
html.dark .border-slate-100{ border-color: rgba(255,255,255,0.10) !important; }
html.dark .border-slate-200{ border-color: rgba(255,255,255,0.12) !important; }

/* Scroll reveal helpers (JS toggles opacity/translate classes) */
.ka-reveal{
  will-change: transform, opacity;
}

/* ------------------------------------------------------------
   Premium "card" system (global) — consistent 3D border + hover
   Use by adding class: ka-card
   Works in both light + dark mode.
------------------------------------------------------------ */

.ka-card{
  position: relative;
  isolation: isolate;
  border-radius: 1rem; /* matches rounded-2xl vibe */
  border: 1px solid transparent;
  border-color: transparent !important; /* neutralize any Tailwind border colors (we draw our own stroke) */
  /* More "3D" depth even before hover */
  box-shadow:
    0 1px 0 rgba(255,255,255,0.55),
    0 12px 44px -14px rgba(15,23,42,0.14);
  transform: translateZ(0);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), box-shadow 300ms cubic-bezier(.2,.8,.2,1), border-color 300ms ease;
}

/* Gradient border (stroke) + subtle outline (the look you pointed in the screenshot) */
.ka-card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px; /* stroke thickness (thicker + premium) */
  background: linear-gradient(90deg,
    rgba(78,38,134,.35),
    rgba(250,225,77,.65),
    rgba(78,38,134,.35)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .92;
  z-index: 0;
}
.ka-card::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  /* subtle bevel to feel "raised" */
  box-shadow:
    inset 0 0 0 1px rgba(15,23,42,0.10),
    inset 0 1px 0 rgba(255,255,255,0.75),
    inset 0 -1px 0 rgba(15,23,42,0.06);
  pointer-events: none;
  z-index: 0;
}
.ka-card > *{
  position: relative;
  z-index: 1;
}

.ka-card:hover{
  transform: translateY(-10px) scale(1.01);
  box-shadow:
    0 0 0 1px rgba(78,38,134,0.18),
    0 0 22px rgba(78, 38, 134, 0.26),
    0 22px 72px -36px rgba(0,0,0,0.38);
  border-color: rgba(78, 38, 134, 0.28);
}

.ka-card:hover::before{ opacity: 1; }

.ka-card:focus-within{
  box-shadow: 0 0 0 4px rgba(250,225,77,0.35), 0 0 20px rgba(78, 38, 134, 0.25), 0 18px 60px -30px rgba(0,0,0,0.35);
}

html.dark .ka-card{
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06),
    0 22px 78px -50px rgba(0,0,0,0.88);
}

html.dark .ka-card::before{
  background: linear-gradient(90deg,
    rgba(78,38,134,.55),
    rgba(250,225,77,.35),
    rgba(78,38,134,.55)
  );
  opacity: .84;
}
html.dark .ka-card::after{
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.10),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.35);
}

html.dark .ka-card:hover{
  box-shadow:
    0 0 0 1px rgba(250,225,77,0.10),
    0 0 18px rgba(250, 225, 77, 0.18),
    0 0 28px rgba(78, 38, 134, 0.26),
    0 30px 96px -62px rgba(0,0,0,0.92);
  border-color: rgba(250, 225, 77, 0.16);
}

/* Scroll reveal (auto-applied via JS). Keeps the page feeling alive without changing layout. */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: var(--ka-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Ensure common Tailwind text utilities remain readable inside ka-card in dark mode */
html.dark .ka-card .text-slate-900{ color: rgb(241 245 249) !important; }
html.dark .ka-card .text-slate-800{ color: rgb(241 245 249) !important; }
html.dark .ka-card .text-slate-700{ color: rgb(226 232 240) !important; }
html.dark .ka-card .text-slate-600{ color: rgb(203 213 225) !important; }
html.dark .ka-card .text-slate-500{ color: rgb(148 163 184) !important; }

/* Better dark-mode inputs across the whole site (no markup changes needed) */
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.dark select,
html.dark textarea{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.92);
}
html.dark input::placeholder,
html.dark textarea::placeholder{
  color: rgba(255,255,255,0.55);
}

@media (prefers-reduced-motion: reduce){
  .ka-card{ transition: none !important; }
  .ka-card:hover{ transform: none !important; }
  .reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
}


