/* ============================================================
   Vercel Academy — Fonts Aesthetic
   Extracted from https://vercel.com/academy/ai-sdk
   ============================================================ */

/* -- Geist Sans (variable, self-hosted via npm `geist` or Vercel font) ---- */
/* Easiest: install `npm i geist` then import { GeistSans } from 'geist/font/sans'
   Or use the CDN woff2 below (from Vercel's public font page). */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("https://fonts.cdnfonts.com/s/102191/Geist-Variable.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("https://fonts.cdnfonts.com/s/102193/GeistMono-Variable.woff2") format("woff2-variations");
}

/* Metric-matched fallback (prevents CLS before Geist loads) */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial");
  ascent-override: 95.94%;
  descent-override: 28.16%;
  line-gap-override: 0%;
  size-adjust: 104.76%;
}

/* -- Secondary display faces used on Academy --------------------------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  src: url("https://fonts.gstatic.com/s/spacegrotesk/v13/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7oUXskPMBBSSJLm2E.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  src: url("https://fonts.gstatic.com/s/spacegrotesk/v13/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUXskPMBBSSJLm2E.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  src: url("https://assets.vercel.com/raw/upload/v1659422347/fonts/space-mono/space-mono-v11-latin-regular.woff2") format("woff2");
  font-display: optional;
}

/* -- Font stacks, weights, type scale, tracking, leading --------------- */
:root {
  --font-sans: "Geist", "Geist Fallback", Arial, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "Roboto Mono",
    Menlo, Monaco, "Liberation Mono", "DejaVu Sans Mono", "Courier New",
    monospace, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-sans-fallback: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
    "Helvetica Neue", sans-serif;
  --font-mono-fallback: "Roboto Mono", Menlo, Monaco, "Lucida Console",
    "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono",
    "Courier New", monospace;
  --font-space-grotesk: "Space Grotesk", "Geist", "Geist Fallback", Arial;

  --default-font-family: var(--font-sans);
  --default-mono-font-family: var(--font-mono);

  /* Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Type scale (rem) + paired line-heights */
  --text-xs: 0.75rem;       --text-xs--line-height: calc(1 / 0.75);
  --text-sm: 0.875rem;      --text-sm--line-height: calc(1.25 / 0.875);
  --text-base: 1rem;        --text-base--line-height: calc(1.5 / 1);
  --text-lg: 1.125rem;      --text-lg--line-height: calc(1.75 / 1.125);
  --text-xl: 1.25rem;       --text-xl--line-height: calc(1.75 / 1.25);
  --text-2xl: 1.5rem;       --text-2xl--line-height: calc(2 / 1.5);
  --text-3xl: 1.875rem;     --text-3xl--line-height: calc(2.25 / 1.875);
  --text-4xl: 2.25rem;      --text-4xl--line-height: calc(2.5 / 2.25);
  --text-5xl: 3rem;         --text-5xl--line-height: 1;
  --text-6xl: 3.75rem;      --text-6xl--line-height: 1;

  /* Tracking */
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-widest: 0.1em;

  /* Leading */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Form text sizes */
  --geist-form-font: 0.875rem;
  --geist-form-small-font: 0.875rem;
  --geist-form-large-font: 1rem;
}

/* -- Base typographic defaults (match Vercel body feel) ---------------- */
html {
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01";  /* Geist humanist + alt-a */
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

code, kbd, pre, samp { font-family: var(--font-mono); }
