/*
 * Citefy Labs design tokens and fonts — the one source for every page on
 * citefylabs.com. The Next.js pages import this file (app/globals.css); each
 * app's static pages (public/trawl and later ones) link it as /brand/tokens.css.
 * Change a colour here and both change together.
 *
 * Dark mode is the .dark class on <html>, set before paint from the visitor's
 * saved choice or the system setting (app/layout.tsx; /brand/theme.js on the
 * static pages).
 *
 * Fonts are served from this site (OFL-licensed Bricolage Grotesque, Geist and
 * Geist Mono, latin subset, variable weight).
 */
@font-face { font-family: "Bricolage Grotesque"; src: url("/brand/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/brand/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/brand/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --font-bricolage: "Bricolage Grotesque";
  --font-geist: "Geist";
  --font-geist-mono: "Geist Mono";
  --radius: 0.9rem;
  --background: oklch(0.975 0.008 85);
  --foreground: oklch(0.18 0.01 60);
  --card: oklch(0.995 0.004 85);
  --card-foreground: oklch(0.18 0.01 60);
  --popover: oklch(0.995 0.004 85);
  --popover-foreground: oklch(0.18 0.01 60);
  --primary: oklch(0.18 0.01 60);
  --primary-foreground: oklch(0.975 0.008 85);
  --secondary: oklch(0.93 0.012 85);
  --secondary-foreground: oklch(0.18 0.01 60);
  --muted: oklch(0.93 0.012 85);
  --muted-foreground: oklch(0.48 0.015 60);
  --accent: oklch(0.86 0.19 128);
  --accent-foreground: oklch(0.18 0.01 60);
  --destructive: oklch(0.58 0.22 27);
  --destructive-foreground: oklch(0.98 0 0);
  --border: oklch(0.88 0.012 85);
  --input: oklch(0.88 0.012 85);
  --ring: oklch(0.18 0.01 60);
  --ink: oklch(0.16 0.01 60);
  --ink-foreground: oklch(0.96 0.008 85);
  --trawl: oklch(0.72 0.17 45);
  --grid-line: color-mix(in oklab, var(--foreground) 7%, transparent);
  --shadow-float: 0 30px 60px -25px color-mix(in oklab, var(--foreground) 35%, transparent);
  --app: var(--accent);
}

.dark {
  --background: oklch(0.16 0.008 60);
  --foreground: oklch(0.95 0.008 85);
  --card: oklch(0.2 0.008 60);
  --card-foreground: oklch(0.95 0.008 85);
  --popover: oklch(0.2 0.008 60);
  --popover-foreground: oklch(0.95 0.008 85);
  --primary: oklch(0.95 0.008 85);
  --primary-foreground: oklch(0.16 0.008 60);
  --secondary: oklch(0.25 0.008 60);
  --secondary-foreground: oklch(0.95 0.008 85);
  --muted: oklch(0.25 0.008 60);
  --muted-foreground: oklch(0.7 0.012 80);
  --border: oklch(0.3 0.008 60);
  --input: oklch(0.3 0.008 60);
  --ring: oklch(0.86 0.19 128);
  --ink: oklch(0.11 0.006 60);
  --ink-foreground: oklch(0.95 0.008 85);
  --grid-line: color-mix(in oklab, var(--foreground) 6%, transparent);
  --shadow-float: 0 30px 60px -25px oklch(0 0 0 / 0.7);
  color-scheme: dark;
}

/* Page-to-page cross-fade (browsers that support cross-document view
   transitions: Chrome, Edge, Safari 18.2+). Off with "reduce motion". */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Analytics consent banner (public/brand/consent.js), on every page. */
.cl-consent {
  position: fixed; z-index: 70; left: 1rem; right: 1rem; bottom: 1rem; max-width: 27rem;
  padding: 1.1rem 1.25rem; border: 1px solid var(--border); border-radius: 1.5rem;
  background: var(--card); color: var(--foreground); box-shadow: var(--shadow-float);
  font-family: var(--font-geist), ui-sans-serif, system-ui, sans-serif; font-size: 0.9rem; line-height: 1.5;
  animation: cl-consent-in .4s cubic-bezier(.2,.7,.2,1) both;
}
.cl-consent[hidden] { display: none; }
.cl-consent p { margin: 0; color: var(--muted-foreground); }
.cl-consent a { color: var(--foreground); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.cl-consent__actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.9rem; }
.cl-consent button {
  font: inherit; font-weight: 600; min-height: 2.5rem; padding: 0.45rem 1.2rem; border-radius: 999px; cursor: pointer;
  transform: none; transition: background-color .15s;
}
.cl-consent__no { background: transparent; color: var(--foreground); border: 1px solid var(--border); }
.cl-consent__no:hover { background: var(--secondary); }
.cl-consent__yes { background: var(--foreground); color: var(--background); border: 1px solid var(--foreground); }
.cl-consent [hidden] { display: none; }
.cl-consent__choices { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.cl-consent__choice { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 1rem; cursor: pointer; }
.cl-consent__choice input { margin-top: 0.2rem; width: 1rem; height: 1rem; accent-color: var(--foreground); flex: none; }
.cl-consent__choice b { display: block; color: var(--foreground); font-weight: 600; }
.cl-consent__choice span span { display: block; color: var(--muted-foreground); font-size: 0.82rem; }
.cl-consent__actions { flex-wrap: wrap; }
/* The cookie button that reopens the choice. */
.cl-cookie-fab {
  position: fixed; z-index: 65; left: 1rem; bottom: 5.5rem; width: 2.75rem; height: 2.75rem; padding: 0; min-height: 0;
  display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--foreground); box-shadow: var(--shadow-float); cursor: pointer;
  transition: transform .2s, background-color .2s; animation: cl-consent-in .4s cubic-bezier(.2,.7,.2,1) both;
}
.cl-cookie-fab[hidden] { display: none; }
.cl-cookie-fab:hover { transform: scale(1.08) rotate(-8deg); background: var(--secondary); }
.cl-cookie-fab svg { width: 1.3rem; height: 1.3rem; }
@media (min-width: 768px) { .cl-cookie-fab { left: 1.5rem; bottom: 1.5rem; } }
@keyframes cl-consent-in { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@media (min-width: 640px) { .cl-consent { right: auto; left: 1.5rem; bottom: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .cl-consent { animation: none; } }
