/* =========================================================================
   321Klik — shared design tokens (SINGLE SOURCE OF TRUTH)
   Consumed by:
     - portal    → apps/portal/app/globals.css   (@import "@321klik/ui/tokens.css")
     - marketing → apps/portal/public/site/site.css (@import "/site/tokens.css",
                   generated from this file by the portal's predev/prebuild copy step)
     - gallery, design-studio (to be wired in the visible-redesign phase)

   Brand (2026 palette): Flash Orange → Sunset Coral → Hot Pink signature gradient,
   Deep Plum ink on a Warm White canvas, Plus Jakarta Sans, soft depth, rounded
   geometry. DO NOT re-declare these brand tokens in individual apps — change them
   here so every surface stays in sync.
   ========================================================================= */
:root {
  /* Brand gradient ramp — Flash Orange #FF6B35 → Sunset Coral #FF8A7A → Hot Pink #F83E8E */
  --b1: #FF6B35;   /* Flash Orange — primary */
  --b2: #FF7A76;   /* gradient mid (coral) */
  --b3: #F83E8E;   /* Hot Pink — accent */
  --b4: #F83E8E;
  --grad: linear-gradient(105deg, #FF6B35 0%, #FF7A76 50%, #F83E8E 100%);
  /* The soft brand tint: a card top, a highlighted row, the promo banner. It was #FFE4C7 → #FFD9DE,
     a tan and a dusty pink, both low on colour — together they read muddy rather than warm. These are
     the tints the marketing site's step cards use (peach walking to pink), which carry their colour
     properly at this lightness. */
  --grad-soft: linear-gradient(112deg, #FFDCBC 0%, #FFCBD5 55%, #FFC4E2 100%);
  --grad-warm: linear-gradient(135deg, #FF8A7A 0%, #F83E8E 100%);

  /* Ink + text (Deep Plum) */
  --ink: #3B1835;
  --ink-2: #5A4753;
  --ink-deep: #241022;      /* dark section */
  --muted: #6E5C68;
  --on-grad: #FFFFFF;

  /* Surfaces
     Neutrals carry a faint Deep-Plum undertone, NOT a peach one. The earlier warm
     cream/sand (#FBF4EF / #F6EDE7) read as dirty yellow next to pure white; these
     cool, near-neutral greys give clean contrast on white while still sitting in
     the plum family with --ink, so surfaces read modern rather than corporate-grey.
     The accent tints below stay warm on purpose — they are the brand "kleuren". */
  --canvas: #FFFFFF;
  --cream: #F8F7F9;         /* near-white section, faint plum-grey */
  --sand: #F1EFF3;          /* slightly deeper cool neutral */
  --tint-peach: #FFE4C7;    /* Peach */
  --tint-pink: #FFD9DE;     /* Soft Blush */
  --tint-lilac: #EADCF8;    /* Lilac */
  --tint-mint: #DFF6E9;     /* Mint */

  /* Lines */
  --line: #EAE7EE;
  --line-strong: #DAD4E0;

  /* Radius */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* Shadow (plum-tinted) */
  --sh-sm: 0 2px 8px rgba(59,24,53,.06);
  --sh-md: 0 12px 32px -8px rgba(59,24,53,.14);
  --sh-lg: 0 30px 70px -20px rgba(59,24,53,.26);
  --sh-glow: 0 24px 60px -18px rgba(248,62,142,.4);

  /* Layout */
  --maxw: 1200px;
  --gut: 32px;
  --nav-h: 76px;

  /* Spacing — a 4px scale. Before this existed the apps had exactly one spacing
     token (--gut) and every other gap was a literal, which is what ~500 inline
     style objects were standing in for. Use these instead of px. */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* ── THE type scale — the whole platform, marketing site and portal alike ─────────────────────────
     Nine steps. Between them they had about two hundred different sizes, most a half-pixel apart and
     none of them meaning anything; the smallest print came out at 11.5px. Each step below has a job.
     Use a step, never a new number: if none fits, the question is whether that block really needs a
     size of its own. Headings scale between phone and desktop; the text sizes are fixed, because body
     text that grows on a wide screen only makes the line length worse. (Agreed 30 Sep 2026.) */
  --t-hero:    clamp(1.875rem, 9.6vw, 5.3rem); /* 31 → 85px (36 on a 375px phone). A marketing hero. One per page. The phone floor was 46px, which
                                                 held seven characters of Poppins 800 on a 375px screen: "Wij zijn / 321Klik."
                                                 (site audit 17 Oct 2026, no single-word lines) */
  --t-h1:      clamp(30px, 6.4vw, 50px);      /* page title, and a section opener on the site */
  --t-h2:      clamp(24px, 4vw, 34px);        /* a heading inside a page; also the amount to read first */
  --t-h3:      20px;                          /* the heading of a block or a card */
  --t-h4:      17.5px;                        /* what a block is about: a product or option name */
  --t-h5:      16px;                          /* the smallest heading: body size, carried by weight 700 */
  --t-body:    16px;                          /* everything that is simply read. 16px = the web baseline (browser default) */
  --t-small:   14px;                          /* small print, field labels, errors. Nothing is smaller */
  --t-micro:   12px;                          /* short uppercase labels on a badge, and nothing else */
  /* the names the portal already used, kept so older rules keep working */
  --t-display: var(--t-h1);
  --t-sm:      var(--t-small);
  --t-caption: var(--t-small);                /* was 12.5px: too small to read on a phone */
  --t-eyebrow: var(--t-micro);
  /* Roles that are a step of the scale above, named so a rule says WHAT it is, not how big
     (site audit 17 Oct 2026: a lead was 17.5px with three different leadings, a button 16 / 17.5 / 17.5 at 800, a
     field 14 / 16 / 17.5). One value per role now. */
  --t-lead:      var(--t-h4);                 /* the standfirst under a heading, the hero's sub line */
  --t-field:     var(--t-body);               /* every input and select: 16px, the floor below which iOS zooms in */
  --t-button:    var(--t-body);               /* a button */
  --t-button-lg: var(--t-h4);                 /* the one big call to action of a hero or a panel */
  --t-title-fit: clamp(21px, 6.6vw, 29px);    /* a page title that must stay on as few lines as its words allow on a phone: the
                                                 login screens (10.7em fits 320px) and the legal titles below 600px ("Algemene
                                                 voorwaarden" stacked one word a line at the h1 step, S21 verify) */

  /* Line-height, one per step. It was never a token: the marketing site had thirty values (.85 to 1.78) and the
     portal twenty, and the same heading level carried four. Big type wants tight leading (its lines are far apart
     already), running text wants air. A rule that sets a size from the scale takes the leading of the same step. */
  --lh-hero:  1;      /* --t-hero */
  --lh-h1:    1.05;   /* --t-h1 */
  --lh-h2:    1.1;    /* --t-h2 */
  --lh-h3:    1.2;    /* --t-h3 */
  --lh-h4:    1.3;    /* --t-h4 / --t-h5 as a heading */
  --lh-lead:  1.55;   /* --t-lead */
  --lh-body:  1.6;    /* --t-body: everything that is simply read */
  --lh-small: 1.45;   /* --t-small and --t-micro */
  --lh-ui:    1;      /* a single line that is not prose: a button, a badge, a numeral, a price */

  /* Letter-spacing, which was the same sprawl: fourteen different values on uppercase labels alone
     (.04em to .34em) and thirteen on headings. Caps need air to be readable; large type
     needs the opposite, or it looks loose; body text needs neither. */
  --track-caps:    .12em;    /* an uppercase label, always */
  --track-tight:   -.02em;   /* a heading at h3 and below */
  --track-tighter: -.035em;  /* the big ones: hero, h1, h2 */
  --track-body:    0;        /* running text, leads, buttons, fields: the face's own spacing. The site inherited
                                -.02em into every paragraph, which made Plus Jakarta Sans read cramped at 16px. */
  --track-stars:   .06em;    /* a row of star glyphs (★★★★★): a little air between the stars, not type */

  /* Four weights, where there were fifteen (420, 460, 540, 560, 640, 660, 720, 740, 760 among them —
     none of which the eye can tell apart from its neighbour). */
  --w-normal: 400;    /* running text */
  --w-medium: 600;    /* labels, buttons */
  --w-bold:   700;    /* emphasis inside a sentence, and the h5 step */
  --w-head:   800;    /* headings */

  /* Focus ring — one definition, so a component that forgets to style focus
     still gets a visible one from the global fallback. */
  --focus: 3px solid color-mix(in srgb, #FF6B35 55%, transparent);
  --focus-offset: 2px;

  /* Type. ONE heading face across the platform (chosen 30 Sep 2026): Poppins, which the homepage hero
     and the step cards already used, so the newest pages are the reference. Archivo, which the older
     section headings and the portal used, is gone — a second heading face on the same page is exactly
     what made it look unsettled, and it is one less font for every visitor to download. */
  /* Self-hosted since 18 Oct 2026 (apps/portal/public/fonts/fonts.css, no Google request). The "… Fallback" faces are
     the local Arial sized to each face's width (declared in fonts.css), so the swap from fallback to web font keeps
     every line break; a surface without fonts.css simply skips them. */
  --font: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --disp: "Poppins", "Poppins Fallback", "Plus Jakarta Sans", system-ui, sans-serif;
  --hand: "Caveat", cursive;   /* the handwritten accent, used sparingly: weight 700 only */
  /* A REAL monospace. This used to be Plus Jakarta Sans, which meant booking
     references and amounts — the strings that most want tabular figures — were
     rendered proportionally despite asking for mono. */
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  /* Semantic status — three roles each: base (icon/accent/border),
     -ink (readable text on the light bg), -bg (tinted surface). Replaces the
     scattered green/red/amber literals across apps. */
  --success: #1ea672;      /* was #16a34a/#059669/#10b981/#22c55e */
  --success-ink: #15803d;  /* was #166534/#15803d/#065f46 */
  --success-bg: #e7f7ee;   /* was #dcfce7/#ecfdf5/#e7f7ee */
  --warning: #d97706;      /* was #f59e0b/#d97706 */
  --warning-ink: #92400e;  /* was #92400e/#9a3412 */
  --warning-bg: #fff3e0;
  --danger: #E11D48;       /* was #dc2626/#e5484d/#e11d48 */
  --danger-ink: #991b1b;   /* was #991b1b/#b91c1c */
  --danger-bg: #fdecef;
  --star: #FFB300;

  /* Legacy portal aliases — kept so existing portal class rules keep working
     unchanged. (Values match the semantic tokens above.) */
  --bg: #FFFCF9;            /* page background (Warm White) */
  --surface: #FFFFFF;
  --text: #3B1835;
  --accent: #FF6B35;
  /* Owner rule: no red/rust text. The old #B8480F read as red, so "accent" text (links, the selected
     item, chips) is the page ink; the brand orange (--accent) carries the accent on icons and buttons.
     Real red (--danger) only for genuine urgency. */
  --accent-ink: var(--ink);
  --border: #EEE2E7;
  --radius: 18px;
  --shadow: var(--sh-sm), 0 12px 30px rgba(59,24,53,.05);

  color-scheme: light;
}
