/* =============================================================================
 * @ralph/design-system — Design Tokens
 * -----------------------------------------------------------------------------
 * The single source of truth for every visual value in the Ralph Studiecoaching
 * identity. Extracted verbatim from the original site CSS, then organised into
 * named scales.
 *
 * Layers, in order:
 *   1. Primitive palette   — the raw brand colours (hex literals live ONLY here)
 *   2. Semantic tokens      — meaning-based aliases used by components
 *   3. Scales               — spacing / radius / shadow / type / motion / z-index
 *   4. Legacy aliases       — the original unprefixed names (--green, --sand …)
 *                             kept so the existing website renders identically.
 *
 * Never hardcode a value in a component — reference a --rds-* token instead.
 *
 * SINGLE SOURCE OF TRUTH: this file is the canonical token layer for both the
 * static website (linked before css/style.css) and the React component library.
 * It is mirrored at design-system/src/tokens/tokens.css — keep the two in sync
 * (the design system re-exports it as `@ralph/design-system/tokens.css`).
 * ========================================================================== */

:root {
  /* ==========================================================================
   * 1. PRIMITIVE PALETTE  (soft green identity — the only place hex lives)
   * ======================================================================== */
  --rds-color-cream: #f7faf8; /* page background */
  --rds-color-sand: #e1ece5; /* soft green section background */
  --rds-color-line: #cbdcd2; /* borders / hairlines */
  --rds-color-sage: #7fa695; /* light accent */
  --rds-color-green: #618574; /* primary accent */
  --rds-color-green-dark: #4d6b5c; /* primary action / hover */
  --rds-color-green-darkest: #3e574a; /* deepest action / gradient stop */
  --rds-color-ink: #2f3a34; /* headings / footer surface */
  --rds-color-muted: #54635a; /* body text (6.3:1 on white) */
  --rds-color-white: #ffffff;

  /* Functional colours found in the source (forms, feedback, footer) */
  --rds-color-input-border: #6e8a7b;
  --rds-color-placeholder: #5c6b62;
  --rds-color-error: #b3423e; /* contact-form error text */
  --rds-color-footer-text: #cfd8d2;
  --rds-color-footer-tagline: #b8c4bc;
  --rds-color-footer-muted: #9fb0a6;

  /* Additions completing the token set the design system needs (documented as
   * net-new — not present in the original site — but tuned to the palette). */
  --rds-color-success: #4d6b5c; /* == green-dark; matches the ✓ affordance */
  --rds-color-warning: #b57e2e; /* on-brand warm ochre */

  /* Neutral / surface scale. The palette is intentionally green-tinted — there
   * are no pure greys — so the "neutral" ramp is the brand's own soft tones. */
  --rds-color-neutral-0: var(--rds-color-white);
  --rds-color-neutral-50: var(--rds-color-cream);
  --rds-color-neutral-100: var(--rds-color-sand);
  --rds-color-neutral-200: var(--rds-color-line);
  --rds-color-neutral-400: var(--rds-color-sage);
  --rds-color-neutral-600: var(--rds-color-muted);
  --rds-color-neutral-800: var(--rds-color-green-dark);
  --rds-color-neutral-900: var(--rds-color-ink);

  /* ==========================================================================
   * 2. SEMANTIC COLOUR TOKENS  (what components actually reference)
   * ======================================================================== */
  --rds-color-bg: var(--rds-color-cream);
  --rds-color-bg-alt: var(--rds-color-sand); /* .section-alt */
  --rds-color-surface: var(--rds-color-white); /* cards, boxes */
  --rds-color-surface-soft: var(--rds-color-sand); /* accent boxes */
  --rds-color-border: var(--rds-color-line);

  --rds-color-text: var(--rds-color-muted);
  --rds-color-text-strong: var(--rds-color-ink);
  --rds-color-heading: var(--rds-color-ink);
  --rds-color-heading-accent: var(--rds-color-green-dark); /* h2 accent */

  --rds-color-primary: var(--rds-color-green-dark); /* primary button bg */
  --rds-color-primary-hover: var(--rds-color-green-darkest);
  --rds-color-primary-text: var(--rds-color-white);
  --rds-color-accent: var(--rds-color-green); /* accent text / step circles */
  --rds-color-accent-soft: var(--rds-color-sage); /* card top-borders */

  --rds-color-on-dark: var(--rds-color-white); /* text on ink / gradients */
  --rds-color-on-accent: var(--rds-color-white);

  /* Footer surface */
  --rds-color-footer-bg: var(--rds-color-ink);
  --rds-color-footer-heading: var(--rds-color-white);

  /* ==========================================================================
   * 3a. TYPOGRAPHY
   * ======================================================================== */
  --rds-font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --rds-font-heading: 'Quicksand', 'Nunito', 'Segoe UI', sans-serif;

  /* Font-size scale (px — matches the source's px usage; half-pixel sizes such
   * as 14.5 / 15.5 / 16.5 from the original are normalised to the nearest step). */
  --rds-font-size-2xs: 12px;
  --rds-font-size-xs: 13px; /* eyebrow / fineprint */
  --rds-font-size-sm: 14px;
  --rds-font-size-md: 15px;
  --rds-font-size-lg: 16px;
  --rds-font-size-body: 17px; /* base body copy */
  --rds-font-size-xl: 18px;
  --rds-font-size-2xl: 20px;
  --rds-font-size-3xl: 22px;
  --rds-font-size-4xl: 26px;
  --rds-font-size-5xl: 30px;
  --rds-font-size-6xl: 40px;

  /* Fluid heading sizes (preserve the original clamp() expressions verbatim) */
  --rds-font-size-hero: clamp(40px, 7vw, 100px); /* home hero h1 */
  --rds-font-size-hero-pkg: clamp(34px, 4.4vw, 56px); /* package hero h1 */
  --rds-font-size-display: clamp(28px, 3.4vw, 40px); /* section h2 */
  --rds-font-size-heading-lg: clamp(26px, 3.2vw, 38px);

  --rds-font-weight-regular: 400;
  --rds-font-weight-medium: 600;
  --rds-font-weight-bold: 700;
  --rds-font-weight-extrabold: 800;

  --rds-line-height-tight: 1.1; /* hero h1 */
  --rds-line-height-heading: 1.3;
  --rds-line-height-snug: 1.5;
  --rds-line-height-normal: 1.65;
  --rds-line-height-relaxed: 1.7; /* body default */
  --rds-line-height-loose: 1.8; /* long-form prose */

  --rds-letter-spacing-tight: -1px; /* large headings */
  --rds-letter-spacing-normal: 0;
  --rds-letter-spacing-wide: 0.5px;
  --rds-letter-spacing-eyebrow: 2.5px; /* normalised (was 1.5–3px) */

  /* ==========================================================================
   * 3b. SPACING SCALE  (4px base grid)
   * ======================================================================== */
  --rds-space-0: 0;
  --rds-space-1: 4px;
  --rds-space-2: 8px;
  --rds-space-3: 12px;
  --rds-space-4: 16px;
  --rds-space-5: 20px;
  --rds-space-6: 24px;
  --rds-space-7: 28px;
  --rds-space-8: 32px;
  --rds-space-9: 36px;
  --rds-space-10: 40px;
  --rds-space-11: 44px;
  --rds-space-12: 48px;
  --rds-space-13: 52px;
  --rds-space-15: 60px;
  --rds-space-16: 64px;
  --rds-space-18: 72px;
  --rds-space-20: 80px;
  --rds-space-22: 88px;
  --rds-space-24: 96px;

  /* ==========================================================================
   * 3c. RADIUS
   * ======================================================================== */
  --rds-radius-sm: 8px;
  --rds-radius-md: 12px; /* inputs, hamburger */
  --rds-radius-lg: 18px; /* cards, faq (original --radius) */
  --rds-radius-xl: 22px; /* benefits box, package cards */
  --rds-radius-2xl: 24px; /* price / coach cards */
  --rds-radius-3xl: 28px; /* CTA panels */
  --rds-radius-pill: 999px; /* buttons, chips */
  --rds-radius-full: 50%; /* avatars, step circles */

  /* ==========================================================================
   * 3d. SHADOWS  (all use the ink colour at low alpha, per the source)
   * ======================================================================== */
  --rds-shadow-sm: 0 4px 20px rgba(47, 58, 52, 0.08); /* original --shadow */
  --rds-shadow-md: 0 12px 34px rgba(47, 58, 52, 0.08); /* raised cards */
  --rds-shadow-lg: 0 22px 48px rgba(47, 58, 52, 0.14); /* card hover */
  --rds-shadow-xl: 0 22px 54px rgba(47, 58, 52, 0.14); /* price card */
  --rds-shadow-photo: 0 14px 34px rgba(47, 58, 52, 0.14); /* framed photos */
  --rds-shadow-drawer: -8px 0 28px rgba(47, 58, 52, 0.16); /* mobile nav */
  --rds-shadow-banner: 0 10px 34px rgba(47, 58, 52, 0.18); /* cookie banner */
  --rds-shadow-primary: 0 10px 26px rgba(97, 133, 116, 0.35); /* primary CTA */
  --rds-shadow-ring: 0 6px 16px rgba(97, 133, 116, 0.35); /* step circles */
  --rds-shadow-focus: 0 0 0 3px rgba(97, 133, 116, 0.4); /* input focus ring */

  /* ==========================================================================
   * 3e. MOTION
   * ======================================================================== */
  --rds-duration-fast: 150ms;
  --rds-duration-base: 200ms;
  --rds-duration-medium: 280ms;
  --rds-duration-slow: 350ms;
  --rds-duration-reveal: 800ms;
  --rds-ease-standard: ease;
  --rds-ease-emphasized: cubic-bezier(0.2, 0.6, 0.2, 1);

  /* ==========================================================================
   * 3f. LAYOUT — containers, breakpoints (reference), z-index, opacity
   * ======================================================================== */
  --rds-container-narrow: 680px;
  --rds-container-prose: 780px;
  --rds-container-wide: 1040px;
  --rds-container-max: 1050px;
  --rds-container-padding: var(--rds-space-6);

  /* Breakpoints are exposed as tokens for JS/TS (they cannot drive @media).
   * Canonical set; the source's 520/640/860/901 are normalised to these. */
  --rds-breakpoint-sm: 560px;
  --rds-breakpoint-md: 760px;
  --rds-breakpoint-nav: 820px; /* hamburger threshold (coupled to site JS) */
  --rds-breakpoint-lg: 900px;
  --rds-breakpoint-xl: 1050px;

  --rds-z-hide: -1;
  --rds-z-base: 0;
  --rds-z-raised: 1;
  --rds-z-sticky: 100; /* sticky header */
  --rds-z-backdrop: 150; /* drawer backdrop */
  --rds-z-drawer: 200; /* mobile nav panel */
  --rds-z-drawer-toggle: 210; /* hamburger stays tappable */
  --rds-z-banner: 300; /* cookie banner */
  --rds-z-skip-link: 1000;

  --rds-opacity-0: 0;
  --rds-opacity-muted: 0.6;
  --rds-opacity-full: 1;

  /* ==========================================================================
   * 4. LEGACY ALIASES
   * -----------------------------------------------------------------------
   * The original unprefixed variable names from css/style.css. Kept so the
   * existing website renders byte-identically when it links this file — every
   * alias resolves to the same value the site hardcoded before.
   * ======================================================================== */
  --cream: var(--rds-color-cream);
  --sand: var(--rds-color-sand);
  --line: var(--rds-color-line);
  --green: var(--rds-color-green);
  --green-dark: var(--rds-color-green-dark);
  --sage: var(--rds-color-sage);
  --sage-soft: var(--rds-color-sand); /* normalised: was #E1ECE5, == --sand */
  --dark: var(--rds-color-ink);
  --muted: var(--rds-color-muted);
  --white: var(--rds-color-white);
  --radius: var(--rds-radius-lg);
  --shadow: var(--rds-shadow-sm);
}
