/* Perfume Chapter brand layer. Loaded after styles.css, only when
   HOST_BONUS_BRAND=perfume-chapter (see host_bonus/branding.py).

   This is a token layer: it overrides the brand-overridable tokens of the shared
   :root and nothing else. Status colours, the scrim, disabled states, chart
   colours, --font-data, spacing and radius stay shared; do not redefine them
   here. tests/test_brand_chapter.py enforces the list and the contrast ratios.

   Brand book: cream #DDD3C5, dark brown #250D0C, typeface Inter. */

/* Inter 4.1 variable (upright), unmodified, SIL OFL 1.1: see Inter-LICENSE.txt. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("InterVariable.woff2") format("woff2");
}

:root {
  /* Cream page, lighter cream cards. The shared status text colours are below
     4.5:1 on the brand cream itself (3.6-4.4:1), so the surfaces that carry
     status text are lightened instead of inventing new status colours:
     --bg-surface and --bg-subtle both keep them at 4.5:1 or better. A few
     shared rules still paint status text straight onto the canvas; that
     known exception is listed in tests/test_brand_chapter.py. */
  --bg-canvas: #DDD3C5;
  --bg-surface: #FBF8F4;
  --bg-subtle: #F2EDE6;
  --bg-hover: #F2EDE6;
  --bg-accent-subtle: #F2EDE6;

  /* Brown rail and brown actions, cream text. */
  --bg-rail: #250D0C;
  --bg-rail-hover: #3A1F1C;
  --bg-rail-selected: #DDD3C5;
  --bg-accent: #250D0C;
  --bg-accent-hover: #4A2B26;

  --text-primary: #250D0C;
  --text-secondary: #5E4B43;
  /* Links are brown like body text; the shared underline is the cue. */
  --text-accent: #250D0C;
  /* Also sits on the shared status colours (step dots, callouts), so it is the
     light card cream rather than the darker brand cream. */
  --text-inverse: #FBF8F4;
  --text-on-dark: #DDD3C5;
  --text-on-dark-muted: #B5A898;
  --text-on-dark-faint: #8F8175;

  --border-default: #C9BDAD;
  --border-strong: #4A2B26;
  --border-dark: #40231F;
  --border-accent-soft: #4A2B26;
  --focus-ring: #250D0C;

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* The serif wordmark, painted through a mask in currentColor. The URL is
     root-relative on purpose: browsers have not agreed on whether a relative
     url() inside a custom property resolves against the sheet that declares it
     or the sheet that uses it (styles.css), and this is right under both. */
  --brand-logo-mask: url("/static/brands/perfume-chapter/logo.svg");
  --brand-logo-ratio: 872.9 / 288.77;
}

/* The sign-in page prints the wordmark as text. Show the serif logo there as in
   the rail and the mobile header. The text stays in the document and the
   paragraph keeps its aria-label; the tagline sizes itself in rem, so it is
   unaffected. This is the only non-token rule in this file. */
.auth-wordmark { font-size: 0; }
.auth-wordmark::before {
  content: "";
  display: block;
  width: min(100%, 11rem);
  margin-inline: auto;
  aspect-ratio: var(--brand-logo-ratio);
  background-color: currentColor;
  -webkit-mask: var(--brand-logo-mask) no-repeat center / contain;
  mask: var(--brand-logo-mask) no-repeat center / contain;
}
.auth-wordmark small { margin-top: var(--space-3); }
