/* ECHO family identity layer, shared by every page of the site (and /console).
   Load order: echo-tokens.css → echo-brand.css → the page's own stylesheets.
   Faces are self-hosted under SIL OFL 1.1 (see fonts/OFL-*.txt); url() paths are relative to this file,
   so they resolve to /home/assets/fonts/ both behind nginx and from the FastAPI static mount. */

/* Inter (variable 100–900): latin, then latin-ext loaded on demand by unicode-range. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/inter-latin-ext-var.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Display: English uppercase phrases only (product names, eyebrows, slogans). Never Chinese. */
@font-face {
  font-family: "Michroma";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/michroma-latin-400-normal.woff2") format("woff2");
}
/* Telemetry and code. */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  /* Telemetry labels sometimes carry a localized word; CJK glyphs fall back to the sans faces, not a bitmap monospace. */
  --echo-font-telemetry: "JetBrains Mono", "Cascadia Code", Consolas, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", ui-monospace, monospace;
}

::selection { color: var(--echo-on-core); background: var(--echo-core); }

/* ---------- mark, wordmark and product lockup ----------
   Inline SVG copied from the brand kit geometry: frame / letters stroke currentColor, the Echo Core fills --echo-core. */
.echo-mark,
.echo-wordmark-svg { display: block; overflow: visible; }
.echo-mark-core { fill: var(--echo-core); }
.echo-lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--echo-ink); text-decoration: none; }
.echo-lockup .echo-wordmark-svg { width: auto; height: 17px; }
.echo-lockup-product { padding-left: 12px; border-left: 1px solid var(--echo-line-strong); color: var(--echo-ink-muted); font: 500 11px/16px var(--echo-font-mono); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }

/* The Echo Core breathing is the only looping animation the brand allows: 2.4 s, 70–100 % opacity. */
.echo-core-breathe { animation: echo-core-breathe 2.4s ease-in-out infinite; }

/* ---------- shared type roles ---------- */
.echo-eyebrow { font-family: var(--echo-font-display); font-size: 11px; line-height: 16px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; }
.echo-telemetry { font-family: var(--echo-font-telemetry); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 600px) {
  .echo-lockup { gap: 9px; }
  .echo-lockup .echo-wordmark-svg { height: 15px; }
  .echo-lockup-product { padding-left: 9px; font-size: 10px; letter-spacing: .14em; }
}
@media (prefers-reduced-motion: reduce) {
  .echo-core-breathe { animation: none; }
}
