/* ============================================================================
   Buy Me a Photo — online typography (single source of truth)
   ----------------------------------------------------------------------------
   One family (Inter, self-hosted variable font), one scale, one set of
   utilities for every page, overlay and status page the backend serves to
   photographers, studios, editors and visitors. Customer photo-delivery pages
   (public/web, online-thankyou.js, cardpay.js, studio-select.js) do NOT load
   this file on purpose.

   Usage (see .cursor/rules/backend-typography.mdc in blindshot_app):
     <link rel="stylesheet" href="/type.css">
   Pages that copy the --bmp-* token block only point it at this file:
     --bmp-font: var(--font-sans);
   Never write a font-family literal in a page; use the tokens below.
   Swapping the family later = replace the two woff2 files + this @font-face
   block. Nothing else references the family name.

   Served from the site root (express.static on public/). The studio host
   whitelists /type.css and /fonts/ in src/server.js (STUDIO_STATIC_FILES).
   ========================================================================= */

/* ─── Font files (latin + latin-ext; latin-ext carries Turkish and ₺) ───── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  /* families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* sizes */
  --fs-2xs: 11px;   /* uppercase labels, badges */
  --fs-xs: 12px;    /* meta, captions, footers */
  --fs-sm: 13px;    /* secondary UI, table cells */
  --fs-md: 14px;    /* form fields, buttons, dense UI */
  --fs-base: 15px;  /* body */
  --fs-lg: 17px;    /* lead paragraphs, card titles */
  --fs-xl: 20px;    /* h3 / sheet titles */
  --fs-2xl: 24px;   /* h2 */
  --fs-3xl: 30px;   /* h1 inside apps */
  --fs-4xl: 38px;   /* section headings on marketing pages */
  --fs-5xl: clamp(36px, 7.5vw, 68px); /* landing hero only */

  /* line heights */
  --lh-tight: 1.1;    /* display */
  --lh-snug: 1.25;    /* headings */
  --lh-normal: 1.5;   /* UI */
  --lh-relaxed: 1.6;  /* long text */

  /* letter spacing (Inter needs tightening above ~17px, never below) */
  --ls-display: -.025em; /* >= 38px */
  --ls-heading: -.02em;  /* 24–30px */
  --ls-title: -.01em;    /* 17–20px */
  --ls-label: .06em;     /* uppercase labels */

  /* weights (never 300) */
  --fw-regular: 400;   /* body */
  --fw-medium: 500;    /* secondary emphasis */
  --fw-semibold: 600;  /* buttons, links, labels */
  --fw-bold: 700;      /* strong, subheads */
  --fw-heavy: 800;     /* headings */
  --fw-black: 900;     /* landing hero only */
}

/* ─── Base ────────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
code, kbd, pre, samp { font-family: var(--font-mono); }

/* ─── Utilities (for new UI; existing components keep their own sizes) ───── */
.t-display { font-size: var(--fs-5xl); font-weight: var(--fw-black); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
.t-h1 { font-size: var(--fs-3xl); font-weight: var(--fw-heavy); line-height: var(--lh-snug); letter-spacing: var(--ls-heading); }
.t-h2 { font-size: var(--fs-2xl); font-weight: var(--fw-heavy); line-height: var(--lh-snug); letter-spacing: var(--ls-heading); }
.t-h3 { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: var(--lh-snug); letter-spacing: var(--ls-title); }
.t-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh-snug); letter-spacing: var(--ls-title); }
.t-body { font-size: var(--fs-base); font-weight: var(--fw-regular); line-height: var(--lh-relaxed); }
.t-sm { font-size: var(--fs-sm); line-height: var(--lh-normal); }
.t-xs { font-size: var(--fs-xs); line-height: var(--lh-normal); }
.t-label { font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-label); text-transform: uppercase; line-height: var(--lh-normal); }
.t-mono { font-family: var(--font-mono); font-size: var(--fs-sm); }
.t-num { font-variant-numeric: tabular-nums; } /* amounts, KPIs, codes */
