/* Design tokens + self-hosted fonts. Single source of truth; no raw hex elsewhere.
   Visual language adapted from the Pickrail app: light airy canvas, faint green
   hairline borders, soft green-tinted shadows, Geist Sans headings + Inter body,
   mint->celadon gradient primary action. */

@font-face {
  font-family: 'Geist Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/public/fonts/geist-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/public/fonts/inter-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/public/fonts/jetbrains-mono-regular.woff2') format('woff2');
}

:root {
  /* Brand greens (tuned for contrast on light surfaces) */
  --primary:       #0F7A47;  /* readable green: links, accents, solid buttons */
  --primary-hot:   #0A6B3E;  /* hover */
  --accent:        #34D399;  /* vivid emerald: glow, focus ring, gradient start */
  --celadon:       #73E2A7;  /* gradient end */
  --tea:           #DEF4C6;  /* pale fills */

  /* Surfaces */
  --surface:          #FFFFFF;  /* page canvas */
  --surface-elevated: #F4FAF7;  /* cards, sidebar, rows */
  --surface-warm:     #E9F4EF;  /* inputs, insets, pills, icon chips */

  /* Borders */
  --rim:        #1C7C54;             /* emphasis border (hover) */
  --rim-soft:   rgba(20,80,55,0.14); /* the signature faint hairline */

  /* Text */
  --text-bright: #0C1A13;  /* headings + body (~18:1 on white) */
  --text-glow:   #2C4A3D;  /* secondary */
  --text-muted:  #47685A;  /* metadata, labels, placeholders */

  /* Semantic */
  --success:    #0F7A47;  --success-bg: #E9F4EF;
  --warning:    #B45309;  --warning-bg: #FEF3E2;
  --danger:     #DC2626;  --danger-bg:  #FDECEC;

  /* Primary action */
  --cta-grad: linear-gradient(to right, #34D399, #73E2A7);
  --cta-text: #06251A;
  --primary-tint: rgba(15,122,71,0.12);  /* active nav / soft banner */

  /* Header (frosted) */
  --header-bg: rgba(255,255,255,0.72);
  --header-border: var(--rim-soft);

  /* Elevation (soft, green-tinted) */
  --shadow-card:  0 1px 2px rgba(12,26,19,.04), 0 10px 24px -18px rgba(15,122,71,.22);
  --shadow-pop:   0 12px 32px -12px rgba(15,122,71,.28);
  --shadow-glow:  0 8px 24px -12px rgba(15,122,71,.20);

  /* Radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* Spacing */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-8: 48px;

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Geist Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --tap-min: 44px;
}

[data-theme="dark"] {
  /* Neutral dark: grays/black surfaces, white text. Green stays only as the brand accent. */
  --surface:          #0E0E11;
  --surface-elevated: #18181B;
  --surface-warm:     #232327;

  --rim:        rgba(255,255,255,0.22);
  --rim-soft:   rgba(255,255,255,0.10);

  --text-bright: #FAFAFA;
  --text-glow:   #C7C7CC;
  --text-muted:  #8A8A8F;

  --primary:     #34D399;
  --primary-hot: #6EE7B7;
  --success:     #34D399;  --success-bg: rgba(52,211,153,.12);
  --warning:     #F59E0B;  --warning-bg: rgba(245,158,11,.14);
  --danger:      #F87171;  --danger-bg:  rgba(248,113,113,.14);

  --primary-tint: rgba(52,211,153,0.14);
  --header-bg: rgba(20,20,22,0.72);

  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 12px 28px -18px rgba(0,0,0,.7);
  --shadow-pop:  0 16px 40px -12px rgba(0,0,0,.7);
  --shadow-glow: 0 8px 24px -12px rgba(0,0,0,.6);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
