/* ═══════════════════════════════════════════════
   PlaceSpace Design System — Colors & Type Tokens
   Source of truth: github.com/Alodda/place-space
   ═══════════════════════════════════════════════ */

:root {
  /* ─── Brand: Emerald ───
     Emerald is the identity color. The logo is emerald-on-white,
     the theme-color meta is #059669, active states across the app
     are emerald-500. Teal is used as a secondary accent. */
  --ps-emerald-50:  #ecfdf5;
  --ps-emerald-100: #d1fae5;
  --ps-emerald-200: #a7f3d0;
  --ps-emerald-300: #6ee7b7;
  --ps-emerald-400: #34d399;
  --ps-emerald-500: #10b981; /* primary brand */
  --ps-emerald-600: #059669; /* theme-color, active nav */
  --ps-emerald-700: #047857;
  --ps-emerald-800: #065f46;
  --ps-emerald-900: #064e3b;

  --ps-teal-50:  #f0fdfa;
  --ps-teal-100: #ccfbf1;
  --ps-teal-400: #2dd4bf;
  --ps-teal-500: #14b8a6;
  --ps-teal-600: #0d9488;
  --ps-teal-700: #0f766e;

  /* ─── Neutrals ───
     Repo uses Tailwind gray-* throughout (gray-50 backdrop,
     gray-100 borders, gray-400 inactive icons, gray-900 text). */
  --ps-gray-50:  #f9fafb;
  --ps-gray-100: #f3f4f6;
  --ps-gray-200: #e5e7eb;
  --ps-gray-300: #d1d5db;
  --ps-gray-400: #9ca3af;
  --ps-gray-500: #6b7280;
  --ps-gray-600: #4b5563;
  --ps-gray-700: #374151;
  --ps-gray-800: #1f2937;
  --ps-gray-900: #111827;

  --ps-white: #ffffff;
  --ps-black: #000000;

  /* ─── Status ─── */
  --ps-success:     #10b981;
  --ps-success-bg:  #ecfdf5;
  --ps-warning:     #f59e0b;
  --ps-warning-bg:  #fffbeb;
  --ps-danger:      #ef4444;
  --ps-danger-bg:   #fef2f2;
  --ps-info:        #3b82f6;
  --ps-info-bg:     #eff6ff;

  /* ─── Category accents (used in Discover / feed) ─── */
  --ps-cat-sports:    #f97316; /* orange */
  --ps-cat-concerts:  #a855f7; /* purple */
  --ps-cat-theater:   #ec4899; /* pink */
  --ps-cat-comedy:    #eab308; /* yellow */
  --ps-cat-food:      #dc2626; /* red */
  --ps-cat-nature:    #16a34a; /* green */

  /* ─── Semantic tokens (light, default) ─── */
  --ps-bg:            var(--ps-white);
  --ps-bg-subtle:     var(--ps-gray-50);
  --ps-bg-muted:      var(--ps-gray-100);
  --ps-bg-card:       var(--ps-white);
  --ps-bg-input:      var(--ps-gray-50);
  --ps-bg-overlay:    rgba(0, 0, 0, 0.5);

  --ps-fg:            var(--ps-gray-900);
  --ps-fg-muted:      var(--ps-gray-500);
  --ps-fg-subtle:     var(--ps-gray-400);
  --ps-fg-inverse:    var(--ps-white);

  --ps-border:        var(--ps-gray-200);
  --ps-border-subtle: var(--ps-gray-100);
  --ps-border-focus:  var(--ps-emerald-500);

  --ps-primary:       var(--ps-emerald-500);
  --ps-primary-hover: var(--ps-emerald-600);
  --ps-primary-active: var(--ps-emerald-700);
  --ps-on-primary:    var(--ps-white);

  /* ─── Radii ─── */
  --ps-radius-xs:   2px;
  --ps-radius-sm:   6px;
  --ps-radius-md:   8px;   /* buttons, inputs (rounded-md = 0.5rem) */
  --ps-radius-lg:   10px;  /* --radius = 0.625rem */
  --ps-radius-xl:   12px;
  --ps-radius-2xl:  16px;  /* cards */
  --ps-radius-3xl:  24px;  /* sheets, modals */
  --ps-radius-full: 9999px;

  /* ─── Spacing (4px base, Tailwind-aligned) ─── */
  --ps-space-0:  0;
  --ps-space-1:  4px;
  --ps-space-2:  8px;
  --ps-space-3:  12px;
  --ps-space-4:  16px;
  --ps-space-5:  20px;
  --ps-space-6:  24px;
  --ps-space-8:  32px;
  --ps-space-10: 40px;
  --ps-space-12: 48px;
  --ps-space-16: 64px;

  /* ─── Shadows ─── */
  --ps-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --ps-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --ps-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --ps-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --ps-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --ps-shadow-emerald: 0 8px 24px -6px rgba(16, 185, 129, 0.35);

  /* ─── Motion ─── */
  --ps-ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ps-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ps-dur-fast:    150ms;
  --ps-dur-base:    200ms;
  --ps-dur-slow:    300ms;

  /* ─── Type ───
     Stack: system UI sans. No custom webfont is loaded in the repo;
     everything defers to Tailwind's --font-sans. */
  --ps-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                  "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --ps-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
                  "Liberation Mono", "Courier New", monospace;

  --ps-weight-normal:   400;
  --ps-weight-medium:   500; /* default for h*, labels, buttons */
  --ps-weight-semibold: 600;
  --ps-weight-bold:     700;

  /* Type scale (Tailwind-aligned; line-heights are 1.5 per globals.css) */
  --ps-text-xs:   12px;
  --ps-text-sm:   14px;
  --ps-text-base: 16px;
  --ps-text-lg:   18px;
  --ps-text-xl:   20px;
  --ps-text-2xl:  24px;
  --ps-text-3xl:  30px;
  --ps-text-4xl:  36px;
  --ps-text-5xl:  48px;

  --ps-leading-tight:    1.25;
  --ps-leading-snug:     1.375;
  --ps-leading-normal:   1.5;
  --ps-leading-relaxed:  1.625;
}

