/**
 * TangoAtlas Design Tokens
 *
 * Shared CSS custom properties for TangoAtlas Core, Passport, and Card modes.
 * The default semantic layer matches the currently implemented core UI so this
 * file can be introduced without changing the live look and feel unexpectedly.
 */

:root {
  color-scheme: light;

  /* ============================================
   * Primitive Brand Tokens
   * ============================================ */
  --brand-atlas-blue: 222 47% 11%;
  --brand-old-paper: 60 5% 96%;
  --brand-tango-gold: 38 92% 44%;
  --brand-signal-red: 347 83% 41%;

  --travel-blue: 197 77% 48%;
  --travel-light-blue: 191 73% 49%;
  --travel-green: 146 69% 39%;
  --travel-cream: 33 52% 89%;
  --travel-red: 0 88% 57%;

  --neutral-white: 0 0% 100%;
  --neutral-warm-white: 40 33% 98%;
  --neutral-slate: 215 25% 43%;
  --neutral-border-light: 33 20% 85%;
  --neutral-border-quiet: 33 12% 90%;

  /* ============================================
   * Compatibility Aliases
   * ============================================ */
  --core-ink: 210 20% 20%;
  --atlas-blue: var(--core-ink);
  --atlas-paper: var(--travel-cream);
  --atlas-gold: var(--travel-blue);
  --atlas-red: var(--travel-red);

  /* ============================================
   * Typography Tokens
   * ============================================ */
  --font-sans: 'Inter', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Merriweather', 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* ============================================
   * Radius Tokens
   * ============================================ */
  --radius-none: 0;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --radius: var(--radius-md);

  /* ============================================
   * Spacing Tokens
   * ============================================ */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;
  --space-24: 12rem;

  --content-max-width: 1200px;
  --content-padding: 1rem;

  /* ============================================
   * Shadow & Motion Tokens
   * ============================================ */
  --shadow-soft: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-raised: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);

  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);

  /* ============================================
   * Default Semantic Layer
   * TangoAtlas Core - implemented UI baseline
   * ============================================ */
  --background: var(--neutral-white);
  --foreground: var(--core-ink);

  --card: 33 52% 94%;
  --card-foreground: var(--core-ink);

  --popover: var(--neutral-white);
  --popover-foreground: var(--core-ink);

  --primary: 197 77% 34%;
  --primary-foreground: var(--neutral-white);

  --secondary: 146 69% 31%;
  --secondary-foreground: var(--neutral-white);

  --muted: 33 30% 92%;
  --muted-foreground: 210 10% 40%;

  --accent: 191 73% 49%;
  --accent-foreground: var(--neutral-white);

  --success: 146 69% 31%;
  --success-foreground: var(--neutral-white);

  --warning: 38 92% 44%;
  --warning-foreground: 22 82% 15%;

  --info: 197 77% 34%;
  --info-foreground: var(--neutral-white);

  --destructive: var(--travel-red);
  --destructive-foreground: var(--neutral-white);

  --border: var(--neutral-border-light);
  --input: var(--neutral-border-light);
  --ring: var(--travel-blue);

  /* ============================================
   * Mode-Specific Component Tokens
   * ============================================ */
  --passport-card-max-width: 26.25rem;
  --passport-card-padding: var(--space-4);

  --card-profile-surface: var(--card);
  --card-profile-border: var(--border);
  --card-profile-divider: var(--border);
  --card-progress-bg: var(--muted);
  --card-progress-fill: var(--primary);
}

html.dark {
  color-scheme: dark;

  --background: 210 20% 12%;
  --foreground: var(--travel-cream);

  --card: 210 20% 16%;
  --card-foreground: var(--travel-cream);

  --popover: 210 20% 16%;
  --popover-foreground: var(--travel-cream);

  --primary: var(--travel-blue);
  --primary-foreground: var(--neutral-white);

  --secondary: 146 69% 39%;
  --secondary-foreground: var(--neutral-white);

  --muted: 210 15% 22%;
  --muted-foreground: 33 30% 65%;

  --accent: 191 73% 55%;
  --accent-foreground: var(--neutral-white);

  --success: 146 69% 39%;
  --success-foreground: var(--neutral-white);

  --warning: 38 92% 52%;
  --warning-foreground: 35 100% 97%;

  --info: 197 77% 48%;
  --info-foreground: var(--neutral-white);

  --destructive: 0 88% 62%;
  --destructive-foreground: var(--neutral-white);

  --border: 210 15% 25%;
  --input: 210 15% 25%;
  --ring: 197 77% 55%;
}

/* ============================================
 * Passport Mode
 * ============================================ */
