/* ============================================================
   Revival MD — Design System & Shared Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Brand Colors (Updated to Navy & Gold) */
  --teal-900: #040b22;
  --teal-800: #060f2e;
  --teal-700: #0A1F5C;
  --teal-600: #162d7a;
  --teal-500: #1a3278;
  --teal-400: #425ea3;
  --teal-300: #627ec7;
  --teal-200: #88a1db;
  --teal-100: #e8ecf7;
  --teal-50:  #f4f6fb;

  --gold-700: #8a6514;
  --gold-600: #B8924A;
  --gold-500: #d4aa6a;
  --gold-400: #e8b934;
  --gold-300: #f2ca5c;
  --gold-200: #f7de9b;
  --gold-100: #fdf3d4;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  --error:   #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;

  /* Typography */
  --font-sans:   'Inter', system-ui, sans-serif;
  --font-serif:  'Playfair Display', Georgia, serif;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-xl:  0 20px 50px rgba(0,0,0,0.18), 0 8px 20px rgba(0,0,0,0.10);
  --shadow-teal: 0 4px 20px rgba(10,31,92,0.30);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   all 0.15s cubic-bezier(0.4,0,0.2,1);
  --transition-base:   all 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-slow:   all 0.4s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--slate-100);
  color: var(--slate-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p { color: var(--slate-600); }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-teal   { color: var(--teal-600); }
.text-gold   { color: var(--gold-600); }
.font-serif  { font-family: var(--font-serif); }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.gap-1       { gap: 0.5rem; }
.gap-2       { gap: 1rem; }
.gap-3       { gap: 1.5rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--slate-100); }
::-webkit-scrollbar-thumb { background: var(--teal-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal-500); }

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease forwards;
  max-width: 360px;
}

.toast.success { background: linear-gradient(135deg, #16a34a, #15803d); }
.toast.error   { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.toast.info    { background: linear-gradient(135deg, var(--teal-600), var(--teal-800)); }

.toast-icon { font-size: 1.3rem; flex-shrink: 0; }

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* ── Loading Spinner ── */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
  color: white;
  box-shadow: var(--shadow-teal);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10,31,92,0.40);
}
.btn-primary:active { transform: translateY(0); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: white;
  box-shadow: 0 4px 16px rgba(212,160,23,0.30);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,160,23,0.40);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--teal-400);
  color: var(--teal-600);
}
.btn-outline:hover {
  background: var(--teal-50);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}
.btn-danger:hover { transform: translateY(-1px); opacity: 0.9; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }

/* ── Modal Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
  text-align: center;
}

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

/* ── Divider ── */
.divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal-200), transparent);
  border: none;
  margin: 1.5rem 0;
}
