/*
  Kit Optimizer: design tokens.
  Import this one file: it pulls in fonts.css. Every value other marketing pages need lives here as a
  custom property, so the trailer, store art and docs stay one system. Ready-made pieces (super,
  counter, island tag, proof badge, disclaimer) are in components.css.

    <link rel="stylesheet" href="../brand/tokens.css">

  Units: px at the 1920 x 1080 video frame and the 1920-wide store layouts. Scale with the frame for
  other sizes (for example multiply by 1950/1920 on the 1950 x 1300 cover).
*/
@import url("fonts.css");

:root {
  /* ---------------------------------------------------------------- colour: neutrals */
  --wpm-ink: #0A0C0F;          /* page and video background */
  --wpm-graphite: #12151A;     /* panels, cards (always solid, never translucent) */
  --wpm-slate: #1B2027;        /* raised surfaces, inputs, chips */
  --wpm-hairline: #2A313B;     /* 1 px rules, grid lines, card borders */
  --wpm-faint: #5B6573;        /* NOT for small text: only text >= 18 px, or non-text (ticks, grid labels drawn large) */
  --wpm-muted: #8A94A3;        /* secondary text; every text under 18 px that is not primary (6.4:1 on ink) */
  --wpm-text: #EEF2F6;         /* primary text */

  /* ---------------------------------------------------------------- colour: accents
     Accents are flat. No gradients, glows or inset highlights on a swatch, a logo or a label. */
  --wpm-cyan: #3DE0FF;         /* "atlas cyan": after, optimised, the brand */
  --wpm-cyan-hi: #9BF0FF;      /* highlight on large cyan surfaces (store icon only) */
  --wpm-cyan-lo: #12A9CF;      /* shaded side of large cyan surfaces (store icon only) */
  --wpm-amber: #FFB547;        /* "before amber": the original, the cost */
  --wpm-green: #5CF2A5;        /* proof: only a check that really ran and passed, named on the badge */

  /* Semantic aliases. Use these in compositions so the meaning stays explicit. */
  --wpm-after: var(--wpm-cyan);
  --wpm-before: var(--wpm-amber);
  --wpm-proof: var(--wpm-green);
  --wpm-brand: var(--wpm-cyan);

  /* Accent washes (fills behind accent text, selection). */
  --wpm-cyan-a08: rgba(61, 224, 255, 0.08);
  --wpm-cyan-a16: rgba(61, 224, 255, 0.16);
  --wpm-cyan-a32: rgba(61, 224, 255, 0.32);
  --wpm-amber-a12: rgba(255, 181, 71, 0.12);
  --wpm-green-a12: rgba(92, 242, 165, 0.12);
  --wpm-white-a04: rgba(238, 242, 246, 0.04);
  --wpm-white-a08: rgba(238, 242, 246, 0.08);

  /* ---------------------------------------------------------------- colour: UV islands
     One hue per island, wherever it appears (mesh, UV view, atlas page). Outline 1.5 px at full
     strength; fill 16-24%. Never for text or UI chrome.
     Hue 3 is the "after" cyan and hue 5 the "before" amber: in any frame that shows before/after,
     use only hues 1, 2, 4, 6, 7 and 8 (--wpm-island-ba-1..6 below). */
  --wpm-island-1: #FF4D9D;     /* rose */
  --wpm-island-2: #8C7CFF;     /* violet */
  --wpm-island-3: #3DE0FF;     /* cyan  (not in before/after frames) */
  --wpm-island-4: #B6F03C;     /* lime */
  --wpm-island-5: #FFB547;     /* amber (not in before/after frames) */
  --wpm-island-6: #FF6B5A;     /* coral */
  --wpm-island-7: #2ED3B7;     /* teal */
  --wpm-island-8: #4DA3FF;     /* azure */
  --wpm-island-ba-1: var(--wpm-island-1);
  --wpm-island-ba-2: var(--wpm-island-2);
  --wpm-island-ba-3: var(--wpm-island-4);
  --wpm-island-ba-4: var(--wpm-island-6);
  --wpm-island-ba-5: var(--wpm-island-7);
  --wpm-island-ba-6: var(--wpm-island-8);
  --wpm-island-stroke: 1.5px;
  --wpm-island-fill-opacity: 0.2;   /* 0.16-0.24 */

  /* ---------------------------------------------------------------- type: families
     Defined in fonts.css: --wpm-font-display, --wpm-font-text, --wpm-font-mono, --wpm-font-serif */

  /* ---------------------------------------------------------------- type: scale (px) */
  --wpm-type-hero: 160px;      /* end card, single words */
  --wpm-type-d1: 120px;        /* headline supers, 1 line */
  --wpm-type-d2: 96px;         /* headline supers, 2 lines */
  --wpm-type-d3: 72px;         /* section titles, store art titles */
  --wpm-type-h1: 56px;
  --wpm-type-h2: 40px;
  --wpm-type-h3: 32px;
  --wpm-type-h4: 24px;         /* subheads (Inter Tight 500, muted) */
  --wpm-type-body-l: 20px;
  --wpm-type-body: 16px;
  --wpm-type-label: 14px;      /* mono uppercase labels */
  --wpm-type-micro: 12px;      /* the minimum for any text: mono captions, legal */
  --wpm-type-hud: 64px;        /* mono numbers in HUD counters */

  /* Tracking (letter-spacing) by size band. */
  --wpm-track-hero: -0.045em;  /* >= 120 px */
  --wpm-track-display: -0.04em;/* 72-119 px */
  --wpm-track-heading: -0.03em;/* 32-71 px */
  --wpm-track-title: -0.02em;  /* 20-31 px */
  --wpm-track-body: 0.01em;    /* Inter Tight 12-19 px text: open it slightly */
  --wpm-track-label: 0.08em;   /* mono uppercase labels, 13 px and up */
  --wpm-track-label-wide: 0.1em; /* mono uppercase labels at 12 px (the maximum) */
  /* Negative tracking also closes word spaces; give them back at display sizes (96 px and up). */
  --wpm-word-space-display: 0.04em;

  /* Leading. */
  --wpm-leading-display: 0.94;
  --wpm-leading-display-serif: 0.98; /* a multi-line display block containing an accent-serif word */
  --wpm-leading-heading: 1.04;
  --wpm-leading-body: 1.5;
  --wpm-leading-mono: 1.35;

  /* The accent serif is set 1.07x the surrounding size: that matches its x-height (0.510 em) to
     Inter Tight's (0.546 em). Its descender is deeper (0.31 em against 0.24 em): see the leading above. */
  --wpm-accent-scale: 1.07em;

  /* Weights. Inter Tight is variable (100-900); JetBrains Mono (100-800). */
  --wpm-weight-display: 700;
  --wpm-weight-display-heavy: 800;
  --wpm-weight-heading: 650;
  --wpm-weight-subhead: 500;
  --wpm-weight-body: 450;
  --wpm-weight-mono: 500;
  --wpm-weight-mono-strong: 700;

  /* ---------------------------------------------------------------- space (4 px base) */
  --wpm-space-1: 4px;
  --wpm-space-2: 8px;
  --wpm-space-3: 12px;
  --wpm-space-4: 16px;
  --wpm-space-5: 24px;
  --wpm-space-6: 32px;
  --wpm-space-7: 48px;
  --wpm-space-8: 64px;
  --wpm-space-9: 96px;
  --wpm-space-10: 128px;
  /* Safe areas at 1920 x 1080: title-safe 96 px sides, 64 px top and bottom. */
  --wpm-safe-x: 96px;
  --wpm-safe-y: 64px;

  /* ---------------------------------------------------------------- radii */
  --wpm-radius-xs: 4px;        /* tags, chips */
  --wpm-radius-sm: 8px;        /* buttons, inputs, small swatches */
  --wpm-radius-md: 12px;       /* cards on video */
  --wpm-radius-lg: 16px;       /* panels, UI captures */
  --wpm-radius-xl: 24px;       /* hero panels */
  --wpm-radius-mark: 22.2%;    /* rounded-square fallback for the mark container (the SVG uses a superellipse) */
  --wpm-radius-tile: 0;        /* atlas tiles and islands' charts: square, they are texture, not UI */

  /* ---------------------------------------------------------------- borders, shadows */
  --wpm-border: 1px solid var(--wpm-hairline);
  --wpm-border-soft: 1px solid rgba(238, 242, 246, 0.06);
  --wpm-highlight-top: inset 0 1px 0 rgba(238, 242, 246, 0.06);
  --wpm-shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.4);
  --wpm-shadow-float: 0 24px 64px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
  --wpm-glow-cyan: 0 0 24px rgba(61, 224, 255, 0.35), 0 0 80px rgba(61, 224, 255, 0.18); /* motion and the icon only */
  --wpm-scrim: rgba(10, 12, 15, 0.6); /* behind text over footage (never drop shadows on flat text) */

  /* ---------------------------------------------------------------- motion
     60 fps masters. One easing family; nothing overshoots (tiles land exactly where they belong).
     Every duration is a whole number of frames: --wpm-f is one frame. The plain numbers (-f) are for
     scripts that count frames. */
  --wpm-ease-out: cubic-bezier(0.16, 1, 0.3, 1);     /* entrances (ease-out expo), 10-14 f */
  --wpm-ease-in: cubic-bezier(0.7, 0, 0.84, 0);      /* exits, 6-8 f, always faster than the entrance */
  --wpm-ease-inout: cubic-bezier(0.65, 0, 0.35, 1);  /* wipes, camera moves, counters, 18-24 f */

  --wpm-fps: 60;
  --wpm-f: calc(1000ms / 60);
  --wpm-dur-enter-f: 12;
  --wpm-dur-enter-long-f: 14;
  --wpm-dur-exit-f: 7;
  --wpm-dur-wipe-f: 21;
  --wpm-stagger-word-f: 2;     /* 2 f between words; 3 f for slower, larger lines */
  --wpm-stagger-word-slow-f: 3;
  --wpm-stagger-char-f: 1;
  --wpm-beat-f: 30;            /* 120 BPM: 1 beat = 30 f */
  --wpm-bar-f: 120;            /* 1 bar = 4 beats = 120 f; major cuts on the downbeat */
  --wpm-dur-enter: calc(12 * var(--wpm-f));
  --wpm-dur-enter-long: calc(14 * var(--wpm-f));
  --wpm-dur-exit: calc(7 * var(--wpm-f));
  --wpm-dur-wipe: calc(21 * var(--wpm-f));
  --wpm-stagger-word: calc(2 * var(--wpm-f));
  --wpm-stagger-word-slow: calc(3 * var(--wpm-f));
  --wpm-stagger-char: calc(1 * var(--wpm-f));
  --wpm-beat: calc(30 * var(--wpm-f));
  --wpm-bar: calc(120 * var(--wpm-f));
  --wpm-reveal-distance: 0.42em;   /* mask reveal: text rises this far from behind its clip edge */
  --wpm-reveal-blur: 6px;          /* blur-to-sharp at the start of an entrance */

  /* ---------------------------------------------------------------- finishing (motion only)
     Grain: soft-light blend of noise whose mean is mid-grey, at about 3%. Never screen or add (they
     lift the black level). Never over swatches, logos or editor UI captures, and never on static
     deliverables (store images, the brand sheet). Vignette: motion only, never over UI captures. */
  --wpm-grain-opacity: 0.03;
  --wpm-grain-blend: soft-light;
  --wpm-vignette: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
  --wpm-texel-grid: 1px;           /* texel and atlas grid lines are always 1 device pixel */
}

