/* ================================================
   CUREVA — DESIGN SYSTEM
   Organic Intelligence — Premium Fluidity
   ================================================ */

/* ---------- PALETTE & TOKENS ---------- */
:root {
  /* Primary — Indigo */
  --primary: #4338ca;
  --primary-dark: #3730a3;
  --primary-light: #6366f1;
  --primary-soft: #e0e7ff;
  --primary-ghost: #eef2ff;

  /* Accent — Purple mesh tones */
  --accent: #7c3aed;
  --accent-dark: #6d28d9;
  --accent-soft: #ede9fe;

  /* Neutrals */
  --text-primary: #171717;
  --text-secondary: #404040;
  --text-muted: #737373;
  --text-light: #a3a3a3;

  /* Surfaces — warm cream-first approach */
  --bg-body: #fcfbf9;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-inset: #f5f5f0;
  --bg-hover: #f0eeeb;
  --bg-dark: #171717;

  /* Borders — subtle, never heavy */
  --border: #e5e5e5;
  --border-light: #ebebeb;
  --border-focus: var(--primary-light);

  /* Status — refined, softer */
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #2563eb;
  --info-soft: #dbeafe;

  /* Shadows — soft, colored blurs, NEVER harsh box-shadows */
  --shadow-xs: 0 1px 2px rgba(67, 56, 202, 0.03);
  --shadow-sm: 0 1px 4px rgba(67, 56, 202, 0.04);
  --shadow-md: 0 4px 20px rgba(67, 56, 202, 0.06);
  --shadow-lg: 0 8px 40px rgba(67, 56, 202, 0.08);
  --shadow-xl: 0 16px 56px rgba(67, 56, 202, 0.10);
  --shadow-card-hover: 0 20px 50px rgba(67, 56, 202, 0.10);
  --shadow-indigo-glow: 0 0 20px rgba(67, 56, 202, 0.15);

  /* Radii — generous, organic */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Transitions — Premium Ease ONLY */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.35s;
  --duration-slow: 0.6s;
  --duration-reveal: 1000ms;

  /* Typography families */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 15px;
  min-height: 100vh;
  font-weight: 400;
}

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

a:hover {
  color: var(--primary);
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: 3rem; line-height: 0.95; font-weight: 700; }
h2 { font-size: 2.25rem; line-height: 1.1; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

.muted {
  color: var(--text-muted);
  font-size: 13.5px;
  font-family: var(--font-sans);
}

/* ---------- MONOSPACE LABEL UTILITY ---------- */
.label-mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes premiumReveal {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes meshDrift {
  0% { transform: translate(-10%, -10%) rotate(0deg) scale(1); }
  33% { transform: translate(5%, -5%) rotate(120deg) scale(1.1); }
  66% { transform: translate(-5%, 5%) rotate(240deg) scale(0.95); }
  100% { transform: translate(-10%, -10%) rotate(360deg) scale(1); }
}

@keyframes btnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(67, 56, 202, 0.3); }
  50% { transform: scale(1.02); box-shadow: 0 0 20px rgba(67, 56, 202, 0.2); }
}

@keyframes statusPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.animate-fade-in {
  animation: fadeIn 0.5s var(--ease) both;
}

.animate-slide-up {
  animation: slideUp 0.6s var(--ease) both;
}

/* Scroll reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-reveal) var(--ease),
              transform var(--duration-reveal) var(--ease);
}

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

/* ---------- FORM ELEMENTS ---------- */
input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
textarea,
select {
  transition: all var(--duration) var(--ease);
  border-color: var(--border);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(67, 56, 202, 0.1);
}

input:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus),
select:hover:not(:disabled):not(:focus) {
  border-color: var(--border-focus);
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(67, 56, 202, 0.15);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(67, 56, 202, 0.3);
}
