/* logswap identity — 7 "Spiral" */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --logswap-black: #0c0c0d;
  --logswap-ink: #f4f2ec;
  --logswap-gold: #e6c64f;
  --logswap-grey: #8f8d84;
  --logswap-line: #26262a;

  --logswap-font-display: 'Chakra Petch', sans-serif;
  --logswap-font-mono: 'IBM Plex Mono', monospace;
}

/* Lockup ------------------------------------------------------------ */
.logswap-lockup { display: flex; align-items: center; gap: 22px; font-family: var(--logswap-font-display); color: var(--logswap-ink); }
.logswap-lockup img, .logswap-lockup svg { flex-shrink: 0; width: 110px; height: 110px; }
.logswap-wordmark { font-size: 52px; font-weight: 700; letter-spacing: -.03em; line-height: .95; }
.logswap-wordmark .paren { color: var(--logswap-grey); }
.logswap-tagline { font-family: var(--logswap-font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--logswap-accent); margin-top: 10px; white-space: nowrap; }

/* Small lockup (nav / header) */
.logswap-lockup--sm { gap: 12px; }
.logswap-lockup--sm img, .logswap-lockup--sm svg { width: 42px; height: 42px; }
.logswap-lockup--sm .logswap-wordmark { font-size: 18px; letter-spacing: -.02em; }
.logswap-lockup--sm .logswap-tagline { display: none; }

/* On gold or ink backgrounds, swap to the ink mark and dark type */
.logswap-lockup--onlight { color: var(--logswap-black); }

/* Palettes ---------------------------------------------------------- */
/* The same table as unimod-design and the app's theme.ts. The identity's own colours are the
   default (`logswap`); the rest are alternates, cycled with the palette control.

   Three colours. Slots are assigned by LUMINANCE, not by table order, so every palette reads the
   same way regardless of how its four colours happen to be listed:
     --logswap-s0  brightest
     --logswap-s1  third brightest (recedes)
     --logswap-s2  second brightest, and the accent
   That is the identity's own arrangement — ink, grey, gold. The convention outlived the square
   chain it was written for: the spiral names three ROLES over these slots rather than using them
   directly, so a palette whose colours sit in an unusual order can permute them. See the cluster
   role block at the end of this file, and design/README.md. */

:root {
  --logswap-s0: var(--logswap-ink);
  --logswap-s1: var(--logswap-grey);
  --logswap-s2: var(--logswap-gold);
  --logswap-accent: var(--logswap-gold);
}

/* Data series -------------------------------------------------------- */
/* Two quantities charted against each other take the two slots FURTHEST apart in luminance, so
   they stay distinguishable in every palette and for anyone reading by brightness rather than hue.
   The brightest slot is reserved for LIQUIDITY (L) — it is the headline quantity and the one a
   reader should find first. Quote takes the dimmest, since it is derived from L: quote = L(x − ξ).

   These reference the slot variables rather than copying values, so a [data-pal] switch flows
   through: custom properties resolve at use, and data-pal sets the slots on the same element. */
:root {
  --logswap-viz-l: var(--logswap-s0);
  --logswap-viz-quote: var(--logswap-s1);
}
/* marine — the palette the design mockups are drawn in. It is NOT the app's default: that is
   `logswap`, the identity's own, which is what the app, the landing page and the microsites all
   open on. Marine was the default once, and the claim outlived the change.

   One departure from the rule above, deliberate and confined to this palette: it restates
   black / ink / line. The mockups sit on a cool near-black with neutral type, and the identity's
   warm cream on warm black reads as a different product against it. Every other palette inherits
   the identity's own three, so this is an override, not a new default.

   There used to be a second departure recorded here — the accent on the largest square rather
   than the smallest. That was not a departure but a mis-entry: the slots were out of luminance
   order, and a cluster-role override existed to paper over it. Both are fixed, and the values
   below satisfy s0 > s2 > s1 with the accent on s2 like every other palette. See design/README.md,
   'Roles, not slots'. */
[data-pal="marine"] {
  --logswap-black:#08090b;
  --logswap-ink:#e9edee;
  --logswap-grey:#7c8a87;
  --logswap-line:#1f2326;
  --logswap-s0:#8fe3bd; --logswap-s1:#2f6fd8; --logswap-s2:#4ade9c; --logswap-accent:#4ade9c;
  /* Two greens rather than a green and a grey: the position bars are read as one quantity against
     another, and the mockups separate them by depth. L keeps the brightest slot (see above). */
  --logswap-viz-l:#4ade9c;
  --logswap-viz-quote:#2f8f6b;
}

/* The identity's own ink / grey / gold, restated as a selectable palette. It is what `:root` above
   already carries, so this block changes nothing on a surface that sets no attribute — the landing
   and the microsites still open on it. The app names a default of `marine` and therefore always
   sets the attribute, which needs a block to point at. */
[data-pal="logswap"] {
  --logswap-s0: var(--logswap-ink); --logswap-s1: var(--logswap-grey); --logswap-s2: var(--logswap-gold);
  --logswap-accent: var(--logswap-gold);
}

