/* style.css — Jugendamt Advocacy Site Design Tokens & Components */

/* === TYPE SCALE (fluid clamp) === */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* === SPACING (4px base) === */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* === FONTS === */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  /* === RADIUS === */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  /* === TRANSITIONS === */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* === CONTENT WIDTHS === */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* === DARK MODE (DEFAULT) === 
   Dark navy base — this is the primary/default mode for this site.
   The site conveys gravity through darkness. */

:root, [data-theme="dark"] {
  /* Surfaces — dark navy progression */
  --color-bg:             #0a1628;
  --color-surface:        #0f1d33;
  --color-surface-2:      #14253f;
  --color-surface-offset: #0d1a2e;
  --color-surface-offset-2: #182c4a;
  --color-surface-dynamic: #1e3454;
  --color-divider:        #1e3050;
  --color-border:         #2a3f62;

  /* Text */
  --color-text:           #e8e6e1;
  --color-text-muted:     #8e9ab0;
  --color-text-faint:     #4a5872;
  --color-text-inverse:   #0a1628;

  /* Primary Accent — deep amber/gold for CTAs and urgency */
  --color-primary:        #c5880c;
  --color-primary-hover:  #daa020;
  --color-primary-active: #a87208;
  --color-primary-highlight: #2a2318;

  /* Alarm — muted red for statistics and urgency */
  --color-alarm:          #8b2020;
  --color-alarm-light:    #c44040;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
}

/* === LIGHT MODE === */
[data-theme="light"] {
  --color-bg:             #f8f6f1;
  --color-surface:        #ffffff;
  --color-surface-2:      #f0ede7;
  --color-surface-offset: #eae7e0;
  --color-surface-offset-2: #e2dfd8;
  --color-surface-dynamic: #d8d5cd;
  --color-divider:        #d0cdc5;
  --color-border:         #c0bdb5;

  --color-text:           #1a1a1a;
  --color-text-muted:     #5c5c5c;
  --color-text-faint:     #999999;
  --color-text-inverse:   #f8f6f1;

  --color-primary:        #b07a08;
  --color-primary-hover:  #8b6106;
  --color-primary-active: #6e4d05;
  --color-primary-highlight: #f5ecd8;

  --color-alarm:          #8b2020;
  --color-alarm-light:    #b83030;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
}

/* System preference fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:             #f8f6f1;
    --color-surface:        #ffffff;
    --color-surface-2:      #f0ede7;
    --color-surface-offset: #eae7e0;
    --color-surface-offset-2: #e2dfd8;
    --color-surface-dynamic: #d8d5cd;
    --color-divider:        #d0cdc5;
    --color-border:         #c0bdb5;
    --color-text:           #1a1a1a;
    --color-text-muted:     #5c5c5c;
    --color-text-faint:     #999999;
    --color-text-inverse:   #f8f6f1;
    --color-primary:        #b07a08;
    --color-primary-hover:  #8b6106;
    --color-primary-active: #6e4d05;
    --color-primary-highlight: #f5ecd8;
    --color-alarm:          #8b2020;
    --color-alarm-light:    #b83030;
    --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
    --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
    --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
  }
}
