/* FloorTalk design tokens. One source for color, type, space, radius, elevation and motion.
   Light theme, one teal accent. Fonts are self-hosted (OFL): Inter for text, Fraunces for display. */

@font-face {
  font-family: "FT Signin";
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "FT Display";
  src: url("/static/fonts/FrauncesVariable.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "FT Display";
  src: url("/static/fonts/FrauncesVariable-Italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}
/* Metric-matched fallback so the headline does not jump when Fraunces arrives. */
@font-face {
  font-family: "FT Display Fallback";
  src: local("Georgia"), local("Times New Roman"), local("DejaVu Serif"), local("Noto Serif");
  size-adjust: 104%;
  ascent-override: 94%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;

  /* Color: paper, ink, one teal. Status colors are for chips, dots and SOS only. */
  --ft-paper: #faf9f6;
  --ft-surface: #ffffff;
  --ft-sunken: #f3f1ec;
  --ft-line: #e4e1da;
  --ft-line-soft: #ece9e2;
  --ft-line-strong: #cfcabd;
  --ft-ink: #111111;
  --ft-ink-2: #2a2722;
  --ft-muted: #5c564c;
  --ft-faint: #8a8377;
  --ft-teal: #0f766e;
  --ft-teal-hover: #0c655e;
  --ft-teal-press: #0a574f;
  --ft-teal-tint: rgba(15, 118, 110, 0.08);
  --ft-teal-wash: #e8f2f0;
  --ft-ok: #166534;     --ft-ok-bg: #dcfce7;   --ft-ok-line: #bbf7d0;
  --ft-warn: #92400e;   --ft-warn-bg: #fef3c7; --ft-warn-line: #fde68a;
  --ft-bad: #991b1b;    --ft-bad-bg: #fee2e2;  --ft-bad-line: #fecaca;
  --ft-sos: #dc2626;    --ft-sos-press: #b91c1c;
  --ft-scrim: rgba(17, 17, 17, 0.42);

  /* Type */
  --ft-font-sans: "FT Signin", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ft-font-display: "FT Display", "FT Display Fallback", Georgia, serif;
  --ft-text-2xs: 11px;
  --ft-text-xs: 12px;
  --ft-text-sm: 13px;
  --ft-text-base: 16px;
  --ft-text-md: 16px;
  --ft-text-lg: 18px;
  --ft-text-xl: 22px;
  --ft-text-2xl: 28px;
  --ft-text-3xl: 36px;
  --ft-display-sm: clamp(2rem, 3.4vw, 2.75rem);
  --ft-display-md: clamp(2.4rem, 5vw, 4rem);
  --ft-display-lg: clamp(2.9rem, 7.4vw, 6.25rem);
  --ft-track-tight: -0.035em;
  --ft-track-snug: -0.02em;
  --ft-track-eyebrow: 0.14em;

  /* Space: 4pt grid */
  --ft-s-1: 4px;
  --ft-s-2: 8px;
  --ft-s-3: 12px;
  --ft-s-4: 16px;
  --ft-s-5: 20px;
  --ft-s-6: 24px;
  --ft-s-7: 32px;
  --ft-s-8: 40px;
  --ft-s-9: 56px;
  --ft-s-10: 80px;
  --ft-s-11: 120px;

  /* Radius */
  --ft-r-xs: 6px;
  --ft-r-sm: 10px;
  --ft-r-md: 14px;
  --ft-r-lg: 18px;
  --ft-r-xl: 24px;
  --ft-r-pill: 999px;

  /* Elevation: hairline first, then soft ambient shadow. Never colored. */
  --ft-e-0: 0 0 0 0 transparent;
  --ft-e-1: 0 1px 0 rgba(17, 17, 17, 0.03), 0 1px 2px rgba(17, 17, 17, 0.05);
  --ft-e-2: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 20px -10px rgba(17, 17, 17, 0.14);
  --ft-e-3: 0 2px 4px rgba(17, 17, 17, 0.04), 0 20px 44px -18px rgba(17, 17, 17, 0.22);
  --ft-e-4: 0 2px 6px rgba(17, 17, 17, 0.05), 0 36px 80px -24px rgba(17, 17, 17, 0.30);
  --ft-ring: 0 0 0 3px rgba(15, 118, 110, 0.18);

  /* Motion: transform and opacity only. Spring curve settles without overshoot. */
  --ft-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ft-ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ft-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ft-ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --ft-d-1: 120ms;
  --ft-d-2: 180ms;
  --ft-d-3: 260ms;
  --ft-d-4: 420ms;
  --ft-d-5: 720ms;
  /* GSAP reads these names (expo.out, power3.out) so JS motion and CSS share one curve family. */
  --ft-gsap-ease: expo.out;
  --ft-gsap-ease-soft: power3.out;
  --ft-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* shadcn/ui semantic tokens, mapped onto the palette above. Components in ui.css read only these. */
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 10px);
  --background: var(--ft-paper);
  --foreground: var(--ft-ink);
  --card: var(--ft-surface);
  --card-foreground: var(--ft-ink);
  --popover: var(--ft-surface);
  --popover-foreground: var(--ft-ink);
  --primary: var(--ft-teal);
  --primary-hover: var(--ft-teal-hover);
  --primary-press: var(--ft-teal-press);
  --primary-foreground: #ffffff;
  --secondary: var(--ft-sunken);
  --secondary-hover: #ebe8e1;
  --secondary-foreground: var(--ft-ink);
  --muted: var(--ft-sunken);
  --muted-foreground: var(--ft-muted);
  --accent: var(--ft-sunken);
  --accent-foreground: var(--ft-ink);
  --destructive: var(--ft-sos);
  --destructive-hover: var(--ft-sos-press);
  --destructive-soft: rgba(220, 38, 38, 0.2);
  --border: var(--ft-line);
  --input: #d9d5cc;
  --ring: var(--ft-teal);
  --ring-soft: rgba(15, 118, 110, 0.22);
  --overlay: rgba(17, 17, 17, 0.45);
  --shadow-xs: 0 1px 2px rgba(17, 17, 17, 0.05);
  --shadow-sm: var(--ft-e-1);
  --shadow-md: var(--ft-e-2);
  --shadow-lg: var(--ft-e-3);
  --shadow-xl: var(--ft-e-4);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ft-d-1: 0ms;
    --ft-d-2: 0ms;
    --ft-d-3: 0ms;
    --ft-d-4: 0ms;
    --ft-d-5: 0ms;
  }
}
