/* =============================================
   Screenly — base.css
   Variables, reset, body, typography, utilities
   ============================================= */

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

:root {
  --bg:            #f7f5f0;
  --bg-card:       #ffffff;
  --bg-card-hover: #faf9f7;
  --bg-subtle:     #f0ede6;
  --border:        #e2ddd5;
  --border-dark:   #c8c0b4;
  --text:          #1a1714;
  --text-muted:    #6b6460;
  --text-dim:      #b0a89e;
  --accent:        #c0392b;
  --accent-light:  rgba(192,57,43,0.08);
  --accent2:       #2c3e50;
  --success:       #1a7a4a;
  --success-light: rgba(26,122,74,0.08);
  --warning:       #b7770d;
  --warning-light: rgba(183,119,13,0.08);
  --danger:        #c0392b;
  --danger-light:  rgba(192,57,43,0.08);
  --score-ats:     #2980b9;
  --score-content: #8e44ad;
  --score-overall: #1a7a4a;
  --radius:        10px;
  --radius-sm:     6px;
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Lato', sans-serif;
  --font-mono:     'JetBrains Mono', 'Courier New', monospace;
  --transition:    0.18s cubic-bezier(0.4,0,0.2,1);
  --shadow-card:   0 1px 4px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-lift:   0 4px 16px rgba(0,0,0,0.10);
  --page-max:      1400px;
  --page-pad:      32px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }

/* ── Shared animation ── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes slide-up {
  from { transform: translateX(-50%) translateY(12px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);   opacity: 1; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── Spinner ── */
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  max-width: 90vw;
  animation: slide-up 0.3s ease;
}
.toast-icon  { color: var(--danger); }
.toast-msg   { flex: 1; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0 4px; }