/* ─── Dark theme ─── */
[data-theme="dark"], .dark {
  --ps-bg:            #0f172a;
  --ps-bg-subtle:     #1e293b;
  --ps-bg-muted:      #334155;
  --ps-bg-card:       #1e293b;
  --ps-bg-input:      #1e293b;
  --ps-bg-overlay:    rgba(0, 0, 0, 0.7);

  --ps-fg:            #f1f5f9;
  --ps-fg-muted:      #94a3b8;
  --ps-fg-subtle:     #64748b;
  --ps-fg-inverse:    #0f172a;

  --ps-border:        #334155;
  --ps-border-subtle: #1e293b;
  --ps-border-focus:  #34d399;

  --ps-primary:       #34d399;
  --ps-primary-hover: #10b981;
  --ps-primary-active: #059669;
}

/* ═══════════════════════════════════════════════
   Semantic element styles — h1/h2/h3/h4/p/label
   Matches globals.css: weight-medium, line-height 1.5
   ═══════════════════════════════════════════════ */

.ps-h1 { font-family: var(--ps-font-sans); font-size: var(--ps-text-2xl); font-weight: var(--ps-weight-medium); line-height: 1.5; color: var(--ps-fg); }
.ps-h2 { font-family: var(--ps-font-sans); font-size: var(--ps-text-xl);  font-weight: var(--ps-weight-medium); line-height: 1.5; color: var(--ps-fg); }
.ps-h3 { font-family: var(--ps-font-sans); font-size: var(--ps-text-lg);  font-weight: var(--ps-weight-medium); line-height: 1.5; color: var(--ps-fg); }
.ps-h4 { font-family: var(--ps-font-sans); font-size: var(--ps-text-base); font-weight: var(--ps-weight-medium); line-height: 1.5; color: var(--ps-fg); }
.ps-body       { font-family: var(--ps-font-sans); font-size: var(--ps-text-base); font-weight: var(--ps-weight-normal); line-height: 1.5; color: var(--ps-fg); }
.ps-body-sm    { font-family: var(--ps-font-sans); font-size: var(--ps-text-sm);   font-weight: var(--ps-weight-normal); line-height: 1.5; color: var(--ps-fg-muted); }
.ps-caption    { font-family: var(--ps-font-sans); font-size: var(--ps-text-xs);   font-weight: var(--ps-weight-normal); line-height: 1.4; color: var(--ps-fg-muted); }
.ps-label      { font-family: var(--ps-font-sans); font-size: var(--ps-text-sm);   font-weight: var(--ps-weight-medium); line-height: 1.5; color: var(--ps-fg); }
.ps-button     { font-family: var(--ps-font-sans); font-size: var(--ps-text-sm);   font-weight: var(--ps-weight-medium); line-height: 1.25; }
.ps-mono       { font-family: var(--ps-font-mono); font-size: var(--ps-text-sm); }

/* Display scale — hero and marketing headings */
.ps-display-lg { font-family: var(--ps-font-sans); font-size: clamp(36px, 5vw, 60px); font-weight: var(--ps-weight-bold); line-height: 1.1; letter-spacing: -0.02em; color: var(--ps-fg); }
.ps-display-md { font-family: var(--ps-font-sans); font-size: clamp(28px, 4vw, 48px); font-weight: var(--ps-weight-bold); line-height: 1.15; letter-spacing: -0.015em; color: var(--ps-fg); }
