:root {
  /* Toulouse-Inspired Delicate Palette */
  --bcg-grad-violette-soft:  #9d81cd;
  --bcg-grad-violette-wash:  #cbbce4;
  --bcg-grad-apricot-glow:   #fde6d2;
  --bcg-grad-terracotta-sun: #fbcbad;

  /* Deep Toulouse Night Palette */
  --bcg-grad-violette-night: #1a0b2e; /* Deepest Indigo-Violet */
  --bcg-grad-violette-royal: #311652; /* Saturated Shadow Purple */
  --bcg-grad-sunset-ember:   #54202b; /* Darkened Wine (the "bridge") */
  --bcg-grad-terracotta-ash: #6b341a; /* Burnt Umber / Dark Orange */

  /* Light theme gradient */
  --bcg-grad-1: var(--bcg-grad-violette-soft);
  --bcg-grad-2: var(--bcg-grad-violette-wash);
  --bcg-grad-3: var(--bcg-grad-apricot-glow);
  --bcg-grad-4: var(--bcg-grad-terracotta-sun);
  --bcg-fall: #cbbce4;



  --glassy-base-opacity: 1.0;
  --glassy-stronger-opacity: 0.3;
}

[data-theme="dark"] {
  --bcg-grad-1: var(--bcg-grad-violette-night);
  --bcg-grad-2: var(--bcg-grad-violette-royal);
  --bcg-grad-3: var(--bcg-grad-sunset-ember);
  --bcg-grad-4: var(--bcg-grad-terracotta-ash);
  --bcg-fall: #311652;
}

body {
  margin: 0;
  min-height: 100vh;
  background-attachment: fixed;
  background-color: var(--bcg-fall); /* Fallback */
  
  /* The Atmospheric Gradient */
  background-image: linear-gradient(
    -145deg,
    var(--bcg-grad-1) 0%,
    var(--bcg-grad-2) 25%,
    var(--bcg-grad-3) 70%,
    var(--bcg-grad-4) 100%
  );
}

/* --- CRUSH OS-LEVEL DARK MODE OVERRIDES --- */
/* Prevents iPhones/browsers in Dark Mode from forcing white text and orange links */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* 1. Force text to stay dark so it remains readable on your white glass cards */
        --text-color: #2c2c2c !important; 
        --text-color-high-contrast: #111111 !important;
        --meta-color: #666666 !important;
        
        /* 2. Stop links from turning into Tabi's default dark-mode orange. 
              (Replace this hex code with your exact Toulouse primary color!) */
        --primary-color: #c94a29 !important; 
        
        /* 3. OPTIONAL: If you want the page background to stay the light pastel 
              gradient on mobile instead of turning into your deep night palette, 
              uncomment the lines below: */
              
        /*
        --bcg-grad-1: var(--bcg-grad-violette-soft) !important;
        --bcg-grad-2: var(--bcg-grad-violette-wash) !important;
        --bcg-grad-3: var(--bcg-grad-apricot-glow) !important;
        --bcg-grad-4: var(--bcg-grad-terracotta-sun) !important;
        --bcg-fall: #cbbce4 !important;
        */
    }
}