/* style.css — Rentr Design Tokens & Component Styles */

:root {
  /* --- Type Scale (fluid clamp) --- */
  --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);

  /* --- 4px Spacing System --- */
  --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;

  /* --- Font Families --- */
  --font-display: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  /* --- Radius --- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --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%;
}

/* ============================================
   LIGHT MODE
   ============================================ */
:root, [data-theme="light"] {
  --color-bg:               #f5f5f3;
  --color-surface:          #ffffff;
  --color-surface-2:        #fafaf9;
  --color-surface-offset:   #eeeeec;
  --color-surface-offset-2: #e8e7e5;
  --color-surface-dynamic:  #dddcda;
  --color-divider:          #d5d4d2;
  --color-border:           #cbcac8;

  --color-text:           #1a1f2e;
  --color-text-muted:     #6b7080;
  --color-text-faint:     #a5a9b4;
  --color-text-inverse:   #f8f9fc;

  --color-primary:         #1e3a5f;
  --color-primary-hover:   #162d4a;
  --color-primary-active:  #0f2038;
  --color-primary-highlight: #dce4ed;

  --color-success:         #0d7a4f;
  --color-success-hover:   #0a6340;
  --color-success-active:  #084d32;
  --color-success-highlight: #d1ede2;

  --color-warning:         #b5850a;
  --color-warning-hover:   #946d08;
  --color-warning-active:  #725506;
  --color-warning-highlight: #f0e6c8;

  --color-error:           #c0392b;
  --color-error-hover:     #a33124;
  --color-error-active:    #872a1f;
  --color-error-highlight: #f2d6d2;

  --color-notification:    #e74c3c;
  --color-notification-hover: #c0392b;
  --color-notification-active: #a33124;
  --color-notification-highlight: #fce4e1;

  --color-blue:            #2980b9;
  --color-blue-hover:      #1f6fa3;
  --color-blue-active:     #17588a;
  --color-blue-highlight:  #d0e5f4;

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

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --color-bg:               #111318;
  --color-surface:          #181a21;
  --color-surface-2:        #1e2029;
  --color-surface-offset:   #1a1c24;
  --color-surface-offset-2: #22242d;
  --color-surface-dynamic:  #2b2e38;
  --color-divider:          #262830;
  --color-border:           #363840;

  --color-text:           #d8dae0;
  --color-text-muted:     #8a8d98;
  --color-text-faint:     #555861;
  --color-text-inverse:   #1a1f2e;

  --color-primary:         #6b9fd4;
  --color-primary-hover:   #5389bf;
  --color-primary-active:  #4074a8;
  --color-primary-highlight: #252e3a;

  --color-success:         #3dbe85;
  --color-success-hover:   #2da56f;
  --color-success-active:  #218c5c;
  --color-success-highlight: #1e3029;

  --color-warning:         #e8b84a;
  --color-warning-hover:   #d4a23a;
  --color-warning-active:  #bf8e2c;
  --color-warning-highlight: #3a3324;

  --color-error:           #e47163;
  --color-error-hover:     #d15a4c;
  --color-error-active:    #bc473a;
  --color-error-highlight: #3a2523;

  --color-notification:    #f08070;
  --color-notification-hover: #e06555;
  --color-notification-active: #cc5040;
  --color-notification-highlight: #3d2a28;

  --color-blue:            #5aace0;
  --color-blue-hover:      #4496cb;
  --color-blue-active:     #3080b5;
  --color-blue-highlight:  #222d38;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #111318;
    --color-surface:          #181a21;
    --color-surface-2:        #1e2029;
    --color-surface-offset:   #1a1c24;
    --color-surface-offset-2: #22242d;
    --color-surface-dynamic:  #2b2e38;
    --color-divider:          #262830;
    --color-border:           #363840;
    --color-text:           #d8dae0;
    --color-text-muted:     #8a8d98;
    --color-text-faint:     #555861;
    --color-text-inverse:   #1a1f2e;
    --color-primary:         #6b9fd4;
    --color-primary-hover:   #5389bf;
    --color-primary-active:  #4074a8;
    --color-primary-highlight: #252e3a;
    --color-success:         #3dbe85;
    --color-success-hover:   #2da56f;
    --color-success-active:  #218c5c;
    --color-success-highlight: #1e3029;
    --color-warning:         #e8b84a;
    --color-warning-hover:   #d4a23a;
    --color-warning-active:  #bf8e2c;
    --color-warning-highlight: #3a3324;
    --color-error:           #e47163;
    --color-error-hover:     #d15a4c;
    --color-error-active:    #bc473a;
    --color-error-highlight: #3a2523;
    --color-notification:    #f08070;
    --color-notification-hover: #e06555;
    --color-notification-active: #cc5040;
    --color-notification-highlight: #3d2a28;
    --color-blue:            #5aace0;
    --color-blue-hover:      #4496cb;
    --color-blue-active:     #3080b5;
    --color-blue-highlight:  #222d38;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}