[data-pal="woodland"] { --logswap-s0:#6f6a4b; --logswap-s1:#2c2b1e; --logswap-s2:#4a4a33; --logswap-accent:#4a4a33; }
[data-pal="desert"] { --logswap-s0:#c9b48a; --logswap-s1:#6f5a3c; --logswap-s2:#a98f5e; --logswap-accent:#a98f5e; }
[data-pal="urban"] { --logswap-s0:#c9cccb; --logswap-s1:#5f6666; --logswap-s2:#9aa0a0; --logswap-accent:#9aa0a0; }
[data-pal="winter"] { --logswap-s0:#edefec; --logswap-s1:#9aa39d; --logswap-s2:#ccd1cd; --logswap-accent:#ccd1cd; }
[data-pal="tiger"] { --logswap-s0:#c1a35d; --logswap-s1:#2b3020; --logswap-s2:#5c6340; --logswap-accent:#5c6340; }
[data-pal="blaze"] { --logswap-s0:#c9b483; --logswap-s1:#6f5a3c; --logswap-s2:#e2661f; --logswap-accent:#e2661f; }
[data-pal="green"] { --logswap-s0:#aecb8c; --logswap-s1:#3f7c39; --logswap-s2:#6fa254; --logswap-accent:#6fa254; }
/* deepsky — the astronomer's dark blue, for the emblem's own subject matter. Navy recedes, the
   sky blue takes the accent, ice blue resolves the glints. The name is one word because the
   palette control finds these blocks with /^\[data-pal="([a-z]+)"\]$/ — a hyphen and it is
   invisible to both the app and the landing page. */
[data-pal="deepsky"] { --logswap-s0:#cfe1f7; --logswap-s1:#2f5288; --logswap-s2:#5b9fdd; --logswap-accent:#5b9fdd; }
[data-pal="yellow"] { --logswap-s0:#f1de89; --logswap-s1:#c39a26; --logswap-s2:#e2c04e; --logswap-accent:#e2c04e; }
[data-pal="prism"] { --logswap-s0:#e6c64f; --logswap-s1:#3f6fb0; --logswap-s2:#6fa250; --logswap-accent:#6fa250; }
[data-pal="teal"] { --logswap-s0:#8fc9a8; --logswap-s1:#2f6f8a; --logswap-s2:#4fa88f; --logswap-accent:#4fa88f; }
[data-pal="meadow"] { --logswap-s0:#dfe08a; --logswap-s1:#6f9e4f; --logswap-s2:#a9c46a; --logswap-accent:#a9c46a; }
[data-pal="rust"] { --logswap-s0:#c98a4a; --logswap-s1:#5f3a20; --logswap-s2:#9c5a2f; --logswap-accent:#9c5a2f; }
[data-pal="arctic"] { --logswap-s0:#dde7ea; --logswap-s1:#6f92a3; --logswap-s2:#a9c2cf; --logswap-accent:#a9c2cf; }
[data-pal="moss"] { --logswap-s0:#b7c48a; --logswap-s1:#4f6f34; --logswap-s2:#7f9e4f; --logswap-accent:#7f9e4f; }
[data-pal="orchid"] { --logswap-s0:#e6c64f; --logswap-s1:#2f8f82; --logswap-s2:#b9a3d9; --logswap-accent:#b9a3d9; }
[data-pal="ember"] { --logswap-s0:#d9b48a; --logswap-s1:#a52f22; --logswap-s2:#e0762b; --logswap-accent:#e0762b; }
[data-pal="tide"] { --logswap-s0:#3fb0a8; --logswap-s1:#1f6f8a; --logswap-s2:#f06a52; --logswap-accent:#f06a52; }
[data-pal="dusk"] { --logswap-s0:#f0c24a; --logswap-s1:#d94f8c; --logswap-s2:#3fb6d6; --logswap-accent:#3fb6d6; }

/* Two palettes put a near-black in the s1 slot (contrast under 1.3 against the card), which would
   render the quote series invisible rather than merely dim. They fall back to s2 — less separation
   from s0 than the rule wants, but a bar you cannot see conveys nothing at all. */
[data-pal="woodland"] { --logswap-viz-quote: var(--logswap-s2); }
[data-pal="tiger"]    { --logswap-viz-quote: var(--logswap-s2); }

/* The emblem's roles --------------------------------------------------- */
/* The emblem (design/logswap-mark-slots.svg, the vortex) names ROLES rather than slots, so a
   palette whose colours do not sit in the usual luminance order can permute them without the mark
   being redrawn. The default is the order every palette but two already has.

     halo   the outer sub-arm, the edge underneath — the dimmest colour
     core   the inner sub-arm, the body drawn over — the accent, so the mark is the palette's own
     glint  unused since the vortex (the lattice spent it on a few bright squares); kept so a
            palette override written against it still parses

   The rule the overrides below follow: core must be brighter than halo. */
:root {
  --logswap-cluster-halo: var(--logswap-s1);
  --logswap-cluster-core: var(--logswap-s2);
  --logswap-cluster-glint: var(--logswap-s0);
}

/* woodland and tiger are near-blacks: their dimmest slot scores under 1.5 against the plate, so
   the halo would not be there at all. Both roles step up one, which costs the accent its place —
   the alternative is an invisible halo or an inverted core, and either is worse. */
[data-pal="woodland"] { --logswap-cluster-halo: var(--logswap-s2); --logswap-cluster-core: var(--logswap-s0); --logswap-cluster-glint: var(--logswap-s0); }
[data-pal="tiger"]    { --logswap-cluster-halo: var(--logswap-s2); --logswap-cluster-core: var(--logswap-s0); --logswap-cluster-glint: var(--logswap-s0); }
