/* ==========================================================================
   PRONTO-GUIDE THEME: the one place the Pronto-Guide brand lives.
   Served at https://www.pronto-guide.com/brand/theme.css

   Used by:
   - the company site      (site/src/index.html links /brand/theme.css)
   - Pronto-Scrivo         (src/index.css imports this file at build time)
   - Pronto-Via            (links the hosted URL, pronto-fleet/app/layout.tsx)
   - Pronto-Targa          (links the hosted URL, manheim-routes app/layout.tsx,
                            only when the brand is "pronto")
   Manheim does NOT use this file; it keeps its own Cox/PRISM theme.

   Change a value here and every product follows. Scrivo picks it up on its
   next deploy (it bundles this file); the site, Via and Targa pick it up as
   soon as the company site is deployed, with no deploy of their own. So:
   deploy the company site first, and never rename or move this file.
   Don't copy these values into the products: map a product's own variable
   names onto the --pg-* tokens instead (e.g. --text: var(--pg-text)).

   Theme: follows the device. Dark unless the device prefers light; the
   light/dark switch in each product sets <html data-theme="light|dark">,
   which wins over the device. Colour palette (Scrivo's indigo/teal/cyan
   setting): <html data-palette="...">, indigo when unset.

   Contents: 1 palettes  2 fixed tokens  3 light/dark tokens  4 surfaces  5 buttons (with the metallic sheen)
   ========================================================================== */

/* ─── 1. Palettes ─────────────────────────────────────────────────────────── */
/* ─── Colour theme palettes (PGD-233, decided 3 Nov 2026) ──────────────────
   Set by src/theme.ts as <html data-palette="indigo|teal|cyan">.
   Teal and cyan shift their 500–950 steps one shade darker than Tailwind's
   own scale so white text on buttons stays ≥ 4.5:1 (WCAG 2.1 AA):
     button 600: indigo 6.29, teal 5.47, cyan 5.36
     hover  500: indigo 4.61, teal 4.63, cyan 4.64
   10 Nov 2026 (Colleen: "please make the change"): indigo 500 was Tailwind's
   #6366f1, 4.47:1 under white text on hover, just under 4.5. It is now
   #6163f0 (4.61:1), a step towards 600 like teal and cyan. Focus rings stay
   above 3:1 on dark (3.87:1 on slate-900); text-indigo-500 on dark surfaces
   already uses --pg-p-300.
   --pg-wordmark-light is the "Scrivo" colour on light backgrounds; dark
   backgrounds always use BRAND.colors.wordmarkAccent (#06B6D4). */
:root, :root[data-palette="indigo"] {
  --pg-p-50: #eef2ff;  --pg-p-100: #e0e7ff; --pg-p-200: #c7d2fe; --pg-p-300: #a5b4fc;
  --pg-p-400: #818cf8; --pg-p-500: #6163f0; --pg-p-600: #4f46e5; --pg-p-700: #4338ca;
  --pg-p-800: #3730a3; --pg-p-900: #312e81; --pg-p-950: #1e1b4b;
  --pg-grad-end: #7c3aed;
  --pg-wordmark-light: #0284c7;
}
:root[data-palette="teal"] {
  --pg-p-50: #f0fdfa;  --pg-p-100: #ccfbf1; --pg-p-200: #99f6e4; --pg-p-300: #5eead4;
  --pg-p-400: #2dd4bf; --pg-p-500: #0d8378; --pg-p-600: #0f766e; --pg-p-700: #115e59;
  --pg-p-800: #134e4a; --pg-p-900: #0f3d3a; --pg-p-950: #042f2e;
  --pg-grad-end: #155e75;
  --pg-wordmark-light: #0891b2;
}
:root[data-palette="cyan"] {
  --pg-p-50: #ecfeff;  --pg-p-100: #cffafe; --pg-p-200: #a5f3fc; --pg-p-300: #67e8f9;
  --pg-p-400: #22d3ee; --pg-p-500: #0b7f9c; --pg-p-600: #0e7490; --pg-p-700: #155e75;
  --pg-p-800: #164e63; --pg-p-900: #123f4f; --pg-p-950: #083344;
  --pg-grad-end: #1e40af;
  --pg-wordmark-light: #0284c7;
}

