/* ============================================================
   TeamFlow — Base: reset, typography, utilities
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.05px;
  color: var(--ink);
  background: var(--canvas);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: rgba(255, 90, 31, 0.35); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--hairline-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: var(--r-pill); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- Type scale (Linear hierarchy) ---------- */
.display-xl { font-family: var(--font-display); font-size: 80px; font-weight: 600; line-height: 1.05; letter-spacing: -3px; }
.display-lg { font-family: var(--font-display); font-size: 56px; font-weight: 600; line-height: 1.1; letter-spacing: -1.8px; }
.display-md { font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1.15; letter-spacing: -1px; }
.headline   { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -0.6px; }
.card-title { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -0.4px; }
.subhead    { font-family: var(--font-display); font-size: 20px; font-weight: 400; line-height: 1.4; letter-spacing: -0.2px; }
.body-lg    { font-size: 18px; line-height: 1.5; letter-spacing: -0.1px; }
.body-sm    { font-size: 14px; line-height: 1.5; letter-spacing: 0; }
.caption    { font-size: 12px; line-height: 1.4; letter-spacing: 0; }
.eyebrow {
  font-size: 13px; font-weight: 500; line-height: 1.3;
  letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-subtle);
}
.mono { font-family: var(--font-mono); font-size: 13px; line-height: 1.5; }

.text-muted    { color: var(--ink-muted); }
.text-subtle   { color: var(--ink-subtle); }
.text-tertiary { color: var(--ink-tertiary); }
.text-primary  { color: var(--primary); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }

/* ---------- Utilities ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xxs { gap: var(--s-xxs); } .gap-xs { gap: var(--s-xs); } .gap-sm { gap: var(--s-sm); }
.gap-md { gap: var(--s-md); } .gap-lg { gap: var(--s-lg); }
.flex-1 { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* Focus ring — 2px primary-focus at 50% */
:focus-visible { outline: 2px solid rgba(255, 90, 31, 0.5); outline-offset: 2px; }

/* ---------- Animations ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes pulse-dot { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.anim-rise { animation: rise-in var(--t-slow) var(--ease) both; }
.anim-fade { animation: fade-in var(--t-slow) var(--ease) both; }

/* Skeleton loaders */
.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
