/* Hypersphere public site: typefaces and tokens (docs/site.md, "Look").
   Loaded after tokens.css, which tools/design/build_tokens.mjs generates from design/tokens.json
   (the workstation's own tokens: never edit it). Every page pins data-theme="dark", so the
   generated --hs-* values are the workstation's dark appearance. The --site-* and --c-* tokens
   below are the site's own; each comment names the product token or Scene colour it comes from. */

/* ----- typefaces: self-hosted SIL OFL 1.1 subsets (tools/site/fonts.py, licences in fonts/OFL-*.txt).
   Chakra Petch is set at 600 only (headings, panel titles, buttons, kickers). ----- */

@font-face {
	font-family: "Chakra Petch";
	src: url("../fonts/chakra-petch-600-e88d75046c.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Saira";
	src: url("../fonts/saira-var-c6fc703803.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("../fonts/jetbrains-mono-var-c70aefbc9b.woff2") format("woff2");
	font-weight: 400 600;
	font-style: normal;
	font-display: swap;
}
/* Metric-matched fallbacks (measured against Arial with fontTools): text keeps its line
   breaks while the faces load, so nothing moves when they arrive. */
@font-face {
	font-family: "Chakra Petch Fallback";
	src: local("Arial"), local("ArialMT"), local("Helvetica");
	size-adjust: 106.4%;
	ascent-override: 93.2%;
	descent-override: 28.9%;
	line-gap-override: 0%;
}
@font-face {
	font-family: "Saira Fallback";
	src: local("Arial"), local("ArialMT"), local("Helvetica");
	size-adjust: 104.1%;
	ascent-override: 109.1%;
	descent-override: 42.2%;
	line-gap-override: 0%;
}

:root {
	color-scheme: dark;

	--site-font-display: "Chakra Petch", "Chakra Petch Fallback", Bahnschrift, "DIN Alternate", "Arial Narrow", system-ui, sans-serif;
	--site-font-text: "Saira", "Saira Fallback", Bahnschrift, "DIN Alternate", "Segoe UI", system-ui, sans-serif;
	--site-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

	/* surfaces and glass */
	--site-canvas: var(--hs-color-surface-canvas, #05070d);   /* the Scene's clear colour */
	--site-base: #0a0f1a;                                      /* surface.base */
	--site-sunken: #070b14;                                    /* surface.sunken */
	--site-glass-top: rgba(24, 38, 56, .80);                   /* the mockup-measured card sheen */
	--site-glass-bottom: rgba(9, 17, 27, .80);
	--site-glass-solid: #0f1925;                               /* glass.cardSolid */
	--site-titlebar: rgba(10, 22, 37, .86);                    /* glass.titleBar */
	--site-hud: rgba(14, 22, 38, .78);                         /* glass.hud */
	--site-hair: rgba(255, 255, 255, .12);                     /* glass.border */
	--site-hair-soft: rgba(255, 255, 255, .065);
	--site-highlight: rgba(255, 255, 255, .09);                /* glass.highlight */
	--site-well: rgba(0, 0, 0, .30);                           /* glass.well */
	--site-shadow: inset 0 1px 0 var(--site-highlight), 0 10px 30px rgba(0, 0, 0, .5);

	/* text (text.primary … text.tertiary) */
	--site-text: #f2f5fa;
	--site-text-2: #d6dde6;
	--site-text-3: #aeb8c8;
	--site-text-4: #8a95a8;

	/* the action colour: station cyan (palette 12), not the app's chrome blue */
	--site-accent: #56d3da;
	--site-accent-hover: #7fe2e7;
	--site-accent-ink: #03161a;

	/* data colours: each means what it means in the Scene */
	--c-station: #56d3da;     /* ground stations, contacts (palette 12) */
	--c-link: #4cd68a;        /* access and communications link lines (status.success) */
	--c-orbit: #56f487;       /* catalog rings, the Mars cruise (palette 2) */
	--c-debris: #f85da5;      /* debris catalogs, close approaches (palette 3) */
	--c-craft: #f5ce00;       /* Landsat 9, LRO, EO-Sat, GEO-B (palette 6) */
	--c-target: #f98f3a;      /* point targets, calibration sites (palette 4) */
	--c-iss: #eabdff;         /* the ISS, ground tracks (palette 10) */
	--c-signal: #439bf7;      /* OneWeb, the SSO relay, the chief (palette 1) */
	--c-violet: #9474fc;      /* "Other" catalog, populations (palette 5); marks only on glass */
	--c-orchid: #d780fc;      /* BeiDou, the Hohmann reference (palette 8) */
	--c-transfer: #f2b84b;    /* GEO-1's transfer (orbit-raising) */
	--c-periwinkle: #9b8cff;  /* the SPK variant (ephemeris-interchange) */
	--c-mars: #e14d28;        /* Mars, Iridium (palette 11); marks only */
	--c-neutral: #b4bfd2;     /* region outlines, the fixed rate (dataviz.neutral) */
	--c-coverage: #b5de2b;    /* the coverage map's viridis top end */
	--c-medium: #ffb547;      /* severity medium (status.medium) */
	--c-high: #ff6b63;        /* severity high (status.high) */

	/* the DVB-S2 rate ramp: viridis, as the product draws ordinal values */
	--acm-1: #21918c;         /* 8PSK 2/3 */
	--acm-2: #35b779;         /* 8PSK 3/4 */
	--acm-3: #8fd744;         /* 16APSK 3/4 */
	--acm-4: #fde725;         /* 32APSK 9/10 */
	--acm-wait: #5b6578;      /* acquiring */

	/* layout */
	--site-max: 1360px;
	--site-gutter: 32px;
	--site-gap: 16px;
	--site-topbar: 58px;
	--site-section: 96px;
	--site-r-panel: var(--hs-radius-xl, 16px);
	--site-r-tile: var(--hs-radius-lg, 12px);
	--site-r-ctl: var(--hs-radius-md, 8px);
	--site-ease: cubic-bezier(.2, 0, 0, 1);
}

/* Colour helpers: CSP style-src 'self' forbids style attributes, so markup picks a colour with
   a class that sets --c, and components read var(--c). */
.c-station { --c: var(--c-station); }
.c-link { --c: var(--c-link); }
.c-orbit { --c: var(--c-orbit); }
.c-debris { --c: var(--c-debris); }
.c-craft { --c: var(--c-craft); }
.c-target { --c: var(--c-target); }
.c-iss { --c: var(--c-iss); }
.c-signal { --c: var(--c-signal); }
.c-violet { --c: var(--c-violet); }
.c-orchid { --c: var(--c-orchid); }
.c-transfer { --c: var(--c-transfer); }
.c-periwinkle { --c: var(--c-periwinkle); }
.c-mars { --c: var(--c-mars); }
.c-neutral { --c: var(--c-neutral); }
.c-coverage { --c: var(--c-coverage); }
.c-medium { --c: var(--c-medium); }
.c-wait { --c: var(--acm-wait); }
.c-acm-1 { --c: var(--acm-1); }
.c-acm-2 { --c: var(--acm-2); }
.c-acm-3 { --c: var(--acm-3); }
.c-acm-4 { --c: var(--acm-4); }

/* The analysis-type key (the same colour wherever a type appears). */
.t-access { --c: var(--c-station); }
.t-communications { --c: var(--c-link); }
.t-lighting { --c: var(--c-craft); }
.t-conjunction { --c: var(--c-debris); }
.t-coverage { --c: var(--c-coverage); }
.t-orbital_elements { --c: var(--c-target); }
.t-relative_motion { --c: var(--c-signal); }
.t-ground_track { --c: var(--c-iss); }
.t-population { --c: var(--c-violet); }
.t-targeting { --c: var(--c-orchid); }

/* Example signature colours: the colour of each example's primary object in its mission. */
.x-leo-downlink { --c: var(--c-link); }
.x-walker-coverage { --c: var(--c-coverage); }
.x-lunar-lro { --c: var(--c-craft); }
.x-heliocentric-cruise { --c: var(--c-mars); }
.x-leo-ground-contacts { --c: var(--c-iss); }
.x-sso-imaging { --c: var(--c-target); }
.x-geo-stationkeeping { --c: var(--c-station); }
.x-orbit-raising { --c: var(--c-transfer); }
.x-rendezvous-compare { --c: var(--c-debris); }
.x-system-validation { --c: var(--c-signal); }
.x-ephemeris-interchange { --c: var(--c-periwinkle); }
.x-quickstart { --c: var(--c-signal); }
.x-python-trade-study { --c: var(--c-signal); }
.x-leo-operations { --c: var(--c-craft); }
.x-starlink-population { --c: var(--c-orbit); }
