/* ==========================================================================
   Zoo — design tokens
   ---------------------------------------------------------------------------
   The visual language follows shadcn/ui (neutral zinc surfaces, one hairline
   border, restrained radii, generous spacing) with Magic UI touches reserved for
   a few moments: a soft aurora behind the hero, a gradient hairline on hover, and
   a slow shimmer on primary actions.

   Everything is expressed as tokens so the theme can be retuned in one place.
   ========================================================================== */

:root {
  /* ---- neutrals (shadcn zinc scale) ------------------------------------- */
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --zinc-950: #09090b;

  /* ---- brand accent
     Used as link text on white and as a button fill with white text, so it must
     clear 4.5:1 both ways: #1772c2 is 4.97:1 each direction. ---- */
  --c-accent: #1772c2;
  --c-accent-strong: #125fa6;
  --c-accent-soft: #eff6fd;
  --c-accent-ring: rgb(23 114 194 / .18);
  --c-emerald: #0f8a7a;
  --c-emerald-soft: #e6f5f2;
  --c-amber: #b45309;
  --c-violet: #6d5bd0;
  --c-danger: #d92d20;

  /* ---- surfaces ---------------------------------------------------------
     A page that reads as one calm plane: the shell is faintly cool grey and the
     cards sit on top in pure white, which is what makes the layout feel open
     rather than boxed in.
     NOTE: the semantic tokens below are written as literal hex, not var()
     references, because the accessibility suite parses these values to compute
     contrast ratios. ---- */
  --c-bg: #fbfbfc;
  --c-surface: #ffffff;
  --c-surface-2: #f4f4f5;
  --c-surface-3: #e4e4e7;
  --c-border: #e4e4e7;
  --c-border-strong: #d4d4d8;

  /* ---- text ------------------------------------------------------------- */
  --c-text: #09090b;
  --c-text-soft: #52525b;
  /* 11-13px text: must still clear 4.5:1 on white and on --c-surface-2 */
  --c-text-muted: #62626c;
  --c-text-invert: #ffffff;
  --c-on-accent: #ffffff;

  /* ---- elevation (shadcn-style: two crisp, low layers) ------------------ */
  --shadow-xs: 0 1px 2px 0 rgb(9 9 11 / .04);
  --shadow-sm: 0 1px 3px 0 rgb(9 9 11 / .06), 0 1px 2px -1px rgb(9 9 11 / .06);
  --shadow-md: 0 4px 12px -2px rgb(9 9 11 / .08), 0 2px 6px -2px rgb(9 9 11 / .05);
  --shadow-lg: 0 16px 40px -8px rgb(9 9 11 / .14), 0 4px 12px -4px rgb(9 9 11 / .08);
  --shadow-xl: 0 28px 64px -16px rgb(9 9 11 / .2);
  --ring: 0 0 0 3px var(--c-accent-ring);

  /* ---- photography overlays -------------------------------------------- */
  --overlay-scrim: linear-gradient(180deg, rgb(9 9 11 / 0) 30%, rgb(9 9 11 / .5) 58%, rgb(9 9 11 / .9) 100%);
  --overlay-soft: linear-gradient(180deg, rgb(9 9 11 / 0) 40%, rgb(9 9 11 / .35) 100%);

  /* ---- Magic UI effects (used sparingly) -------------------------------- */
  --aurora-1: rgb(23 114 194 / .16);
  --aurora-2: rgb(109 91 208 / .13);
  --aurora-3: rgb(15 138 122 / .12);
  --gradient-hairline: linear-gradient(90deg, transparent, var(--c-accent), transparent);
  --glow-accent: 0 0 0 1px rgb(23 114 194 / .12), 0 12px 40px -12px rgb(23 114 194 / .35);
  --shimmer: linear-gradient(100deg, transparent 20%, rgb(255 255 255 / .35) 50%, transparent 80%);

  /* ---- typography -------------------------------------------------------
     Manrope for Latin (geometric, editorial), Tajawal for Arabic. Headings get a
     tighter tracking and a shorter line-height; body text runs long, at 1.75. */
  --font-sans: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-ar: "Tajawal", "Cairo", "Noto Naskh Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-head: var(--font-sans);

  --fs-11: .6875rem;
  --fs-12: .75rem;
  --fs-13: .8125rem;
  --fs-14: .875rem;
  --fs-15: .9375rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-34: 2.125rem;
  --fs-42: 2.625rem;
  --fs-52: 3.25rem;

  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.75;
  --tracking-tight: -.022em;
  --tracking-tight-wide: -.032em;

  /* ---- spacing: an 8pt grid, extended far enough for real whitespace ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 28px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-14: 56px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-28: 112px;

  /* radius ladder. Cards land on 16px, which reads modern without looking bubbly. */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* ---- layout ---------------------------------------------------------- */
  --container: 1320px;
  --container-narrow: 760px;
  --gutter: 32px;
  --sidebar-w: 328px;
  --header-h: 72px;
  --topbar-h: 32px;

  /* ---- motion ---------------------------------------------------------- */
  --t-fast: .15s cubic-bezier(.4, 0, .2, 1);
  --t: .24s cubic-bezier(.4, 0, .2, 1);
  --t-slow: .45s cubic-bezier(.22, 1, .36, 1);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

/* ============================  DARK THEME  ================================ */
:root[data-theme="dark"] {
  --c-bg: #09090b;
  --c-surface: #131316;
  --c-surface-2: #1a1a1f;
  --c-surface-3: #232329;
  --c-border: #26262c;
  --c-border-strong: #33333b;

  --c-text: #f4f4f5;
  --c-text-soft: #b4b4bd;
  --c-text-muted: #8b8b95;
  --c-text-invert: #09090b;

  --c-accent: #5aa6f0;
  --c-accent-strong: #83bef7;
  --c-accent-soft: #10253a;
  --c-accent-ring: rgb(90 166 240 / .28);
  /* the dark accent is light, so filled buttons take dark labels */
  --c-on-accent: #09090b;
  --c-emerald: #34d3b4;
  --c-emerald-soft: #102b28;
  --c-amber: #f0a44a;
  --c-violet: #a882ff;

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .5);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .55), 0 1px 2px -1px rgb(0 0 0 / .5);
  --shadow-md: 0 4px 14px -2px rgb(0 0 0 / .6), 0 2px 6px -2px rgb(0 0 0 / .5);
  --shadow-lg: 0 16px 44px -8px rgb(0 0 0 / .7), 0 4px 12px -4px rgb(0 0 0 / .5);
  --shadow-xl: 0 28px 70px -16px rgb(0 0 0 / .8);
  --ring: 0 0 0 3px var(--c-accent-ring);

  --overlay-scrim: linear-gradient(180deg, rgb(0 0 0 / 0) 30%, rgb(0 0 0 / .55) 58%, rgb(0 0 0 / .92) 100%);
  --aurora-1: rgb(90 166 240 / .18);
  --aurora-2: rgb(168 130 255 / .14);
  --aurora-3: rgb(52 211 180 / .12);
  --glow-accent: 0 0 0 1px rgb(90 166 240 / .2), 0 12px 44px -12px rgb(90 166 240 / .45);

  color-scheme: dark;
}

/* ---- category accents ----------------------------------------------------
   `-ink` is the small-caps label colour and must clear 4.5:1 against its own tint.
   Dark overrides repeat the `:root` prefix: `:root` and `[data-theme="dark"]` have
   equal specificity, so without it the light palette wins regardless of order. */
:root {
  --cat-wild: #0f8a7a;
  --cat-wild-ink: #0b6b5f;
  --cat-care: #1772c2;
  --cat-care-ink: #1466ad;
  --cat-supplies: #b45309;
  --cat-supplies-ink: #92400e;
  --cat-birds: #6d5bd0;
  --cat-birds-ink: #5843b8;
}
:root[data-theme="dark"] {
  --cat-wild: #34d3b4;
  --cat-wild-ink: #4fe0c3;
  --cat-care: #5aa6f0;
  --cat-care-ink: #7dbdf7;
  --cat-supplies: #f0a44a;
  --cat-supplies-ink: #ffbb6b;
  --cat-birds: #c4a8ff;
  --cat-birds-ink: #d3bdff;
}

/* =======================  MOTION PREFERENCES  ============================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
