/* Master Sky Gradients & Circadian Variables */
:root {
  --screen-brightness: 100%;
}

[data-phase="night"] {
  --sky-top: #09101d;
  --sky-bottom: #141e30;
  --ambient-dim: 0.55;
  --card-bg: rgba(15, 23, 42, 0.85);
  --card-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #38bdf8;
}

[data-phase="dawn"] {
  --sky-top: #2c1b4d;
  --sky-bottom: #ff7e5f;
  --ambient-dim: 0.1;
  --card-bg: rgba(255, 248, 240, 0.9);
  --card-border: rgba(255, 126, 95, 0.3);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --accent-color: #ea580c;
}

[data-phase="morning"] {
  --sky-top: #3a7bd5;
  --sky-bottom: #3a6073;
  --ambient-dim: 0;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(15, 124, 138, 0.25);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-color: #0284c7;
}

[data-phase="afternoon"] {
  --sky-top: #1e88e5;
  --sky-bottom: #90caf9;
  --ambient-dim: 0;
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(30, 136, 229, 0.25);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-color: #0284c7;
}

[data-phase="dusk"] {
  --sky-top: #2c3e50;
  --sky-bottom: #fd746c;
  --ambient-dim: 0.2;
  --card-bg: rgba(30, 41, 59, 0.88);
  --card-border: rgba(253, 116, 108, 0.3);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --accent-color: #f97316;
}

/* Master Overarching Night Veil */
#night-dim-veil {
  position: fixed;
  inset: 0;
  background-color: #020408;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 99;
}

[data-phase="night"] #night-dim-veil {
  opacity: var(--ambient-dim);
}