html[data-brand="passport"] {
  --background: 40 33% 98%;
  --foreground: var(--brand-atlas-blue);

  --card: var(--neutral-white);
  --card-foreground: var(--brand-atlas-blue);

  --popover: var(--neutral-white);
  --popover-foreground: var(--brand-atlas-blue);

  --primary: var(--brand-tango-gold);
  --primary-foreground: var(--neutral-white);

  --secondary: var(--brand-old-paper);
  --secondary-foreground: var(--brand-atlas-blue);

  --muted: 30 17% 96%;
  --muted-foreground: var(--neutral-slate);

  --accent: 30 17% 96%;
  --accent-foreground: var(--brand-atlas-blue);

  --success: 146 69% 31%;
  --success-foreground: var(--neutral-white);

  --warning: var(--brand-tango-gold);
  --warning-foreground: 22 82% 15%;

  --info: 213 65% 38%;
  --info-foreground: var(--neutral-white);

  --destructive: var(--brand-signal-red);
  --destructive-foreground: var(--neutral-white);

  --border: 32 16% 90%;
  --input: 32 16% 90%;
  --ring: var(--brand-tango-gold);

  --card-profile-surface: var(--card);
}

html.dark[data-brand="passport"] {
  --background: var(--brand-atlas-blue);
  --foreground: var(--brand-old-paper);

  --card: 215 28% 18%;
  --card-foreground: var(--brand-old-paper);

  --popover: 215 28% 18%;
  --popover-foreground: var(--brand-old-paper);

  --primary: var(--brand-tango-gold);
  --primary-foreground: var(--neutral-white);

  --secondary: 215 20% 24%;
  --secondary-foreground: var(--brand-old-paper);

  --muted: 215 18% 22%;
  --muted-foreground: 60 6% 84%;

  --accent: 215 18% 22%;
  --accent-foreground: var(--brand-old-paper);

  --success: 146 50% 42%;
  --success-foreground: var(--neutral-white);

  --warning: var(--brand-tango-gold);
  --warning-foreground: 35 100% 97%;

  --info: 213 58% 55%;
  --info-foreground: var(--neutral-white);

  --destructive: var(--brand-signal-red);
  --destructive-foreground: var(--neutral-white);

  --border: 215 22% 28%;
  --input: 215 22% 28%;
  --ring: var(--brand-tango-gold);
}

/* ============================================
 * Card Mode
 * ============================================ */
html[data-brand="card"] {
  --background: var(--brand-old-paper);
  --foreground: var(--brand-atlas-blue);

  --card: var(--brand-old-paper);
  --card-foreground: var(--brand-atlas-blue);

  --popover: var(--neutral-white);
  --popover-foreground: var(--brand-atlas-blue);

  --primary: var(--brand-tango-gold);
  --primary-foreground: var(--neutral-white);

  --secondary: var(--brand-atlas-blue);
  --secondary-foreground: var(--brand-old-paper);

  --muted: 45 18% 92%;
  --muted-foreground: var(--neutral-slate);

  --accent: 43 61% 90%;
  --accent-foreground: var(--brand-atlas-blue);

  --success: 145 63% 32%;
  --success-foreground: var(--neutral-white);

  --warning: var(--brand-tango-gold);
  --warning-foreground: 22 82% 15%;

  --info: 213 65% 38%;
  --info-foreground: var(--neutral-white);

  --destructive: var(--brand-signal-red);
  --destructive-foreground: var(--neutral-white);

  --border: 222 20% 18%;
  --input: 32 16% 90%;
  --ring: var(--brand-tango-gold);

  --card-profile-surface: var(--brand-old-paper);
  --card-profile-border: 222 20% 18%;
  --card-profile-divider: 32 16% 90%;
  --card-progress-bg: 45 18% 92%;
  --card-progress-fill: var(--brand-tango-gold);
}

html.dark[data-brand="card"] {
  --background: 222 32% 12%;
  --foreground: var(--brand-old-paper);

  --card: 222 24% 16%;
  --card-foreground: var(--brand-old-paper);

  --popover: 222 24% 16%;
  --popover-foreground: var(--brand-old-paper);

  --primary: var(--brand-tango-gold);
  --primary-foreground: var(--neutral-white);

  --secondary: 222 18% 22%;
  --secondary-foreground: var(--brand-old-paper);

  --muted: 222 15% 22%;
  --muted-foreground: 60 6% 84%;

  --accent: 38 35% 28%;
  --accent-foreground: var(--brand-old-paper);

  --success: 145 45% 42%;
  --success-foreground: var(--neutral-white);

  --warning: var(--brand-tango-gold);
  --warning-foreground: 35 100% 97%;

  --info: 213 58% 55%;
  --info-foreground: var(--neutral-white);

  --destructive: var(--brand-signal-red);
  --destructive-foreground: var(--neutral-white);

  --border: 222 18% 28%;
  --input: 222 18% 28%;
  --ring: var(--brand-tango-gold);

  --card-profile-surface: 222 24% 16%;
  --card-profile-border: 222 18% 28%;
  --card-profile-divider: 222 18% 28%;
  --card-progress-bg: 222 15% 22%;
}