/* Handy role classes. Compositions may use them or copy the declarations. */
.wpm-display {
  font-family: var(--wpm-font-display);
  font-weight: var(--wpm-weight-display);
  letter-spacing: var(--wpm-track-display);
  line-height: var(--wpm-leading-display);
  font-feature-settings: var(--wpm-features-display);
}
.wpm-display:has(.wpm-accent) { line-height: var(--wpm-leading-display-serif); }
.wpm-accent {
  font-family: var(--wpm-font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--wpm-accent-scale);
  letter-spacing: -0.01em;
  word-spacing: normal;
}
.wpm-subhead {
  font-family: var(--wpm-font-text);
  font-weight: var(--wpm-weight-subhead);
  font-size: var(--wpm-type-h4);
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--wpm-muted);
}
.wpm-body {
  font-family: var(--wpm-font-text);
  font-weight: var(--wpm-weight-body);
  letter-spacing: var(--wpm-track-body);
  line-height: var(--wpm-leading-body);
}
.wpm-mono {
  font-family: var(--wpm-font-mono);
  font-weight: var(--wpm-weight-mono);
  font-feature-settings: var(--wpm-features-mono);
  font-variant-numeric: tabular-nums;
}
.wpm-label {
  font-family: var(--wpm-font-mono);
  font-weight: var(--wpm-weight-mono);
  font-size: var(--wpm-type-label);
  letter-spacing: var(--wpm-track-label);
  text-transform: uppercase;
  font-feature-settings: var(--wpm-features-mono);
  font-variant-numeric: tabular-nums;
  color: var(--wpm-muted);
}
