/* CameraOS brand tokens + shared components.
   Used by the brand guidelines, the deck and the brochure. Fonts are OFL and live in ./fonts. */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/Bricolage.ttf") format("truetype"); font-weight: 200 800; font-stretch: 75% 100%; font-display: block; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans.ttf") format("truetype"); font-weight: 400 700; font-stretch: 75% 100%; font-display: block; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Italic.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: block; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono.ttf") format("truetype"); font-weight: 100 800; font-display: block; }

:root {
  /* Core neutrals: a warm "daylight" base, with Night kept for video and product moments */
  --paper: #F4F1EA;      /* primary background */
  --bone: #E8E3D8;       /* secondary surface, cards on paper */
  --sand: #D6CFC1;       /* hairlines on paper */
  --ink: #0F1112;        /* primary text, logo */
  --graphite: #5B5F62;   /* secondary text on paper (5.7:1) */
  --night: #16191B;      /* dark surfaces: video frames, product sections */
  --night-2: #202427;    /* raised dark surface */
  --mist: #A9AFB2;       /* secondary text on night */

  /* Signal colors */
  --cyan: #9AF4FC;       /* Signal Cyan: the lens-ring color. Fills and highlights; text only on Night */
  --teal: #0B6F79;       /* Lens Teal: cyan's accessible partner for text and links on Paper (5.2:1) */
  --amber: #F2A93B;      /* Sodium Amber: warmth, waiting, "pay attention" (not alarm) */
  --amber-ink: #9A5B00;  /* amber for text on Paper */
  --rose: #F0466A;       /* Alert Rose: real alerts only (falls, intrusions). Never decorative */
  --leaf: #3DBE7A;       /* Go Green: OK / free / served */
  --chart-1: #008C99;    /* Chart Teal: single-series data marks (passes the chroma + contrast checks on Paper) */

  /* Tracker palette: the per-object ring colors the product draws on video */
  --trk-1: #9AF4FC; --trk-2: #57E39A; --trk-3: #F2A93B; --trk-4: #F07AC8; --trk-5: #A99BFF;

  /* Type */
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-text: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Radii + spacing (8-pt base) */
  --r-s: 6px; --r-m: 14px; --r-l: 28px; --r-tile: 26.5%; /* tile radius = the app icon's 136/512 */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s6: 48px; --s8: 64px; --s12: 96px;
}

/* ---------- Type roles ---------- */
.display { font-family: var(--font-display); font-weight: 700; font-variation-settings: "opsz" 96; letter-spacing: -0.035em; line-height: 0.95; }
.headline { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.025em; line-height: 1.02; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.lead { font-family: var(--font-text); font-size: 22px; line-height: 1.45; }
.body { font-family: var(--font-text); font-size: 16px; line-height: 1.55; }
.mono { font-family: var(--font-mono); }
.hl { background: linear-gradient(transparent 58%, var(--cyan) 58%, var(--cyan) 92%, transparent 92%); padding: 0 0.06em; }

/* ---------- Signature components ---------- */
/* HUD chip: the product's on-video readout ("IN LINE 5"). Label in mono caps, value large. */
.hud { display: inline-flex; flex-direction: column; gap: 2px; padding: 8px 12px 9px; background: rgba(15,17,18,0.9); color: #fff; border-left: 3px solid var(--cyan); border-radius: 4px; }
.hud b { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.1em; color: var(--mist); text-transform: uppercase; }
.hud span { font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.hud.amber { border-color: var(--amber); } .hud.rose { border-color: var(--rose); } .hud.leaf { border-color: var(--leaf); }

/* Tag: small pill label (event types, app groups) */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid currentColor; }
.tag.solid-rose { background: var(--rose); color: #fff; border-color: var(--rose); }
.tag.solid-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Cite chip: Ask answers point at the clip they came from */
.cite { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px; background: var(--ink); color: var(--cyan); font-family: var(--font-mono); font-size: 0.78em; font-weight: 500; white-space: nowrap; vertical-align: 0.06em; }
.cite::before { content: "▶"; font-size: 0.75em; }

/* Viewfinder: corner brackets around an image or block */
.vf { position: relative; }
.vf::before, .vf::after { content: ""; position: absolute; width: 28px; height: 28px; border: 2px solid var(--vf, var(--cyan)); pointer-events: none; z-index: 3; }
.vf::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; }
.vf::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; }

/* Tracker ring: the floor ellipse the product draws under people. Used as a bullet / marker */
.ring { display: inline-block; width: 1.25em; height: 0.5em; border-radius: 50%; border: 2px solid var(--ring, var(--teal)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring, var(--teal)) 18%, transparent); vertical-align: 0.15em; }

