/* Mealzy Design System — tokens.css */

:root {
  /* Brand Colors */
  --color-forest:      #1a3d2b;
  --color-green:       #3d8b5e;
  --color-green-light: #4ade80;
  --color-green-muted: #a8d5ba;

  /* Neutral Palette */
  --color-foreground:  #1a1a1a;
  --color-muted-fg:    #6b7280;
  --color-cream:       #f8f5f0;
  --color-parchment:   #f2ede6;
  --color-muted-bg:    #faf8f6;
  --color-border:      #e5e0d8;
  --color-hairline:    #ede8e0;

  /* Semantic Colors */
  --color-success:     #10b981;
  --color-warning:     #f59e0b;
  --color-error:       #ef4444;
  --color-brick:       #c2410c;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm:     0 2px 8px rgba(26, 61, 43, 0.06);
  --shadow-md:     0 4px 16px rgba(26, 61, 43, 0.08);
  --shadow-lg:     0 8px 32px rgba(26, 61, 43, 0.12);
  --shadow-xl:     0 16px 48px rgba(26, 61, 43, 0.16);
  --shadow-button: 0 4px 12px rgba(61, 139, 94, 0.25);
  --shadow-card:   0 2px 12px rgba(26, 61, 43, 0.08);

  /* Animation */
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-edit:     cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.15s;
  --duration-base: 0.3s;
  --duration-slow: 0.5s;
}

[data-theme="dark"] {
  --color-foreground:  #f5f1ed;
  --color-muted-fg:    #9ca3af;
  --color-cream:       #1f2937;
  --color-parchment:   #111827;
  --color-muted-bg:    #0f1419;
  --color-border:      #2d3748;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-green);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.15s var(--ease-out);
}

.skip-link:focus {
  top: 0;
}

.badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-green {
  background: var(--color-green);
  color: white;
}

.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-wrapper .form-input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted-fg);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.password-toggle:focus {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Dark mode nav fix */
[data-theme="dark"] .nav {
  background: rgba(15, 20, 25, 0.95);
  border-bottom-color: var(--color-border);
}
[data-theme="dark"] .nav-logo { color: white; }
[data-theme="dark"] .nav-link { color: var(--color-foreground); }

/* Dark mode card fix */
[data-theme="dark"] .card {
  box-shadow: none;
  border-color: var(--color-border);
}
[data-theme="dark"] .card:hover {
  box-shadow: none;
  border-color: var(--color-green-muted);
  transform: translateY(-2px);
}

/* Dark mode form inputs */
[data-theme="dark"] .form-input {
  background: var(--color-cream);
  color: var(--color-foreground);
  border-color: var(--color-border);
}
