/* ============================================================
   Wayfinder Tech — Design tokens
   Colour · Typography · Spacing/Radii/Shadows/Motion · Base layer.
   Consolidated from the Wayfinder Tech Design System for static hosting.
   ============================================================ */

:root {
  /* --- Brand primitives -------------------------------------- */
  --wf-cream: #fbfbf8;
  --wf-teal: #12383f;
  --wf-orchid: #d86ff2;

  /* --- Teal scale (primary) ---------------------------------- */
  --teal-50:  #f1f8f9;
  --teal-100: #e0eff1;
  --teal-200: #c2dde1;
  --teal-300: #97c4cb;
  --teal-400: #63a3ad;
  --teal-500: #3d828e;
  --teal-600: #2c6873;
  --teal-700: #25535d;
  --teal-800: #1d444c;
  --teal-900: #12383f;
  --teal-950: #0b2429;

  /* --- Cream / warm neutral scale ---------------------------- */
  --cream-50:  #fdfdfb;
  --cream-100: #fbfbf8;
  --cream-200: #f4f4ec;
  --cream-300: #ebebdf;
  --cream-400: #dcdccd;
  --cream-500: #c4c4b1;
  --cream-600: #9b9b87;
  --cream-700: #6f6f5e;

  /* --- Ink scale (text on cream) ----------------------------- */
  --ink-strong: #12383f;
  --ink-body:   #2a474d;
  --ink-muted:  #5c7176;
  --ink-faint:  #8a9a9d;

  /* --- Orchid scale (accent / wayfinder mark) ---------------- */
  --orchid-50:  #fbf2fe;
  --orchid-100: #f5e0fc;
  --orchid-200: #eec5f8;
  --orchid-300: #e29ff2;
  --orchid-400: #d86ff2;
  --orchid-500: #c451e0;
  --orchid-600: #a838c2;
  --orchid-700: #872c9c;
  --orchid-800: #6a2479;

  /* --- Semantic colours -------------------------------------- */
  --success: #1f8a5b;
  --success-bg: #e6f4ec;
  --warning: #c2832a;
  --warning-bg: #f8efdc;
  --danger: #c2455a;
  --danger-bg: #f9e7ea;
  --info: var(--teal-600);
  --info-bg: var(--teal-100);

  /* --- Surfaces ---------------------------------------------- */
  --surface-page:    var(--cream-100);
  --surface-card:    #ffffff;
  --surface-sunken:  var(--cream-200);
  --surface-inverse: var(--teal-900);
  --surface-accent:  var(--orchid-50);

  /* --- Text -------------------------------------------------- */
  --text-strong:   var(--ink-strong);
  --text-body:     var(--ink-body);
  --text-muted:    var(--ink-muted);
  --text-faint:    var(--ink-faint);
  --text-on-teal:  var(--cream-100);
  --text-on-teal-muted: #9fc0c5;
  --text-accent:   var(--orchid-600);
  --text-link:     var(--teal-700);

  /* --- Borders & dividers ------------------------------------ */
  --border-subtle: var(--cream-300);
  --border-default: var(--cream-400);
  --border-strong: var(--teal-200);
  --border-inverse: rgba(255, 255, 255, 0.14);
  --border-focus:  var(--orchid-400);

  /* --- Interactive ------------------------------------------- */
  --action-primary:        var(--teal-900);
  --action-primary-hover:  var(--teal-800);
  --action-primary-press:  var(--teal-950);
  --action-accent:         var(--orchid-400);
  --action-accent-hover:   var(--orchid-500);
  --action-accent-press:   var(--orchid-600);

  /* --- Focus ring -------------------------------------------- */
  --ring: 0 0 0 3px var(--orchid-200);
  --ring-on-teal: 0 0 0 3px rgba(216, 111, 242, 0.45);

  /* --- Wayfinder chevron mask (promoted to :root so eyebrows + marks share it) */
  --wf-mark-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none'%3E%3Cpath d='M16 62 L50 34 L84 62' stroke='%23000' stroke-width='13' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  /* --- Families ---------------------------------------------- */
  --font-sans: "Static", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Static", ui-sans-serif, system-ui, sans-serif;
  --font-logo: "Wayfinder Static Logo", var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* --- Weights ----------------------------------------------- */
  --weight-regular: 400;
  --weight-bold: 700;

  /* --- Type scale -------------------------------------------- */
  --text-display-2xl: 4.5rem;
  --text-display-xl: 3.5rem;
  --text-display-lg: 2.75rem;
  --text-display-md: 2.25rem;
  --text-display-sm: 1.875rem;
  --text-2xl: 1.5rem;
  --text-xl: 1.25rem;
  --text-lg: 1.125rem;
  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;

  /* --- Line heights ------------------------------------------ */
  --leading-tight: 0.95;
  --leading-snug: 1.1;
  --leading-heading: 1.2;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;

  /* --- Letter spacing ---------------------------------------- */
  --tracking-tighter: -0.02em;
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-eyebrow: 0.14em;

  --type-eyebrow-size: var(--text-xs);
  --type-eyebrow-tracking: var(--tracking-eyebrow);

  /* --- Spacing scale (4px base) ------------------------------ */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Radii ------------------------------------------------- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 999px;
  --radius-round: 50%;

  /* --- Borders ----------------------------------------------- */
  --border-width: 1px;
  --border-width-thick: 1.5px;

  /* --- Shadows ----------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(18, 56, 63, 0.06);
  --shadow-sm: 0 1px 3px rgba(18, 56, 63, 0.07), 0 1px 2px rgba(18, 56, 63, 0.05);
  --shadow-md: 0 4px 12px rgba(18, 56, 63, 0.08), 0 2px 4px rgba(18, 56, 63, 0.05);
  --shadow-lg: 0 12px 28px rgba(18, 56, 63, 0.10), 0 4px 8px rgba(18, 56, 63, 0.05);
  --shadow-xl: 0 24px 48px rgba(18, 56, 63, 0.14), 0 8px 16px rgba(18, 56, 63, 0.06);
  --shadow-orchid: 0 8px 24px rgba(216, 111, 242, 0.28);

  /* --- Layout ------------------------------------------------ */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1320px;
  --gutter: var(--space-6);

  /* --- Motion ------------------------------------------------ */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 360ms;
  --transition-base: all var(--duration-base) var(--ease-out);
}

/* ============================================================
   Base layer
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  text-wrap: balance;
}
h1 { font-size: var(--text-display-xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-tighter); }
h2 { font-size: var(--text-display-lg); }
h3 { font-size: var(--text-display-sm); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { margin: 0; text-wrap: pretty; }

a { color: var(--text-link); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: var(--action-accent-press); }

strong, b { font-weight: var(--weight-bold); }
em, i { font-style: italic; }
small { font-size: var(--text-sm); }

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

hr { border: none; border-top: var(--border-width) solid var(--border-subtle); margin: var(--space-8) 0; }

img, svg, video, canvas { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

ul, ol { margin: 0; }

::selection { background: var(--orchid-200); color: var(--ink-strong); }

:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* --- Brand utilities --------------------------------------- */
.wf-wordmark {
  font-family: var(--font-logo);
  font-palette: --wayfinder-original;
  color: var(--wf-teal);
  letter-spacing: 0.04em;
  line-height: 0.9;
}
.wf-eyebrow {
  font-size: var(--type-eyebrow-size);
  font-weight: var(--weight-bold);
  letter-spacing: var(--type-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--text-accent);
}
.wf-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--wf-mark-svg) center / contain no-repeat;
  mask: var(--wf-mark-svg) center / contain no-repeat;
}

/* Visually-hidden (for accessible skip links / labels) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