/* Live dot */
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: #fff; background: #E5243F; padding: 3px 8px; border-radius: 4px; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

/* Photo: full-bleed cover image */
.photo { background-size: cover; background-position: center; }

/* ---------- Icons ---------- */
/* Outline icons (Lucide), drawn by icons.js: <i class="ic" data-icon="cctv"></i>.
   Size follows font-size; stroke is 1.75 at 24 px and stays optically even as the icon scales. */
.ic { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -0.14em; color: var(--ic, currentColor); }
.ic svg { display: block; width: 100%; height: 100%; stroke-width: var(--ic-stroke, 1.75); }
/* Icon tile: the app icon's rounded square, outlined. For headline items (pillars, cards, steps). */
.ic-tile { display: inline-grid; place-items: center; width: var(--tile, 64px); height: var(--tile, 64px); border-radius: 26.5%; border: 1.5px solid var(--ic-line, var(--sand)); color: var(--ic, var(--teal)); font-size: calc(var(--tile, 64px) * 0.5); flex: none; }
.night .ic-tile, .ink .ic-tile, .ic-tile.on-dark { --ic-line: #3A4146; --ic: var(--cyan); }
.ic-tile.rose { --ic: var(--rose); } .ic-tile.amber { --ic: var(--amber-ink); } .night .ic-tile.amber { --ic: var(--amber); }

/* ---------- Diagram + directory helpers ---------- */
.stepn { display: inline-grid; place-items: center; width: var(--n, 40px); height: var(--n, 40px); border-radius: 50%; background: var(--ink); color: var(--cyan); font-family: var(--font-display); font-weight: 700; font-size: 20px; flex: none; }
.leader { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 17px; color: var(--ink); }
.leader i { width: 46px; border-top: 1.5px solid var(--teal); }
.leader i::before { content: ""; display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin: -4px 0 0 -4px; }
.leader b { font-weight: 600; }
.grp-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border: 1.5px solid var(--sand); border-radius: 999px; font-size: 16px; font-weight: 500; background: #fff; white-space: nowrap; }
.pill .ic { color: var(--teal); font-size: 18px; }

/* ---------- Traditional Chinese and Japanese ----------
   Latin letters and numbers stay in the brand fonts; CJK characters fall through to Noto Sans TC / JP (SIL OFL).
   CJK headlines need looser leading and no negative tracking, and Japanese breaks lines at phrase boundaries. */
:lang(zh-Hant) { --cjk: "Noto Sans TC"; }
:lang(ja) { --cjk: "Noto Sans JP"; }
:lang(zh-Hant), :lang(ja) {
  --font-display: "Bricolage Grotesque", var(--cjk), sans-serif;
  --font-text: "Instrument Sans", var(--cjk), sans-serif;
  --font-mono: "JetBrains Mono", var(--cjk), monospace;
}
:lang(zh-Hant) body, :lang(ja) body { font-family: var(--font-text); }
:lang(zh-Hant) .display, :lang(ja) .display { letter-spacing: -0.01em; line-height: 1.12; }
:lang(zh-Hant) .headline, :lang(ja) .headline { letter-spacing: 0; line-height: 1.22; text-wrap: balance; }
:lang(zh-Hant) .lead, :lang(ja) .lead, :lang(zh-Hant) .body, :lang(ja) .body { line-height: 1.7; }
:lang(zh-Hant) .eyebrow, :lang(ja) .eyebrow { letter-spacing: 0.1em; }
:lang(zh-Hant) { line-break: strict; }
:lang(ja) { line-break: strict; word-break: auto-phrase; }
