/* ============================================================
   Haxfer design tokens
   Mirrors the :root block of the poster-style home page so that
   content pages and the landing share one visual language.
   ============================================================ */
:root {
  --bg: #f6f7fa;
  --ink: #0b0d12;
  --ink-soft: #5b6472;
  --ink-dim: #8b929c;
  --ink-faint: #a7aeba;

  --surface: #ffffff;
  --surface-alt: #eef1f7;
  --surface-glass: rgba(255, 255, 255, 0.72);

  --line: rgba(10, 11, 13, 0.10);
  --line-soft: rgba(10, 11, 13, 0.06);
  --line-strong: rgba(10, 11, 13, 0.16);

  --accent: #2f6bff;
  --accent-deep: #1f4fd8;
  --accent-soft: #dbe6ff;
  --accent-ghost: rgba(47, 107, 255, 0.10);
  --on-accent: #ffffff;

  --warn: #b45309;
  --warn-soft: #fdf3e3;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Same serif stack the landing page uses for its highlighted lines. */
  --serif: "Songti SC", STSong, "Noto Serif SC", "Source Han Serif SC", serif;
  --ink-tone: #5a6478;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 8px 22px -6px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 24px 60px -24px rgba(16, 24, 40, 0.24);
  --shadow-cta: 0 8px 18px -6px rgba(47, 107, 255, 0.45);

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  /* Scales with the poster rhythm of the landing page: 112px at 1440,
     ~149px at 1920, capped at 152px. */
  --section-gap: clamp(64px, 7.78vw, 152px);

  /* Shared shell: matches the landing page's page-width / page-inset ladder.
     Content width = 1280 at 1440+, 928 at <=1200, 704 at <=900, 350 at <=580. */
  --shell-max: 1920px;
  --shell-pad: min(5.5556vw, 106.667px);

  /* Type scale. Pinned in px, matching the landing page's own values: the
     poster grid scales its *titles* with the viewport but keeps reading text
     at 14px / 18px no matter how wide the window is. Content pages used to
     scale every step with vw (1.3715x at 1975px), which left 20px paragraphs
     and 24px buttons next to the landing page's 14px ones. Display sizes
     (.p-title, .h2) still follow the landing curve; text does not. */
  --fs-xs: 12px;
  --fs-sm: 12px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 18px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
}

/* Shell ladder — mirrors the landing page breakpoints so the header and the
   content column line up at every width. */
@media (width <= 1200px) {
  :root { --shell-max: 1024px; --shell-pad: 48px; }
}
@media (width <= 900px) {
  :root { --shell-max: 768px; --shell-pad: min(4.1667vw, 32px); }
}
@media (width <= 580px) {
  :root { --shell-max: 390px; --shell-pad: min(5.1282vw, 20px); }
}
