/* Capital Law Review — design tokens
   Palette: warm limestone parchment + deep judicial oxblood.
   Deliberately not the cream/terracotta default — the accent is a
   saturated maroon (echoes Indian judicial robes / sandstone monuments),
   not a clay orange. */

:root {
  --background: 240 238 231;      /* #F0EEE7 warm limestone */
  --foreground: 35 31 26;         /* #231F1A near-black warm charcoal */
  --card: 251 249 244;            /* #FBF9F4 */
  --secondary: 228 223 211;       /* #E4DFD3 stone */
  --border: 216 208 192;          /* #D8D0C0 */
  --stone: 197 187 166;           /* #C5BBA6 */
  --muted-foreground: 107 100 89; /* #6B6459 */
  --primary: 16 29 46;            /* #101D2E navy — sampled from the real logo */
  --primary-dark: 10 19 32;       /* #0A1320 */
  --primary-foreground: 251 249 244;
  --ring: 16 29 46;

  --font-serif: 'Cormorant Garamond', serif;
  --font-quote: 'Cormorant Garamond', serif;
  --font-body: 'Lora', serif;
}

html.dark {
  --background: 24 21 18;         /* #181512 */
  --foreground: 240 238 231;      /* #F0EEE7 */
  --card: 33 29 24;                /* #211D18 */
  --secondary: 34 30 25;          /* #221E19 */
  --border: 58 52 44;             /* #3A342C */
  --stone: 74 66 55;
  --muted-foreground: 167 158 142;/* #A79E8E */
  --primary: 90 120 158;          /* #5A789E brighter navy/steel-blue for contrast */
  --primary-dark: 60 88 124;      /* #3C587C */
  --primary-foreground: 24 21 18;
  --ring: 90 120 158;
}

* { border-color: rgb(var(--border)); }

html { scroll-behavior: smooth; }

body {
  background-color: rgb(var(--background));
  color: rgb(var(--foreground));
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

.font-serif { font-family: var(--font-serif); }
.font-quote { font-family: var(--font-quote); font-style: italic; }

/* Reveal-on-load animation used throughout (class="reveal" style="animation-delay:Nms") */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: clr-reveal .7s cubic-bezier(.16,.8,.24,1) forwards;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}
@keyframes clr-reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* Header goes solid once page is scrolled (toggled by main.js) */
header.clr-scrolled {
  background-color: rgb(var(--background) / 0.92);
  backdrop-filter: blur(8px);
  border-bottom-color: rgb(var(--border));
}

/* Mobile nav panel */
#clr-mobile-nav { display: none; }
#clr-mobile-nav.clr-open { display: block; }

@media print {
  .no-print { display: none !important; }
}

/* Article cards on Archives */
.clr-article-card {
  border: 1px solid rgb(var(--border));
  background: rgb(var(--card));
  transition: border-color .2s ease, box-shadow .2s ease;
}
.clr-article-card:hover {
  border-color: rgb(var(--primary));
  box-shadow: 0 4px 18px -6px rgb(var(--primary) / 0.25);
}

#clr-mobile-nav { position: fixed; inset-x: 0; top: 5rem; max-height: calc(100vh - 5rem); overflow-y: auto; z-index: 40; }
