/* style.css — T. Pora CPA, PC — 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);
}

/* ============================================
   4px SPACING SYSTEM
   ============================================ */
:root {
  --space-1:  0.25rem;  /*  4px */
  --space-2:  0.5rem;   /*  8px */
  --space-3:  0.75rem;  /* 12px */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.25rem;  /* 20px */
  --space-6:  1.5rem;   /* 24px */
  --space-8:  2rem;     /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
}

/* ============================================
   CUSTOM PALETTE: CPA PROFESSIONAL
   Deep navy primary, warm cream surfaces, subtle gold accent.
   Trust, competence, calm professionalism.
   ============================================ */

:root, [data-theme="light"] {
  /* --- Surfaces (Bright & Clean) --- */
  --color-bg:             #f7f9fc;  /* Cool light base */
  --color-surface:        #ffffff;  /* White card */
  --color-surface-2:      #ffffff;  /* Raised+1 */
  --color-surface-offset: #eef2f7;  /* Offset/alternate section bg */
  --color-surface-offset-2: #e4eaf2; /* Offset+1 */
  --color-surface-dynamic: #dce3ed;  /* Hover bg / dynamic */
  --color-divider:        #d1d9e4;  /* Dividers */
  --color-border:         #c2cdd9;  /* Borders */

  /* --- Text (Deep Navy) --- */
  --color-text:           #1a2b5b;  /* Deep navy from logo */
  --color-text-muted:     #4a5a80;  /* Secondary text */
  --color-text-faint:     #8a95aa;  /* Disabled / placeholder */
  --color-text-inverse:   #f7f9fc;  /* Text on dark bg */

  /* --- Primary Accent (Deep Navy) --- */
  --color-primary:        #1a2b5b;  /* Deep navy from logo */
  --color-primary-hover:  #122044;  /* Darker navy */
  --color-primary-active: #0c1630;  /* Darkest */
  --color-primary-highlight: #dce3f0; /* Light navy tint */

  /* --- Secondary Accent (Bright Blue / Cerulean) --- */
  --color-accent:         #0099cc;  /* Bright cerulean from logo */
  --color-accent-hover:   #0085b3;  /* Darker cerulean */
  --color-accent-active:  #007199;  /* Darkest cerulean */
  --color-accent-highlight: #d4f0fa; /* Light cerulean tint */

  /* --- Legacy gold alias (maps to accent) --- */
  --color-gold:           #0099cc;
  --color-gold-hover:     #0085b3;
  --color-gold-active:    #007199;
  --color-gold-highlight: #d4f0fa;

  /* --- Semantic: Success (Forest Green) --- */
  --color-success:        #2e8b57;
  --color-success-hover:  #236b43;
  --color-success-active: #1a5033;
  --color-success-highlight: #d4ede0;

  /* --- Semantic: Error (Muted Red) --- */
  --color-error:          #c0392b;
  --color-error-hover:    #a0302a;
  --color-error-active:   #802520;
  --color-error-highlight: #f5d4d0;

  /* --- Semantic: Warning (Terra) --- */
  --color-warning:        #d68910;
  --color-warning-hover:  #b87a0d;
  --color-warning-active: #9a6a0a;
  --color-warning-highlight: #faebd7;

  /* --- 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);

  /* --- 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);

  /* --- Content widths --- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* --- Font families --- */
  --font-display: 'Libre Baskerville', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  /* --- Surfaces (Deep Navy) --- */
  --color-bg:             #0e1829;
  --color-surface:        #152035;
  --color-surface-2:      #1a2840;
  --color-surface-offset: #121c30;
  --color-surface-offset-2: #17223a;
  --color-surface-dynamic: #1e2e48;
  --color-divider:        #1e2e48;
  --color-border:         #2a3d5a;

  /* --- Text --- */
  --color-text:           #d8e0ec;
  --color-text-muted:     #8a9ab8;
  --color-text-faint:     #506080;
  --color-text-inverse:   #0e1829;

  /* --- Primary Accent (Bright Blue) --- */
  --color-primary:        #38b0e0;
  --color-primary-hover:  #2a9acc;
  --color-primary-active: #2088b8;
  --color-primary-highlight: #15253d;

  /* --- Secondary Accent (Bright Blue — same family) --- */
  --color-accent:         #38b0e0;
  --color-accent-hover:   #50c0ee;
  --color-accent-active:  #68d0ff;
  --color-accent-highlight: #152535;

  --color-gold:           #38b0e0;
  --color-gold-hover:     #50c0ee;
  --color-gold-active:    #68d0ff;
  --color-gold-highlight: #152535;

  /* --- Semantic: Success --- */
  --color-success:        #5ec08e;
  --color-success-hover:  #44a874;
  --color-success-active: #30905e;
  --color-success-highlight: #142820;

  /* --- Semantic: Error --- */
  --color-error:          #e06060;
  --color-error-hover:    #c84848;
  --color-error-active:   #b03838;
  --color-error-highlight: #2c1515;

  /* --- Semantic: Warning --- */
  --color-warning:        #e0a838;
  --color-warning-hover:  #d4b848;
  --color-warning-active: #e0c858;
  --color-warning-highlight: #282010;

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

/* System preference fallback — disabled: site always starts light.
   Dark mode is opt-in via the theme toggle. */
