/* Cloud Waypoint visual system v1
 * One reading/display family across public, Studio, Reference, and reports.
 * Monospace is reserved for code, identifiers, hashes, and machine evidence. */
@font-face { font-family: "Roobert"; src: url("../assets/fonts/roobert/Roobert-Regular.woff2") format("woff2"); font-display: swap; font-weight: 400; }
@font-face { font-family: "Roobert"; src: url("../assets/fonts/roobert/Roobert-SemiBold.woff2") format("woff2"); font-display: swap; font-weight: 600; }
@font-face { font-family: "Roobert"; src: url("../assets/fonts/roobert/Roobert-Bold.woff2") format("woff2"); font-display: swap; font-weight: 700 900; }

:root {
  --cw-font-text: "Roobert", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cw-font-display: var(--cw-font-text);
  --cw-font-code: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --cw-hero-title: clamp(2.55rem, 5vw, 4.5rem);
  --cw-hero-subtitle: clamp(1rem, 1.55vw, 1.25rem);
  --cw-hero-title-leading: 1;
  --cw-hero-subtitle-leading: 1.55;
  --cw-hero-title-weight: 400;
  --cw-hero-subtitle-weight: 400;
  --cw-navy: #203a56;
  --cw-blue: #2f6291;
  /* Gold is structural, never typographic: use it only on a left or top
   * edge. Labels and emphasis use the Waypoint blue/navy pair. */
  --cw-accent-edge: #c69a48;
  --cw-accent-text: #2f6291;
  --cw-accent-text-on-dark: #a8c9e6;
  --cw-accent-strong: #203a56;
  --cw-accent-soft: #eef4f8;
  /* Owner-selected climbing-mountain brand, 2026-09-08. */
  --mark-gold: #826017;
  --mark-ring: var(--cw-ink);
  --cw-gold: var(--cw-accent-edge);
  --cw-ink: #182735;
  --cw-muted: #5d6e7c;
  --cw-paper: #fff;
  --cw-line: #ccd7e1;

  /* Legacy aliases converge old surfaces without duplicating a new palette. */
  --font: var(--cw-font-text);
  --display: var(--cw-font-display);
  --font-body: var(--cw-font-text);
  --font-heading: var(--cw-font-display);
  --font-entry: var(--cw-font-text);
  --ref-sans: var(--cw-font-text);
  --ref-serif: var(--cw-font-display);
  --sans: var(--cw-font-text);
}

/* The public and Studio themes swap their legacy surface tokens at runtime.
 * Keep the shared design-system roles in the same theme so new components do
 * not carry light-page ink or tint values onto the night palette. */
@media (prefers-color-scheme: dark) {
  [data-public-face="minimal-signal"]:not([data-public-theme="light"]) {
    --cw-accent-text: #a8c9e6;
    --cw-accent-strong: #b8d2ed;
    --cw-accent-soft: #193653;
    --cw-ink: #edf5ff;
    --cw-ink-soft: #b8cbe0;
    --cw-ink-faint: #a9bed3;
    --cw-paper: #102842;
    --cw-line: #486b8f;
  }
}

[data-public-face="minimal-signal"][data-public-theme="dark"],
:root[data-studio-resolved="dark"] {
  --cw-accent-text: #a8c9e6;
  --cw-accent-strong: #b8d2ed;
  --cw-accent-soft: #193653;
  --cw-ink: #edf5ff;
  --cw-ink-soft: #b8cbe0;
  --cw-ink-faint: #a9bed3;
  --cw-paper: #102842;
  --cw-line: #486b8f;
}

html[data-cw-density="studio"] {
  --cw-hero-title: clamp(1.75rem, 3vw, 2.8rem);
  --cw-hero-subtitle: clamp(.9rem, 1.25vw, 1.08rem);
}

html body,
html body :is(button, input, select, textarea) { font-family: var(--cw-font-text) !important; }
html body :is(h1, h2, h3, h4, h5, h6) { font-family: var(--cw-font-display) !important; }
html body :is(code, pre, kbd, samp) { font-family: var(--cw-font-code) !important; }

/* A shared title/subtitle rhythm. Heights may vary with content, but the
 * typographic scale, weight, and measure no longer vary by page author. */
html body :is(
  .aiCaptureHero, .airCover, .b2Hero, .b3DashboardHero, .contHero,
  .dpHeroCopy, .executiveWorkspaceHero, .hero, .lpHero, .mcrFallbackHeader,
  .mcrHero, .mdpSurfaceHero, .pfHero, .pfTabHero, .pwHeroCopy, .refHero,
  .referenceHero, .registerHero, .reviewHero, .sellerHero, .storyboardHero
) h1 {
  font-size: var(--cw-hero-title) !important;
  font-weight: var(--cw-hero-title-weight) !important;
  line-height: var(--cw-hero-title-leading) !important;
  letter-spacing: -.035em !important;
}

html body :is(
  .aiCaptureHero, .airCover, .b2Hero, .b3DashboardHero, .contHero,
  .dpHeroCopy, .executiveWorkspaceHero, .hero, .lpHero, .mcrFallbackHeader,
  .mcrHero, .mdpSurfaceHero, .pfHero, .pfTabHero, .pwHeroCopy, .refHero,
  .referenceHero, .registerHero, .reviewHero, .sellerHero, .storyboardHero
) :is(.pfLead, .heroLead, .refHeroLead, .reviewLead, .lede, p:first-of-type) {
  font-size: var(--cw-hero-subtitle) !important;
  font-weight: var(--cw-hero-subtitle-weight) !important;
  line-height: var(--cw-hero-subtitle-leading) !important;
}

@media (max-width: 720px) {
  :root { --cw-hero-title: clamp(2.15rem, 10vw, 3.25rem); --cw-hero-subtitle: 1rem; }
  html[data-cw-density="studio"] { --cw-hero-title: clamp(1.65rem, 8vw, 2.35rem); --cw-hero-subtitle: .95rem; }
}

@media print {
  :root { --cw-hero-title: 26pt; --cw-hero-subtitle: 11pt; }
}
