/* towns_product.css - towns.cafe colour and display-type tokens.
 * Palette "Blue Ribbon": county-fair rosette inks on fair-poster paper, town green as the anchor.
 * Display face: Calistoga (SIL OFL 1.1), approved for towns only in ADR-TOWNS-07.
 * Every text pair below is >= 4.5:1; light category fills always carry an ink border and a text label.
 */
@font-face {
  font-family: "Calistoga";
  src: url("../fonts/towns_calistoga.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Metric-adjusted fallback so the headline does not jump when Calistoga arrives (F-28). Calistoga is
 * 1000 upm, ascent 1000, descent 300, and sets about 4% wider than Georgia. */
@font-face {
  font-family: "Calistoga Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Liberation Serif"), local("Noto Serif");
  size-adjust: 104%;
  ascent-override: 96%;
  descent-override: 29%;
  line-gap-override: 0%;
}

:root {
  --brand-hue: 155deg;
  --towns-font-display: "Calistoga", "Calistoga Fallback", "Georgia", "Times New Roman", serif;

  --color-bg: #FBF6EA;          /* fair-poster paper */
  --color-surface: #FFFDF7;     /* card stock */
  --color-text: #1D2333;        /* navy-black ink, 14.5:1 on paper */
  --color-text-muted: #545A68;  /* 6.4:1 on paper */
  --color-accent: #1B5E43;      /* town green, 7.1:1 on paper */
  --color-accent-hover: #134B34;
  --color-on-accent: #FFFDF7;
  --color-link: #1F4E9C;        /* ribbon blue, 7.4:1 */
  --color-focus: #1F4E9C;

  --towns-ink: #1D2333;
  --towns-paper-deep: #F3EBD8;  /* darker paper band */
  --towns-border-subtle: #E4DAC4;
  --towns-border-strong: #B9AD93;
  --towns-border-input: #7D735F; /* 4.0:1 on card */
  --towns-note-bg: #FFF1C2;
  --towns-note-text: #5C4500;
  --towns-error-text: #A3211A;

  /* Ribbon inks: fill + text-safe ink + label colour on the fill */
  --towns-fest: #B3261E;   --towns-fest-ink: #B3261E;   --towns-fest-on: #FFFDF7;
  --towns-music: #1F4E9C;  --towns-music-ink: #1F4E9C;  --towns-music-on: #FFFDF7;
  --towns-comedy: #F2C230; --towns-comedy-ink: #7A5A00; --towns-comedy-on: #1D2333;
  --towns-market: #5B3A8C; --towns-market-ink: #5B3A8C; --towns-market-on: #FFFDF7;
  --towns-family: #E58FB0; --towns-family-ink: #9C2F5C; --towns-family-on: #1D2333;
  --towns-free: #1B5E43;   --towns-free-ink: #1B5E43;   --towns-free-on: #FFFDF7;
  --towns-sky: #1F4E9C;
  --towns-sun: #F2C230;
  --towns-grass: #2F7A55;

  --towns-print-shadow: 3px 3px 0 var(--towns-ink);

  /* Alias the shared --twc-* tokens to this palette (ADR-DS04). */
  --twc-bg: var(--color-bg);
  --twc-surface: var(--color-surface);
  --twc-text: var(--color-text);
  --twc-text-secondary: var(--color-text-muted);
  --twc-text-muted: var(--color-text-muted);
  --twc-border: var(--towns-border-subtle);
  --twc-accent: var(--color-accent);
  --twc-accent-hover: var(--color-accent-hover);
  --twc-focus: var(--color-focus);
}

:root[data-theme="dark"] {
  --color-bg: #15171C;
  --color-surface: #1E2128;
  --color-text: #F3EEE4;
  --color-text-muted: #B5AFA4;
  --color-accent: #5FBF91;
  --color-accent-hover: #7FD2A9;
  --color-on-accent: #0E1210;
  --color-link: #9DB1E2;
  --color-focus: #9DB1E2;
  --towns-ink: #F3EEE4;
  --towns-paper-deep: #1A1D23;
  --towns-border-subtle: #2C3039;
  --towns-border-strong: #4A505C;
  --towns-border-input: #8A8F99;
  --towns-note-bg: #3A3014;
  --towns-note-text: #F6DE8C;
  --towns-error-text: #FFA59E;
  --towns-fest: #FF8A80;   --towns-fest-ink: #FF8A80;   --towns-fest-on: #15171C;
  --towns-music: #9DB1E2;  --towns-music-ink: #9DB1E2;  --towns-music-on: #15171C;
  --towns-comedy: #FFE066; --towns-comedy-ink: #FFE066; --towns-comedy-on: #15171C;
  --towns-market: #C3A8EE; --towns-market-ink: #C3A8EE; --towns-market-on: #15171C;
  --towns-family: #F4A9C6; --towns-family-ink: #F4A9C6; --towns-family-on: #15171C;
  --towns-free: #5FBF91;   --towns-free-ink: #5FBF91;   --towns-free-on: #15171C;
}
