/* ============================================================
   Connixt Design System — component stylesheet
   Colour, spacing, radius, shadow, layout and font-family values
   live in tokens.json (compiled to tokens.css). This sheet keeps
   the type scale, motion values and the base + semantic classes.
   ============================================================ */

:root {
  /* ---------- Type scale (1.200 minor third, base 16) ---------- */
  --fs-2xs:  11px;
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   20px;
  --fs-xl:   24px;
  --fs-2xl:  30px;
  --fs-3xl:  36px;
  --fs-4xl:  48px;
  --fs-5xl:  60px;
  --fs-6xl:  72px;
  --fs-7xl:  96px;   /* hero use */

  /* ---------- Line height ---------- */
  --lh-tight:  1.05; /* @kind font */ /* display */
  --lh-snug:   1.20; /* @kind font */ /* H1/H2 */
  --lh-normal: 1.45; /* @kind font */ /* H3 / lead */
  --lh-body:   1.55; /* @kind font */ /* paragraphs */
  --lh-loose:  1.75; /* @kind font */ /* long-form */

  /* ---------- Weight ---------- */
  --fw-thin:        100; /* @kind font */
  --fw-light:       300; /* @kind font */
  --fw-regular:     400; /* @kind font */
  --fw-medium:      500; /* @kind font */
  --fw-semibold:    600; /* @kind font */
  --fw-bold:        700; /* @kind font */
  --fw-extrabold:   800; /* @kind font */
  --fw-black:       900; /* @kind font */

  /* ---------- Tracking ---------- */
  --tr-tight:  -0.02em; /* @kind font */ /* hero / display */
  --tr-snug:   -0.01em; /* @kind font */ /* H1–H3 */
  --tr-normal:  0; /* @kind font */
  --tr-wide:    0.04em; /* @kind font */
  --tr-eyebrow: 0.10em; /* @kind font */ /* uppercase eyebrows */

  /* ---------- Motion ---------- */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1); /* @kind other */
  --ease-emphasize: cubic-bezier(0.2, 0, 0, 1.2); /* @kind other */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */

  --dur-fast:   120ms; /* @kind other */
  --dur-base:   180ms; /* @kind other */
  --dur-slow:   280ms; /* @kind other */
  --dur-slower: 420ms; /* @kind other */
}

/* ============================================================
   Base + semantic typography classes
   Use the .ds-* classes or the bare tags; both are wired up.
   ============================================================ */

html {
  font-family: var(--font-sans);
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11" 1; /* single-story a — feels more modern */
}

body {
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

/* --- Display (marketing hero) --- */
.ds-display, .ds-h0 {
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  font-size: clamp(48px, 7vw, var(--fs-7xl));
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--color-fg-strong);
  text-wrap: balance;
}

/* --- Headings --- */
.ds-h1, h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(36px, 4.5vw, var(--fs-5xl));
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-snug);
  color: var(--color-fg-strong);
  text-wrap: balance;
}
.ds-h2, h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(28px, 3vw, var(--fs-3xl));
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-snug);
  color: var(--color-fg-strong);
  text-wrap: balance;
}
.ds-h3, h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-2xl);
  line-height: var(--lh-normal);
  letter-spacing: var(--tr-snug);
  color: var(--color-fg-strong);
}
.ds-h4, h4 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xl);
  line-height: var(--lh-normal);
  color: var(--color-fg-strong);
}
.ds-h5, h5 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  color: var(--color-fg-strong);
}
.ds-h6, h6 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-fg-strong);
}
.ds-h6-eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
  line-height: var(--lh-normal);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

/* --- Body --- */
.ds-lead {
  font-size: var(--fs-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-fg);
  text-wrap: pretty;
}
.ds-p, p {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--color-fg);
  text-wrap: pretty;
}
.ds-small, small {
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--color-fg-muted);
}

/* --- Eyebrows / labels (uppercase, tracked) --- */
.ds-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tr-eyebrow);
  color: var(--color-accent-hover);
}
.ds-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-fg-strong);
}
.ds-caption {
  font-size: var(--fs-xs);
  color: var(--color-fg-muted);
}

/* --- Mono / numeric --- */
.ds-mono, code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.ds-tabular {
  font-variant-numeric: tabular-nums;
}

/* --- Links --- */
a {
  color: var(--color-fg-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}
a:hover {
  color: var(--color-fg-link-hover);
  border-bottom-color: currentColor;
}

/* --- Selection --- */
::selection {
  background: var(--c-primary);
  color: var(--c-black);
}

/* --- Focus ring --- */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
