#import "theme.typ": *
#import "decor.typ": tech-label

/// Logo：品牌蓝块 + 白色折线图形 + GreLin | Tech
#let grelin-logo(
  primary: "GreLin",
  secondary: "Tech",
) = grid(
  columns: (auto, auto),
  column-gutter: 10pt,
  align: horizon,
  box(width: 34pt, height: 34pt, fill: color-brand)[
    #place(left + top, dx: 7pt, dy: 8pt, box(width: 14pt, height: 3pt, fill: white))
    #place(left + top, dx: 7pt, dy: 14pt, box(width: 3pt, height: 14pt, fill: white))
    #place(left + top, dx: 18pt, dy: 14pt, box(width: 9pt, height: 3pt, fill: white))
    #place(left + top, dx: 18pt, dy: 17pt, box(width: 3pt, height: 11pt, fill: white))
  ],
  grid(
    columns: (auto, auto, auto),
    column-gutter: 7pt,
    align: horizon,
    text(font: heading-font, size: 12pt, weight: "black", fill: color-ink, tracking: 0.04em)[#primary],
    box(width: 1.2pt, height: 1em, fill: color-ink),
    text(font: heading-font, size: 12pt, weight: "black", fill: color-ink, tracking: 0.16em)[#secondary],
  ),
)

#let cover-index-badge(index) = box(
  width: 58pt,
  height: 58pt,
  stroke: 2pt + color-ink,
  fill: white,
)[
  #align(center + horizon)[
    #text(font: mono-font, size: size-cover-index, weight: "black", fill: color-ink)[#index]
  ]
]