:root {
  --role-teacher: 213 65% 38%;
  --role-dj: 271 67% 47%;
  --role-photographer: 145 63% 32%;
  --role-author: 28 84% 43%;
  --role-performer: 330 73% 52%;
  --role-musician: 237 52% 55%;
  --role-organizer: 173 58% 39%;
}

.design-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  color: hsl(var(--card-foreground));
  box-shadow: var(--shadow-soft);
}

.content-card-badge--blue,
.content-card-badge--teacher {
  background-color: hsl(var(--role-teacher) / 0.12);
  color: hsl(var(--role-teacher));
}

.content-card-badge--green,
.content-card-badge--photographer {
  background-color: hsl(var(--role-photographer) / 0.12);
  color: hsl(var(--role-photographer));
}

.content-card-badge--purple,
.content-card-badge--dj {
  background-color: hsl(var(--role-dj) / 0.12);
  color: hsl(var(--role-dj));
}

.content-card-badge--orange,
.content-card-badge--author {
  background-color: hsl(var(--role-author) / 0.12);
  color: hsl(var(--role-author));
}

.content-card-badge--red {
  background-color: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
}

.content-card-badge--default {
  background-color: hsl(var(--secondary) / 0.12);
  color: hsl(var(--secondary));
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.role-badge--teacher,
.role-chip--teacher,
.role-section__title--teacher,
.role-link--teacher {
  color: hsl(var(--role-teacher));
}

.role-badge--dj,
.role-chip--dj,
.role-section__title--dj,
.role-link--dj {
  color: hsl(var(--role-dj));
}

.role-badge--photographer,
.role-chip--photographer,
.role-section__title--photographer,
.role-link--photographer {
  color: hsl(var(--role-photographer));
}

.role-badge--author,
.role-chip--author,
.role-section__title--author,
.role-link--author {
  color: hsl(var(--role-author));
}

.role-badge--performer,
.role-chip--performer,
.role-section__title--performer,
.role-link--performer {
  color: hsl(var(--role-performer));
}

.role-badge--musician,
.role-chip--musician,
.role-section__title--musician,
.role-link--musician {
  color: hsl(var(--role-musician));
}

.role-badge--organizer,
.role-chip--organizer,
.role-section__title--organizer,
.role-link--organizer {
  color: hsl(var(--role-organizer));
}

.role-badge--teacher,
.role-chip--teacher {
  background-color: hsl(var(--role-teacher) / 0.12);
}

.role-badge--dj,
.role-chip--dj {
  background-color: hsl(var(--role-dj) / 0.12);
}

.role-badge--photographer,
.role-chip--photographer {
  background-color: hsl(var(--role-photographer) / 0.12);
}

.role-badge--author,
.role-chip--author {
  background-color: hsl(var(--role-author) / 0.12);
}

.role-badge--performer,
.role-chip--performer {
  background-color: hsl(var(--role-performer) / 0.12);
}

.role-badge--musician,
.role-chip--musician {
  background-color: hsl(var(--role-musician) / 0.12);
}

.role-badge--organizer,
.role-chip--organizer {
  background-color: hsl(var(--role-organizer) / 0.12);
}

.role-section {
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  padding: 1.5rem;
}

.role-section--teacher {
  background-color: hsl(var(--role-teacher) / 0.08);
  border-color: hsl(var(--role-teacher) / 0.2);
}

.role-section--dj {
  background-color: hsl(var(--role-dj) / 0.08);
  border-color: hsl(var(--role-dj) / 0.2);
}

.role-section--photographer {
  background-color: hsl(var(--role-photographer) / 0.08);
  border-color: hsl(var(--role-photographer) / 0.2);
}

.role-section--author {
  background-color: hsl(var(--role-author) / 0.08);
  border-color: hsl(var(--role-author) / 0.2);
}

.role-divider--teacher {
  border-color: hsl(var(--role-teacher) / 0.2);
}

.role-divider--dj {
  border-color: hsl(var(--role-dj) / 0.2);
}

.role-divider--photographer {
  border-color: hsl(var(--role-photographer) / 0.2);
}

.role-divider--author {
  border-color: hsl(var(--role-author) / 0.2);
}

.role-link {
  transition: opacity var(--duration-fast) var(--ease-default);
}

.role-link:hover {
  opacity: 0.82;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
}

.status-pill--active {
  background-color: hsl(var(--success) / 0.12);
  color: hsl(var(--success));
}

.status-pill--on-break {
  background-color: hsl(var(--warning) / 0.14);
  color: hsl(var(--warning-foreground));
}

.status-pill--inactive,
.status-pill--retired {
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}
