@tailwind base;
@tailwind components;
@tailwind utilities;

/* Premium UI fonts — Elvaro Grotesque (primary) */
@font-face {
  font-family: 'Elvaro Grotesque';
  src: url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Light.woff2') format('woff2'),
       url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Elvaro Grotesque';
  src: url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Regular.woff2') format('woff2'),
       url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Elvaro Grotesque';
  src: url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Medium.woff2') format('woff2'),
       url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Elvaro Grotesque';
  src: url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-SemiBold.woff2') format('woff2'),
       url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Elvaro Grotesque';
  src: url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Bold.woff2') format('woff2'),
       url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Elvaro Grotesque';
  src: url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-ExtraBold.woff2') format('woff2'),
       url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-ExtraBold.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Elvaro Grotesque';
  src: url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Black.woff2') format('woff2'),
       url('/Fonts/Elvaro Grotesque Sans Family/WOFF/TBJElvaro-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Premium UI fonts — Blumir (alternative) */
@font-face {
  font-family: 'Blumir';
  src: url('/Fonts/blumir-font-family/WOFF/Blumir-VF.woff2') format('woff2-variations'),
       url('/Fonts/blumir-font-family/WOFF/Blumir-VF.woff') format('woff-variations');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Original design system tokens (for boot/ECG phases) */
  --bg: #FFFFFF;
  --text: #334155;
  --heading: #0F172A;
  --teal: #00897B;
  --teal-light: rgba(0, 137, 123, 0.08);
  --teal-medium: rgba(0, 137, 123, 0.15);
  --coral: #FF6B6B;
  --coral-light: rgba(255, 107, 107, 0.08);
  --muted: #94A3B8;
  --card-bg: #FFFFFF;
  --radius: 16px;
  --font-primary: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-secondary: 'Inter Tight', system-ui, sans-serif;

  /* Typography — Elvaro Grotesque primary, Blumir alternative */
  --font-ui: 'Elvaro Grotesque', system-ui, sans-serif;
  --font-ui-alt: 'Blumir', system-ui, sans-serif;
  --font-geist-mono: 'Geist Mono', 'Fira Code', monospace;

  /* GP System Dashboard tokens */
  --bg-dashboard: #F0F5F4;
  --surface: #FFFFFF;
  --sidebar-bg: #F7FAFA;
  --text-primary: #1A2B2A;
  --text-secondary: #5B7A78;
  --text-tertiary: #8DA8A5;
  --accent: #0D6E6E;
  --accent-hover: #0A8080;
  --accent-light: rgba(10,128,128,0.08);
  --accent-border: rgba(10,128,128,0.18);
  --amber: #D97706;
  --amber-light: rgba(217,119,6,0.08);
  --amber-border: rgba(217,119,6,0.18);
  --success: #059669;
  --success-light: rgba(5,150,105,0.08);
  --success-border: rgba(5,150,105,0.18);
  --alert: #DC2626;
  --alert-light: rgba(220,38,38,0.08);
  --alert-border: rgba(220,38,38,0.18);
  --purple: #7C3AED;
  --purple-light: rgba(124,58,237,0.08);
  --purple-border: rgba(124,58,237,0.18);
  --border: #D4E0DE;
  --border-light: #E4EDEB;
  --sidebar-width: 272px;
  --topbar-height: 48px;
  --radius-card: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(26,43,42,0.05);
  --shadow-md: 0 2px 8px rgba(26,43,42,0.08);
  --shadow-lg: 0 8px 32px rgba(26,43,42,0.12);
  --font-body: var(--font-ui);
  --font-mono-dashboard: 'Geist Mono', 'Fira Code', monospace;

  /* Legacy PMR tokens — kept for backward compat during transition (cleaned up in Task 21) */
  --pmr-content: #F0F5F4;
  --pmr-card: #FFFFFF;
  --pmr-sidebar: #F7FAFA;
  --pmr-banner: #334155;
  --pmr-nhs-blue: #005EB8;
  --pmr-green: #22C55E;
  --pmr-amber: #F59E0B;
  --pmr-red: #EF4444;
  --pmr-text-primary: #1A2B2A;
  --pmr-text-secondary: #5B7A78;
  --pmr-border: #D4E0DE;
  --pmr-border-dark: #D1D5DB;
  --pmr-selected: #EFF6FF;
  --pmr-alert-bg: #FEF3C7;
  --pmr-alert-border: #F59E0B;
  --pmr-alert-text: #92400E;
  --pmr-radius: 8px;
  --pmr-radius-login: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@layer utilities {
  .font-primary {
    font-family: var(--font-primary);
  }
  .font-secondary {
    font-family: var(--font-secondary);
  }
  .font-mono {
    font-family: 'Fira Code', monospace;
  }
  .font-ui {
    font-family: var(--font-ui);
  }
  .font-ui-alt {
    font-family: var(--font-ui-alt);
  }
  .font-geist-mono {
    font-family: var(--font-geist-mono);
  }
  .pmr-theme {
    background-color: var(--bg-dashboard);
    color: var(--text-primary);
    font-family: var(--font-ui);
  }
}

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

@keyframes seedPulse {
  0%, 100% { text-shadow: 0 0 8px #00ff41, 0 0 16px #00ff41; }
  50% { text-shadow: 0 0 14px #00ff41, 0 0 28px #00ff41, 0 0 40px rgba(0,255,65,0.3); }
}

.animate-blink {
  animation: blink 1s step-end infinite;
}

.animate-seed-pulse {
  animation: seedPulse 0.6s ease-in-out infinite;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeIn 200ms ease-out forwards;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

html {
  scroll-behavior: smooth;
}
