/* ==========================================================================
   Base Styles & A Modern CSS Reset
   ========================================================================== */

   *, *::before, *::after {
    box-sizing: border-box;
  }
  
  body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
    margin: 0;
  }
  
  img, picture {
    max-width: 100%;
    display: block;
  }
  
  input, button, textarea, select {
    font: inherit;
  }
  
  ul, ol {
    list-style: none;
    padding: 0;
  }

  a {
      text-decoration: none;
      color: inherit;
  }
  
  /* ==========================================================================
     Design System Variables
     ========================================================================== */
  
  :root,
  [data-theme="light"] {
      /* Font & Spacing Variables */
      --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
      --spacing-xs: 0.25rem;
      --spacing-s: 0.5rem;
      --spacing-m: 1rem;
      --spacing-l: 1.5rem;
      --spacing-xl: 2rem;
      --spacing-xxl: 3rem;
  
      /* --- Refined Light Theme --- */
      --color-background: #f8f9fa;       
      --color-surface: #ffffff;          
      --color-primary: #2a9d8f;
      --color-primary-dark: #207d72;
      --color-secondary: #e9c46a;       
      --color-text: #264653;             
      --color-text-muted: #5f737d; /* REFINED: Blue-grey to match brand charcoal */      
      --color-border: #d8dde0;     /* REFINED: Cool grey border */           
      --color-success: #2a9d8f;          
      --color-danger: #e76f51; 
      --color-error: #dc3545;          
      --color-warning: #f4a261;
      
      --color-primary-rgb: 42, 157, 143;
      --color-surface-rgb: 255, 255, 255;
      --color-border-rgb: 216, 221, 224; /* Updated RGB */
      --color-text-rgb: 38, 70, 83;
      --color-error-rgb: 220, 53, 69;

      /* Shadows */
      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }
  
  [data-theme="dark"] {
      --color-background: #181c25;
      --color-surface: #222831;
      --color-primary: #6ab7c2;
      --color-primary-dark: #529db0;
      --color-secondary: #8e9aab;
      --color-text: #e0e0e0;
      --color-text-muted: #9cafb7; /* REFINED: Lighter blue-grey for dark mode */
      --color-border: rgba(255, 255, 255, 0.1);
      --color-success: #6ab7c2;
      --color-danger: #e76f51;
      --color-error: #ff6b6b;
      
      --color-primary-rgb: 106, 183, 194;
      --color-surface-rgb: 34, 40, 49;
      --color-border-rgb: 255, 255, 255;
      --color-text-rgb: 224, 224, 224;
      --color-error-rgb: 255, 107, 107;
  }
  
  body {
      background-color: var(--color-background);
      color: var(--color-text);
      font-family: var(--font-sans);
      transition: background-color 0.2s, color 0.2s;
      line-height: 1.6;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
  }
  
  /* ==========================================================================
     Global Component Styles
     ========================================================================== */

  /* Primary Button */
  .cta-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.8rem 1.6rem;
      background-color: var(--color-primary);
      color: white;
      text-decoration: none;
      border: none;
      border-radius: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: var(--shadow-md);
      font-size: 1rem;
      line-height: 1;
  }

  .cta-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(var(--color-primary-rgb), 0.3);
      background-color: var(--color-primary); 
      filter: brightness(110%);
  }
  
  .cta-button:active {
      transform: translateY(0);
      box-shadow: var(--shadow-sm);
  }
  
  .cta-button:disabled {
      opacity: 0.7;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
  }

  /* Secondary Button */
  .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    background-color: transparent;
    color: var(--color-text-muted);
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1;
  }

  .secondary-button:hover {
      background-color: var(--color-surface);
      border-color: var(--color-text);
      color: var(--color-text);
      transform: translateY(-1px);
      box-shadow: var(--shadow-sm);
  }

  /* Utility Classes */
  .text-center { text-align: center; }
  .hidden { display: none !important; }
  
  .container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 var(--spacing-m);
  }
  
  /* ==========================================================================
     Global Responsive Styles
     ========================================================================== */
  
  @media (max-width: 768px) {
      body {
          font-size: 16px;
      }
      
      :root {
          --spacing-xl: 1.5rem;
          --spacing-xxl: 2rem;
      }
  }