/* ─── 2. Fixed tokens (same in light and dark) ────────────────────────────── */
:root {
  --pg-primary: var(--pg-p-600);
  --pg-primary-hover: var(--pg-p-700);
  --pg-on-primary: #ffffff;
  --pg-violet: #7c3aed;
  --pg-gradient: linear-gradient(90deg, var(--pg-p-500), var(--pg-grad-end));
  --pg-gradient-hover: linear-gradient(90deg, var(--pg-p-600), color-mix(in srgb, var(--pg-grad-end) 85%, #000));
  --pg-gradient-text: linear-gradient(90deg, var(--pg-p-500), var(--pg-grad-end));
  /* App typography (12 Nov 2026): Inter for everything, headings included.
     Playfair stays only inside documents users write in Scrivo. */
  --pg-font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pg-font-display: var(--pg-font-sans);
  --pg-font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pg-heading-weight: 700;
  --pg-heading-tracking: -0.01em;
  --pg-radius: 14px;
  --pg-radius-sm: 10px;
  --pg-radius-pill: 999px;
  --pg-header-dark: linear-gradient(to right, rgba(2, 8, 23, 0.92), rgba(15, 23, 42, 0.88));
  --pg-sheen-shine: linear-gradient(110deg, transparent 40%, rgb(255 255 255 / 0.5) 50%, transparent 60%);
}

/* ─── 3. Light/dark tokens ────────────────────────────────────────────────── */
:root {
  --pg-base: #020817;
  --pg-panel: #0f172a;
  --pg-raised: #1e293b;
  --pg-border: #334155;
  --pg-field: #475569;
  --pg-text: #f8fafc;
  --pg-text2: #a3b0c4;
  --pg-muted: #8b9bb4;
  --pg-link: var(--pg-p-300);
  --pg-brand: var(--pg-p-400);
  --pg-highlight: #a78bfa;
  --pg-focus: var(--pg-p-400);
  --pg-info-bg: color-mix(in srgb, var(--pg-p-950) 85%, var(--pg-base));
  --pg-on-brand: #020817;
  --pg-header: rgba(2, 8, 23, 0.95);
  --pg-header-solid: #0f172a;
  --pg-ok: #34d399;   --pg-ok-bg: rgba(16, 185, 129, 0.14); --pg-ok-edge: #10b981;
  --pg-warn: #f5c84a; --pg-warn-bg: #2b2410; --pg-warn-edge: #fcc523;
  --pg-bad: #f0857a;  --pg-bad-bg: #2e1513;  --pg-bad-edge: #c0473a;
  --pg-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.28);
  --pg-band: rgba(11, 18, 34, 0.72);
  --pg-section-wash: rgba(2, 8, 23, 0.62);
  --pg-page-wash: rgba(2, 8, 23, 0.68);
  --pg-halo: rgba(2, 8, 23, 0.9);
  --pg-text2-img: #cbd5e1;
  --pg-muted-img: #b4c0d3;
  --pg-sheen-shine-soft: linear-gradient(110deg, transparent 40%, rgb(255 255 255 / 0.35) 50%, transparent 60%);
  --pg-sheen-silver: linear-gradient(180deg, #64748b 0%, #475569 48%, #334155 52%, #475569 100%);
  --pg-sheen-edge: #cbd5e1;
  --pg-sheen-ink: #ffffff;
  --pg-sheen-lift: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 4px 12px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
  --pg-base: #f8fafc;
  --pg-panel: #ffffff;
  --pg-raised: #f1f5f9;
  --pg-border: #e2e8f0;
  --pg-field: #64748b;
  --pg-text: #0f172a;
  --pg-text2: #475569;
  --pg-muted: #5b6b80;
  --pg-link: var(--pg-p-700);
  --pg-brand: var(--pg-p-600);
  --pg-highlight: #7c3aed;
  --pg-focus: var(--pg-p-600);
  --pg-info-bg: var(--pg-p-50);
  --pg-on-brand: #ffffff;
  --pg-header: rgba(255, 255, 255, 0.95);
  --pg-header-solid: #020817;
  --pg-ok: #047857;   --pg-ok-bg: rgba(16, 185, 129, 0.12); --pg-ok-edge: #10b981;
  --pg-warn: #7a5200; --pg-warn-bg: #fff6d6; --pg-warn-edge: #fcc523;
  --pg-bad: #8d271d;  --pg-bad-bg: #fbeae8;  --pg-bad-edge: #8d271d;
  --pg-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.07);
  --pg-band: rgba(241, 245, 249, 0.72);
  --pg-section-wash: rgba(248, 250, 252, 0.7);
  --pg-page-wash: rgba(248, 250, 252, 0.82);
  --pg-halo: rgba(255, 255, 255, 0.95);
  --pg-text2-img: #1e293b;
  --pg-muted-img: #334155;
  --pg-sheen-shine-soft: linear-gradient(110deg, transparent 40%, rgb(255 255 255 / 0.9) 50%, transparent 60%);
  --pg-sheen-silver: linear-gradient(180deg, #fdfdff 0%, #e8eaf2 48%, #d5d9e4 52%, #eef0f6 100%);
  --pg-sheen-edge: #94a3b8;
  --pg-sheen-ink: #0f172a;
  --pg-sheen-lift: inset 0 1px 0 #ffffff, 0 4px 12px rgb(15 23 42 / 0.12);
  color-scheme: light;
  }
}
:root[data-theme="light"] {
  --pg-base: #f8fafc;
  --pg-panel: #ffffff;
  --pg-raised: #f1f5f9;
  --pg-border: #e2e8f0;
  --pg-field: #64748b;
  --pg-text: #0f172a;
  --pg-text2: #475569;
  --pg-muted: #5b6b80;
  --pg-link: var(--pg-p-700);
  --pg-brand: var(--pg-p-600);
  --pg-highlight: #7c3aed;
  --pg-focus: var(--pg-p-600);
  --pg-info-bg: var(--pg-p-50);
  --pg-on-brand: #ffffff;
  --pg-header: rgba(255, 255, 255, 0.95);
  --pg-header-solid: #020817;
  --pg-ok: #047857;   --pg-ok-bg: rgba(16, 185, 129, 0.12); --pg-ok-edge: #10b981;
  --pg-warn: #7a5200; --pg-warn-bg: #fff6d6; --pg-warn-edge: #fcc523;
  --pg-bad: #8d271d;  --pg-bad-bg: #fbeae8;  --pg-bad-edge: #8d271d;
  --pg-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.07);
  --pg-band: rgba(241, 245, 249, 0.72);
  --pg-section-wash: rgba(248, 250, 252, 0.7);
  --pg-page-wash: rgba(248, 250, 252, 0.82);
  --pg-halo: rgba(255, 255, 255, 0.95);
  --pg-text2-img: #1e293b;
  --pg-muted-img: #334155;
  --pg-sheen-shine-soft: linear-gradient(110deg, transparent 40%, rgb(255 255 255 / 0.9) 50%, transparent 60%);
  --pg-sheen-silver: linear-gradient(180deg, #fdfdff 0%, #e8eaf2 48%, #d5d9e4 52%, #eef0f6 100%);
  --pg-sheen-edge: #94a3b8;
  --pg-sheen-ink: #0f172a;
  --pg-sheen-lift: inset 0 1px 0 #ffffff, 0 4px 12px rgb(15 23 42 / 0.12);
  color-scheme: light;
}

/* ─── 4. Surfaces ─────────────────────────────────────────────────────────── */
/* Two text surfaces (brand rule, 11 Nov 2026):
   - PANEL   (.pg-band, cards): normal palette.
   - IMAGE   (.pg-onimg, .pg-onimg-soft): text straight on the background
             art. Feathered reading wash, stronger greys, soft halo.
   Every full-width section is one or the other. */
/* ---------- Panel band ---------- */
.pg-band {
  background: var(--pg-band);
  border-top: 1px solid var(--pg-border);
  border-bottom: 1px solid var(--pg-border);
  backdrop-filter: blur(2px);
}

/* ---------- Image sections ---------- */
/* Full-width section straight on the art: wash fades in/out at top and bottom. */
.pg-onimg {
  background: linear-gradient(to bottom, transparent, var(--pg-section-wash) 72px, var(--pg-section-wash) calc(100% - 72px), transparent);
}
/* A block of copy (not full width), e.g. hero text under the film: oval wash, no hard edges. */
.pg-onimg-soft {
  background: radial-gradient(closest-side, var(--pg-section-wash) 0, var(--pg-section-wash) 70%, transparent 100%);
}
.pg-onimg, .pg-onimg-soft { --pg-text2: var(--pg-text2-img); --pg-muted: var(--pg-muted-img); }
:is(.pg-onimg, .pg-onimg-soft) :is(h1, h2, h3, p, li, .eyebrow, .lede, .sub) {
  text-shadow: 0 0 10px var(--pg-halo), 0 0 2px var(--pg-halo);
}
/* No halo inside panels/cards/forms, or on gradient text (it would show through). */
:is(.pg-onimg, .pg-onimg-soft) :is(.pg-panel, .card, .stat, .stats, .note, form, pre) :is(h1, h2, h3, p, li, span, .sub, .tag, .domain),
:is(.pg-onimg, .pg-onimg-soft) :is(.pg-g, .b, .g) { text-shadow: none; }

/* ---------- Signed-in pages ---------- */
/* Page background: the product's art (--pg-page-img, set per product) under the page wash. */
.pg-page {
  background: linear-gradient(var(--pg-page-wash), var(--pg-page-wash)), var(--pg-page-img, none) center / cover no-repeat;
  background-color: var(--pg-base);
}
.pg-page-fixed { background-attachment: fixed; }
/* Top bar: dark chrome gets the gradient over the art; light chrome keeps its own style. */
.pg-app-header[data-chrome="dark"] {
  background: var(--pg-header-dark), var(--pg-header-img, none) center / cover;
}

/* ─── 5. Buttons, with the metallic sheen (18 Nov 2026) ───────────────────── */
/* Main buttons: .btn.primary (site, Via, Targa) and Scrivo's filled
   bg-indigo-600 buttons. Solid brand primary (follows the palette; white
   text 6.29:1), darker on hover; on hover a silver shine sweeps across once, with a bright top edge and a
   small lift. Outlined buttons: any other .btn (not .danger), and Scrivo's
   bordered buttons; on hover they turn brushed silver. Sizes stay with each
   product. Disabled buttons are left alone; reduced motion: no sweep. */
@keyframes pg-sheen { from { background-position: 120% 0, 0 0; } to { background-position: -20% 0, 0 0; } }
:root .btn.primary {
  background-color: var(--pg-primary);
  background-image: none;
  border-color: transparent;
  color: var(--pg-on-primary);
  border-radius: var(--pg-radius-pill);
}
:root .btn:not(.primary):not(.danger) {
  background-color: var(--pg-panel);
  border: 1px solid color-mix(in srgb, var(--pg-text) 35%, transparent);
  color: var(--pg-text);
  border-radius: var(--pg-radius-pill);
}
:is(:is(button, a).bg-indigo-600, :root .btn.primary):not(:disabled):not([aria-disabled="true"]) {
  background-image: var(--pg-sheen-shine);
  background-size: 300% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 120% 0, 0 0;
  transition: background-color .15s, box-shadow .15s, transform .15s, filter .15s;
}
:root .btn.primary:not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible) {
  background-color: var(--pg-primary-hover);
}
:is(:is(button, a).bg-indigo-600, :root .btn.primary):not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible) {
  animation: pg-sheen .8s ease-out 1;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 6px 16px color-mix(in srgb, var(--pg-p-600) 35%, transparent);
  transform: translateY(-1px);
  color: var(--pg-on-primary);
  filter: none;
}
:is(button.border:is(.rounded, .rounded-md, .rounded-lg, .rounded-full):is(.hover\:bg-slate-50, .hover\:bg-slate-100, .hover\:bg-indigo-50, .hover\:bg-slate-700, .hover\:bg-slate-700\/50, .hover\:bg-slate-800), :root .btn:not(.primary):not(.danger)):not(:disabled) {
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
:is(button.border:is(.rounded, .rounded-md, .rounded-lg, .rounded-full):is(.hover\:bg-slate-50, .hover\:bg-slate-100, .hover\:bg-indigo-50, .hover\:bg-slate-700, .hover\:bg-slate-700\/50, .hover\:bg-slate-800), :root .btn:not(.primary):not(.danger)):not(:disabled):hover {
  background-image: var(--pg-sheen-shine-soft), var(--pg-sheen-silver);
  background-size: 300% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: -20% 0, 0 0;
  animation: pg-sheen .8s ease-out 1;
  border-color: var(--pg-sheen-edge);
  color: var(--pg-sheen-ink);
  box-shadow: var(--pg-sheen-lift);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  :is(:is(button, a).bg-indigo-600, :root .btn.primary):hover, :is(button.border:is(.rounded, .rounded-md, .rounded-lg, .rounded-full):is(.hover\:bg-slate-50, .hover\:bg-slate-100, .hover\:bg-indigo-50, .hover\:bg-slate-700, .hover\:bg-slate-700\/50, .hover\:bg-slate-800), :root .btn:not(.primary):not(.danger)):hover { animation: none !important; transform: none !important; }
}
