/*
 * ec-design.css — Shared design system for Review My Prep
 * Premium UI tokens, components, and utilities
 */

/* ══════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════ */
:root {
  /* Core palette */
  --bg: #F7F9FD;
  --white: #fff;
  --navy: #0C1829;
  --navy2: #162236;
  --navy3: #1E2D45;
  --accent: #2F80D8;
  --accent2: #8CC5F1;
  --accent-bg: #EDF5FF;
  --green: #1A8754;
  --green-bg: #E9F7EF;
  --red: #C0392B;
  --red-bg: #FDEDEC;
  --blue: #2C6FBF;
  --blue-bg: #EBF3FB;
  --purple: #7B42B0;
  --purple-bg: #F3EBF9;
  --text: #1C1C1C;
  --text2: #4A4A4A;
  --text3: #888;
  --border: #E5E2DC;

  /* Typography */
  --f: 'Comfortaa', sans-serif;
  --fs: 'Comfortaa', sans-serif;

  /* Spacing tokens */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius */
  --r: 14px;
  --rl: 20px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 40px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.06), 0 24px 64px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.08), 0 40px 96px rgba(0, 0, 0, 0.14);
  --shadow-accent: 0 4px 24px rgba(217, 123, 26, 0.25);
  --shadow-navy: 0 8px 32px rgba(12, 24, 41, 0.25);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D0CCC4; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #B0ACA4; }
* { scrollbar-width: thin; scrollbar-color: #D0CCC4 transparent; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */

/* Primary */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  color: white;
  border: none;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--f);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-navy);
  letter-spacing: -0.1px;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(12, 24, 41, 0.35);
  background: linear-gradient(135deg, var(--navy2) 0%, var(--navy3) 100%);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Accent / CTA */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: white;
  border: none;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--f);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-accent);
}
.btn-accent:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(217, 123, 26, 0.4);
}
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Ghost */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  background: transparent;
  color: var(--text2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--f);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}

/* Text button */
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--f);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-text:hover { gap: 10px; }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(217, 123, 26, 0.25);
}

.card-elevated {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.card-dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%);
  border-radius: var(--rl);
  padding: 32px;
  color: white;
  position: relative;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   FORMS / INPUTS
══════════════════════════════════════════ */
.input-premium {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 15px;
  font-family: var(--f);
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-premium:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12, 24, 41, 0.07);
}
.input-premium::placeholder {
  color: #B8B4AE;
  font-size: 14px;
}
.input-premium.error { border-color: var(--red); }

/* ══════════════════════════════════════════
   BADGES / PILLS
══════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.badge-accent { background: var(--accent-bg); color: var(--accent); }
.badge-navy { background: rgba(12,24,41,0.08); color: var(--navy); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-ghost {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.18);
}

/* ══════════════════════════════════════════
   NAVIGATION — FROSTED GLASS
══════════════════════════════════════════ */
.nav-frosted {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229, 226, 220, 0.7);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
}

/* ══════════════════════════════════════════
   MODALS / OVERLAYS
══════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 41, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  padding: 24px;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  background: var(--white);
  border-radius: 28px;
  padding: 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform 0.35s var(--ease-spring);
  position: relative;
}
.modal-backdrop.open .modal-sheet {
  transform: translateY(0);
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

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

.fade-in {
  opacity: 0;
  animation: fadeIn 0.4s var(--ease) forwards;
}

.slide-up {
  opacity: 0;
  animation: slideUp 0.5s var(--ease) forwards;
}

.slide-up-1 { animation-delay: 0.05s; }
.slide-up-2 { animation-delay: 0.10s; }
.slide-up-3 { animation-delay: 0.15s; }
.slide-up-4 { animation-delay: 0.20s; }
.slide-up-5 { animation-delay: 0.25s; }

/* ══════════════════════════════════════════
   SECTION LABELS
══════════════════════════════════════════ */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════
   GRADIENT TEXT
══════════════════════════════════════════ */
.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════
   PROGRESS BAR
══════════════════════════════════════════ */
.progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.5s var(--ease);
}

/* ══════════════════════════════════════════
   RESPONSIVE UTILITIES
══════════════════════════════════════════ */
.hide-mobile { display: block; }
.show-mobile { display: none; }

@media (max-width: 600px) {
  .hide-mobile { display: none; }
  .show-mobile { display: block; }
}

/* ══════════════════════════════════════════
   DECORATIVE PATTERNS
══════════════════════════════════════════ */
.dot-pattern {
  background-image: radial-gradient(circle, rgba(12, 24, 41, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.dot-pattern-light {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Gradient mesh for hero backgrounds */
.gradient-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(217, 123, 26, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(44, 111, 191, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 80%, rgba(12, 24, 41, 0.03) 0%, transparent 60%);
  pointer-events: none;
}
