/* Midnight glass: the customer-facing theme of Originium VPN (portal now, website later).
   Source: /var/tmp/portal-moods/tokens-midnight.json (DTCG) and HANDOVER.md, by desk-design, 2026-11-11.
   This file is the theme's only source of colour. scripts/sync-tokens.mjs copies it to portal/portal/static/midnight.css;
   scripts/check-tokens.mjs keeps the copy equal and every other stylesheet free of colour literals.
   Rules the values cannot say (when gold appears, one hero per screen, no count in brand lines) are in HANDOVER.md. */
:root {
  /* night */
  --mg-bg: #000;
  /* W1, moonlight everywhere (the owner, 2026-11-12: "I actually like w1"): every white and every ivory is one cool
     moonlight; no pure white anywhere; gold stays the lights, the routes, the focus ring and the tap marker.
     W0 (before) kept as a set: ink #eef1f6, mute #a1a9b8, faint #828a9a, act and QR tile #f5efe2 / #fbf7ee / #eadfc8,
     QR edge rgba(150,120,70,.25), Q1 dot and icon #ece6da, note rgba(245,239,226,.06) / .22 / #e8e3d8, white #fff,
     hairlines and glass rgba(255,255,255,a).
     W3 (the parent's pick, on file): W1's text, but act, QR tile and the switch's chosen side stay W0's ivory. */
  --mg-ink: #e4e9f4;          /* moonlight: text, focus rings; 17.3:1 */
  --mg-mute: #9aa3b6;         /* secondary text; 8.3:1 */
  --mg-faint: #808a9e;        /* small print; 6.0:1 */
  --mg-unlit: #5d6574;        /* large unlit city names only (32px and up) */
  --mg-waiting: #7c8494;      /* waiting states on glass; 4.9:1 on glass */
  /* gold: only a lit city and the one action that matters on a screen */
  --mg-gold: #f3c27a;
  --mg-gold-hi: #fbe2b4;
  --mg-gold-lo: #d9a55a;
  --mg-gold-on: #1d1406;
  --mg-gold-soft: #c9b07e;    /* the word "coming" */
  --mg-gold-glow: rgba(243, 194, 122, .6);
  --mg-gold-edge: rgba(243, 194, 122, .55);
  --mg-gold-haze: rgba(243, 194, 122, .2);
  /* the one primary action: C, ivory (2026-11-12; the owner liked B or C, the parent picked C): the QR tile's material,
     the one light object on a dark page, so the main action is found at once; gold stays for the lights, the routes,
     the Plus card's edge and the guides' tap marker. Other sets, a swap of these five values:
       A matte gold  --mg-act #d9b26e, hover #e1bb79, press #cda566, ink #1d1406, ring var(--mg-ink)
       B outlined    transparent fill with an inset 1 px #d9b26e edge and #d9b26e label (also change the .act rule's
                     box-shadow and hover fill; see MIDNIGHT.md rule 15) */
  --mg-act: #e4e9f4;          /* --mg-qr-tile: moonlight (W1) */
  --mg-act-hover: #edf1f9;    /* --mg-qr-tile-hi: one step lighter */
  --mg-act-press: #d6dcea;    /* --mg-qr-tile-lo: one step darker */
  --mg-act-ink: #13161d;      /* --mg-qr-ink, about 15:1 on the fill */
  --mg-act-ring: #d9b26e;     /* the focus ring on the action: a thin gold line, clear beside moonlight and below a ringed field */
  /* atmosphere: light, never text */
  /* Look 1, navy and ivory (the owner, 2026-11-12: "the blue looks pretty cheap"; she chose Look 1): blue only as
     depth (the sea, the night sky); highlights are pale moonlight, notes ivory; gold is a light or the tap marker.
     Look 2, slate blue, kept as a set: rim #8ea2c7, sky-glow rgba(142,162,199,.12), horizon rgba(60,80,130,.26),
     horizon-far rgba(28,38,75,.1), tile-top #1b2333, tile-bottom #070a12, tile-glow rgba(110,130,170,.3),
     icon #dbe2ee, globe-sea #162138 / #080d18 / #03060c, globe-land #cfd8e8, star #d4dcee,
     note rgba(142,162,199,.12), note-edge rgba(142,162,199,.32), note-text #d6dbe4 (and globe.js ratios, see there). */
  --mg-rim: #bfc9de;
  --mg-sky-glow: rgba(60, 85, 150, .1);
  --mg-horizon: rgba(25, 45, 115, .26);
  --mg-horizon-far: rgba(12, 22, 60, .12);
  --mg-vignette: rgba(0, 0, 0, .85);
  --mg-line: rgba(244, 247, 252, .06);
  --mg-line-strong: rgba(244, 247, 252, .14);
  --mg-field-edge: rgba(244, 247, 252, .4);   /* form input edge; 3.5:1 on black, 3.2:1 on 6% fill (WCAG 1.4.11) */
  /* glass */
  --mg-glass-top: rgba(244, 247, 252, .1);
  --mg-glass-bottom: rgba(244, 247, 252, .04);
  --mg-glass-card-top: rgba(244, 247, 252, .09);
  --mg-glass-card-mid: rgba(244, 247, 252, .025);
  --mg-glass-edge: rgba(244, 247, 252, .09);
  --mg-glass-light: rgba(244, 247, 252, .18);
  --mg-glass-sheen: rgba(244, 247, 252, .1);
  --mg-shade: rgba(0, 0, 0, .9);
  --mg-sheet: #0d0f14;           /* a sheet over the page (the large QR code) */
  --mg-tile-top: #152038;
  --mg-tile-bottom: #060a14;
  --mg-tile-glow: rgba(150, 160, 185, .18);
  --mg-icon: #dde3ee;
  /* the home globes' own render, drawn by globe.js: never text */
  --mg-globe-sea: #0c1d48;        /* the lower globe's sea where it is lit */
  --mg-globe-sea-mid: #081534;
  --mg-globe-sea-edge: #040918;
  --mg-globe-land: #d6dcea;       /* the lower globe's moonlit land dots */
  --mg-star: #e4e4e6;             /* the starfield */
  --mg-star-warm: #ffe4be;        /* one star in seven */
  /* the night globe (night.js): the real Earth at night; colours of the render, never text */
  --mg-night-sea: #030713;        /* the sea at night: almost black, a breath of navy */
  --mg-night-land: #0d1019;       /* land, barely above the sea; the moonlit surface lifts and lowers it */
  --mg-night-air: #26407e;        /* the thin atmosphere at the edge: deep blue */
  /* the QR code is a light object: dark modules on moonlight */
  --mg-qr-ink: #13161d;
  --mg-qr-tile: #e4e9f4;
  --mg-qr-tile-hi: #edf1f9;
  --mg-qr-tile-lo: #d6dcea;
  --mg-qr-tile-edge: rgba(120, 135, 165, .25);
  /* Q1 "lights on navy" (the owner's pick): moonlight round dots and ring finders on a deep navy tile, light-on-dark */
  --mg-qr-art-dot: #e4e9f4;
  --mg-qr-art-tile: #0a1630;      /* the tile's middle */
  --mg-qr-art-tile-edge: #060e22; /* falls slightly darker to the edge */
  --mg-qr-art-line: rgba(244, 247, 252, .12);  /* the hairline edge */
  /* notices */
  --mg-note: rgba(228, 233, 244, .06);
  --mg-note-edge: rgba(228, 233, 244, .22);
  --mg-note-text: #dde3ee;
  --mg-error: #ffb4a8;
  --mg-error-bg: rgba(255, 120, 100, .1);
  --mg-error-edge: rgba(255, 140, 120, .35);
  --mg-white: #f4f7fc;        /* never pure white (W1) */

  /* type: one family */
  --mg-font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;   /* font 2, chosen 2026-11-12 */
  --mg-display-hero: clamp(2.875rem, 7.3vw, 6.5rem);   /* 104 at most: "The world," stays one line in the hero's column on 2K and 4K */
  --mg-display-section: clamp(2rem, 4.1vw, 4rem);   /* Geist sets ~14% wider than the old face: sizes are ~10% smaller for the same lines */
  --mg-display-page: clamp(2.1875rem, 4.3vw, 4rem);
  --mg-price: clamp(4rem, 6vw, 6rem);
  --mg-city: clamp(2rem, 3.8vw, 3.75rem);
  --mg-city-two: clamp(1.625rem, 2.4vw, 2.5rem);
  --mg-text: 1.125rem;
  --mg-lede: clamp(1.0625rem, 1.35vw, 1.1875rem);
  --mg-small: 0.9375rem;
  --mg-caption: 0.8125rem;
  --mg-track-display: -.04em;
  --mg-track-section: -.035em;
  --mg-weight-display: 600;   /* hero, page and section headings */

  /* the text scale (2026-11-12, owner's direction): seven sizes, each with its line height. Display sizes above are
     for the home page's set pieces; everything a customer reads or presses uses these. */
  --mg-fs-title: clamp(2rem, 3.2vw, 2.75rem);  --mg-lh-title: 1.06;    /* a page's one title */
  --mg-fs-heading: 1.5rem;                    --mg-lh-heading: 1.2;   /* a card's heading */
  --mg-fs-subhead: 1.25rem;                    --mg-lh-subhead: 1.3;   /* a row's name (a device) */
  --mg-fs-body: 1.125rem;                       --mg-lh-body: 1.6;      /* running text */
  --mg-fs-ui: 1rem;                         --mg-lh-ui: 1.4;        /* buttons, fields, status lines */
  --mg-fs-small: 0.9375rem;                      --mg-lh-small: 1.5;     /* hints under a control */
  --mg-fs-caption: 0.8125rem;                    --mg-lh-caption: 1.45;  /* labels; never in --mg-faint */
  --mg-weight-regular: 400;
  --mg-weight-medium: 500;   /* glass buttons, card headings, names */
  --mg-weight-strong: 600;   /* titles and the gold action */
  --mg-track-title: -.03em;
  --mg-track-heading: -.015em;

  /* one spacing scale */
  --mg-space-1: 4px;  --mg-space-2: 8px;  --mg-space-3: 12px;  --mg-space-4: 16px;
  --mg-space-5: 24px; --mg-space-6: 32px; --mg-space-7: 48px;  --mg-space-8: 64px;
  /* three content widths */
  --mg-width-text: 680px;    /* reading: guides, legal, messages */
  --mg-width-app: 1080px;    /* the account: two columns from 1024 px */
  --mg-width-wide: 1240px;   /* plans, home sections */

  /* space and shape */
  --mg-gutter: clamp(20px, 4.2vw, 64px);
  --mg-section: clamp(56px, 6vw, 96px);   /* home sections (2026-11-12: tighter, the page was 4,100 px for 120 words) */
  --mg-measure: 1240px;
  /* corners B, restrained (chosen 2026-11-12): the pill is kept for the one gold action only */
  --mg-pill: 999px;
  --mg-card: 16px;            /* cards and panels */
  --mg-control-corner: 12px;  /* fields, glass buttons, the QR switch */
  --mg-row: 12px;             /* notices, rows, the QR tile, small icon tiles */
  --mg-tile: 16px;            /* the large icon tiles */
  --mg-control: 56px;
  --mg-control-glass: 52px;

  /* motion (2026-11-12, from agy's motion baseline): one easing and three durations; every control, disclosure and
     piece of feedback uses only these. Reduced motion turns all of them off (portal.css, the end).
       quick     a press, a close, the focus ring, a label that changes
       standard  a hover, an open (a disclosure, the QR sheet, the switch's thumb)
       slow      something that arrives or is being prepared */
  --mg-ease: cubic-bezier(.22, .61, .15, 1);
  --mg-t-quick: 120ms;
  --mg-t-standard: 200ms;
  --mg-t-slow: 400ms;
  --mg-slow: .8s;   /* the globes' own fades only (the night globe's first frame, the cities list, the plan-row globe): never a control */
}
