/* style.css — ByeCorporate Design Tokens + Component Styles */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300..700&display=swap');

/* ============================================
   TYPE SCALE (fluid with clamp)
   ============================================ */
:root {
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  --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 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;

  /* ============================================
     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 (ByeCorporate Custom Palette)
   ============================================ */
:root, [data-theme="light"] {
  /* Surfaces — warm cream */
  --color-bg:               #faf8f5;
  --color-surface:          #f5f2ed;
  --color-surface-2:        #f0ede7;
  --color-surface-offset:   #eae7e0;
  --color-surface-offset-2: #e4e0d8;
  --color-surface-dynamic:  #ddd9d0;
  --color-divider:          #d5d0c7;
  --color-border:           #cdc8be;

  /* Text — deep navy */
  --color-text:             #1a1a2e;
  --color-text-muted:       #6b6b7b;
  --color-text-faint:       #a0a0ae;
  --color-text-inverse:     #faf8f5;

  /* Primary Accent — warm amber */
  --color-primary:          #d97706;
  --color-primary-hover:    #b45309;
  --color-primary-active:   #92400e;
  --color-primary-highlight: #fef3c7;

  /* Secondary — deep navy */
  --color-secondary:        #1a1a2e;
  --color-secondary-hover:  #2d2d44;
  --color-secondary-active: #0f0f1e;

  /* Error */
  --color-error:            #dc2626;
  --color-error-hover:      #b91c1c;

  /* Success */
  --color-success:          #16a34a;
  --color-success-hover:    #15803d;

  /* Shadows — warm-tinted */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 60 / 0.12);
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --color-bg:               #141318;
  --color-surface:          #1c1b22;
  --color-surface-2:        #232229;
  --color-surface-offset:   #1e1d24;
  --color-surface-offset-2: #28272f;
  --color-surface-dynamic:  #323140;
  --color-divider:          #2e2d38;
  --color-border:           #3a394a;

  --color-text:             #e8e7ef;
  --color-text-muted:       #9a99a8;
  --color-text-faint:       #5e5d6c;
  --color-text-inverse:     #1a1a2e;

  --color-primary:          #f59e0b;
  --color-primary-hover:    #d97706;
  --color-primary-active:   #b45309;
  --color-primary-highlight: #422006;

  --color-secondary:        #e8e7ef;
  --color-secondary-hover:  #c8c7d5;
  --color-secondary-active: #a8a7b5;

  --color-error:            #f87171;
  --color-error-hover:      #ef4444;

  --color-success:          #4ade80;
  --color-success-hover:    #22c55e;

  --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);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #141318;
    --color-surface:          #1c1b22;
    --color-surface-2:        #232229;
    --color-surface-offset:   #1e1d24;
    --color-surface-offset-2: #28272f;
    --color-surface-dynamic:  #323140;
    --color-divider:          #2e2d38;
    --color-border:           #3a394a;

    --color-text:             #e8e7ef;
    --color-text-muted:       #9a99a8;
    --color-text-faint:       #5e5d6c;
    --color-text-inverse:     #1a1a2e;

    --color-primary:          #f59e0b;
    --color-primary-hover:    #d97706;
    --color-primary-active:   #b45309;
    --color-primary-highlight: #422006;

    --color-secondary:        #e8e7ef;
    --color-secondary-hover:  #c8c7d5;
    --color-secondary-active: #a8a7b5;

    --color-error:            #f87171;
    --color-error-hover:      #ef4444;

    --color-success:          #4ade80;
    --color-success-hover:    #22c55e;

    --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);
  }
}
