/* Centralized font-face declarations for Fastrack Medical Billing
 * Phase 1: Placeholder scaffold. Replace placeholder URLs with actual self-hosted font files.
 * Recommended: host variable fonts if available, else subset woff2 static weights actually used.
 */

/* INTER (variable preferred) */
@font-face {
  font-family: 'InterVariable';
  src: url('/fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
  font-named-instance: 'Regular';
}

/* Static fallback weights (add only those truly needed) */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* POPPINS (variable preferred) */
@font-face {
  font-family: 'PoppinsVariable';
  src: url('/fonts/poppins-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  font-named-instance: 'Regular';
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-900.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* MONO (system-first, no custom download yet) */
/* Add if you decide to embed a mono face for code/terminal blocks */
/* @font-face { font-family: 'Roboto Mono'; src: url('/fonts/roboto-mono-400.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap;} */

/* Utility classes for progressive enhancement (optional) */
/* Fluid typography scale & feature flags */
:root {
  --font-primary: 'InterVariable','Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  --font-secondary: 'PoppinsVariable','Poppins','InterVariable','Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  /* Fluid scale (clamp based) */
  --step--2: clamp(0.68rem, 0.66rem + 0.1vw, 0.72rem);
  --step--1: clamp(0.82rem, 0.80rem + 0.15vw, 0.88rem);
  --step-0: clamp(1rem, 0.97rem + 0.25vw, 1.1rem); /* base */
  --step-1: clamp(1.18rem, 1.12rem + 0.35vw, 1.38rem);
  --step-2: clamp(1.44rem, 1.34rem + 0.55vw, 1.72rem);
  --step-3: clamp(1.78rem, 1.60rem + 0.75vw, 2.15rem);
  --step-4: clamp(2.22rem, 1.92rem + 1.05vw, 2.69rem);
  --step-5: clamp(2.78rem, 2.30rem + 1.45vw, 3.36rem);
  --step-6: clamp(3.47rem, 2.75rem + 1.95vw, 4.20rem);
  /* Semantic mappings */
  --text-xs: var(--step--2);
  --text-sm: var(--step--1);
  --text-base: var(--step-0);
  --text-lg: var(--step-1);
  --text-xl: var(--step-2);
  --text-2xl: var(--step-3);
  --text-3xl: var(--step-4);
  --text-4xl: var(--step-5);
  --text-5xl: var(--step-6);
  /* Feature defaults */
  --font-common-features: 'kern','liga','clig','calt';
  --font-numeric-features: 'tnum','lnum','zero';
}

html { font-feature-settings: var(--font-common-features), var(--font-numeric-features); font-variation-settings: 'wght' 400; }
body { font-family: var(--font-primary); font-size: var(--text-base); line-height:1.55; }

/* Utilities */
.font-display { font-family: var(--font-secondary); }
.font-body { font-family: var(--font-primary); }
.num { font-feature-settings: var(--font-common-features), var(--font-numeric-features); }
.leading-tight { line-height:1.15; }
.leading-snug { line-height:1.3; }
.leading-normal { line-height:1.5; }
.tracking-tight { letter-spacing:-0.02em; }
.tracking-wide { letter-spacing:0.02em; }

/* Hero tokens */
:root { --hero-title-size: var(--text-5xl); --hero-subtitle-size: var(--text-2xl); }

/* Phase 2 Notes:
  - Variable fonts declared; ensure actual /fonts/*.woff2 files exist or browser will fall back.
  - To tune hero size globally adjust --text-5xl in clamp scale or override --hero-title-size.
  - For weight fine-tuning (e.g., slightly lighter on dark bg) apply: .hero-pop-word { font-variation-settings:'wght' 780; }
  - To disable kerning/ligatures for a performance micro-test: html { font-feature-settings:'kern' 0,'liga' 0; }
*/

.html-font-ready body { font-family: var(--font-primary); }
